UNPKG

strapi-plugin-comments

Version:
2,229 lines 925 kB
"use strict";const b=require("react"),k=require("styled-components"),p=require("react/jsx-runtime"),ol=require("react-dom"),DT=t=>t&&t.__esModule?t:{default:t};function Nw(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const $=Nw(b),IT=DT(k),Ro=Nw(ol),C0=(t,e="")=>Object.keys(t).reduce((n,r)=>{const i=e.length?`${e}.`:"";return typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?Object.assign(n,C0(t[r],i+r)):n[i+r]=t[r],n},{}),kv=(t,e)=>{if(!e)throw new TypeError("pluginId can't be empty");return Object.keys(t).reduce((n,r)=>(n[`${e}.${r}`]=t[r],n),{})};function yt(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Sd(t,e){return t-e*Math.floor(t/e)}const jw=1721426;function pc(t,e,n,r){e=rg(t,e);let i=e-1,o=-2;return n<=2?o=0:iu(e)&&(o=-1),jw-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+o+r)}function iu(t){return t%4===0&&(t%100!==0||t%400===0)}function rg(t,e){return t==="BC"?1-e:e}function _T(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const LT={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]};class Cs{fromJulianDay(e){let n=e,r=n-jw,i=Math.floor(r/146097),o=Sd(r,146097),s=Math.floor(o/36524),a=Sd(o,36524),c=Math.floor(a/1461),h=Sd(a,1461),f=Math.floor(h/365),d=i*400+s*100+c*4+f+(s!==4&&f!==4?1:0),[m,v]=_T(d),x=n-pc(m,v,1,1),w=2;n<pc(m,v,3,1)?w=0:iu(v)&&(w=1);let C=Math.floor(((x+w)*12+373)/367),S=n-pc(m,v,C,1)+1;return new La(m,v,C,S)}toJulianDay(e){return pc(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return LT[iu(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return iu(e.year)?366:365}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"}}const BT={"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 Fw(t,e){return e=Gn(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Vw(t,e){let n=t.calendar.toJulianDay(t),r=Math.ceil(n+1-PT(e))%7;return r<0&&(r+=7),r}function NT(t){return Kr(Date.now(),t)}function ig(t){return qw(NT(t))}function Hw(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function jT(t,e){return Tv(t)-Tv(e)}function Tv(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Ad=null;function $s(){return Ad==null&&(Ad=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ad}function FT(t){return t.subtract({days:t.day-1})}function VT(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}function Pw(t,e){let n=Vw(t,e);return t.subtract({days:n})}const Mv=new Map;function HT(t){if(Intl.Locale){let n=Mv.get(t);return n||(n=new Intl.Locale(t).maximize().region,n&&Mv.set(t,n)),n}let e=t.split("-")[1];return e==="u"?void 0:e}function PT(t){let e=HT(t);return e&&BT[e]||0}function $0(t,e){return t&&e?t.compare(e)<=0?t:e:t||e}function S0(t,e){return t&&e?t.compare(e)>=0?t:e:t||e}function Ss(t){t=Gn(t,new Cs);let e=rg(t.era,t.year);return Ww(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function Ww(t,e,n,r,i,o,s){let a=new Date;return a.setUTCHours(r,i,o,s),a.setUTCFullYear(t,e-1,n),a.getTime()}function A0(t,e){if(e==="UTC")return 0;if(t>0&&e===$s())return new Date(t).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:o,minute:s,second:a}=zw(t,e);return Ww(n,r,i,o,s,a,0)-Math.floor(t/1e3)*1e3}const Ev=new Map;function zw(t,e){let n=Ev.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Ev.set(e,n));let r=n.formatToParts(new Date(t)),i={};for(let o of r)o.type!=="literal"&&(i[o.type]=o.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}}const Ov=864e5;function WT(t,e,n,r){return(n===r?[n]:[n,r]).filter(o=>zT(t,e,o))}function zT(t,e,n){let r=zw(n,e);return t.year===r.year&&t.month===r.month&&t.day===r.day&&t.hour===r.hour&&t.minute===r.minute&&t.second===r.second}function Ur(t,e,n="compatible"){let r=mo(t);if(e==="UTC")return Ss(r);if(e===$s()&&n==="compatible"){r=Gn(r,new Cs);let c=new Date,h=rg(r.era,r.year);return c.setFullYear(h,r.month-1,r.day),c.setHours(r.hour,r.minute,r.second,r.millisecond),c.getTime()}let i=Ss(r),o=A0(i-Ov,e),s=A0(i+Ov,e),a=WT(r,e,i-o,i-s);if(a.length===1)return a[0];if(a.length>1)switch(n){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function Uw(t,e,n="compatible"){return new Date(Ur(t,e,n))}function Kr(t,e){let n=A0(t,e),r=new Date(t+n),i=r.getUTCFullYear(),o=r.getUTCMonth()+1,s=r.getUTCDate(),a=r.getUTCHours(),c=r.getUTCMinutes(),h=r.getUTCSeconds(),f=r.getUTCMilliseconds();return new As(i,o,s,e,n,a,c,h,f)}function qw(t){return new La(t.calendar,t.era,t.year,t.month,t.day)}function mo(t,e){let n=0,r=0,i=0,o=0;if("timeZone"in t)({hour:n,minute:r,second:i,millisecond:o}=t);else if("hour"in t&&!e)return t;return e&&({hour:n,minute:r,second:i,millisecond:o}=e),new yu(t.calendar,t.era,t.year,t.month,t.day,n,r,i,o)}function Gn(t,e){if(t.calendar.identifier===e.identifier)return t;let n=e.fromJulianDay(t.calendar.toJulianDay(t)),r=t.copy();return r.calendar=e,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,po(r),r}function UT(t,e,n){if(t instanceof As)return t.timeZone===e?t:Kw(t,e);let r=Ur(t,e,n);return Kr(r,e)}function qT(t){let e=Ss(t)-t.offset;return new Date(e)}function Kw(t,e){let n=Ss(t)-t.offset;return Gn(Kr(n,e),t.calendar)}const ma=36e5;function lh(t,e){let n=t.copy(),r="hour"in n?XT(n,e):0;R0(n,e.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,t),n.month+=e.months||0,k0(n),Gw(n),n.day+=(e.weeks||0)*7,n.day+=e.days||0,n.day+=r,KT(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){var o,s;let c=(o=(s=n.calendar).isInverseEra)===null||o===void 0?void 0:o.call(s,n);n.year=i,n.month=c?1:n.calendar.getMonthsInYear(n),n.day=c?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 R0(t,e){var n,r;!((n=(r=t.calendar).isInverseEra)===null||n===void 0)&&n.call(r,t)&&(e=-e),t.year+=e}function k0(t){for(;t.month<1;)R0(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,R0(t,1)}function KT(t){for(;t.day<1;)t.month--,k0(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,k0(t)}function Gw(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function po(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),Gw(t)}function Yw(t){let e={};for(let n in t)typeof t[n]=="number"&&(e[n]=-t[n]);return e}function Xw(t,e){return lh(t,Yw(e))}function og(t,e){let n=t.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),po(n),n}function xu(t,e){let n=t.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),YT(n),n}function GT(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=vc(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=vc(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=vc(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=vc(t.hour,24),e}function YT(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function vc(t,e){let n=t%e;return n<0&&(n+=e),n}function XT(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,GT(t)}function sg(t,e,n,r){let i=t.copy();switch(e){case"era":{let a=t.calendar.getEras(),c=a.indexOf(t.era);if(c<0)throw new Error("Invalid era: "+t.era);c=Gr(c,n,0,a.length-1,r?.round),i.era=a[c],po(i);break}case"year":var o,s;!((o=(s=i.calendar).isInverseEra)===null||o===void 0)&&o.call(s,i)&&(n=-n),i.year=Gr(t.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Gr(t.month,n,1,t.calendar.getMonthsInYear(t),r?.round);break;case"day":i.day=Gr(t.day,n,1,t.calendar.getDaysInMonth(t),r?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),po(i),i}function Zw(t,e,n,r){let i=t.copy();switch(e){case"hour":{let o=t.hour,s=0,a=23;if(r?.hourCycle===12){let c=o>=12;s=c?12:0,a=c?23:11}i.hour=Gr(o,n,s,a,r?.round);break}case"minute":i.minute=Gr(t.minute,n,0,59,r?.round);break;case"second":i.second=Gr(t.second,n,0,59,r?.round);break;case"millisecond":i.millisecond=Gr(t.millisecond,n,0,999,r?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Gr(t,e,n,r,i=!1){if(i){t+=Math.sign(e),t<n&&(t=r);let o=Math.abs(e);e>0?t=Math.ceil(t/o)*o:t=Math.floor(t/o)*o,t>r&&(t=n)}else t+=e,t<n?t=r-(n-t-1):t>r&&(t=n+(t-r-1));return t}function Qw(t,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=lh(mo(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=Ur(i,t.timeZone)}else n=Ss(t)-t.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let r=Kr(n,t.timeZone);return Gn(r,t.calendar)}function ZT(t,e){return Qw(t,Yw(e))}function QT(t,e,n,r){switch(e){case"hour":{let i=0,o=23;if(r?.hourCycle===12){let x=t.hour>=12;i=x?12:0,o=x?23:11}let s=mo(t),a=Gn(xu(s,{hour:i}),new Cs),c=[Ur(a,t.timeZone,"earlier"),Ur(a,t.timeZone,"later")].filter(x=>Kr(x,t.timeZone).day===a.day)[0],h=Gn(xu(s,{hour:o}),new Cs),f=[Ur(h,t.timeZone,"earlier"),Ur(h,t.timeZone,"later")].filter(x=>Kr(x,t.timeZone).day===h.day).pop(),d=Ss(t)-t.offset,m=Math.floor(d/ma),v=d%ma;return d=Gr(m,n,Math.floor(c/ma),Math.floor(f/ma),r?.round)*ma+v,Gn(Kr(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return Zw(t,e,n,r);case"era":case"year":case"month":case"day":{let i=sg(mo(t),e,n,r),o=Ur(i,t.timeZone);return Gn(Kr(o,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function JT(t,e,n){let r=mo(t),i=xu(og(r,e),e);if(i.compare(r)===0)return t;let o=Ur(i,t.timeZone,n);return Gn(Kr(o,t.timeZone),t.calendar)}const eM=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Jw(t,e){let n=t.match(eM);if(!n)throw new Error("Invalid ISO 8601 date time string: "+t);let r=new As(Vr(n[1],1,9999),Vr(n[2],1,12),1,e,0,n[4]?Vr(n[4],0,23):0,n[5]?Vr(n[5],0,59):0,n[6]?Vr(n[6],0,59):0,n[7]?Vr(n[7],0,1/0)*1e3:0);r.day=Vr(n[3],0,r.calendar.getDaysInMonth(r));var i;return n[8]&&(r.offset=Vr(n[8],-23,23)*36e5+Vr((i=n[9])!==null&&i!==void 0?i:"0",0,59)*6e4),Kw(r,e)}function tM(t){return Jw(t,$s())}function Vr(t,e,n){let r=Number(t);if(r<e||r>n)throw new RangeError(`Value out of range: ${e} <= ${r} <= ${n}`);return r}function nM(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function ex(t){let e=Gn(t,new Cs);return`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function tx(t){return`${ex(t)}T${nM(t)}`}function rM(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let n=Math.floor(t/36e5),r=t%36e5/6e4;return`${e}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function iM(t){return`${tx(t)}${rM(t.offset)}[${t.timeZone}]`}function oM(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ag(t,e,n){oM(t,e),e.set(t,n)}function lg(t){let e=typeof t[0]=="object"?t.shift():new Cs,n;if(typeof t[0]=="string")n=t.shift();else{let s=e.getEras();n=s[s.length-1]}let r=t.shift(),i=t.shift(),o=t.shift();return[e,n,r,i,o]}var sM=new WeakMap;class La{copy(){return this.era?new La(this.calendar,this.era,this.year,this.month,this.day):new La(this.calendar,this.year,this.month,this.day)}add(e){return lh(this,e)}subtract(e){return Xw(this,e)}set(e){return og(this,e)}cycle(e,n,r){return sg(this,e,n,r)}toDate(e){return Uw(this,e)}toString(){return ex(this)}compare(e){return Hw(this,e)}constructor(...e){ag(this,sM,{writable:!0,value:void 0});let[n,r,i,o,s]=lg(e);this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,po(this)}}var aM=new WeakMap;class yu{copy(){return this.era?new yu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new yu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return lh(this,e)}subtract(e){return Xw(this,e)}set(e){return og(xu(this,e),e)}cycle(e,n,r){switch(e){case"era":case"year":case"month":case"day":return sg(this,e,n,r);default:return Zw(this,e,n,r)}}toDate(e,n){return Uw(this,e,n)}toString(){return tx(this)}compare(e){let n=Hw(this,e);return n===0?jT(this,mo(e)):n}constructor(...e){ag(this,aM,{writable:!0,value:void 0});let[n,r,i,o,s]=lg(e);this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,po(this)}}var lM=new WeakMap;class As{copy(){return this.era?new As(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new As(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Qw(this,e)}subtract(e){return ZT(this,e)}set(e,n){return JT(this,e,n)}cycle(e,n,r){return QT(this,e,n,r)}toDate(){return qT(this)}toString(){return iM(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-UT(e,this.timeZone).toDate().getTime()}constructor(...e){ag(this,lM,{writable:!0,value:void 0});let[n,r,i,o,s]=lg(e),a=e.shift(),c=e.shift();this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,this.timeZone=a,this.offset=c,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,po(this)}}let Rd=new Map;class cM{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(n)}`}formatRangeToParts(e,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),i=this.formatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return fM()&&(this.resolvedHourCycle||(this.resolvedHourCycle=dM(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}constructor(e,n={}){this.formatter=nx(e,n),this.options=n}}const uM={true:{ja:"h11"},false:{}};function nx(t,e={}){if(typeof e.hour12=="boolean"&&hM()){e={...e};let i=uM[String(e.hour12)][t.split("-")[0]],o=e.hour12?"h12":"h23";e.hourCycle=i??o,delete e.hour12}let n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Rd.has(n))return Rd.get(n);let r=new Intl.DateTimeFormat(t,e);return Rd.set(n,r),r}let kd=null;function hM(){return kd==null&&(kd=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),kd}let Td=null;function fM(){return Td==null&&(Td=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Td}function dM(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let n=nx(t,{...e,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(o=>o.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 new Error("Unexpected hour cycle result")}function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},U.apply(null,arguments)}function ie(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}function gM(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function ch(...t){return e=>t.forEach(n=>gM(n,e))}function ye(...t){return b.useCallback(ch(...t),t)}function cg(t,e){const n=b.createContext(e);function r(o){const{children:s,...a}=o,c=b.useMemo(()=>a,Object.values(a));return b.createElement(n.Provider,{value:c},s)}function i(o){const s=b.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,i]}function bt(t,e=[]){let n=[];function r(o,s){const a=b.createContext(s),c=n.length;n=[...n,s];function h(d){const{scope:m,children:v,...x}=d,w=m?.[t][c]||a,C=b.useMemo(()=>x,Object.values(x));return b.createElement(w.Provider,{value:C},v)}function f(d,m){const v=m?.[t][c]||a,x=b.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return h.displayName=o+"Provider",[h,f]}const i=()=>{const o=n.map(s=>b.createContext(s));return function(a){const c=a?.[t]||o;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[r,mM(i,...e)]}function mM(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:h})=>{const d=c(o)[`__scope${h}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}const Cr=b.forwardRef((t,e)=>{const{children:n,...r}=t,i=b.Children.toArray(n),o=i.find(pM);if(o){const s=o.props.children,a=i.map(c=>c===o?b.Children.count(s)>1?b.Children.only(null):b.isValidElement(s)?s.props.children:null:c);return b.createElement(T0,U({},r,{ref:e}),b.isValidElement(s)?b.cloneElement(s,void 0,a):null)}return b.createElement(T0,U({},r,{ref:e}),n)});Cr.displayName="Slot";const T0=b.forwardRef((t,e)=>{const{children:n,...r}=t;return b.isValidElement(n)?b.cloneElement(n,{...vM(r,n.props),ref:e?ch(e,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});T0.displayName="SlotClone";const ug=({children:t})=>b.createElement(b.Fragment,null,t);function pM(t){return b.isValidElement(t)&&t.type===ug}function vM(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}const bM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ge=bM.reduce((t,e)=>{const n=b.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Cr:e;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(a,U({},s,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function rx(t,e){t&&ol.flushSync(()=>t.dispatchEvent(e))}function wM(t,e=globalThis?.document){const n=yt(t);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const M0="dismissableLayer.update",xM="dismissableLayer.pointerDownOutside",yM="dismissableLayer.focusOutside";let Dv;const CM=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ko=b.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...h}=t,f=b.useContext(CM),[d,m]=b.useState(null),v=(n=d?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,x]=b.useState({}),w=ye(e,V=>m(V)),C=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),R=C.indexOf(S),T=d?C.indexOf(d):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,O=T>=R,L=$M(V=>{const F=V.target,H=[...f.branches].some(K=>K.contains(F));!O||H||(o?.(V),a?.(V),V.defaultPrevented||c?.())},v),I=SM(V=>{const F=V.target;[...f.branches].some(K=>K.contains(F))||(s?.(V),a?.(V),V.defaultPrevented||c?.())},v);return wM(V=>{T===f.layers.size-1&&(i?.(V),!V.defaultPrevented&&c&&(V.preventDefault(),c()))},v),b.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Dv=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Iv(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Dv)}},[d,v,r,f]),b.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Iv())},[d,f]),b.useEffect(()=>{const V=()=>x({});return document.addEventListener(M0,V),()=>document.removeEventListener(M0,V)},[]),b.createElement(ge.div,U({},h,{ref:w,style:{pointerEvents:E?O?"auto":"none":void 0,...t.style},onFocusCapture:ie(t.onFocusCapture,I.onFocusCapture),onBlurCapture:ie(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:ie(t.onPointerDownCapture,L.onPointerDownCapture)}))});function $M(t,e=globalThis?.document){const n=yt(t),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let h=function(){ix(xM,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=h,e.addEventListener("click",i.current,{once:!0})):h()}else e.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function SM(t,e=globalThis?.document){const n=yt(t),r=b.useRef(!1);return b.useEffect(()=>{const i=o=>{o.target&&!r.current&&ix(yM,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Iv(){const t=new CustomEvent(M0);document.dispatchEvent(t)}function ix(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?rx(i,o):i.dispatchEvent(o)}const AM=ko,ut=globalThis?.document?b.useLayoutEffect:()=>{},RM=$.useId||(()=>{});let kM=0;function _t(t){const[e,n]=$.useState(RM());return ut(()=>{n(r=>r??String(kM++))},[t]),e?`radix-${e}`:""}const TM=["top","right","bottom","left"],Mi=Math.min,An=Math.max,Cu=Math.round,bc=Math.floor,wr=t=>({x:t,y:t}),MM={left:"right",right:"left",bottom:"top",top:"bottom"},EM={start:"end",end:"start"};function E0(t,e,n){return An(t,Mi(e,n))}function Zr(t,e){return typeof t=="function"?t(e):t}function Qr(t){return t.split("-")[0]}function Fs(t){return t.split("-")[1]}function hg(t){return t==="x"?"y":"x"}function fg(t){return t==="y"?"height":"width"}const OM=new Set(["top","bottom"]);function pr(t){return OM.has(Qr(t))?"y":"x"}function dg(t){return hg(pr(t))}function DM(t,e,n){n===void 0&&(n=!1);const r=Fs(t),i=dg(t),o=fg(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=$u(s)),[s,$u(s)]}function IM(t){const e=$u(t);return[O0(t),e,O0(e)]}function O0(t){return t.replace(/start|end/g,e=>EM[e])}const _v=["left","right"],Lv=["right","left"],_M=["top","bottom"],LM=["bottom","top"];function BM(t,e,n){switch(t){case"top":case"bottom":return n?e?Lv:_v:e?_v:Lv;case"left":case"right":return e?_M:LM;default:return[]}}function NM(t,e,n,r){const i=Fs(t);let o=BM(Qr(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(O0)))),o}function $u(t){return t.replace(/left|right|bottom|top/g,e=>MM[e])}function jM(t){return{top:0,right:0,bottom:0,left:0,...t}}function ox(t){return typeof t!="number"?jM(t):{top:t,right:t,bottom:t,left:t}}function Su(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Bv(t,e,n){let{reference:r,floating:i}=t;const o=pr(e),s=dg(e),a=fg(s),c=Qr(e),h=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-i.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Fs(e)){case"start":v[s]-=m*(n&&h?-1:1);break;case"end":v[s]+=m*(n&&h?-1:1);break}return v}const FM=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let h=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:d}=Bv(h,r,c),m=r,v={},x=0;for(let w=0;w<a.length;w++){const{name:C,fn:S}=a[w],{x:R,y:T,data:E,reset:O}=await S({x:f,y:d,initialPlacement:r,placement:m,strategy:i,middlewareData:v,rects:h,platform:s,elements:{reference:t,floating:e}});f=R??f,d=T??d,v={...v,[C]:{...v[C],...E}},O&&x<=50&&(x++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(h=O.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:f,y:d}=Bv(h,m,c)),w=-1)}return{x:f,y:d,placement:m,strategy:i,middlewareData:v}};async function Ba(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=t,{boundary:h="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=Zr(e,t),x=ox(v),C=a[m?d==="floating"?"reference":"floating":d],S=Su(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:h,rootBoundary:f,strategy:c})),R=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},O=Su(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:R,offsetParent:T,strategy:c}):R);return{top:(S.top-O.top+x.top)/E.y,bottom:(O.bottom-S.bottom+x.bottom)/E.y,left:(S.left-O.left+x.left)/E.x,right:(O.right-S.right+x.right)/E.x}}const VM=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=e,{element:h,padding:f=0}=Zr(t,e)||{};if(h==null)return{};const d=ox(f),m={x:n,y:r},v=dg(i),x=fg(v),w=await s.getDimensions(h),C=v==="y",S=C?"top":"left",R=C?"bottom":"right",T=C?"clientHeight":"clientWidth",E=o.reference[x]+o.reference[v]-m[v]-o.floating[x],O=m[v]-o.reference[v],L=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h));let I=L?L[T]:0;(!I||!await(s.isElement==null?void 0:s.isElement(L)))&&(I=a.floating[T]||o.floating[x]);const V=E/2-O/2,F=I/2-w[x]/2-1,H=Mi(d[S],F),K=Mi(d[R],F),W=H,J=I-w[x]-K,G=I/2-w[x]/2+V,re=E0(W,G,J),se=!c.arrow&&Fs(i)!=null&&G!==re&&o.reference[x]/2-(G<W?H:K)-w[x]/2<0,te=se?G<W?G-W:G-J:0;return{[v]:m[v]+te,data:{[v]:re,centerOffset:G-re-te,...se&&{alignmentOffset:te}},reset:se}}}),HM=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:h}=e,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...C}=Zr(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const S=Qr(i),R=pr(a),T=Qr(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(h.floating)),O=m||(T||!w?[$u(a)]:IM(a)),L=x!=="none";!m&&L&&O.push(...NM(a,w,x,E));const I=[a,...O],V=await Ba(e,C),F=[];let H=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&F.push(V[S]),d){const G=DM(i,s,E);F.push(V[G[0]],V[G[1]])}if(H=[...H,{placement:i,overflows:F}],!F.every(G=>G<=0)){var K,W;const G=(((K=o.flip)==null?void 0:K.index)||0)+1,re=I[G];if(re&&(!(d==="alignment"?R!==pr(re):!1)||H.every(ne=>ne.overflows[0]>0&&pr(ne.placement)===R)))return{data:{index:G,overflows:H},reset:{placement:re}};let se=(W=H.filter(te=>te.overflows[0]<=0).sort((te,ne)=>te.overflows[1]-ne.overflows[1])[0])==null?void 0:W.placement;if(!se)switch(v){case"bestFit":{var J;const te=(J=H.filter(ne=>{if(L){const Y=pr(ne.placement);return Y===R||Y==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Y=>Y>0).reduce((Y,ce)=>Y+ce,0)]).sort((ne,Y)=>ne[1]-Y[1])[0])==null?void 0:J[0];te&&(se=te);break}case"initialPlacement":se=a;break}if(i!==se)return{reset:{placement:se}}}return{}}}};function Nv(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function jv(t){return TM.some(e=>t[e]>=0)}const PM=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Zr(t,e);switch(r){case"referenceHidden":{const o=await Ba(e,{...i,elementContext:"reference"}),s=Nv(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:jv(s)}}}case"escaped":{const o=await Ba(e,{...i,altBoundary:!0}),s=Nv(o,n.floating);return{data:{escapedOffsets:s,escaped:jv(s)}}}default:return{}}}}},sx=new Set(["left","top"]);async function WM(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Qr(n),a=Fs(n),c=pr(n)==="y",h=sx.has(s)?-1:1,f=o&&c?-1:1,d=Zr(e,t);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof x=="number"&&(v=a==="end"?x*-1:x),c?{x:v*f,y:m*h}:{x:m*h,y:v*f}}const zM=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,c=await WM(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},UM=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:C=>{let{x:S,y:R}=C;return{x:S,y:R}}},...c}=Zr(t,e),h={x:n,y:r},f=await Ba(e,c),d=pr(Qr(i)),m=hg(d);let v=h[m],x=h[d];if(o){const C=m==="y"?"top":"left",S=m==="y"?"bottom":"right",R=v+f[C],T=v-f[S];v=E0(R,v,T)}if(s){const C=d==="y"?"top":"left",S=d==="y"?"bottom":"right",R=x+f[C],T=x-f[S];x=E0(R,x,T)}const w=a.fn({...e,[m]:v,[d]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[m]:o,[d]:s}}}}}},qM=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:c=!0,crossAxis:h=!0}=Zr(t,e),f={x:n,y:r},d=pr(i),m=hg(d);let v=f[m],x=f[d];const w=Zr(a,e),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const T=m==="y"?"height":"width",E=o.reference[m]-o.floating[T]+C.mainAxis,O=o.reference[m]+o.reference[T]-C.mainAxis;v<E?v=E:v>O&&(v=O)}if(h){var S,R;const T=m==="y"?"width":"height",E=sx.has(Qr(i)),O=o.reference[d]-o.floating[T]+(E&&((S=s.offset)==null?void 0:S[d])||0)+(E?0:C.crossAxis),L=o.reference[d]+o.reference[T]+(E?0:((R=s.offset)==null?void 0:R[d])||0)-(E?C.crossAxis:0);x<O?x=O:x>L&&(x=L)}return{[m]:v,[d]:x}}}},KM=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:c=()=>{},...h}=Zr(t,e),f=await Ba(e,h),d=Qr(i),m=Fs(i),v=pr(i)==="y",{width:x,height:w}=o.floating;let C,S;d==="top"||d==="bottom"?(C=d,S=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=d,C=m==="end"?"top":"bottom");const R=w-f.top-f.bottom,T=x-f.left-f.right,E=Mi(w-f[C],R),O=Mi(x-f[S],T),L=!e.middlewareData.shift;let I=E,V=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(V=T),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(I=R),L&&!m){const H=An(f.left,0),K=An(f.right,0),W=An(f.top,0),J=An(f.bottom,0);v?V=x-2*(H!==0||K!==0?H+K:An(f.left,f.right)):I=w-2*(W!==0||J!==0?W+J:An(f.top,f.bottom))}await c({...e,availableWidth:V,availableHeight:I});const F=await s.getDimensions(a.floating);return x!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function uh(){return typeof window<"u"}function Vs(t){return ax(t)?(t.nodeName||"").toLowerCase():"#document"}function kn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ar(t){var e;return(e=(ax(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ax(t){return uh()?t instanceof Node||t instanceof kn(t).Node:!1}function Qn(t){return uh()?t instanceof Element||t instanceof kn(t).Element:!1}function $r(t){return uh()?t instanceof HTMLElement||t instanceof kn(t).HTMLElement:!1}function Fv(t){return!uh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kn(t).ShadowRoot}const GM=new Set(["inline","contents"]);function sl(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Jn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!GM.has(i)}const YM=new Set(["table","td","th"]);function XM(t){return YM.has(Vs(t))}const ZM=[":popover-open",":modal"];function hh(t){return ZM.some(e=>{try{return t.matches(e)}catch{return!1}})}const QM=["transform","translate","scale","rotate","perspective"],JM=["transform","translate","scale","rotate","perspective","filter"],eE=["paint","layout","strict","content"];function gg(t){const e=mg(),n=Qn(t)?Jn(t):t;return QM.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||JM.some(r=>(n.willChange||"").includes(r))||eE.some(r=>(n.contain||"").includes(r))}function tE(t){let e=Ei(t);for(;$r(e)&&!Rs(e);){if(gg(e))return e;if(hh(e))return null;e=Ei(e)}return null}function mg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nE=new Set(["html","body","#document"]);function Rs(t){return nE.has(Vs(t))}function Jn(t){return kn(t).getComputedStyle(t)}function fh(t){return Qn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ei(t){if(Vs(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Fv(t)&&t.host||Ar(t);return Fv(e)?e.host:e}function lx(t){const e=Ei(t);return Rs(e)?t.ownerDocument?t.ownerDocument.body:t.body:$r(e)&&sl(e)?e:lx(e)}function Na(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=lx(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=kn(i);if(o){const a=D0(s);return e.concat(s,s.visualViewport||[],sl(i)?i:[],a&&n?Na(a):[])}return e.concat(i,Na(i,[],n))}function D0(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function cx(t){const e=Jn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=$r(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Cu(n)!==o||Cu(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function pg(t){return Qn(t)?t:t.contextElement}function gs(t){const e=pg(t);if(!$r(e))return wr(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=cx(e);let s=(o?Cu(n.width):n.width)/r,a=(o?Cu(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const rE=wr(0);function ux(t){const e=kn(t);return!mg()||!e.visualViewport?rE:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function iE(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==kn(t)?!1:e}function vo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=pg(t);let s=wr(1);e&&(r?Qn(r)&&(s=gs(r)):s=gs(t));const a=iE(o,n,r)?ux(o):wr(0);let c=(i.left+a.x)/s.x,h=(i.top+a.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(o){const m=kn(o),v=r&&Qn(r)?kn(r):r;let x=m,w=D0(x);for(;w&&r&&v!==x;){const C=gs(w),S=w.getBoundingClientRect(),R=Jn(w),T=S.left+(w.clientLeft+parseFloat(R.paddingLeft))*C.x,E=S.top+(w.clientTop+parseFloat(R.paddingTop))*C.y;c*=C.x,h*=C.y,f*=C.x,d*=C.y,c+=T,h+=E,x=kn(w),w=D0(x)}}return Su({width:f,height:d,x:c,y:h})}function vg(t,e){const n=fh(t).scrollLeft;return e?e.left+n:vo(Ar(t)).left+n}function hx(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:vg(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function oE(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Ar(r),a=e?hh(e.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},h=wr(1);const f=wr(0),d=$r(r);if((d||!d&&!o)&&((Vs(r)!=="body"||sl(s))&&(c=fh(r)),$r(r))){const v=vo(r);h=gs(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=s&&!d&&!o?hx(s,c,!0):wr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-c.scrollLeft*h.x+f.x+m.x,y:n.y*h.y-c.scrollTop*h.y+f.y+m.y}}function sE(t){return Array.from(t.getClientRects())}function aE(t){const e=Ar(t),n=fh(t),r=t.ownerDocument.body,i=An(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=An(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vg(t);const a=-n.scrollTop;return Jn(r).direction==="rtl"&&(s+=An(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function lE(t,e){const n=kn(t),r=Ar(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const h=mg();(!h||h&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}const cE=new Set(["absolute","fixed"]);function uE(t,e){const n=vo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=$r(t)?gs(t):wr(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,c=i*o.x,h=r*o.y;return{width:s,height:a,x:c,y:h}}function Vv(t,e,n){let r;if(e==="viewport")r=lE(t,n);else if(e==="document")r=aE(Ar(t));else if(Qn(e))r=uE(e,n);else{const i=ux(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Su(r)}function fx(t,e){const n=Ei(t);return n===e||!Qn(n)||Rs(n)?!1:Jn(n).position==="fixed"||fx(n,e)}function hE(t,e){const n=e.get(t);if(n)return n;let r=Na(t,[],!1).filter(a=>Qn(a)&&Vs(a)!=="body"),i=null;const o=Jn(t).position==="fixed";let s=o?Ei(t):t;for(;Qn(s)&&!Rs(s);){const a=Jn(s),c=gg(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&cE.has(i.position)||sl(s)&&!c&&fx(t,s))?r=r.filter(f=>f!==s):i=a,s=Ei(s)}return e.set(t,r),r}function fE(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?hh(e)?[]:hE(e,this._c):[].concat(n),r],a=s[0],c=s.reduce((h,f)=>{const d=Vv(e,f,i);return h.top=An(d.top,h.top),h.right=Mi(d.right,h.right),h.bottom=Mi(d.bottom,h.bottom),h.left=An(d.left,h.left),h},Vv(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dE(t){const{width:e,height:n}=cx(t);return{width:e,height:n}}function gE(t,e,n){const r=$r(e),i=Ar(e),o=n==="fixed",s=vo(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const c=wr(0);function h(){c.x=vg(i)}if(r||!r&&!o)if((Vs(e)!=="body"||sl(i))&&(a=fh(e)),r){const v=vo(e,!0,o,e);c.x=v.x+e.clientLeft,c.y=v.y+e.clientTop}else i&&h();o&&!r&&i&&h();const f=i&&!r&&!o?hx(i,a):wr(0),d=s.left+a.scrollLeft-c.x-f.x,m=s.top+a.scrollTop-c.y-f.y;return{x:d,y:m,width:s.width,height:s.height}}function Md(t){return Jn(t).position==="static"}function Hv(t,e){if(!$r(t)||Jn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ar(t)===n&&(n=n.ownerDocument.body),n}function dx(t,e){const n=kn(t);if(hh(t))return n;if(!$r(t)){let i=Ei(t);for(;i&&!Rs(i);){if(Qn(i)&&!Md(i))return i;i=Ei(i)}return n}let r=Hv(t,e);for(;r&&XM(r)&&Md(r);)r=Hv(r,e);return r&&Rs(r)&&Md(r)&&!gg(r)?n:r||tE(t)||n}const mE=async function(t){const e=this.getOffsetParent||dx,n=this.getDimensions,r=await n(t.floating);return{reference:gE(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pE(t){return Jn(t).direction==="rtl"}const vE={convertOffsetParentRelativeRectToViewportRelativeRect:oE,getDocumentElement:Ar,getClippingRect:fE,getOffsetParent:dx,getElementRects:mE,getClientRects:sE,getDimensions:dE,getScale:gs,isElement:Qn,isRTL:pE};function gx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function bE(t,e){let n=null,r;const i=Ar(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const h=t.getBoundingClientRect(),{left:f,top:d,width:m,height:v}=h;if(a||e(),!m||!v)return;const x=bc(d),w=bc(i.clientWidth-(f+m)),C=bc(i.clientHeight-(d+v)),S=bc(f),T={rootMargin:-x+"px "+-w+"px "+-C+"px "+-S+"px",threshold:An(0,Mi(1,c))||1};let E=!0;function O(L){const I=L[0].intersectionRatio;if(I!==c){if(!E)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!gx(h,t.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(O,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(t)}return s(!0),o}function mx(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,h=pg(t),f=i||o?[...h?Na(h):[],...Na(e)]:[];f.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const d=h&&a?bE(h,n):null;let m=-1,v=null;s&&(v=new ResizeObserver(S=>{let[R]=S;R&&R.target===h&&v&&(v.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var T;(T=v)==null||T.observe(e)})),n()}),h&&!c&&v.observe(h),v.observe(e));let x,w=c?vo(t):null;c&&C();function C(){const S=vo(t);w&&!gx(w,S)&&n(),w=S,x=requestAnimationFrame(C)}return n(),()=>{var S;f.forEach(R=>{i&&R.removeEventListener("scroll",n),o&&R.removeEventListener("resize",n)}),d?.(),(S=v)==null||S.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const px=zM,vx=UM,bx=HM,wE=KM,xE=PM,Pv=VM,yE=qM,wx=(t,e,n)=>{const r=new Map,i={platform:vE,...n},o={...i.platform,_c:r};return FM(t,e,{...i,platform:o})};var CE=typeof document<"u",$E=function(){},ou=CE?b.useLayoutEffect:$E;function Au(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Au(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Au(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function xx(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Wv(t,e){const n=xx(t);return Math.round(e*n)/n}function Ed(t){const e=$.useRef(t);return ou(()=>{e.current=t}),e}function SE(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:h}=t,[f,d]=$.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=$.useState(r);Au(m,r)||v(r);const[x,w]=$.useState(null),[C,S]=$.useState(null),R=$.useCallback(ne=>{ne!==L.current&&(L.current=ne,w(ne))},[]),T=$.useCallback(ne=>{ne!==I.current&&(I.current=ne,S(ne))},[]),E=o||x,O=s||C,L=$.useRef(null),I=$.useRef(null),V=$.useRef(f),F=c!=null,H=Ed(c),K=Ed(i),W=Ed(h),J=$.useCallback(()=>{if(!L.current||!I.current)return;const ne={placement:e,strategy:n,middleware:m};K.current&&(ne.platform=K.current),wx(L.current,I.current,ne).then(Y=>{const ce={...Y,isPositioned:W.current!==!1};G.current&&!Au(V.current,ce)&&(V.current=ce,Ro.flushSync(()=>{d(ce)}))})},[m,e,n,K,W]);ou(()=>{h===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,d(ne=>({...ne,isPositioned:!1})))},[h]);const G=$.useRef(!1);ou(()=>(G.current=!0,()=>{G.current=!1}),[]),ou(()=>{if(E&&(L.current=E),O&&(I.current=O),E&&O){if(H.current)return H.current(E,O,J);J()}},[E,O,J,H,F]);const re=$.useMemo(()=>({reference:L,floating:I,setReference:R,setFloating:T}),[R,T]),se=$.useMemo(()=>({reference:E,floating:O}),[E,O]),te=$.useMemo(()=>{const ne={position:n,left:0,top:0};if(!se.floating)return ne;const Y=Wv(se.floating,f.x),ce=Wv(se.floating,f.y);return a?{...ne,transform:"translate("+Y+"px, "+ce+"px)",...xx(se.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:ce}},[n,a,se.floating,f.x,f.y]);return $.useMemo(()=>({...f,update:J,refs:re,elements:se,floatingStyles:te}),[f,J,re,se,te])}const AE=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Pv({element:r.current,padding:i}).fn(n):{}:r?Pv({element:r,padding:i}).fn(n):{}}}},RE=(t,e)=>({...px(t),options:[t,e]}),kE=(t,e)=>({...vx(t),options:[t,e]}),TE=(t,e)=>({...yE(t),options:[t,e]}),ME=(t,e)=>({...bx(t),options:[t,e]}),EE=(t,e)=>({...wE(t),options:[t,e]}),OE=(t,e)=>({...xE(t),options:[t,e]}),DE=(t,e)=>({...AE(t),options:[t,e]}),IE=b.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...o}=t;return b.createElement(ge.svg,U({},o,{ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?n:b.createElement("polygon",{points:"0,0 30,0 15,10"}))}),_E=IE;function dh(t){const[e,n]=b.useState(void 0);return ut(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,h=Array.isArray(c)?c[0]:c;s=h.inlineSize,a=h.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}const yx="Popper",[Cx,Ni]=bt(yx),[LE,$x]=Cx(yx),BE=t=>{const{__scopePopper:e,children:n}=t,[r,i]=b.useState(null);return b.createElement(LE,{scope:e,anchor:r,onAnchorChange:i},n)},NE="PopperAnchor",jE=b.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,o=$x(NE,n),s=b.useRef(null),a=ye(e,s);return b.useEffect(()=>{o.onAnchorChange(r?.current||s.current)}),r?null:b.createElement(ge.div,U({},i,{ref:a}))}),Sx="PopperContent",[FE,VE]=Cx(Sx),HE=b.forwardRef((t,e)=>{var n,r,i,o,s,a,c,h;const{__scopePopper:f,side:d="bottom",sideOffset:m=0,align:v="center",alignOffset:x=0,arrowPadding:w=0,avoidCollisions:C=!0,collisionBoundary:S=[],collisionPadding:R=0,sticky:T="partial",hideWhenDetached:E=!1,updatePositionStrategy:O="optimized",onPlaced:L,...I}=t,V=$x(Sx,f),[F,H]=b.useState(null),K=ye(e,Pe=>H(Pe)),[W,J]=b.useState(null),G=dh(W),re=(n=G?.width)!==null&&n!==void 0?n:0,se=(r=G?.height)!==null&&r!==void 0?r:0,te=d+(v!=="center"?"-"+v:""),ne=typeof R=="number"?R:{top:0,right:0,bottom:0,left:0,...R},Y=Array.isArray(S)?S:[S],ce=Y.length>0,me={padding:ne,boundary:Y.filter(UE),altBoundary:ce},{refs:Ie,floatingStyles:we,placement:qe,isPositioned:Te,middlewareData:Ve}=SE({strategy:"fixed",placement:te,whileElementsMounted:(...Pe)=>mx(...Pe,{animationFrame:O==="always"}),elements:{reference:V.anchor},middleware:[RE({mainAxis:m+se,alignmentAxis:x}),C&&kE({mainAxis:!0,crossAxis:!1,limiter:T==="partial"?TE():void 0,...me}),C&&ME({...me}),EE({...me,apply:({elements:Pe,rects:Yt,availableWidth:ft,availableHeight:_o})=>{const{width:Qs,height:or}=Yt.reference,Mt=Pe.floating.style;Mt.setProperty("--radix-popper-available-width",`${ft}px`),Mt.setProperty("--radix-popper-available-height",`${_o}px`),Mt.setProperty("--radix-popper-anchor-width",`${Qs}px`),Mt.setProperty("--radix-popper-anchor-height",`${or}px`)}}),W&&DE({element:W,padding:w}),qE({arrowWidth:re,arrowHeight:se}),E&&OE({strategy:"referenceHidden",...me})]}),[pe,De]=Ax(qe),Re=yt(L);ut(()=>{Te&&Re?.()},[Te,Re]);const Le=(i=Ve.arrow)===null||i===void 0?void 0:i.x,Ae=(o=Ve.arrow)===null||o===void 0?void 0:o.y,He=((s=Ve.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[wt,Ze]=b.useState();return ut(()=>{F&&Ze(window.getComputedStyle(F).zIndex)},[F]),b.createElement("div",{ref:Ie.setFloating,"data-radix-popper-content-wrapper":"",style:{...we,transform:Te?we.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:wt,"--radix-popper-transform-origin":[(a=Ve.transformOrigin)===null||a===void 0?void 0:a.x,(c=Ve.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},b.createElement(FE,{scope:f,placedSide:pe,onArrowChange:J,arrowX:Le,arrowY:Ae,shouldHideArrow:He},b.createElement(ge.div,U({"data-side":pe,"data-align":De},I,{ref:K,style:{...I.style,animation:Te?void 0:"none",opacity:(h=Ve.hide)!==null&&h!==void 0&&h.referenceHidden?0:void 0}}))))}),PE="PopperArrow",WE={top:"bottom",right:"left",bottom:"top",left:"right"},zE=b.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,o=VE(PE,r),s=WE[o.placedSide];return b.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},b.createElement(_E,U({},i,{ref:n,style:{...i.style,display:"block"}})))});function UE(t){return t!==null}const qE=t=>({name:"transformOrigin",options:t,fn(e){var n,r,i,o,s;const{placement:a,rects:c,middlewareData:h}=e,d=((n=h.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=d?0:t.arrowWidth,v=d?0:t.arrowHeight,[x,w]=Ax(a),C={start:"0%",center:"50%",end:"100%"}[w],S=((r=(i=h.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,R=((o=(s=h.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+v/2;let T="",E="";return x==="bottom"?(T=d?C:`${S}px`,E=`${-v}px`):x==="top"?(T=d?C:`${S}px`,E=`${c.floating.height+v}px`):x==="right"?(T=`${-v}px`,E=d?C:`${R}px`):x==="left"&&(T=`${c.floating.width+v}px`,E=d?C:`${R}px`),{data:{x:T,y:E}}}});function Ax(t){const[e,n="center"]=t.split("-");return[e,n]}const al=BE,Hs=jE,ll=HE,KE=zE,Ps=b.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=t;return r?Ro.default.createPortal(b.createElement(ge.div,U({},i,{ref:e})),r):null});function GE(t,e){return b.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const Tt=t=>{const{present:e,children:n}=t,r=YE(e),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),o=ye(r.ref,i.ref);return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:o}):null};Tt.displayName="Presence";function YE(t){const[e,n]=b.useState(),r=b.useRef({}),i=b.useRef(t),o=b.useRef("none"),s=t?"mounted":"unmounted",[a,c]=GE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const h=wc(r.current);o.current=a==="mounted"?h:"none"},[a]),ut(()=>{const h=r.current,f=i.current;if(f!==t){const m=o.current,v=wc(h);t?c("MOUNT"):v==="none"||h?.display==="none"?c("UNMOUNT"):c(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),ut(()=>{if(e){const h=d=>{const v=wc(r.current).includes(d.animationName);d.target===e&&v&&ol.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===e&&(o.current=wc(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(h=>{h&&(r.current=getComputedStyle(h)),n(h)},[])}}function wc(t){return t?.animationName||"none"}function It({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=XE({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=yt(n),c=b.useCallback(h=>{if(o){const d=typeof h=="function"?h(t):h;d!==t&&a(d)}else i(h)},[o,t,i,a]);return[s,c]}function XE({defaultProp:t,onChange:e}){const n=b.useState(t),[r]=n,i=b.useRef(r),o=yt(e);return b.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Rx=b.forwardRef((t,e)=>b.createElement(ge.span,U({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),ZE=Rx,[gh,Zte]=bt("Tooltip",[Ni]),bg=Ni(),QE="TooltipProvider",JE=700,I0="tooltip.open",[eO,wg]=gh(QE),tO=t=>{const{__scopeTooltip:e,delayDuration:n=JE,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=t,[s,a]=b.useState(!0),c=b.useRef(!1),h=b.useRef(0);return b.useEffect(()=>{const f=h.current;return()=>window.clearTimeout(f)},[]),b.createElement(eO,{scope:e,isOpenDelayed:s,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(h.current),a(!1)},[]),onClose:b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:b.useCallback(f=>{c.current=f},[]),disableHoverableContent:i},o)},xg="Tooltip",[nO,cl]=gh(xg),rO=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=t,c=wg(xg,t.__scopeTooltip),h=bg(e),[f,d]=b.useState(null),m=_t(),v=b.useRef(0),x=s??c.disableHoverableContent,w=a??c.delayDuration,C=b.useRef(!1),[S=!1,R]=It({prop:r,defaultProp:i,onChange:I=>{I?(c.onOpen(),document.dispatchEvent(new CustomEvent(I0))):c.onClose(),o?.(I)}}),T=b.useMemo(()=>S?C.current?"delayed-open":"instant-open":"closed",[S]),E=b.useCallback(()=>{window.clearTimeout(v.current),C.current=!1,R(!0)},[R]),O=b.useCallback(()=>{window.clearTimeout(v.current),R(!1)},[R]),L=b.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,R(!0)},w)},[w,R]);return b.useEffect(()=>()=>window.clearTimeout(v.current),[]),b.createElement(al,h,b.createElement(nO,{scope:e,contentId:m,open:S,stateAttribute:T,trigger:f,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayed?L():E()},[c.isOpenDelayed,L,E]),onTriggerLeave:b.useCallback(()=>{x?O():window.clearTimeout(v.current)},[O,x]),onOpen:E,onClose:O,disableHoverableContent:x},n))},zv="TooltipTrigger",iO=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=cl(zv,n),o=wg(zv,n),s=bg(n),a=b.useRef(null),c=ye(e,a,i.onTriggerChange),h=b.useRef(!1),f=b.useRef(!1),d=b.useCallback(()=>h.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.createElement(Hs,U({asChild:!0},s),b.createElement(ge.button,U({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:ie(t.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:ie(t.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:ie(t.onPointerDown,()=>{h.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ie(t.onFocus,()=>{h.current||i.onOpen()}),onBlur:ie(t.onBlur,i.onClose),onClick:ie(t.onClick,i.onClose)})))}),kx="TooltipPortal",[oO,sO]=gh(kx,{forceMount:void 0}),aO=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:i}=t,o=cl(kx,e);return b.createElement(oO,{scope:e,forceMount:n},b.createElement(Tt,{present:n||o.open},b.createElement(Ps,{asChild:!0,container:i},r)))},ja="TooltipContent",lO=b.forwardRef((t,e)=>{const n=sO(ja,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=t,s=cl(ja,t.__scopeTooltip);return b.createElement(Tt,{present:r||s.open},s.disableHoverableContent?b.createElement(Tx,U({side:i},o,{ref:e})):b.createElement(cO,U({side:i},o,{ref:e})))}),cO=b.forwardRef((t,e)=>{const n=cl(ja,t.__scopeTooltip),r=wg(ja,t.__scopeTooltip),i=b.useRef(null),o=ye(e,i),[s,a]=b.useState(null),{trigger:c,onClose:h}=n,f=i.current,{onPointerInTransitChange:d}=r,m=b.useCallback(()=>{a(null),d(!1)},[d]),v=b.useCallback((x,w)=>{const C=x.currentTarget,S={x:x.clientX,y:x.clientY},R=hO(S,C.getBoundingClientRect()),T=fO(S,R),E=dO(w.getBoundingClientRect()),O=mO([...T,...E]);a(O),d(!0)},[d]);return b.useEffect(()=>()=>m(),[m]),b.useEffect(()=>{if(c&&f){const x=C=>v(C,f),w=C=>v(C,c);return c.addEventListener("pointerleave",x),f.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",w)}}},[c,f,v,m]),b.useEffect(()=>{if(s){const x=w=>{const C=w.target,S={x:w.clientX,y:w.clientY},R=c?.contains(C)||f?.contains(C),T=!gO(S,s);R?m():T&&(m(),h())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,f,s,h,m]),b.createElement(Tx,U({},t,{ref:o}))}),[uO,Qte]=gh(xg,{isInside:!1}),Tx=b.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=t,c=cl(ja,n),h=bg(n),{onClose:f}=c;return b.useEffect(()=>(document.addEventListener(I0,f),()=>document.removeEventListener(I0,f)),[f]),b.useEffect(()=>{if(c.trigger){const d=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),b.createElement(ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f},b.createElement(ll,U({"data-state":c.stateAttribute},h,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),b.createElement(ug,null,r),b.createElement(uO,{scope:n,isInside:!0},b.createElement(ZE,{id:c.contentId,role:"tooltip"},i||r))))});function hO(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),o=Math.abs(e.left-t.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function fO(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function dO(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function gO(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o].x,c=e[o].y,h=e[s].x,f=e[s].y;c>r!=f>r&&n<(h-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function mO(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),pO(e)}function pO(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const o=e[e.length-1],s=e[e.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}const vO=tO,Mx=rO,Ex=iO,Ox=aO,Dx=lO;let Od=0;function Ws(){b.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:Uv()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:Uv()),Od++,()=>{Od===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Od--}},[])}function Uv(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const Dd="focusScope.autoFocusOnMount",Id="focusScope.autoFocusOnUnmount",qv={bubbles:!1,cancelable:!0},zs=b.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=t,[a,c]=b.useState(null),h=yt(i),f=yt(o),d=b.useRef(null),m=ye(e,w=>c(w)),v=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let w=function(T){if(v.paused||!a)return;const E=T.target;a.contains(E)?d.current=E:xi(d.current,{select:!0})},C=function(T){if(v.paused||!a)return;const E=T.relatedTarget;E!==null&&(a.contains(E)||xi(d.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&xi(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",C);const R=new MutationObserver(S);return a&&R.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",C),R.disconnect()}}},[r,a,v.paused]),b.useEffect(()=>{if(a){Gv.add(v);const w=document.activeElement;if(!a.contains(w)){const S=new CustomEvent(Dd,qv);a.addEventListener(Dd,h),a.dispatchEvent(S),S.defaultPrevented||(bO($O(Ix(a)),{select:!0}),document.activeElement===w&&xi(a))}return()=>{a.removeEventListener(Dd,h),setTimeout(()=>{const S=new CustomEvent(Id,qv);a.addEventListener(Id,f),a.dispatchEvent(S),S.defaultPrevented||xi(w??document.body,{select:!0}),a.removeEventListener(Id,f),Gv.remove(v)},0)}}},[a,h,f,v]);const x=b.useCallback(w=>{if(!n&&!r||v.paused)return;const C=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(C&&S){const R=w.currentTarget,[T,E]=wO(R);T&&E?!w.shiftKey&&S===E?(w.preventDefault(),n&&xi(T,{select:!0})):w.shiftKey&&S===T&&(w.preventDefault(),n&&xi(E,{select:!0})):S===R&&w.preventDefault()}},[n,r,v.paused]);return b.createElement(ge.div,U({tabIndex:-1},s,{ref:m,onKeyDown:x}))});function bO(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(xi(r,{select:e}),document.activeElement!==n)return}function wO(t){const e=Ix(t),n=Kv(e,t),r=Kv(e.reverse(),t);return[n,r]}function Ix(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Kv(t,e){for(const n of t)if(!xO(n,{upTo:e}))return n}function xO(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function yO(t){return t instanceof HTMLInputElement&&"select"in t}function xi(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&yO(t)&&e&&t.select()}}const Gv=CO();function CO(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=Yv(t,e),t.unshift(e)},remove(e){var n;t=Yv(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function Yv(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function $O(t){return t.filter(e=>e.tagName!=="A")}var SO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Xo=new WeakMap,xc=new WeakMap,yc={},_d=0,_x=function(t){return t&&(t.host||_x(t.parentNode))},AO=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=_x(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},RO=function(t,e,n,r){var i=AO(e,Array.isArray(t)?t:[t]);yc[n]||(yc[n]=new WeakMap);var o=yc[n],s=[],a=new Set,c=new Set(i),h=function(d){!d||a.has(d)||(a.add(d),h(d.parentNode))};i.forEach(h);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))f(m);else try{var v=m.getAttribute(r),x=v!==null&&v!=="false",w=(Xo.get(m)||0)+1,C=(o.get(m)||0)+1;Xo.set(m,w),o.set(m,C),s.push(m),w===1&&x&&xc.set(m,!0),C===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return f(e),a.clear(),_d++,function(){s.forEach(function(d){var m=Xo.get(d)-1,v=o.get(d)-1;Xo.set(d,m),o.set(d,v),m||(xc.has(d)||d.removeAttribute(r),xc.delete(d)),v||d.removeAttribute(n)}),_d--,_d||(Xo=new WeakMap,Xo=new WeakMap,xc=new WeakMap,yc={})}},Lx=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=SO(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),RO(r,i,n,"aria-hidden")):function(){return null}};exports.__assign=function(){return exports.__assign=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},exports.__assign.apply(this,arguments)};function Us(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function mh(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var lo="right-scroll-bar-position",co="width-before-scroll-bar",kO="with-scroll-bars-hidden",TO="--removed-body-scroll-bar-size";function Ld(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function MO(t,e){var n=b.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var EO=typeof window<"u"?$.useLayoutEffect:$.useEffect,Xv=new WeakMap;function ph(t,e){var n=MO(null,function(r){return t.forEach(function(i){return Ld(i,r)})});return EO(function(){var r=Xv.get(n);if(r){var i=new Set(r),o=new Set(t),s=n.current;i.forEach(function(a){o.has(a)||Ld(a,null)}),o.forEach(function(a){i.has(a)||Ld(a,s)})}Xv.set(n,t)},[t]),n}function OO(t){return t}function DO(t,e){e===void 0&&(e=OO);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var s=e(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var f=s;s=[],f.forEach(o)},h=function(){return Promise.resolve().then(c)};h(),n={push:function(f){s.push(f),h()},filter:function(f){return s=s.filter(f),n}}}};return i}function vh(t){t===void 0&&(t={});var e=DO(null);return e.options=exports.__assign({async:!0,ssr:!1},t),e}var Bx=function(t){var e=t.sideCar,n=Us(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return $.createElement(r,exports.__assign({},n))};Bx.isSideCarExport=!0;function bh(t,e){return t.useMedium(e),Bx}var Nx=vh(),Bd=function(){},wh=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:Bd,onWheelCapture:Bd,onTouchMoveCapture:Bd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,m=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=t.gapMode,T=Us(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,O=ph([n,e]),L=exports.__assign(exports.__assign({},T),i);return $.createElement($.Fragment,null,f&&$.createElement(E,{sideCar:Nx,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:R}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},L),{ref:O})):$.createElement(S,exports.__assign({},L,{className:c,ref:O}),a))});wh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wh.classNames={fullWidth:co,zeroRight:lo};var IO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _O(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=IO();return e&&t.setAttribute("nonce",e),t}function LO(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function BO(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var NO=function(){var t=0,e=null;return{add:function(n){t==0&&(e=_O())&&(LO(e,n),BO(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},jO=function(){var t=NO();return function(e,n){$.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},ul=function(){var t=jO(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},FO={left:0,top:0,right:0,gap:0},Nd=function(t){return parseInt(t||"",10)||0},VO=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Nd(n),Nd(r),Nd(i)]},HO=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return FO;var e=VO(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},PO=ul(),ms="data-scroll-locked",WO=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(kO,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body[`).concat(ms,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(lo,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(co,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(lo," .").concat(lo,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(co," .").concat(co,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(ms,`] {
    `).concat(TO,": ").concat(a,`px;
  }
`)},Zv=function(){var t=parseInt(document.body.getAttribute(ms)||"0",10);return isFinite(t)?t:0},zO=function(){$.useEffect(function(){return document.body.setAttribute(ms,(Zv()+1).toString()),function(){var t=Zv()-1;t<=0?document.body.removeAttribute(ms):document.body.setAttribute(ms,t.toString())}},[])},xh=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;zO();var o=$.useMemo(function(){return HO(i)},[i]);return $.createElement(PO,{styles:WO(o,!e,i,n?"":"!important")})},_0=!1;if(typeof window<"u")try{var Cc=Object.defineProperty({},"passive",{get:function(){return _0=!0,!0}});window.addEventListener("test",Cc,Cc),window.removeEventListener("test",Cc,Cc)}catch{_0=!1}var Zo=_0?{passive:!1}:!1,UO=function(t){return t.tagName==="TEXTAREA"},jx=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!UO(t)&&n[e]==="visible")},qO=function(t){return jx(t,"overflowY")},KO=function(t){return jx(t,"overflowX")},Qv=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Fx(t,r);if(i){var o=Vx(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GO=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},YO=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Fx=function(t,e){return t==="v"?qO(e):KO(e)},Vx=function(t,e){return t==="v"?GO(e):YO(e)},XO=function(t,e){return t==="h"&&e==="rtl"?-1:1},ZO=function(t,e,n,r,i){var o=XO(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,m=0;do{var v=Vx(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&Fx(t,a)&&(d+=S,m+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&Math.abs(d)<1||!f&&Math.abs(m)<1)&&(h=!0),h},$c=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Jv=function(t){return[t.deltaX,t.deltaY]},e5=function(t){return t&&"current"in t?t.current:t},QO=function(t,e){return t[0]===e[0]&&t[1]===e[1]},JO=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},eD=0,Qo=[];function tD(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(eD++)[0],o=$.useState(ul)[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=mh([t.lockRef.current],(t.shards||[]).map(e5),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=$c(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=Qv(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=Qv(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return ZO(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!Qo.length||Qo[Qo.length-1]!==o)){var S="deltaY"in C?Jv(C):$c(C),R=e.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&QO(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(e5).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R,shadowParent:nD(S)};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=$c(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,Jv(w),w.target,a(w,t.lockRef.current))},[]),m=$.useCallback(function(w){h(w.type,$c(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return Qo.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Zo),document.addEventListener("touchmove",c,Zo),document.addEventListener("touchstart",f,Zo),function(){Qo=Qo.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,Zo),document.removeEventListener("touchmove",c,Zo),document.removeEventListener("touchstart",f,Zo)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:JO(i)}):null,v?$.createElement(xh,{gapMode:t.gapMode}):null)}function nD(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const rD=bh(Nx,tD);var yh=$.forwardRef(function(t,e){return $.createElement(wh,exports.__assign({},t,{ref:e,sideCar:rD}))});yh.classNames=wh.classNames;function L0(t,[e,n]){return Math.min(n,Math.max(e,t))}function Ch(t){const e=t+"CollectionProvider",[n,r]=bt(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:w}=v,C=$.default.useRef(null),S=$.default.useRef(new Map).current;return $.default.createElement(i,{scope:x,itemMap:S,collectionRef:C},w)},a=t+"CollectionSlot",c=$.default.forwardRef((v,x)=>{const{scope:w,children:C}=v,S=o(a,w),R=ye(x,S.collectionRef);return $.default.createElement(Cr,{ref:R},C)}),h=t+"CollectionItemSlot",f="data-radix-collection-item",d=$.default.forwardRef((v,x)=>{const{scope:w,children:C,...S}=v,R=$.default.useRef(null),T=ye(x,R),E=o(h,w);return $.default.useEffect(()=>(E.itemMap.set(R,{ref:R,...S}),()=>void E.itemMap.delete(R))),$.default.createElement(Cr,{[f]:"",ref:T},C)});function m(v){const x=o(t+"CollectionConsumer",v);return $.default.useCallback(()=>{const C=x.collectionRef.current;if(!C)return[];const S=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((E,O)=>S.indexOf(E.ref.current)-S.indexOf(O.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:d},m,r]}const iD=b.createContext(void 0);function To(t){const e=b.useContext(iD);return t||e||"ltr"}function $h(t){const e=b.useRef({value:t,previous:t});return b.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function oD(t){const e=`${t}CollectionProvider`,[n,r]=bt(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map,listeners:new Set}),s=v=>{const{scope:x,children:w}=v,C=$.useRef(null),S=$.useRef(new Map).current,R=$.useRef(new Set).current;return p.jsx(i,{scope:x,itemMap:S,collectionRef:C,listeners:R,children:w})};s.displayName=e;const a=`${t}CollectionSlot`,c=$.forwardRef((v,x)=>{const{scope:w,children:C}=v,S=o(a,w),R=ye(x,S.collectionRef);return p.jsx(Cr,{ref:R,children:C})});c.displayName=a;const h=`${t}CollectionItemSlot`,f="data-radix-collection-item",d=$.forwardRef((v,x)=>{const{scope:w,children:C,...S}=v,R=$.useRef(null),T=ye(x,R),E=o(h,w);return $.useEffect(()=>{const O=Array.from(E.itemMap.values());return E.itemMap.set(R,{ref:R,...S}),E.listeners.forEach(L=>L(Array.from(E.itemMap.values()),O)),()=>{const L=Array.from(E.itemMap.values());E.itemMap.delete(R),E.listeners.forEach(I=>I(Array.from(E.itemMap.values()),L))}}),p.jsx(Cr,{[f]:"",ref:T,children:C})});d.displayName=h;function m(v){const x=o(`${t}CollectionConsumer`,v),w=$.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const R=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((O,L)=>R.indexOf(O.ref.current)-R.indexOf(L.ref.current))},[x.collectionRef,x.itemMap]),C=$.useCallback(S=>(x.listeners.add(S),()=>x.listeners.delete(S)),[x.listeners]);return{getItems:w,subscribe:C}}return[{Provider:s,Slot:c,ItemSlot:d},m,r]}const jd=new Map;function sD(t,e){const n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(jd.has(n))return jd.get(n);const r=new Intl.Collator(t,e);return jd.set(n,r),r}function yg(t,e){const n=sD(t,{usage:"search",...e});return{startsWith(r,i){return i.length===0?!0:(r=r.normalize("NFC"),i=i.normalize("NFC"),n.compare(r.slice(0,i.length),i)===0)},endsWith(r,i){return i.length===0?!0:(r=r.normalize("NFC"),i=i.normalize("NFC"),n.compare(r.slice(-i.length),i)===0)},contains(r,i){if(i.length===0)return!0;r=r.normalize("NFC"),i=i.normalize("NFC");let o=0;const s=i.length;for(;o+s<=r.length;o++){const a=r.slice(o,o+s);if(n.compare(i,a)===0)return!0}return!1}}}const Hx=t=>{const e=$.useRef();return $.useEffect(()=>{e.current=t}),e.current},aD=[" ","Enter","ArrowUp","ArrowDown"],lD=["Enter"],cD=t=>!!(t.length===1&&t.match(/\S| /)),Px="Combobox",[ks,hl]=oD(Px),[uD,Rr]=cg(Px),hD=({children:t})=>p.jsx(al,{children:p.jsx(ks.Provider,{scope:void 0,children:t})}),fD=t=>typeof t=="string"?t==="none"?{type:t,filter:void 0}:{type:t,filter:"startsWith"}:t,dD=t=>{const{allowCustomValue:e=!1,autocomplete:n="none",children:r,open:i,defaultOpen:o,onOpenChange:s,value:a,defaultValue:c,onValueChange:h,disabled:f,required:d=!1,locale:m="en-EN",onTextValueChange:v,textValue:x,defaultTextValue:w,filterValue:C,defaultFilterValue:S,onFilterValueChange:R,isPrintableCharacter:T=cD,visible:E=!1}=t,[O,L]=$.useState(null),[I,V]=$.useState(null),[F,H]=$.useState(null),[K,W]=$.useState(null),[J=!1,G]=It({prop:i,defaultProp:o,onChange:s}),[re,se]=It({prop:a,defaultProp:c,onChange:h}),[te,ne]=It({prop:x,defaultProp:e&&!w?a:w,onChange:v}),[Y,ce]=It({prop:C,defaultProp:S,onChange:R}),me=_t(),Ie=$.useCallback((qe,Te)=>{const Ve=Te.map(Ae=>Ae.ref.current),[pe,...De]=Ve,[Re]=De.slice(-1),Le=K??Te.find(Ae=>Ae.value===re)?.ref.current;for(const Ae of qe){if(Ae===Le)return;if(Ae?.scrollIntoView({block:"nearest"}),Ae===pe&&I&&(I.scrollTop=0),Ae===Re&&I&&(I.scrollTop=I.scrollHeight),W(Ae),n==="both"){const He=Te.find(wt=>wt.ref.current===Ae);He&&ne(He.textValue)}if(Ae!==Le)return}},[n,ne,I,K,re]),we=fD(n);return $.useEffect(()=>{n!=="both"&&W(null)},[te,n]),$.useEffect(()=>{if(F&&O)return Lx([F,O])},[F,O]),p.jsx(hD,{children:p.jsx(uD,{allowCustomValue:e,autocomplete:we,required:d,trigger:O,onTriggerChange:L,contentId:me,value:re,onValueChange:se,open:J,onOpenChange:G,disabled:f,locale:m,focusFirst:Ie,textValue:te,onTextValueChange:ne,onViewportChange:V,onContentChange:H,visuallyFocussedItem:K,filterValue:Y,onFilterValueChange:ce,onVisuallyFocussedItemChange:W,isPrintableCharacter:T,visible:E,children:r})})},Wx="ComboboxTrigger",zx=$.forwardRef((t,e)=>{const{...n}=t,r=Rr(Wx),i=()=>{r.disabled||r.onOpenChange(!0)};return p.jsx(Hs,{asChild:!0,children:p.jsx(zs,{asChild:!0,trapped:r.open,onMountAutoFocus:o=>{o.preventDefault()},onUnmountAutoFocus:o=>{r.trigger?.focus({preventScroll:!0}),document.getSelection()?.empty(),o.preventDefault()},children:p.jsx("div",{ref:e,"data-disabled":r.disabled?"":void 0,...n,onClick:ie(n.onClick,o=>{if(r.disabled){o.preventDefault();return}r.trigger?.focus()}),onPointerDown:ie(n.onPointerDown,o=>{if(r.disabled){o.preventDefault();return}const s=o.target;s.hasPointerCapture(o.pointerId)&&s.releasePointerCapture(o.pointerId),(s.closest("button")??s.closest("div"))===o.currentTarget&&o.button===0&&o.ctrlKey===!1&&(i(),r.trigger?.focus())})})})})});zx.displayName=Wx;const Ux="ComboboxInput",qx=$.forwardRef((t,e)=>{const n=Rr(Ux),r=$.useRef(null),{getItems:i}=hl(void 0),{startsWith:o}=yg(n.locale,{sensitivity:"base"}),s=n.disabled,a=ye(r,e,n.onTriggerChange),c=()=>{s||n.onOpenChange(!0)},h=Hx(n.filterValue);return ut(()=>{const f=setTimeout(()=>{if(n.textValue===""||n.textValue===void 0||n.filterValue===""||n.filterValue===void 0)return;const d=i().find(v=>v.type==="option"&&o(v.textValue,n.textValue)),m=TD(h??"",n.filterValue);d&&!n.visuallyFocussedItem&&m===n.filterValue.length&&r.current?.setSelectionRange(n.filterValue.length,n.textValue.length)});return()=>clearTimeout(f)},[n.textValue,n.filterValue,o,n.visuallyFocussedItem,i,h]),p.jsx("input",{type:"text",role:"combobox","aria-controls":n.contentId,"aria-expanded":n.open,"aria-required":n.required,"aria-autocomplete":n.autocomplete.type,"data-state":n.open?"open":"closed","aria-disabled":s,"aria-activedescendant":n.visuallyFocussedItem?.id,disabled:s,"data-disabled":s?"":void 0,"data-placeholder":n.textValue===void 0?"":void 0,value:n.textValue??"",...t,ref:a,onKeyDown:ie(t.onKeyDown,f=>{if(["ArrowUp","ArrowDown","Home","End"].includes(f.key))n.open||c(),setTimeout(()=>{let m=i().filter(v=>!v.disabled&&v.isVisible).map(v=>v.ref.current);if(["ArrowUp","End"].includes(f.key)&&(m=m.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const v=n.visuallyFocussedItem??i().find(x=>x.value===n.value)?.ref.current;if(v){let x=m.indexOf(v);x===m.length-1&&(x=-1),m=m.slice(x+1)}}if(["ArrowDown"].includes(f.key)&&n.autocomplete.type==="both"&&m.length>1){const[v,...x]=m,w=i().find(C=>C.ref.current===v).textValue;n.textValue===w&&(m=x)}n.focusFirst(m,i())}),f.preventDefault();else if(["Tab"].includes(f.key)&&n.open)f.preventDefault();else if(["Escape"].includes(f.key))n.open?n.onOpenChange(!1):(n.onValueChange(void 0),n.onTextValueChange("")),f.preventDefault();else if(lD.includes(f.key)){if(n.visuallyFocussedItem){const d=i().find(m=>m.ref.current===n.visuallyFocussedItem);d&&(n.onValueChange(d.value),n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue),d.ref.current?.click())}else{const d=i().find(m=>m.type==="option"&&!m.disabled&&m.textValue===n.textValue);d&&(n.onValueChange(d.value),n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue),d.ref.current?.click())}n.onOpenChange(!1),f.preventDefault()}else n.onVisuallyFocussedItemChange(null)}),onChange:ie(t.onChange,f=>{n.onTextValueChange(f.currentTarget.value),n.autocomplete.type==="both"&&n.onFilterValueChange(f.currentTarget.value)}),onKeyUp:ie(t.onKeyUp,f=>{if(!n.open&&(n.isPrintableCharacter(f.key)||["Backspace"].includes(f.key))&&c(),setTimeout(()=>{if(n.autocomplete.type==="both"&&n.isPrintableCharacter(f.key)&&n.filterValue!==void 0){const d=n.filterValue,m=i().find(v=>o(v.textValue,d));m&&n.onTextValueChange(m.textValue)}}),n.autocomplete.type==="none"&&n.isPrintableCharacter(f.key)){const d=n.textValue??"",m=i().find(v=>o(v.textValue,d));m&&(n.onVisuallyFocussedItemChange(m.ref.current),m.ref.current?.scrollIntoView())}}),onBlur:ie(t.onBlur,()=>{if(n.open)return;n.onVisuallyFocussedItemChange(null);const[f]=i().filter(m=>m.textValue===n.textValue&&m.type==="option");if(f){n.onValueChange(f.value),n.autocomplete.type==="both"&&n.onFilterValueChange(f.textValue);return}if(n.allowCustomValue){n.onValueChange(n.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(n.textValue);return}const[d]=i().filter(m=>m.value===n.value&&m.type==="option");d&&n.textValue!==""?(n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue)):(n.onValueChange(void 0),n.onTextValueChange(""))})})});qx.displayName="ComboboxTextInput";const Kx=$.forwardRef((t,e)=>{const{children:n,...r}=t,i=Rr(Ux),o=i.disabled,s=()=>{o||(i.onOpenChange(!0),i.trigger?.focus())};return p.jsx(ge.button,{"aria-hidden":!0,type:"button","aria-disabled":o,"aria-controls":i.contentId,"aria-expanded":i.open,disabled:o,"data-disabled":o?"":void 0,...r,tabIndex:-1,ref:e,onClick:ie(r.onClick,()=>{i.trigger?.focus()}),onPointerDown:ie(r.onPointerDown,a=>{a.button===0&&a.ctrlKey===!1&&(s(),a.preventDefault())}),onKeyDown:ie(r.onKeyDown,a=>{aD.includes(a.key)&&(s(),a.preventDefault())}),children:n||"▼"})});Kx.displayName="ComboboxIcon";const gD="ComboboxPortal",Gx=t=>p.jsx(Ps,{asChild:!0,...t});Gx.displayName=gD;const Cg="ComboboxContent",Yx=$.forwardRef((t,e)=>{const n=Rr(Cg),{getItems:r}=hl(void 0),[i,o]=$.useState();if(ut(()=>{o(new DocumentFragment)},[]),ut(()=>{n.open&&n.autocomplete.type==="none"&&setTimeout(()=>{r().find(a=>a.value===n.value)?.ref.current?.scrollIntoView({block:"nearest"})})},[r,n.autocomplete,n.value,n.open]),!n.open){const s=i;return s?Ro.createPortal(p.jsx(ks.Slot,{scope:void 0,children:p.jsx("div",{children:t.children})}),s):null}return p.jsx(Xx,{...t,ref:e})});Yx.displayName=Cg;const mD=10,Xx=$.forwardRef((t,e)=>{const{onEscapeKeyDown:n,onPointerDownOutside:r,...i}=t,o=Rr(Cg),s=ye(e,c=>o.onContentChange(c)),{onOpenChange:a}=o;return Ws(),$.useEffect(()=>{const c=()=>{a(!1)};return window.addEventListener("blur",c),window.addEventListener("resize",c),()=>{window.removeEventListener("blur",c),window.removeEventListener("resize",c)}},[a]),p.jsx(yh,{allowPinchZoom:!0,children:p.jsx(ko,{asChild:!0,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:c=>{c.preventDefault()},onDismiss:()=>{o.onOpenChange(!1),o.trigger?.focus({preventScroll:!0})},children:p.jsx(Zx,{role:"listbox",id:o.contentId,"data-state":o.open?"open":"closed",onContextMenu:c=>c.preventDefault(),...i,ref:s,style:{display:"flex",flexDirection:"column",outline:"none",...i.style}})})})});Xx.displayName="ComboboxContentImpl";const Zx=$.forwardRef((t,e)=>{const{align:n="start",collisionPadding:r=mD,...i}=t;return p.jsx(ll,{...i,ref:e,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-combobox-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-combobox-content-available-width":"var(--radix-popper-available-width)","--radix-combobox-content-available-height":"var(--radix-popper-available-height)","--radix-combobox-trigger-width":"var(--radix-popper-anchor-width)","--radix-combobox-trigger-height":"var(--radix-popper-anchor-height)"}})});Zx.displayName="ComboboxPopperPosition";const Qx="ComboboxViewport",Jx=$.forwardRef((t,e)=>{const n=Rr(Qx),r=ye(e,n.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-combobox-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-combobox-viewport]::-webkit-scrollbar{display:none}"}}),p.jsx(ks.Slot,{scope:void 0,children:p.jsx(ge.div,{"data-radix-combobox-viewport":"",role:"presentation",...t,ref:r,style:{position:"relative",flex:1,overflow:"auto",...t.style}})})]})});Jx.displayName=Qx;const Sh="ComboboxItem",[t5,$g]=cg(Sh),Sg=$.forwardRef((t,e)=>{const{value:n,disabled:r=!1,textValue:i,...o}=t,[s,a]=$.useState();ut(()=>{a(new DocumentFragment)},[]);const{onTextValueChange:c,textValue:h,...f}=Rr(Sh),d=_t(),[m,v]=$.useState(i??""),x=f.value===n,{startsWith:w,contains:C}=yg(f.locale,{sensitivity:"base"}),S=$.useCallback(R=>{v(T=>T||(R?.textContent??"").trim())},[]);return $.useEffect(()=>{x&&h===void 0&&m!==""&&c(m)},[m,x,h,c]),f.autocomplete.type==="both"&&m&&f.filterValue&&!w(m,f.filterValue)||f.autocomplete.type==="list"&&f.autocomplete.filter==="startsWith"&&m&&h&&!w(m,h)||f.autocomplete.type==="list"&&f.autocomplete.filter==="contains"&&m&&h&&!C(m,h)?s?Ro.createPortal(p.jsx(t5,{textId:d,onTextValueChange:S,isSelected:x,textValue:m,children:p.jsx(ks.ItemSlot,{scope:void 0,value:n,textValue:m,disabled:r,type:"option",isVisible:!1,children:p.jsx(B0,{ref:e,value:n,disabled:r,...o})})}),s):null:p.jsx(t5,{textId:d,onTextValueChange:S,isSelected:x,textValue:m,children:p.jsx(ks.ItemSlot,{scope:void 0,value:n,textValue:m,disabled:r,type:"option",isVisible:!0,children:p.jsx(B0,{ref:e,value:n,disabled:r,...o})})})});Sg.displayName=Sh;const e3="ComboboxItemImpl",B0=$.forwardRef((t,e)=>{const{value:n,disabled:r=!1,...i}=t,o=$.useRef(null),s=ye(e,o),{getItems:a}=hl(void 0),{onTextValueChange:c,visuallyFocussedItem:h,...f}=Rr(Sh),{isSelected:d,textValue:m,textId:v}=$g(e3),x=()=>{r||(f.onValueChange(n),c(m),f.onOpenChange(!1),f.autocomplete.type==="both"&&f.onFilterValueChange(m),f.trigger?.focus({preventScroll:!0}))},w=$.useMemo(()=>h===a().find(S=>S.ref.current===o.current)?.ref.current,[a,h]),C=_t();return p.jsx(ge.div,{role:"option","aria-labelledby":v,"data-highlighted":w?"":void 0,"aria-selected":d&&w,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,id:C,ref:s,onPointerUp:ie(i.onPointerUp,x)})});B0.displayName=e3;const t3="ComboboxItemText",n3=$.forwardRef((t,e)=>{const{className:n,style:r,...i}=t,o=$g(t3),s=ye(e,o.onTextValueChange);return p.jsx(ge.span,{id:o.textId,...i,ref:s})});n3.displayName=t3;const r3="ComboboxItemIndicator",i3=$.forwardRef((t,e)=>{const{isSelected:n}=$g(r3);return n?p.jsx(ge.span,{"aria-hidden":!0,...t,ref:e}):null});i3.displayName=r3;const Ag="ComboboxNoValueFound",o3=$.forwardRef((t,e)=>{const{textValue:n="",filterValue:r="",visible:i=!1,locale:o,autocomplete:s}=Rr(Ag),[a,c]=$.useState([]),{subscribe:h}=hl(void 0),{startsWith:f,contains:d}=yg(o,{sensitivity:"base"});return $.useEffect(()=>{const m=h(v=>{if(i){const x=v.filter(w=>w.type!=="create");c(x)}else c(v)});return()=>{m()}},[i,h]),s.type==="none"&&a.length>0||s.type==="list"&&s.filter==="startsWith"&&a.some(m=>f(m.textValue,n))||s.type==="both"&&a.some(m=>f(m.textValue,r))||s.type==="list"&&s.filter==="contains"&&a.some(m=>d(m.textValue,n))?null:p.jsx(ge.div,{...t,ref:e})});o3.displayName=Ag;const s3=$.forwardRef((t,e)=>{const{disabled:n=!1,...r}=t,i=Rr(Ag),{textValue:o,visuallyFocussedItem:s}=i,{getItems:a,subscribe:c}=hl(void 0),h=$.useRef(null),[f,d]=$.useState(!1),m=ye(e,h),v=$.useMemo(()=>s===a().find(C=>C.ref.current===h.current)?.ref.current,[a,s]),x=_t(),w=()=>{!n&&o&&(i.onValueChange(o),i.onTextValueChange(o),i.onOpenChange(!1),i.autocomplete.type==="both"&&i.onFilterValueChange(o),i.trigger?.focus({preventScroll:!0}))};return ut(()=>{const C=c(S=>{d(!S.some(R=>R.textValue===o&&R.type!=="create"))});return a().length===0&&d(!0),()=>{C()}},[o,c,a]),(!o||!f)&&!i.visible?null:p.jsx(ks.ItemSlot,{scope:void 0,value:o??"",textValue:o??"",disabled:n,isVisible:!0,type:"create",children:p.jsx(ge.div,{role:"option",tabIndex:n?void 0:-1,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,"data-highlighted":v?"":void 0,...r,id:x,ref:m,onPointerUp:ie(r.onPointerUp,w)})})});s3.displayName="ComboboxCreateItem";const pD=dD,vD=zx,bD=qx,wD=Kx,xD=Gx,yD=Yx,CD=Jx,$D=Sg,SD=n3,AD=i3,RD=o3,kD=s3;function TD(t,e){const n=Math.min(t.length,e.length);for(let r=0;r<n;r++)if(t[r]!==e[r])return r;return n}const Yn=Object.freeze(Object.defineProperty({__proto__:null,ComboboxItem:Sg,Content:yD,CreateItem:kD,Icon:wD,Item:$D,ItemIndicator:AD,ItemText:SD,NoValueFound:RD,Portal:xD,Root:pD,TextInput:bD,Trigger:vD,Viewport:CD},Symbol.toStringTag,{value:"Module"}));function Rg(t){const e=$.useRef(t);return $.useEffect(()=>{e.current=t}),$.useMemo(()=>(...n)=>e.current?.(...n),[])}const MD=[" ","Enter","ArrowUp","ArrowDown"],ED=[" ","Enter"],fl="Select",[Ah,dl,OD]=Ch(fl),[qs,DD]=bt(fl,[OD,Ni]),Rh=Ni(),[ID,ri]=qs(fl),[_D,LD]=qs(fl),kg=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:h,disabled:f,required:d,multi:m=!1}=t,v=Rh(e),[x,w]=$.useState(null),[C,S]=$.useState(null),[R,T]=$.useState(!1),E=To(h),[O=!1,L]=It({prop:r,defaultProp:i,onChange:o}),[I,V]=It({prop:s,defaultProp:a,onChange(W){c&&(Array.isArray(W),c(W))}}),F=$.useRef(null),[H,K]=$.useState(new Set);return p.jsx(al,{...v,children:p.jsx(ID,{required:d,scope:e,trigger:x,onTriggerChange:w,valueNode:C,onValueNodeChange:S,valueNodeHasChildren:R,onValueNodeHasChildrenChange:T,contentId:_t(),value:I,onValueChange:V,open:O,onOpenChange:L,dir:E,triggerPointerDownPosRef:F,disabled:f,multi:m,children:p.jsx(Ah.Provider,{scope:e,children:p.jsx(_D,{scope:t.__scopeSelect,onNativeOptionAdd:$.useCallback(W=>{K(J=>new Set(J).add(W))},[]),onNativeOptionRemove:$.useCallback(W=>{K(J=>{const G=new Set(J);return G.delete(W),G})},[]),children:n})})})})};kg.displayName=fl;const a3="SelectTrigger",Tg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Rh(n),o=ri(a3,n),s=o.disabled,a=ye(e,o.onTriggerChange),c=dl(n),[h,f,d]=p3(v=>{const x=c().filter(S=>!S.disabled),w=x.find(S=>S.value===o.value),C=v3(x,v,w);if(C!==void 0&&!Array.isArray(C.value)){const S=o.multi?[C.value]:C.value;o.onValueChange(S)}}),m=()=>{s||(o.onOpenChange(!0),d())};return p.jsx(Hs,{asChild:!0,...i,children:p.jsx(ge.div,{role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed","data-disabled":s?"":void 0,"data-placeholder":o.value===void 0?"":void 0,tabIndex:s?void 0:0,...r,ref:a,onClick:ie(r.onClick,v=>{v.currentTarget.focus()}),onPointerDown:ie(r.onPointerDown,v=>{const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),(x.closest("button")??x.closest("div"))===v.currentTarget&&v.button===0&&v.ctrlKey===!1&&(m(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:ie(r.onKeyDown,v=>{const x=h.current!=="",w=v.ctrlKey||v.altKey||v.metaKey,C=v.target;(C.closest("button")??C.closest("div"))===v.currentTarget&&(!w&&v.key.length===1&&f(v.key),!(x&&v.key===" ")&&MD.includes(v.key)&&(m(),v.preventDefault()))})})})});Tg.displayName=a3;const l3="SelectValue",Mg=$.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,placeholder:i,...o}=t,s=ri(l3,n),{onValueNodeHasChildrenChange:a}=s,c=r!==void 0,h=ye(e,s.onValueNodeChange),[f,d]=$.useState([]),m=dl(n);ut(()=>{a(c)},[a,c]),$.useLayoutEffect(()=>{if(Array.isArray(s.value)&&f.length!==s.value.length){const x=setTimeout(()=>{const w=m().filter(C=>Array.isArray(C.value)?!1:s.value?.includes(C.value));d(w)});return()=>{clearTimeout(x)}}},[s.value,m,f]);let v;if((s.value===void 0||s.value.length===0)&&i!==void 0)v=p.jsx("span",{children:i});else if(typeof r=="function")if(Array.isArray(s.value)){const x=s.value.map(w=>{const C=f.find(S=>S.value===w);return C?r({value:w,textValue:C?.textValue}):null});v=x.every(w=>w===null)?i:x}else v=r(s.value);else v=r;return p.jsx(ge.span,{...o,ref:h,children:v||null})});Mg.displayName=l3;const BD="SelectIcon",Eg=$.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return p.jsx(ge.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});Eg.displayName=BD;const ND="SelectPortal",Og=t=>p.jsx(Ps,{asChild:!0,...t});Og.displayName=ND;const bo="SelectContent",Dg=$.forwardRef((t,e)=>{const n=ri(bo,t.__scopeSelect),[r,i]=$.useState();if(ut(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ro.createPortal(p.jsx(c3,{scope:t.__scopeSelect,children:p.jsx(Ah.Slot,{scope:t.__scopeSelect,children:p.jsx("div",{children:t.children})})}),o):null}return p.jsx(u3,{...t,ref:e})});Dg.displayName=bo;const Pr=10,[c3,ji]=qs(bo),jD="SelectContentImpl",u3=$.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:h,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:w,avoidCollisions:C,...S}=t,R=ri(bo,n),[T,E]=$.useState(null),[O,L]=$.useState(null),I=ye(e,pe=>E(pe)),[V,F]=$.useState(null),[H,K]=$.useState(null),W=dl(n),[J,G]=$.useState(!1),re=$.useRef(!1);$.useEffect(()=>{if(T)return Lx(T)},[T]),Ws();const se=$.useCallback(pe=>{const[De,...Re]=W().map(He=>He.ref.current),[Le]=Re.slice(-1),Ae=document.activeElement;for(const He of pe)if(He===Ae||(He?.scrollIntoView({block:"nearest"}),He===De&&O&&(O.scrollTop=0),He===Le&&O&&(O.scrollTop=O.scrollHeight),He?.focus(),document.activeElement!==Ae))return},[W,O]),te=$.useCallback(()=>se([V,T]),[se,V,T]);$.useEffect(()=>{J&&te()},[J,te]);const{onOpenChange:ne,triggerPointerDownPosRef:Y}=R;$.useEffect(()=>{if(T){let pe={x:0,y:0};const De=Le=>{pe={x:Math.abs(Math.round(Le.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(Y.current?.y??0))}},Re=Le=>{pe.x<=10&&pe.y<=10?Le.preventDefault():T.contains(Le.target)||ne(!1),document.removeEventListener("pointermove",De),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",De),document.addEventListener("pointerup",Re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",De),document.removeEventListener("pointerup",Re,{capture:!0})}}},[T,ne,Y]),$.useEffect(()=>{const pe=()=>ne(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[ne]);const[ce,me]=p3(pe=>{const De=W().filter(Ae=>!Ae.disabled),Re=De.find(Ae=>Ae.ref.current===document.activeElement),Le=v3(De,pe,Re);Le&&setTimeout(()=>Le.ref.current.focus())}),Ie=$.useCallback((pe,De,Re)=>{const Le=!re.current&&!Re;(R.value!==void 0&&R.value===De||Le)&&(F(pe),Le&&(re.current=!0))},[R.value]),we=$.useCallback(()=>T?.focus(),[T]),qe=$.useCallback((pe,De,Re)=>{const Le=!re.current&&!Re;(R.value!==void 0&&(Array.isArray(De)?De.every(He=>R.value?.includes(He)):R.value===De)||Le)&&K(pe)},[R.value]),Te=r==="popper"?N0:h3,Ve=Te===N0?{side:a,sideOffset:c,align:h,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:w,avoidCollisions:C}:{};return p.jsx(c3,{scope:n,content:T,viewport:O,onViewportChange:L,itemRefCallback:Ie,selectedItem:V,onItemLeave:we,itemTextRefCallback:qe,focusSelectedItem:te,selectedItemText:H,position:r,isPositioned:J,searchRef:ce,children:p.jsx(yh,{as:Cr,allowPinchZoom:!0,children:p.jsx(zs,{asChild:!0,trapped:R.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:ie(i,pe=>{R.trigger?.focus({preventScroll:!0}),document.getSelection()?.empty(),pe.preventDefault()}),children:p.jsx(ko,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:p.jsx(Te,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed","aria-multiselectable":R.multi?"true":void 0,dir:R.dir,onContextMenu:pe=>pe.preventDefault(),...S,...Ve,onPlaced:()=>G(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:ie(S.onKeyDown,pe=>{const De=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!De&&pe.key.length===1&&me(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Le=W().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ae=pe.target,He=Le.indexOf(Ae);Le=Le.slice(He+1)}setTimeout(()=>se(Le)),pe.preventDefault()}})})})})})})});u3.displayName=jD;const FD="SelectItemAlignedPosition",h3=$.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,o=ri(bo,n),s=ji(bo,n),[a,c]=$.useState(null),[h,f]=$.useState(null),d=ye(e,I=>f(I)),m=dl(n),v=$.useRef(!1),x=$.useRef(!0),{viewport:w,selectedItem:C,selectedItemText:S,focusSelectedItem:R}=s,T=$.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&h&&w&&C&&S){const I=o.trigger.getBoundingClientRect(),V=h.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(o.dir!=="rtl"){const Ae=H.left-V.left,He=F.left-Ae,wt=I.left-He,Ze=I.width+wt,Pe=Math.max(Ze,V.width),Yt=window.innerWidth-Pr,ft=L0(He,[Pr,Yt-Pe]);a.style.minWidth=`${Ze}px`,a.style.left=`${ft}px`}else{const Ae=V.right-H.right,He=window.innerWidth-F.right-Ae,wt=window.innerWidth-I.right-He,Ze=I.width+wt,Pe=Math.max(Ze,V.width),Yt=window.innerWidth-Pr,ft=L0(He,[Pr,Yt-Pe]);a.style.minWidth=`${Ze}px`,a.style.right=`${ft}px`}const K=m(),W=window.innerHeight-Pr*2,J=w.scrollHeight,G=window.getComputedStyle(h),re=parseInt(G.borderTopWidth,10),se=parseInt(G.paddingTop,10),te=parseInt(G.borderBottomWidth,10),ne=parseInt(G.paddingBottom,10),Y=re+se+J+ne+te,ce=Math.min(C.offsetHeight*5,Y),me=window.getComputedStyle(w),Ie=parseInt(me.paddingTop,10),we=parseInt(me.paddingBottom,10),qe=I.top+I.height/2-Pr,Te=W-qe,Ve=C.offsetHeight/2,pe=C.offsetTop+Ve,De=re+se+pe,Re=Y-De;if(De<=qe){const Ae=C===K[K.length-1].ref.current;a.style.bottom="0px";const He=h.clientHeight-w.offsetTop-w.offsetHeight,wt=Math.max(Te,Ve+(Ae?we:0)+He+te),Ze=De+wt;a.style.height=`${Ze}px`}else{const Ae=C===K[0].ref.current;a.style.top="0px";const wt=Math.max(qe,re+w.offsetTop+(Ae?Ie:0)+Ve)+Re;a.style.height=`${wt}px`,w.scrollTop=De-qe+w.offsetTop}a.style.margin=`${Pr}px 0`,a.style.minHeight=`${ce}px`,a.style.maxHeight=`${W}px`,r?.(),requestAnimationFrame(()=>v.current=!0)}},[m,o.trigger,o.valueNode,a,h,w,C,S,o.dir,r]);ut(()=>T(),[T]);const[E,O]=$.useState();ut(()=>{h&&O(window.getComputedStyle(h).zIndex)},[h]);const L=$.useCallback(I=>{I&&x.current===!0&&(T(),R?.(),x.current=!1)},[T,R]);return p.jsx(HD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:L,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:p.jsx(ge.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});h3.displayName=FD;const VD="SelectPopperPosition",N0=$.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Pr,...o}=t,s=Rh(n);return p.jsx(ll,{...s,...o,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});N0.displayName=VD;const[HD,Ig]=qs(bo,{}),j0="SelectViewport",_g=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=ji(j0,n),o=Ig(j0,n),s=ye(e,i.onViewportChange),a=$.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.jsx(Ah.Slot,{scope:n,children:p.jsx(ge.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:ie(r.onScroll,c=>{const h=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d?.current&&f){const m=Math.abs(a.current-h.scrollTop);if(m>0){const v=window.innerHeight-Pr*2,x=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),C=Math.max(x,w);if(C<v){const S=C+m,R=Math.min(v,S),T=S-R;f.style.height=`${R}px`,f.style.bottom==="0px"&&(h.scrollTop=T>0?T:0,f.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});_g.displayName=j0;const f3="SelectGroup",[PD,WD]=qs(f3),Lg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=_t();return p.jsx(PD,{scope:n,id:i,children:p.jsx(ge.div,{role:"group","aria-labelledby":i,...r,ref:e})})});Lg.displayName=f3;const d3="SelectLabel",Bg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=WD(d3,n);return p.jsx(ge.div,{id:i.id,...r,ref:e})});Bg.displayName=d3;const Ru="SelectItem",[zD,g3]=qs(Ru),Ng=$.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=t,a=ri(Ru,n),c=ji(Ru,n),h=typeof r=="string"?Array.isArray(a.value)?a.value.includes(r):a.value===r:r.every(R=>a.value?.includes(R)),f=Array.isArray(a.value)&&Array.isArray(r)&&r.some(R=>a.value?.includes(R)),[d,m]=$.useState(o??""),[v,x]=$.useState(!1),w=ye(e,R=>c.itemRefCallback?.(R,r,i)),C=_t(),S=()=>{if(!i){let R=a.multi&&typeof r=="string"?[r]:r;f&&!h?a.onValueChange(R):Array.isArray(a.value)&&(R=b3(r,a.value)),a.onValueChange(R),a.multi||a.onOpenChange(!1)}};if(!a.multi&&Array.isArray(r))throw new Error("You can only pass an array of values in multi selects");return p.jsx(zD,{scope:n,value:r,disabled:i,textId:C,isSelected:h,isIntermediate:f,onItemTextChange:$.useCallback(R=>{m(T=>T||(R?.textContent??"").trim())},[]),children:p.jsx(Ah.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:p.jsx(ge.div,{role:"option","aria-labelledby":C,"data-highlighted":v?"":void 0,"aria-selected":a.multi?void 0:h&&v,"aria-checked":a.multi?h:void 0,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:w,onFocus:ie(s.onFocus,()=>x(!0)),onBlur:ie(s.onBlur,()=>x(!1)),onPointerUp:ie(s.onPointerUp,S),onPointerMove:ie(s.onPointerMove,R=>{i?c.onItemLeave?.():R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ie(s.onPointerLeave,R=>{R.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ie(s.onKeyDown,R=>{c.searchRef?.current!==""&&R.key===" "||(ED.includes(R.key)&&S(),R.key===" "&&R.preventDefault())})})})})});Ng.displayName=Ru;const $a="SelectItemText",jg=$.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...o}=t,s=ri($a,n),a=ji($a,n),c=g3($a,n),h=LD($a,n),[f,d]=$.useState(null),m=ye(e,S=>d(S),c.onItemTextChange,S=>a.itemTextRefCallback?.(S,c.value,c.disabled)),v=f?.textContent,x=$.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:v},Array.isArray(c.value)?c.value.join(";"):c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:C}=h;return ut(()=>(w(x),()=>C(x)),[w,C,x]),p.jsxs(p.Fragment,{children:[p.jsx(ge.span,{id:c.textId,...o,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ro.createPortal(o.children,s.valueNode):null]})});jg.displayName=$a;const m3="SelectItemIndicator",Fg=$.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t,o=g3(m3,n);return typeof r=="function"?p.jsx(ge.span,{"aria-hidden":!0,...i,ref:e,children:r({isSelected:o.isSelected,isIntermediate:o.isIntermediate})}):o.isSelected?p.jsx(ge.span,{"aria-hidden":!0,...i,ref:e,children:r}):null});Fg.displayName=m3;const F0="SelectScrollUpButton",Vg=$.forwardRef((t,e)=>{const n=ji(F0,t.__scopeSelect),r=Ig(F0,t.__scopeSelect),[i,o]=$.useState(!1),s=ye(e,r.onScrollButtonChange);return ut(()=>{if(n.viewport&&n.isPositioned){const a=n.viewport,c=()=>{const h=a.scrollTop>0;o(h)};return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?p.jsx(Pg,{...t,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop-=c.offsetHeight)}}):null});Vg.displayName=F0;const V0="SelectScrollDownButton",Hg=$.forwardRef((t,e)=>{const n=ji(V0,t.__scopeSelect),r=Ig(V0,t.__scopeSelect),[i,o]=$.useState(!1),s=ye(e,r.onScrollButtonChange);return ut(()=>{if(n.viewport&&n.isPositioned){const a=n.viewport,c=()=>{const h=a.scrollHeight-a.clientHeight,f=Math.ceil(a.scrollTop)<h;o(f)};return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?p.jsx(Pg,{...t,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop+=c.offsetHeight)}}):null});Hg.displayName=V0;const Pg=$.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,o=ji("SelectScrollButton",n),s=$.useRef(null),a=dl(n),c=$.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return $.useEffect(()=>()=>c(),[c]),ut(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),p.jsx(ge.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerMove:ie(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ie(i.onPointerLeave,()=>{c()})})});Pg.displayName="SelectScrollButtonImpl";const UD="SelectSeparator",Wg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p.jsx(ge.div,{"aria-hidden":!0,...r,ref:e})});Wg.displayName=UD;const H0="SelectArrow",zg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Rh(n),o=ri(H0,n),s=ji(H0,n);return o.open&&s.position==="popper"?p.jsx(KE,{...i,...r,ref:e}):null});zg.displayName=H0;const qD="BubbleSelect",KD=$.forwardRef((t,e)=>{const{value:n,...r}=t,i=$.useRef(null),o=ye(e,i),s=$h(n),a=ri(qD,void 0);$.useEffect(()=>{const h=i.current,f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==n&&m){const v=new Event("change",{bubbles:!0});m.call(h,n),h.dispatchEvent(v)}},[s,n]);let c=n;return a.multi&&!Array.isArray(n)&&(c=[]),p.jsx(Rx,{asChild:!0,children:p.jsx("select",{...r,multiple:a.multi?!0:void 0,ref:o,defaultValue:c})})});KD.displayName="BubbleSelect";function p3(t){const e=Rg(t),n=$.useRef(""),r=$.useRef(0),i=$.useCallback(s=>{const a=n.current+s;e(a),function c(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),o=$.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return $.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function v3(t,e,n){const i=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let s=GD(t,Math.max(o,0));i.length===1&&(s=s.filter(h=>h!==n));const c=s.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function GD(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const b3=(t,e=[])=>{if(Array.isArray(t))return t.reduce((r,i)=>b3(i,r),e);const n=e.indexOf(t);return n===-1?[...e,t]:[...e.slice(0,n),...e.slice(n+1)]},YD=kg,XD=Tg,ZD=Mg,QD=Eg,JD=Og,eI=Dg,tI=_g,nI=Lg,rI=Bg,iI=Ng,oI=jg,sI=Fg,aI=Vg,lI=Hg,cI=Wg,uI=zg,nr=Object.freeze(Object.defineProperty({__proto__:null,Arrow:uI,Content:eI,Group:nI,Icon:QD,Item:iI,ItemIndicator:sI,ItemText:oI,Label:rI,Portal:JD,Root:YD,ScrollDownButton:lI,ScrollUpButton:aI,Select:kg,SelectArrow:zg,SelectContent:Dg,SelectGroup:Lg,SelectIcon:Eg,SelectItem:Ng,SelectItemIndicator:Fg,SelectItemText:jg,SelectLabel:Bg,SelectPortal:Og,SelectScrollDownButton:Hg,SelectScrollUpButton:Vg,SelectSeparator:Wg,SelectTrigger:Tg,SelectValue:Mg,SelectViewport:_g,Separator:cI,Trigger:XD,Value:ZD,Viewport:tI,createSelectScope:DD},Symbol.toStringTag,{value:"Module"}));function uo(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}const w3="Collapsible",[hI,x3]=bt(w3),[fI,Ug]=hI(w3),dI=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...a}=t,[c=!1,h]=It({prop:r,defaultProp:i,onChange:s});return b.createElement(fI,{scope:n,disabled:o,contentId:_t(),open:c,onOpenToggle:b.useCallback(()=>h(f=>!f),[h])},b.createElement(ge.div,U({"data-state":qg(c),"data-disabled":o?"":void 0},a,{ref:e})))}),gI="CollapsibleTrigger",mI=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=Ug(gI,n);return b.createElement(ge.button,U({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:e,onClick:ie(t.onClick,i.onOpenToggle)}))}),y3="CollapsibleContent",pI=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Ug(y3,t.__scopeCollapsible);return b.createElement(Tt,{present:n||i.open},({present:o})=>b.createElement(vI,U({},r,{ref:e,present:o})))}),vI=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=t,s=Ug(y3,n),[a,c]=b.useState(r),h=b.useRef(null),f=ye(e,h),d=b.useRef(0),m=d.current,v=b.useRef(0),x=v.current,w=s.open||a,C=b.useRef(w),S=b.useRef();return b.useEffect(()=>{const R=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(R)},[]),ut(()=>{const R=h.current;if(R){S.current=S.current||{transitionDuration:R.style.transitionDuration,animationName:R.style.animationName},R.style.transitionDuration="0s",R.style.animationName="none";const T=R.getBoundingClientRect();d.current=T.height,v.current=T.width,C.current||(R.style.transitionDuration=S.current.transitionDuration,R.style.animationName=S.current.animationName),c(r)}},[s.open,r]),b.createElement(ge.div,U({"data-state":qg(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!w},o,{ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style}}),w&&i)});function qg(t){return t?"open":"closed"}const bI=dI,wI=mI,xI=pI,Fi="Accordion",yI=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Kg,CI,$I]=Ch(Fi),[kh,Jte]=bt(Fi,[$I,x3]),Gg=x3(),C3=$.default.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,o=r;return $.default.createElement(Kg.Provider,{scope:t.__scopeAccordion},n==="multiple"?$.default.createElement(kI,U({},o,{ref:e})):$.default.createElement(RI,U({},i,{ref:e})))});C3.propTypes={type(t){const e=t.value||t.defaultValue;return t.type&&!["single","multiple"].includes(t.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):t.type==="multiple"&&typeof e=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):t.type==="single"&&Array.isArray(e)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[$3,SI]=kh(Fi),[S3,AI]=kh(Fi,{collapsible:!1}),RI=$.default.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...s}=t,[a,c]=It({prop:n,defaultProp:r,onChange:i});return $.default.createElement($3,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:$.default.useCallback(()=>o&&c(""),[o,c])},$.default.createElement(S3,{scope:t.__scopeAccordion,collapsible:o},$.default.createElement(A3,U({},s,{ref:e}))))}),kI=$.default.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=t,[s=[],a]=It({prop:n,defaultProp:r,onChange:i}),c=$.default.useCallback(f=>a((d=[])=>[...d,f]),[a]),h=$.default.useCallback(f=>a((d=[])=>d.filter(m=>m!==f)),[a]);return $.default.createElement($3,{scope:t.__scopeAccordion,value:s,onItemOpen:c,onItemClose:h},$.default.createElement(S3,{scope:t.__scopeAccordion,collapsible:!0},$.default.createElement(A3,U({},o,{ref:e}))))}),[TI,Th]=kh(Fi),A3=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...s}=t,a=$.default.useRef(null),c=ye(a,e),h=CI(n),d=To(i)==="ltr",m=ie(t.onKeyDown,v=>{var x;if(!yI.includes(v.key))return;const w=v.target,C=h().filter(F=>{var H;return!((H=F.ref.current)!==null&&H!==void 0&&H.disabled)}),S=C.findIndex(F=>F.ref.current===w),R=C.length;if(S===-1)return;v.preventDefault();let T=S;const E=0,O=R-1,L=()=>{T=S+1,T>O&&(T=E)},I=()=>{T=S-1,T<E&&(T=O)};switch(v.key){case"Home":T=E;break;case"End":T=O;break;case"ArrowRight":o==="horizontal"&&(d?L():I());break;case"ArrowDown":o==="vertical"&&L();break;case"ArrowLeft":o==="horizontal"&&(d?I():L());break;case"ArrowUp":o==="vertical"&&I();break}const V=T%R;(x=C[V].ref.current)===null||x===void 0||x.focus()});return $.default.createElement(TI,{scope:n,disabled:r,direction:i,orientation:o},$.default.createElement(Kg.Slot,{scope:n},$.default.createElement(ge.div,U({},s,{"data-orientation":o,ref:c,onKeyDown:r?void 0:m}))))}),P0="AccordionItem",[MI,Yg]=kh(P0),EI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,o=Th(P0,n),s=SI(P0,n),a=Gg(n),c=_t(),h=r&&s.value.includes(r)||!1,f=o.disabled||t.disabled;return $.default.createElement(MI,{scope:n,open:h,disabled:f,triggerId:c},$.default.createElement(bI,U({"data-orientation":o.orientation,"data-state":R3(h)},a,i,{ref:e,disabled:f,open:h,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})))}),OI="AccordionHeader",DI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Th(Fi,n),o=Yg(OI,n);return $.default.createElement(ge.h3,U({"data-orientation":i.orientation,"data-state":R3(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:e}))}),n5="AccordionTrigger",II=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Th(Fi,n),o=Yg(n5,n),s=AI(n5,n),a=Gg(n);return $.default.createElement(Kg.ItemSlot,{scope:n},$.default.createElement(wI,U({"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},a,r,{ref:e})))}),_I="AccordionContent",LI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Th(Fi,n),o=Yg(_I,n),s=Gg(n);return $.default.createElement(xI,U({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation},s,r,{ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}}))});function R3(t){return t?"open":"closed"}const BI=C3,NI=EI,jI=DI,FI=II,VI=LI,HI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 2A12.014 12.014 0 0 0 4 14c0 3 1.57 6.883 4.201 10.375C10.85 27.894 13.764 30 16 30s5.151-2.101 7.799-5.625C26.43 20.875 28 17 28 14A12.014 12.014 0 0 0 16 2M8 14.5A1.5 1.5 0 0 1 9.5 13a4.5 4.5 0 0 1 4.5 4.5 1.5 1.5 0 0 1-1.5 1.5A4.5 4.5 0 0 1 8 14.5M18 25h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 0 2m1.5-6a1.5 1.5 0 0 1-1.5-1.5 4.5 4.5 0 0 1 4.5-4.5 1.5 1.5 0 0 1 1.5 1.5 4.5 4.5 0 0 1-4.5 4.5"})})};b.forwardRef(HI);const PI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 6H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2v11a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V13a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-9 12h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2m9-7H4V8h24z"})})};b.forwardRef(PI);const WI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.5 7v6a1.5 1.5 0 0 1-1.5 1.5h-6a1.5 1.5 0 0 1 0-3h2.137l-2.375-2.173-.047-.046a9.5 9.5 0 1 0-6.84 16.219H16a9.44 9.44 0 0 0 6.519-2.59 1.5 1.5 0 1 1 2.061 2.181A12.43 12.43 0 0 1 16 28.5h-.171a12.5 12.5 0 1 1 8.985-21.368L27.5 9.59V7a1.5 1.5 0 0 1 3 0"})})},zI=b.forwardRef(WI),UI=zI,qI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.061 19.061-9 9a1.503 1.503 0 0 1-2.125 0l-9-9a1.503 1.503 0 1 1 2.125-2.125l6.439 6.439V5a1.5 1.5 0 1 1 3 0v18.375l6.439-6.44a1.502 1.502 0 1 1 2.125 2.125z"})})};b.forwardRef(qI);const KI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H8.625l6.44 6.439a1.502 1.502 0 1 1-2.125 2.125l-9-9a1.5 1.5 0 0 1 0-2.125l9-9a1.503 1.503 0 0 1 2.125 2.125L8.625 14.5H27a1.5 1.5 0 0 1 1.5 1.5"})})};b.forwardRef(KI);const GI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:o,viewBox:"0 0 16 16",stroke:s,ref:r,...n,children:p.jsx("path",{d:"M14.75 8a.75.75 0 0 1-.75.75H6.813l3.22 3.22a.751.751 0 1 1-1.063 1.062l-4.5-4.5a.75.75 0 0 1 0-1.063l4.5-4.5a.751.751 0 0 1 1.063 1.063L6.813 7.25H14a.75.75 0 0 1 .75.75M2.5 1.75a.75.75 0 0 0-.75.75v11a.75.75 0 0 0 1.5 0v-11a.75.75 0 0 0-.75-.75"})})};b.forwardRef(GI);const YI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:o,viewBox:"0 0 16 16",stroke:s,ref:r,...n,children:p.jsx("path",{d:"M11.53 7.47a.75.75 0 0 1 0 1.062l-4.5 4.5a.751.751 0 1 1-1.062-1.063l3.22-3.219H2a.75.75 0 1 1 0-1.5h7.188L5.969 4.03a.751.751 0 1 1 1.063-1.062zm1.97-5.72a.75.75 0 0 0-.75.75v11a.75.75 0 0 0 1.5 0v-11a.75.75 0 0 0-.75-.75"})})};b.forwardRef(YI);const XI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m28.061 17.061-9 9a1.503 1.503 0 1 1-2.125-2.125l6.439-6.436H5a1.5 1.5 0 1 1 0-3h18.375l-6.436-6.44a1.503 1.503 0 0 1 2.125-2.125l9 9a1.5 1.5 0 0 1-.003 2.126"})})};b.forwardRef(XI);const ZI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.061 15.061a1.5 1.5 0 0 1-2.125 0L17.5 8.625V27a1.5 1.5 0 1 1-3 0V8.625l-6.439 6.436a1.503 1.503 0 1 1-2.125-2.125l9-9a1.5 1.5 0 0 1 2.125 0l9 9a1.5 1.5 0 0 1 0 2.125"})})},QI=b.forwardRef(ZI),JI=QI,e_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M11 13.5H5A1.5 1.5 0 0 1 3.5 12V6a1.5 1.5 0 0 1 3 0v1.733C8.581 5.683 11.786 3.5 16 3.5c5.558 0 8.92 3.299 9.061 3.439a1.5 1.5 0 0 1-2.117 2.125C22.889 9.01 20.25 6.5 16 6.5c-3.625 0-6.367 2.21-8 4h3a1.5 1.5 0 1 1 0 3m16 5h-6a1.5 1.5 0 1 0 0 3h3c-1.625 1.79-4.375 4-8 4-4.25 0-6.889-2.511-6.944-2.565A1.5 1.5 0 0 0 6.94 25.06c.141.141 3.504 3.44 9.061 3.44 4.214 0 7.419-2.183 9.5-4.233V26a1.5 1.5 0 1 0 3 0v-6a1.5 1.5 0 0 0-1.5-1.5"})})};b.forwardRef(e_);const t_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M220 48v48a12 12 0 0 1-24 0V77l-39.51 39.52a12 12 0 0 1-17-17L179 60h-19a12 12 0 0 1 0-24h48a12 12 0 0 1 12 12M99.51 139.51 60 179v-19a12 12 0 0 0-24 0v48a12 12 0 0 0 12 12h48a12 12 0 0 0 0-24H77l39.52-39.51a12 12 0 0 0-17-17Z"})})};b.forwardRef(t_);const n_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.725 21.993C27.031 20.798 26 17.416 26 13a10 10 0 0 0-20 0c0 4.418-1.032 7.797-1.726 8.993A2 2 0 0 0 6 25h5.101a5 5 0 0 0 9.798 0H26a2 2 0 0 0 1.725-3.008M16 27a3 3 0 0 1-2.828-2h5.656A3 3 0 0 1 16 27"})})};b.forwardRef(n_);const r_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M22.135 14.308A6.001 6.001 0 0 0 17.5 4.5H9A1.5 1.5 0 0 0 7.5 6v19A1.5 1.5 0 0 0 9 26.5h10a6.5 6.5 0 0 0 3.135-12.192M10.5 7.5h7a3 3 0 0 1 0 6h-7zm8.5 16h-8.5v-7H19a3.5 3.5 0 1 1 0 7"})})},i_=b.forwardRef(r_),o_=i_,s_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 4v20a1 1 0 0 1-1 1H9a2 2 0 0 0-2 2h17a1 1 0 0 1 0 2H6a1 1 0 0 1-1-1V7a4 4 0 0 1 4-4h17a1 1 0 0 1 1 1"})})};b.forwardRef(s_);const a_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19 14a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1m10-5v16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V6a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v1h5a2 2 0 0 1 2 2M12 7h8V6a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1zm15 7.201V9H5v5.201A23 23 0 0 0 16 17a23 23 0 0 0 11-2.799"})})};b.forwardRef(a_);const l_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M9.5 8A1.5 1.5 0 0 1 11 6.5h16a1.5 1.5 0 0 1 0 3H11A1.5 1.5 0 0 1 9.5 8M27 14.5H11a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3m0 8H11a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3M5.5 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-8a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 16a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})},c_=b.forwardRef(l_),u_=c_,h_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 4h-3V3a1 1 0 0 0-2 0v1H11V3a1 1 0 0 0-2 0v1H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 6H6V6h3v1a1 1 0 0 0 2 0V6h10v1a1 1 0 0 0 2 0V6h3z"})})},f_=b.forwardRef(h_),d_=f_,g_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 14h-1.35l-3.472-7.812A2 2 0 0 0 23.35 5H8.65a2 2 0 0 0-1.828 1.188L3.35 14H2a1 1 0 0 0 0 2h1v10a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2v-2h12v2a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V16h1a1 1 0 0 0 0-2m-20 6H8a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2m12 0a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2z"})})};b.forwardRef(g_);const m_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.708 12.708-10 10a1 1 0 0 1-1.415 0l-10-10A1 1 0 0 1 6 11h20a1 1 0 0 1 .707 1.707"})})},p_=b.forwardRef(m_),Oi=p_,v_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.924 20.383A1 1 0 0 1 26 21H6a1 1 0 0 1-.708-1.707l10-10a1 1 0 0 1 1.415 0l10 10a1 1 0 0 1 .217 1.09"})})};b.forwardRef(v_);const b_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M7 26a1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1 0-2 3 3 0 0 1 3 3m-3-7a1 1 0 0 0 0 2 5 5 0 0 1 5 5 1 1 0 1 0 2 0 7.01 7.01 0 0 0-7-7m0-4a1 1 0 0 0 0 2 9.01 9.01 0 0 1 9 9 1 1 0 0 0 2 0A11.01 11.01 0 0 0 4 15M27 5H5a2 2 0 0 0-2 2v5a1 1 0 0 0 1 1 13.014 13.014 0 0 1 13 13 1 1 0 0 0 1 1h9a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2"})})};b.forwardRef(b_);const w_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25 3h-1a2 2 0 0 0-2 2v2h-3.5V5a2 2 0 0 0-2-2h-1a2 2 0 0 0-2 2v2H10V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v5.586A1.98 1.98 0 0 0 5.586 12L7 13.414V27a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V13.414L26.414 12A1.98 1.98 0 0 0 27 10.586V5a2 2 0 0 0-2-2m-6 24h-6v-8a3 3 0 0 1 6 0z"})})};b.forwardRef(w_);const x_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-5-2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3-5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M25 24H7a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v13h17a1 1 0 0 1 0 2"})})};b.forwardRef(x_);const y_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.094 14.443a12.8 12.8 0 0 1 2.914-6.72 2 2 0 0 1 2.953-.138l3.459 3.533a1.98 1.98 0 0 1 .211 2.56 3.2 3.2 0 0 0-.462.968.5.5 0 0 1-.478.354h-8.1a.5.5 0 0 1-.497-.557m14.08-11.435A2 2 0 0 0 15 5v5.084a1.98 1.98 0 0 0 1.656 1.97 4 4 0 0 1 .677 7.72.51.51 0 0 0-.333.476v8.154a.5.5 0 0 0 .558.5A13.04 13.04 0 0 0 29 16.185C29.094 9.4 23.899 3.61 17.174 3.008M14.656 19.77a4 4 0 0 1-2.425-2.427.51.51 0 0 0-.475-.343H3.59a.5.5 0 0 0-.5.556A13.01 13.01 0 0 0 14.443 28.91a.5.5 0 0 0 .556-.5V20.25a.51.51 0 0 0-.343-.48"})})};b.forwardRef(y_);const C_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m0 2a11 11 0 0 1 8.984 4.659L16 14.845zm0 22a11 11 0 0 1-8.984-4.659l18.97-10.951A11 11 0 0 1 16 27"})})};b.forwardRef(C_);const $_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.061 10.061-16 16a1.5 1.5 0 0 1-2.125 0l-7-7a1.504 1.504 0 0 1 2.125-2.125L12 22.875 26.939 7.939a1.502 1.502 0 1 1 2.125 2.125z"})})},S_=b.forwardRef($_),A_=S_,R_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m5.708 10.708-7 7a1 1 0 0 1-1.415 0l-3-3a1 1 0 0 1 1.415-1.415L14 18.586l6.293-6.293a1 1 0 0 1 1.415 1.415"})})},k_=b.forwardRef(R_),T_=k_,M_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M176.49 95.51a12 12 0 0 1 0 17l-56 56a12 12 0 0 1-17 0l-24-24a12 12 0 1 1 17-17L112 143l47.51-47.52a12 12 0 0 1 16.98.03M236 128A108 108 0 1 1 128 20a108.12 108.12 0 0 1 108 108m-24 0a84 84 0 1 0-84 84 84.09 84.09 0 0 0 84-84"})})};b.forwardRef(M_);const E_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m27.061 13.061-10 10a1.503 1.503 0 0 1-2.125 0l-10-10a1.503 1.503 0 1 1 2.125-2.125L16 19.875l8.939-8.94a1.502 1.502 0 1 1 2.125 2.125z"})})},O_=b.forwardRef(E_),D_=O_,I_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M21.061 24.939a1.503 1.503 0 0 1-2.125 2.125l-10-10a1.5 1.5 0 0 1 0-2.125l10-10a1.503 1.503 0 0 1 2.125 2.125L12.125 16z"})})},__=b.forwardRef(I_),k3=__,L_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m23.061 17.061-10 10a1.503 1.503 0 0 1-2.125-2.125L19.875 16l-8.936-8.939a1.502 1.502 0 1 1 2.125-2.125l10 10a1.5 1.5 0 0 1-.003 2.125"})})},B_=b.forwardRef(L_),Xg=B_,N_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.061 21.061a1.503 1.503 0 0 1-2.125 0L16 12.125l-8.939 8.936a1.503 1.503 0 0 1-2.125-2.125l10-10a1.5 1.5 0 0 1 2.125 0l10 10a1.5 1.5 0 0 1 0 2.125"})})},j_=b.forwardRef(N_),F_=j_,V_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m7 14h-7a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v6h6a1 1 0 0 1 0 2"})})},H_=b.forwardRef(V_),P_=H_,W_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 16a12 12 0 0 1-20.236 8.728 1.002 1.002 0 0 1 1.375-1.456 10 10 0 1 0-.21-14.343c-.441.446-.857.885-1.26 1.321l2.039 2.043A1 1 0 0 1 9 14H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1.707-.707L6.25 8.838c.402-.437.817-.875 1.258-1.32A12 12 0 0 1 28 16M16 9a1 1 0 0 0-1 1v6a1 1 0 0 0 .485.858l5 3a.999.999 0 0 0 1.486-1.1 1 1 0 0 0-.456-.616L17 15.434V10a1 1 0 0 0-1-1"})})};b.forwardRef(W_);const z_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M20.008 5a11.01 11.01 0 0 0-9.847 6.084A10.9 10.9 0 0 0 9 15.966 1.023 1.023 0 0 1 8.071 17 1 1 0 0 1 7 16a13 13 0 0 1 .668-4.115.5.5 0 0 0-.594-.647A8.01 8.01 0 0 0 1 19c0 4.399 3.719 8 8.125 8H20a11.01 11.01 0 0 0 10.991-11.435C30.764 9.693 25.884 5 20.008 5"})})};b.forwardRef(z_);const U_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.991 15.565C30.764 9.693 25.884 5 20.008 5a11.01 11.01 0 0 0-9.847 6.084A10.9 10.9 0 0 0 9 15.966 1.023 1.023 0 0 1 8.071 17 1 1 0 0 1 7 16a13 13 0 0 1 .668-4.115.5.5 0 0 0-.594-.647A8.01 8.01 0 0 0 1 19c0 4.399 3.719 8 8.125 8H20a11.01 11.01 0 0 0 10.991-11.435m-7.283 3.143a1 1 0 0 1-1.415 0L20 16.414V24a1 1 0 0 1-2 0v-7.586l-2.293 2.293a1 1 0 0 1-1.415-1.415l4-4a1 1 0 0 1 1.415 0l4 4a1 1 0 0 1 0 1.415"})})};b.forwardRef(U_);const q_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M8.96 12.153 4.342 16l4.618 3.848a1.5 1.5 0 1 1-1.92 2.305l-6-5a1.5 1.5 0 0 1 0-2.305l6-5a1.5 1.5 0 0 1 1.92 2.304m22 2.694-6-5a1.5 1.5 0 1 0-1.92 2.306L27.658 16l-4.618 3.848a1.5 1.5 0 1 0 1.92 2.305l6-5a1.5 1.5 0 0 0 0-2.305M20.512 3.59a1.5 1.5 0 0 0-1.922.898l-8 22a1.5 1.5 0 0 0 2.82 1.024l8-22a1.5 1.5 0 0 0-.898-1.922"})})},K_=b.forwardRef(q_),G_=K_,Y_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M200 40h-32a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v80a16 16 0 0 0 16 16h8v64a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m-93.66 21.66a8 8 0 0 1 11.32-11.32l24 24a8 8 0 0 1 0 11.32l-24 24a8 8 0 0 1-11.32-11.32L124.69 80Zm-64 24a8 8 0 0 1 0-11.32l24-24a8 8 0 0 1 11.32 11.32L59.31 80l18.35 18.34a8 8 0 0 1-11.32 11.32ZM200 200H56v-64h96a16 16 0 0 0 16-16V56h32Z"})})};b.forwardRef(Y_);const X_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 10H4a1 1 0 0 0-1 1v6a12.04 12.04 0 0 0 4.068 9H4a1 1 0 0 0 0 2h22a1 1 0 0 0 0-2h-3.067a12.1 12.1 0 0 0 3.375-5.011A5 5 0 0 0 31 16v-1a5 5 0 0 0-5-5m3 6a3 3 0 0 1-2.15 2.875Q27 17.944 27 17v-4.828A3 3 0 0 1 29 15zM14 7V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0m4 0V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0m-8 0V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0"})})};b.forwardRef(X_);const Z_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.743 13.401a1 1 0 0 0-.487-.675l-3.729-2.125-.015-4.202a1 1 0 0 0-.353-.76 14 14 0 0 0-4.59-2.584 1 1 0 0 0-.808.074L16 5.23l-3.765-2.106a1 1 0 0 0-.809-.075 14 14 0 0 0-4.585 2.594 1 1 0 0 0-.354.758L6.47 10.61 2.74 12.734a1 1 0 0 0-.486.675 13.3 13.3 0 0 0 0 5.195 1 1 0 0 0 .486.675l3.729 2.125.015 4.204a1 1 0 0 0 .353.76 14 14 0 0 0 4.59 2.583 1 1 0 0 0 .808-.073L16 26.768l3.765 2.107a1.013 1.013 0 0 0 .809.073 14 14 0 0 0 4.585-2.592 1 1 0 0 0 .354-.759l.018-4.206 3.729-2.125a1 1 0 0 0 .486-.675c.34-1.713.338-3.477-.003-5.19M16 21a5 5 0 1 1 0-10 5 5 0 0 1 0 10"})})};b.forwardRef(Z_);const Q_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M18.5 12V6a1.5 1.5 0 1 1 3 0v4.5H26a1.5 1.5 0 1 1 0 3h-6a1.5 1.5 0 0 1-1.5-1.5M12 18.5H6a1.5 1.5 0 1 0 0 3h4.5V26a1.5 1.5 0 1 0 3 0v-6a1.5 1.5 0 0 0-1.5-1.5m14 0h-6a1.5 1.5 0 0 0-1.5 1.5v6a1.5 1.5 0 1 0 3 0v-4.5H26a1.5 1.5 0 1 0 0-3m-14-14A1.5 1.5 0 0 0 10.5 6v4.5H6a1.5 1.5 0 1 0 0 3h6a1.5 1.5 0 0 0 1.5-1.5V6A1.5 1.5 0 0 0 12 4.5"})})},J_=b.forwardRef(Q_),eL=J_,tL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M22.5 17.5h-2v-3h2a5 5 0 1 0-5-5v2h-3v-2a5 5 0 1 0-5 5h2v3h-2a5 5 0 1 0 5 5v-2h3v2a5 5 0 1 0 5-5m-2-8a2 2 0 1 1 2 2h-2zm-13 0a2 2 0 0 1 4 0v2h-2a2 2 0 0 1-2-2m4 13a2 2 0 1 1-2-2h2zm3-8h3v3h-3zm8 10a2 2 0 0 1-2-2v-2h2a2 2 0 0 1 0 4"})})};b.forwardRef(tL);const nL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.5 24a1.5 1.5 0 0 1-1.5 1.5h-3.5V29a1.5 1.5 0 1 1-3 0v-3.5H8A1.5 1.5 0 0 1 6.5 24V9.5H3a1.5 1.5 0 0 1 0-3h3.5V3a1.5 1.5 0 0 1 3 0v19.5H29a1.5 1.5 0 0 1 1.5 1.5M13 9.5h9.5V19a1.5 1.5 0 1 0 3 0V8A1.5 1.5 0 0 0 24 6.5H13a1.5 1.5 0 0 0 0 3"})})};b.forwardRef(nL);const rL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.061 23.939a1.503 1.503 0 0 1-2.125 2.125L16 18.125l-7.939 7.936a1.503 1.503 0 1 1-2.125-2.125L13.875 16 5.939 8.061a1.503 1.503 0 1 1 2.125-2.125L16 13.875l7.939-7.94a1.502 1.502 0 1 1 2.125 2.125L18.125 16z"})})},iL=b.forwardRef(rL),Vi=iL,oL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m4.708 16.293a1 1 0 0 1-1.415 1.415L16 17.414l-3.293 3.293a1 1 0 0 1-1.415-1.415L14.587 16l-3.293-3.293a1 1 0 1 1 1.415-1.415L16 14.587l3.293-3.293a1 1 0 0 1 1.415 1.415L17.414 16z"})})};b.forwardRef(oL);const sL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.48 9.524a1.51 1.51 0 0 0-1.668-.213l-6.276 3.125-5.24-8.704a1.514 1.514 0 0 0-2.592 0l-5.24 8.708L3.19 9.315a1.514 1.514 0 0 0-2.113 1.825l4.625 14.17a1 1 0 0 0 1.46.55C7.194 25.841 10.39 24 16 24s8.806 1.841 8.835 1.859a1 1 0 0 0 1.464-.549l4.625-14.166a1.51 1.51 0 0 0-.444-1.62M21.98 19.6a1 1 0 0 1-1.159.811 28.5 28.5 0 0 0-9.652 0 1 1 0 0 1-.348-1.97 30.6 30.6 0 0 1 10.348 0 1 1 0 0 1 .816 1.159z"})})};b.forwardRef(sL);const aL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.414 24a2 2 0 0 1 0 2.829l-.585.585a2 2 0 0 1-2.829 0l-6.906-6.905-2.735 6.292A1.98 1.98 0 0 1 12.533 28h-.098a1.98 1.98 0 0 1-1.801-1.375L4.1 6.615A1.994 1.994 0 0 1 6.615 4.1l20.01 6.534a2 2 0 0 1 .176 3.725l-6.292 2.735z"})})};b.forwardRef(aL);const lL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3C9.271 3 4 6.075 4 10v12c0 3.925 5.271 7 12 7s12-3.075 12-7V10c0-3.925-5.271-7-12-7m10 13c0 1.203-.985 2.429-2.701 3.365C21.366 20.419 18.774 21 16 21s-5.366-.581-7.299-1.635C6.985 18.429 6 17.203 6 16v-2.08C8.133 15.795 11.779 17 16 17s7.868-1.21 10-3.08zm-2.701 9.365C21.366 26.419 18.774 27 16 27s-5.366-.581-7.299-1.635C6.985 24.429 6 23.203 6 22v-2.08C8.133 21.795 11.779 23 16 23s7.868-1.21 10-3.08V22c0 1.203-.985 2.429-2.701 3.365"})})};b.forwardRef(lL);const cL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 12a2 2 0 0 0-2-2h-4V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16a1 1 0 0 0 1.625.777L9 19.25V23a2 2 0 0 0 2 2h11.699l4.676 3.778A1 1 0 0 0 29 28zm-5.319 11.223a1 1 0 0 0-.625-.223H11v-4h10a2 2 0 0 0 2-2v-5h4v13.906z"})})};b.forwardRef(cL);const uL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 19v7a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 26v-7a1.5 1.5 0 0 1 3 0v6.5h19V19a1.5 1.5 0 1 1 3 0m-13.561 1.061a1.5 1.5 0 0 0 2.125 0l5-5a1.502 1.502 0 1 0-2.125-2.125L17.5 15.375V5a1.5 1.5 0 1 0-3 0v10.375l-2.439-2.436a1.502 1.502 0 1 0-2.125 2.125z"})})};b.forwardRef(uL);const hL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M13.5 7.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0m7 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4m-9 4.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-9 8.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})};b.forwardRef(hL);const fL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 4H11a1 1 0 0 0-1 1v5H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-5h5a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1m-1 16h-4v-9a1 1 0 0 0-1-1h-9V6h14z"})})};b.forwardRef(fL);const dL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m11 13c.001 1.411-.27 2.81-.8 4.118l-5.587-3.437a2 2 0 0 0-.78-.279l-2.853-.385a2.01 2.01 0 0 0-2 .983h-1.09l-.475-.983a1.99 1.99 0 0 0-1.375-1.083l-1-.216.978-1.718h2.088c.338 0 .67-.087.966-.25l1.532-.845q.202-.113.375-.268l3.364-3.042a1.99 1.99 0 0 0 .407-2.458l-.045-.08A11.01 11.01 0 0 1 27 16M5 16a10.94 10.94 0 0 1 1.068-4.725l1.417 3.784a2 2 0 0 0 1.453 1.25l2.678.576.476.99a2.01 2.01 0 0 0 1.8 1.125h.186l-.904 2.029a2 2 0 0 0 .357 2.171l.018.018L16 25.742l-.242 1.25A11.014 11.014 0 0 1 5 16"})})};b.forwardRef(dL);const gL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:[p.jsx("path",{d:"M20.689 3.88A13 13 0 0 0 16 3a13 13 0 0 0-8.155 23.124l1.02-1.765A11 11 0 0 1 5 16a10.94 10.94 0 0 1 1.068-4.724l1.417 3.784a2 2 0 0 0 1.453 1.25l2.678.576.476.99q.113.226.275.418l1.169-2.025-.121-.25a1.99 1.99 0 0 0-1.375-1.084l-1-.217.978-1.717h2.088c.338 0 .67-.087.966-.25l.726-.4z"}),p.jsx("path",{fillRule:"evenodd",d:"m24 2.144 1.732 1-1.58 2.736q.54.435 1.036.932A13.01 13.01 0 0 1 29 16a13 13 0 0 1-17.69 12.124l-1.578 2.732-1.732-1zm-.86 5.49-4.936 8.549 1.628.22c.277.037.543.132.78.278l5.588 3.436c.53-1.308.801-2.706.8-4.117a11.01 11.01 0 0 0-3.86-8.367M13.92 23.6l-1.593 2.76a11 11 0 0 0 3.43.631l.242-1.25z",clipRule:"evenodd"})]})};b.forwardRef(gL);const mL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-4.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m10.365 7.5C20.579 21.724 18.441 23 16 23s-4.579-1.275-5.865-3.5a1.001 1.001 0 0 1 1.477-1.31q.157.129.253.31C12.799 20.114 14.266 21 16 21s3.201-.887 4.135-2.5a1 1 0 1 1 1.73 1M20.5 15a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(mL);const pL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-4.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m10 10.865a1 1 0 0 1-1.365-.365C19.201 20.886 17.734 20 16 20s-3.201.887-4.135 2.5a1.001 1.001 0 1 1-1.73-1C11.421 19.276 13.559 18 16 18s4.579 1.275 5.865 3.5a1 1 0 0 1-.365 1.365M20.5 15a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(pL);const vL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.5 6v5a1.5 1.5 0 1 1-3 0V7.5H21a1.5 1.5 0 0 1 0-3h5A1.5 1.5 0 0 1 27.5 6M11 24.5H7.5V21a1.5 1.5 0 0 0-3 0v5A1.5 1.5 0 0 0 6 27.5h5a1.5 1.5 0 1 0 0-3m15-5a1.5 1.5 0 0 0-1.5 1.5v3.5H21a1.5 1.5 0 1 0 0 3h5a1.5 1.5 0 0 0 1.5-1.5v-5a1.5 1.5 0 0 0-1.5-1.5m-15-15H6A1.5 1.5 0 0 0 4.5 6v5a1.5 1.5 0 0 0 3 0V7.5H11a1.5 1.5 0 0 0 0-3"})})},bL=b.forwardRef(vL),wL=bL,xL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 13a1.5 1.5 0 1 1-3 0V8.625l-7.439 7.439a1.503 1.503 0 1 1-2.125-2.125L23.375 6.5H19a1.5 1.5 0 0 1 0-3h8A1.5 1.5 0 0 1 28.5 5zM23 16a1.5 1.5 0 0 0-1.5 1.5v8h-15v-15h8a1.5 1.5 0 1 0 0-3H6A2.5 2.5 0 0 0 3.5 10v16A2.5 2.5 0 0 0 6 28.5h16a2.5 2.5 0 0 0 2.5-2.5v-8.5A1.5 1.5 0 0 0 23 16"})})},yL=b.forwardRef(xL),CL=yL,$L=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.914 15.595c-.044-.099-1.103-2.447-3.457-4.801C24.322 7.657 20.36 6 16 6S7.679 7.657 4.542 10.794C2.19 13.148 1.125 15.5 1.086 15.595a1 1 0 0 0 0 .812c.044.1 1.103 2.447 3.456 4.8C7.68 24.344 11.64 26 16 26s8.321-1.657 11.458-4.792c2.353-2.354 3.412-4.702 3.456-4.8a1 1 0 0 0 0-.813M16 21a5 5 0 1 1 0-10 5 5 0 0 1 0 10"})})},SL=b.forwardRef($L),AL=SL,RL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M6.74 4.328a1 1 0 1 0-1.48 1.345l2.405 2.646c-4.54 2.786-6.493 7.081-6.579 7.276a1 1 0 0 0 0 .813c.044.098 1.103 2.446 3.456 4.8C7.68 24.343 11.64 26 16 26c2.24.013 4.459-.448 6.509-1.354l2.75 3.027a1 1 0 1 0 1.48-1.345zm11.125 15.21a4 4 0 0 1-5.209-5.73zm13.049-3.13c-.053.117-1.319 2.92-4.17 5.475a1 1 0 0 1-1.408-.072L12.675 7.884a1 1 0 0 1 .575-1.66A17 17 0 0 1 16 6c4.36 0 8.321 1.658 11.458 4.794 2.353 2.354 3.412 4.702 3.456 4.801a1 1 0 0 1 0 .813"})})};b.forwardRef(RL);const kL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M17 15v12a1 1 0 0 1-2 0V15a1 1 0 0 1 2 0m8 9a1 1 0 0 0-1 1v2a1 1 0 0 0 2 0v-2a1 1 0 0 0-1-1m3-6h-2V5a1 1 0 0 0-2 0v13h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1M7 20a1 1 0 0 0-1 1v6a1 1 0 1 0 2 0v-6a1 1 0 0 0-1-1m3-6H8V5a1 1 0 0 0-2 0v9H4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1m9-6h-2V5a1 1 0 0 0-2 0v3h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1"})})};b.forwardRef(kL);const TL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.48 16.851-7.474 7.559a1.97 1.97 0 0 1-1.4.585H9.415l-3.707 3.712a1.001 1.001 0 0 1-1.415-1.415l2.823-2.822L15.588 16h10.537a.5.5 0 0 1 .355.851m.607-13.03a8 8 0 0 0-10.737.518l-1.2 1.185a.5.5 0 0 0-.15.351v7.875l6.875-6.875a1 1 0 0 1 1.414 1.414L17.589 14h11.047a.5.5 0 0 0 .445-.27 8.01 8.01 0 0 0-1.994-9.909M7.854 20.904 13 15.758V8.845a.5.5 0 0 0-.851-.355L7.586 13A1.99 1.99 0 0 0 7 14.414v6.136a.5.5 0 0 0 .854.354"})})};b.forwardRef(TL);const ML=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.708 10.293-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V11a1 1 0 0 0-.293-.707M19 11V5.5l5.5 5.5z"})})};b.forwardRef(ML);const EL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m213.66 82.34-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44ZM48 180c0 11 7.18 20 16 20a14.18 14.18 0 0 0 10.06-4.5 8.21 8.21 0 0 1 10.9-.91 8 8 0 0 1 .82 11.81A30.06 30.06 0 0 1 64 216c-17.64 0-32-16.15-32-36s14.36-36 32-36a30 30 0 0 1 21.39 9.19 8.26 8.26 0 0 1 .73 11.09 8 8 0 0 1-11.9.38A14.17 14.17 0 0 0 64 160c-8.82 0-16 9-16 20m103.81 16.31a20.82 20.82 0 0 1-9.19 15.23C137.43 215 131 216 125.13 216a61.1 61.1 0 0 1-15.13-2 8 8 0 1 1 4.3-15.41c4.38 1.2 14.95 2.7 19.55-.36.88-.59 1.83-1.52 2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56 20.56 0 0 1 9-14.95c11.84-8 30.71-3.31 32.83-2.76a8 8 0 0 1-4.07 15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54 4.54 0 0 0-2 3.67c-.12.9-.14 1.09 1.11 1.9 2.31 1.49 6.45 2.68 10.45 3.84 9.79 2.83 26.35 7.66 24.11 24.97M215.42 155l-19.89 55.68a8 8 0 0 1-15.06 0L160.58 155a8.21 8.21 0 0 1 4.5-10.45 8 8 0 0 1 10.45 4.76l12.47 34.9 12.47-34.9a8 8 0 0 1 10.45-4.76 8.23 8.23 0 0 1 4.5 10.45"})})};b.forwardRef(EL);const OL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.708 10.293-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V11a1 1 0 0 0-.293-.707m-7 11a1 1 0 0 1-1.415 1.415L16 20.414l-2.293 2.293a1 1 0 0 1-1.415-1.415L14.587 19l-2.293-2.293a1 1 0 1 1 1.415-1.415L16 17.587l2.293-2.293a1 1 0 0 1 1.415 1.415L17.414 19zM19 11V5.5l5.5 5.5z"})})};b.forwardRef(OL);const DL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M6 15h20a1 1 0 0 0 1-1v-3a1 1 0 0 0-.293-.707l-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v9a1 1 0 0 0 1 1m13-9.5 5.5 5.5H19zM28 19a1 1 0 0 1-1 1h-3v2h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1M8 18H6a1 1 0 0 0-1 1v7a1 1 0 1 0 2 0v-1h1a3.5 3.5 0 1 0 0-7m0 5H7v-3h1a1.5 1.5 0 1 1 0 3m8-5h-2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2a4.5 4.5 0 1 0 0-9m0 7h-1v-5h1a2.5 2.5 0 0 1 0 5"})})};b.forwardRef(DL);const IL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M44 120h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4m108-76 44 44h-44Zm4 164.53a8.18 8.18 0 0 1-8.25 7.47H120a8 8 0 0 1-8-8v-55.73a8.18 8.18 0 0 1 7.47-8.25 8 8 0 0 1 8.53 8v48h20a8 8 0 0 1 8 8.51m-61.49-51.88L77.83 180l16.68 23.35a8 8 0 0 1-13 9.3L68 193.76l-13.49 18.89a8 8 0 1 1-13-9.3L58.17 180l-16.68-23.35a8 8 0 0 1 2.3-11.46 8.19 8.19 0 0 1 10.88 2.38L68 166.24l13.49-18.89a8 8 0 0 1 13 9.3Zm121.28 39.66a20.81 20.81 0 0 1-9.18 15.23c-5.19 3.46-11.67 4.46-17.49 4.46a60.6 60.6 0 0 1-15.19-2 8 8 0 0 1 4.31-15.41c4.38 1.21 14.94 2.71 19.54-.35.89-.6 1.84-1.52 2.15-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58 20.58 0 0 1 8.95-14.94c11.84-8 30.72-3.31 32.83-2.76a8 8 0 0 1-4.07 15.48c-4.48-1.17-15.22-2.56-19.82.56a4.54 4.54 0 0 0-2 3.67c-.11.9-.13 1.08 1.12 1.9 2.31 1.49 6.45 2.68 10.45 3.84 9.87 2.82 26.39 7.65 24.18 24.96"})})};b.forwardRef(IL);const _L=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M184 144h-16a8 8 0 0 0-8 8v55.73a8.17 8.17 0 0 0 7.47 8.25 8 8 0 0 0 8.53-8v-8h7.4c15.24 0 28.14-11.92 28.59-27.15A28 28 0 0 0 184 144m-.35 40H176v-24h8a12 12 0 0 1 12 13.16A12.25 12.25 0 0 1 183.65 184M136 152v55.73a8.17 8.17 0 0 1-7.47 8.25 8 8 0 0 1-8.53-8v-55.71a8.17 8.17 0 0 1 7.47-8.25A8 8 0 0 1 136 152m-40 56.53a8.17 8.17 0 0 1-8.27 7.47h-31.5a8.27 8.27 0 0 1-6-2.5 8 8 0 0 1-1.18-9.5l25.16-44H56.27a8.17 8.17 0 0 1-8.27-7.47 8 8 0 0 1 8-8.53h31.77a8.27 8.27 0 0 1 6 2.5A8 8 0 0 1 95 156l-25.21 44H88a8 8 0 0 1 8 8.53M213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44Z"})})};b.forwardRef(_L);const LL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.5 16a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 1 1 0-3h16a1.5 1.5 0 0 1 1.5 1.5M29 8.5H3a1.5 1.5 0 0 0 0 3h26a1.5 1.5 0 1 0 0-3m-10 12h-6a1.5 1.5 0 1 0 0 3h6a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(LL);const BL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 9H16.414L13 5.586A1.98 1.98 0 0 0 11.586 5H5a2 2 0 0 0-2 2v18.078A1.926 1.926 0 0 0 4.924 27H27.11A1.89 1.89 0 0 0 29 25.111V11a2 2 0 0 0-2-2M5 7h6.586l2 2H5z"})})};b.forwardRef(BL);const NL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 9h-4.385q.075-.06.146-.125A3.7 3.7 0 0 0 24 6.196 4.08 4.08 0 0 0 19.805 2a3.7 3.7 0 0 0-2.68 1.239A6.9 6.9 0 0 0 16 5.049a6.9 6.9 0 0 0-1.125-1.81A3.7 3.7 0 0 0 12.195 2 4.08 4.08 0 0 0 8 6.196a3.7 3.7 0 0 0 1.239 2.679q.072.06.146.125H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2v8a2 2 0 0 0 2 2h7.5a.5.5 0 0 0 .5-.5V15H5v-4h10v4h2v-4h10v4H17v11.5a.5.5 0 0 0 .5.5H25a2 2 0 0 0 2-2v-8a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M10.564 7.375A1.7 1.7 0 0 1 10 6.125 2.076 2.076 0 0 1 12.074 4h.061a1.71 1.71 0 0 1 1.25.563c1.049 1.185 1.419 3.15 1.549 4.365-1.22-.13-3.184-.5-4.37-1.553m10.875 0c-1.186 1.05-3.155 1.42-4.375 1.55.148-1.314.561-3.237 1.561-4.361A1.7 1.7 0 0 1 19.875 4h.061A2.077 2.077 0 0 1 22 6.135a1.7 1.7 0 0 1-.564 1.24z"})})};b.forwardRef(NL);const jL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m9.796 8h-4.428a17.8 17.8 0 0 0-2.533-5.625A11.05 11.05 0 0 1 25.796 11M16 5.014c1.5 1.625 2.625 3.693 3.296 5.986h-6.592C13.375 8.707 14.5 6.641 16 5.014M12 16c0-1.005.084-2.009.25-3h7.5a18.2 18.2 0 0 1 0 6h-7.5a18 18 0 0 1-.25-3m.704 5h6.592c-.671 2.293-1.796 4.359-3.296 5.986-1.5-1.627-2.625-3.693-3.296-5.986m6.131 5.625A17.8 17.8 0 0 0 21.367 21h4.43a11.05 11.05 0 0 1-6.962 5.625M21.776 19a20.2 20.2 0 0 0 0-6h4.808a11 11 0 0 1 0 6z"})})};b.forwardRef(jL);const FL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M13.29 28.226 6.765 24.46a2.822 2.822 0 1 1-2.708-4.693v-7.532a2.824 2.824 0 1 1 2.708-4.693l6.525-3.767a2.824 2.824 0 1 1 5.42 0l6.524 3.766a2.822 2.822 0 1 1 2.71 4.693v7.533a2.824 2.824 0 1 1-2.71 4.694l-6.524 3.766A2.825 2.825 0 0 1 16 31.84a2.822 2.822 0 0 1-2.71-3.614M16 5.806q.413-.002.791-.113l8.531 14.776a2.8 2.8 0 0 0-.791 1.37H7.467a2.8 2.8 0 0 0-.79-1.369L15.21 5.693q.377.11.791.112M7.468 23.178l-.033.12 6.526 3.767A2.81 2.81 0 0 1 16 26.195c.802 0 1.526.334 2.04.871l6.523-3.766-.032-.121zM5.397 12.233a2.824 2.824 0 0 0 2.038-3.532l6.526-3.767q.043.045.088.088L5.517 19.8l-.12-.032zM26.482 19.8q.06-.018.121-.033v-7.532a2.824 2.824 0 0 1-2.04-3.534L18.04 4.934q-.045.045-.089.088z",clipRule:"evenodd"})})};b.forwardRef(FL);const VL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 7v7.5a.5.5 0 0 1-.5.5H17V5.5a.5.5 0 0 1 .5-.5H25a2 2 0 0 1 2 2M14.5 5H7a2 2 0 0 0-2 2v7.5a.5.5 0 0 0 .5.5H15V5.5a.5.5 0 0 0-.5-.5m12 12H17v9.5a.5.5 0 0 0 .5.5H25a2 2 0 0 0 2-2v-7.5a.5.5 0 0 0-.5-.5M5 17.5V25a2 2 0 0 0 2 2h7.5a.5.5 0 0 0 .5-.5V17H5.5a.5.5 0 0 0-.5.5"})})};b.forwardRef(VL);const HL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M10.5 6.5v5h-7A.5.5 0 0 1 3 11V8a2 2 0 0 1 2-2h5a.5.5 0 0 1 .5.5m2 19a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-5h-7zM3 21v3a2 2 0 0 0 2 2h5a.5.5 0 0 0 .5-.5v-5h-7a.5.5 0 0 0-.5.5m0-7v4a.5.5 0 0 0 .5.5h7v-5h-7a.5.5 0 0 0-.5.5m16-8h-6a.5.5 0 0 0-.5.5v5h7v-5A.5.5 0 0 0 19 6m9.5 7.5h-7v5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5m-16 5h7v-5h-7zM27 6h-5a.5.5 0 0 0-.5.5v5h7a.5.5 0 0 0 .5-.5V8a2 2 0 0 0-2-2m1.5 14.5h-7v5a.5.5 0 0 0 .5.5h5a2 2 0 0 0 2-2v-3a.5.5 0 0 0-.5-.5"})})};b.forwardRef(HL);const PL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.791 17.633a3.04 3.04 0 0 0-2.326-.597C28.813 14.666 30 12.31 30 10c0-3.309-2.661-6-5.933-6A5.95 5.95 0 0 0 19.5 6.094 5.95 5.95 0 0 0 14.932 4C11.663 4 9 6.691 9 10c0 1.375.405 2.711 1.258 4.125a4 4 0 0 0-1.844 1.05L5.586 18H2a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h13q.123 0 .242-.03l8-2a1 1 0 0 0 .15-.05l4.858-2.067.055-.025a3.074 3.074 0 0 0 .491-5.195zm-1.362 3.393-4.75 2.023L14.875 25H7v-5.586l2.829-2.828A1.98 1.98 0 0 1 11.242 16H17.5a1.5 1.5 0 0 1 0 3H14a1 1 0 0 0 0 2h4q.113 0 .224-.025l8.375-1.926.038-.01a1.075 1.075 0 0 1 .788 1.987z"})})};b.forwardRef(PL);const WL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 10.5h-5.475l.951-5.231a1.5 1.5 0 1 0-2.952-.538L19.475 10.5h-4.95l.951-5.231a1.5 1.5 0 1 0-2.952-.538L11.475 10.5H6a1.5 1.5 0 0 0 0 3h4.93l-.909 5H4a1.5 1.5 0 0 0 0 3h5.475l-.951 5.231a1.5 1.5 0 0 0 1.207 1.75q.134.022.269.019a1.5 1.5 0 0 0 1.475-1.233l1.05-5.767h4.95l-.951 5.231a1.5 1.5 0 1 0 2.952.543l1.049-5.774H26a1.5 1.5 0 1 0 0-3h-4.93l.909-5H28a1.5 1.5 0 1 0 0-3m-9.979 8H13.07l.909-5h4.951z"})})};b.forwardRef(WL);const zL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31.5 22.5a5 5 0 0 1-5 5 4.94 4.94 0 0 1-3.571-1.45 1.5 1.5 0 0 1 2.142-2.1 1.94 1.94 0 0 0 1.429.55 2 2 0 0 0 0-4 1.94 1.94 0 0 0-1.429.55 1.5 1.5 0 0 1-2.551-1.3l1-6A1.5 1.5 0 0 1 25 12.5h5a1.5 1.5 0 1 1 0 3h-3.729l-.338 2.029q.283-.03.567-.029a5 5 0 0 1 5 5M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(zL);const UL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M32 22a1.5 1.5 0 0 1-1.5 1.5V26a1.5 1.5 0 1 1-3 0v-2.5H23a1.5 1.5 0 0 1-1.422-1.974l3-9a1.5 1.5 0 0 1 2.845.948L25.08 20.5H27.5V18a1.5 1.5 0 1 1 3 0v2.5A1.5 1.5 0 0 1 32 22M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(UL);const qL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.5 14v12a1.5 1.5 0 1 1-3 0v-9.198l-.668.448a1.503 1.503 0 0 1-1.665-2.5l3-2A1.5 1.5 0 0 1 29.5 14M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(qL);const KL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m27.133 17.541 1.655-2.772a1.5 1.5 0 1 0-2.576-1.538l-4.03 6.75q-.018.029-.032.059a5 5 0 1 0 4.983-2.5zM26.5 24.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4M19.5 7v15a1.5 1.5 0 1 1-3 0v-6h-10v6a1.5 1.5 0 0 1-3 0V7a1.5 1.5 0 0 1 3 0v6h10V7a1.5 1.5 0 1 1 3 0"})})};b.forwardRef(KL);const GL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31.5 22.5a5 5 0 0 1-8.571 3.5 1.5 1.5 0 1 1 2.142-2.099A2 2 0 1 0 26.5 20.5a1.5 1.5 0 0 1-1.229-2.36l1.854-2.64H24a1.5 1.5 0 1 1 0-3h6a1.5 1.5 0 0 1 1.229 2.36l-2.293 3.275A5 5 0 0 1 31.5 22.5M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(GL);const YL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.5 7v15a1.5 1.5 0 1 1-3 0v-6h-10v6a1.5 1.5 0 0 1-3 0V7a1.5 1.5 0 0 1 3 0v6h10V7a1.5 1.5 0 1 1 3 0M30 24.5h-3l3.593-4.791a4.499 4.499 0 1 0-7.837-4.209 1.5 1.5 0 1 0 2.829 1q.076-.218.216-.402a1.5 1.5 0 1 1 2.394 1.807L22.8 25.1a1.5 1.5 0 0 0 1.2 2.4h6a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(YL);const XL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 17v7a3 3 0 0 1-3 3h-2a3 3 0 0 1-3-3v-5a3 3 0 0 1 3-3h2.956A10.964 10.964 0 0 0 16.081 6H16A11 11 0 0 0 5.045 16H8a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-7a13.014 13.014 0 0 1 22.236-9.167A12.93 12.93 0 0 1 29 17"})})};b.forwardRef(XL);const ZL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 11.75c0 8.75-12.974 15.833-13.526 16.125a1 1 0 0 1-.948 0C14.974 27.582 2 20.5 2 11.75A7.76 7.76 0 0 1 9.75 4c2.581 0 4.841 1.11 6.25 2.986C17.409 5.11 19.669 4 22.25 4A7.76 7.76 0 0 1 30 11.75"})})};b.forwardRef(ZL);const QL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 14.444V26a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V14.444a2 2 0 0 1 .646-1.473l10-9.435.014-.013a2 2 0 0 1 2.705.013l10 9.435A2 2 0 0 1 28 14.444"})})};b.forwardRef(QL);const JL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-7.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M5 25v-3.5l6.5-6.5 10 10zm22 0h-2.671l-4.5-4.5 2.5-2.5L27 22.672z"})})};b.forwardRef(JL);const eB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H9a2 2 0 0 0-2 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-2h2a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M23 25H5V11h2v10a2 2 0 0 0 2 2h14zm4-4H9v-4.5l4.5-4.5 6.208 6.208a1 1 0 0 0 1.413 0L24.33 15 27 17.672z"})})};b.forwardRef(eB);const tB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H15a1.5 1.5 0 0 1 0-3h12a1.5 1.5 0 0 1 1.5 1.5M15 9.5h12a1.5 1.5 0 0 0 0-3H15a1.5 1.5 0 0 0 0 3m12 13H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 0 0 0-3m-18-4a1.5 1.5 0 0 0 1.061-2.561L6.125 12l3.936-3.94a1.503 1.503 0 1 0-2.125-2.125l-5 5a1.5 1.5 0 0 0 0 2.125l5 5A1.5 1.5 0 0 0 9 18.5"})})};b.forwardRef(tB);const nB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H15a1.5 1.5 0 0 1 0-3h12a1.5 1.5 0 0 1 1.5 1.5M15 9.5h12a1.5 1.5 0 0 0 0-3H15a1.5 1.5 0 0 0 0 3m12 13H5a1.5 1.5 0 0 0 0 3h22a1.5 1.5 0 1 0 0-3M3.939 18.06a1.5 1.5 0 0 0 2.125 0l5-5a1.5 1.5 0 0 0 0-2.125l-5-5a1.503 1.503 0 0 0-2.125 2.125L7.875 12l-3.936 3.939a1.5 1.5 0 0 0 0 2.122"})})};b.forwardRef(nB);const rB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M17 23a2 2 0 0 1-2-2v-5a1 1 0 0 1 0-2 2 2 0 0 1 2 2v5a1 1 0 0 1 0 2"})})},iB=b.forwardRef(rB),oB=iB,sB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.5 7A1.5 1.5 0 0 1 24 8.5h-3.919l-5 15H18a1.5 1.5 0 1 1 0 3H8a1.5 1.5 0 1 1 0-3h3.919l5-15H14a1.5 1.5 0 0 1 0-3h10A1.5 1.5 0 0 1 25.5 7"})})},aB=b.forwardRef(sB),lB=aB,cB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M20 2a10.01 10.01 0 0 0-9.511 13.098l-7.196 7.195A1 1 0 0 0 3 23v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-2h2a1 1 0 0 0 1-1v-2h2a1 1 0 0 0 .707-.293l1.195-1.196A10 10 0 1 0 20 2m2.5 9.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4"})})};b.forwardRef(cB);const uB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M5 7h22v5H5zm22 18H14V14h13z"})})};b.forwardRef(uB);const hB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M22 29a1 1 0 0 1-1 1H11a1 1 0 1 1 0-2h10a1 1 0 0 1 1 1m5-16a10.94 10.94 0 0 1-4.205 8.651A2.03 2.03 0 0 0 22 23.25V24a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-.75a2 2 0 0 0-.779-1.582A10.95 10.95 0 0 1 5 13.06C4.967 7.104 9.782 2.143 15.735 2A11 11 0 0 1 27 13m-4.014-1.168a7.2 7.2 0 0 0-5.82-5.818 1 1 0 1 0-.332 1.972c2.071.349 3.829 2.106 4.18 4.182a1 1 0 0 0 1.972-.335"})})};b.forwardRef(hB);const fB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m21.731 14.683-14 15a1 1 0 0 1-1.711-.875l1.832-9.167L.65 16.936a1 1 0 0 1-.375-1.625l14-15a1 1 0 0 1 1.71.875l-1.837 9.177 7.204 2.7a1 1 0 0 1 .375 1.62z"})})};b.forwardRef(fB);const dB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M17.046 23.441a1.5 1.5 0 0 1 0 2.125l-.742.743a7.502 7.502 0 1 1-10.61-10.61l3.015-3.014A7.5 7.5 0 0 1 19 12.375a1.506 1.506 0 0 1-2 2.25 4.5 4.5 0 0 0-6.171.184l-3.013 3.01a4.5 4.5 0 0 0 6.365 6.365l.743-.743a1.5 1.5 0 0 1 2.122 0m9.26-17.75a7.51 7.51 0 0 0-10.61 0l-.742.743a1.503 1.503 0 1 0 2.125 2.125l.742-.743a4.5 4.5 0 0 1 6.365 6.365l-3.014 3.015a4.5 4.5 0 0 1-6.172.179 1.506 1.506 0 1 0-2 2.25 7.5 7.5 0 0 0 10.288-.304l3.014-3.014a7.51 7.51 0 0 0 .004-10.613z"})})},gB=b.forwardRef(dB),mB=gB,pB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5M5 9.5h22a1.5 1.5 0 0 0 0-3H5a1.5 1.5 0 0 0 0 3m22 13H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(pB);const vB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.5 8A1.5 1.5 0 0 1 5 6.5h22a1.5 1.5 0 0 1 0 3H5A1.5 1.5 0 0 1 3.5 8M5 17.5h22a1.5 1.5 0 1 0 0-3H5a1.5 1.5 0 1 0 0 3m13 5H5a1.5 1.5 0 1 0 0 3h13a1.5 1.5 0 1 0 0-3m11 0h-1.5V21a1.5 1.5 0 1 0-3 0v1.5H23a1.5 1.5 0 1 0 0 3h1.5V27a1.5 1.5 0 1 0 3 0v-1.5H29a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(vB);const bB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 64a12 12 0 0 1 12-12h176a12 12 0 0 1 0 24H40a12 12 0 0 1-12-12m12 76h64a12 12 0 0 0 0-24H40a12 12 0 0 0 0 24m80 40H40a12 12 0 0 0 0 24h80a12 12 0 0 0 0-24m120.49 20.49a12 12 0 0 1-17 0l-18.08-18.08a44 44 0 1 1 17-17l18.08 18.07a12 12 0 0 1 0 17.01M184 164a20 20 0 1 0-20-20 20 20 0 0 0 20 20"})})};b.forwardRef(bB);const wB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M17.5 4v4a1.5 1.5 0 1 1-3 0V4a1.5 1.5 0 1 1 3 0m4.156 7.844a1.5 1.5 0 0 0 1.062-.44l2.828-2.829a1.503 1.503 0 1 0-2.125-2.125l-2.825 2.833a1.5 1.5 0 0 0 1.06 2.56M28 14.5h-4a1.5 1.5 0 1 0 0 3h4a1.5 1.5 0 1 0 0-3m-5.282 6.096a1.501 1.501 0 0 0-2.451 1.638c.075.182.186.348.326.487l2.828 2.829a1.503 1.503 0 0 0 2.125-2.125zM16 22.5a1.5 1.5 0 0 0-1.5 1.5v4a1.5 1.5 0 1 0 3 0v-4a1.5 1.5 0 0 0-1.5-1.5m-6.717-1.904-2.83 2.829A1.503 1.503 0 0 0 8.58 25.55l2.829-2.829a1.503 1.503 0 0 0-2.125-2.125M9.5 16A1.5 1.5 0 0 0 8 14.5H4a1.5 1.5 0 1 0 0 3h4A1.5 1.5 0 0 0 9.5 16m-.925-9.546A1.503 1.503 0 0 0 6.45 8.579l2.833 2.825a1.503 1.503 0 0 0 2.125-2.125z"})})},xB=b.forwardRef(wB),T3=xB,yB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 10h-4V7a6 6 0 1 0-12 0v3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V12a2 2 0 0 0-2-2M16 20.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M20 10h-8V7a4 4 0 1 1 8 0z"})})};b.forwardRef(yB);const CB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31 19a1 1 0 0 1-1 1h-2v2a1 1 0 0 1-2 0v-2h-2a1 1 0 0 1 0-2h2v-2a1 1 0 1 1 2 0v2h2a1 1 0 0 1 1 1M7 9h2v2a1 1 0 1 0 2 0V9h2a1 1 0 0 0 0-2h-2V5a1 1 0 0 0-2 0v2H7a1 1 0 0 0 0 2m16 15h-1v-1a1 1 0 0 0-2 0v1h-1a1 1 0 0 0 0 2h1v1a1 1 0 1 0 2 0v-1h1a1 1 0 0 0 0-2m4.414-14L10 27.414a2 2 0 0 1-2.828 0l-2.587-2.585a2 2 0 0 1 0-2.829L22 4.586a2 2 0 0 1 2.829 0l2.585 2.585a2 2 0 0 1 0 2.829M26 8.586 23.414 6l-4 4L22 12.586z"})})};b.forwardRef(CB);const $B=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 6H4a1 1 0 0 0-1 1v17a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a1 1 0 0 0-1-1M12.339 16 5 22.726V9.274zm1.48 1.356 1.5 1.381a1 1 0 0 0 1.352 0l1.5-1.38L25.421 24H6.571zM19.66 16 27 9.273v13.455z"})})};b.forwardRef($B);const SB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M11 7q0 .432-.088.838L16 10.382l5.088-2.544a4 4 0 1 1 .895 1.789L18.236 11.5l3.747 1.873a4 4 0 1 1 0 5.253L18.236 20.5l3.747 1.874a4 4 0 1 1-.895 1.788L16 21.618l-5.088 2.544Q11 24.567 11 25a4 4 0 1 1-.983-2.626l3.747-1.874-3.747-1.873a4 4 0 1 1 0-5.253l3.747-1.874-3.747-1.874A4 4 0 1 1 11 7M9 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0m2.236 8h9.528L16 12.618zM9 25a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-2-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4M27 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-2 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4m2-11a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-11 3.382L20.764 17h-9.528z",clipRule:"evenodd"})})};b.forwardRef(SB);const AB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M14.8 8.254a4 4 0 1 0-1.082 1.682l7.483 4.81a4 4 0 0 0-.075.254H10.874A4.002 4.002 0 0 0 3 16a4 4 0 0 0 7.874 1h10.252q.033.128.075.254l-7.484 4.81a4 4 0 1 0 1.082 1.682l7.484-4.81a4 4 0 1 0 0-5.871zM11 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4M9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0m16 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};b.forwardRef(AB);const RB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M18.842 3.227a1 1 0 1 0-.445 1.95l1.747.399L9.6 12.959a4 4 0 1 0 0 6.081l10.546 7.385-1.748.399a1 1 0 1 0 .445 1.95l3.945-.9a1 1 0 0 0 .77-1.1l-.503-4.014a1 1 0 0 0-1.985.248l.223 1.779-10.545-7.384a4 4 0 0 0 .127-.403h14.712l-1.293 1.293a1 1 0 1 0 1.414 1.414l3-3a1 1 0 0 0 0-1.414l-3-3a1 1 0 0 0-1.414 1.414L25.586 15H10.874a4 4 0 0 0-.127-.403l10.544-7.383-.222 1.778a1 1 0 0 0 1.984.249l.503-4.015a1 1 0 0 0-.77-1.099zM9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0",clipRule:"evenodd"})})};b.forwardRef(RB);const kB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 6H5a2 2 0 0 0-2 2v20a1.98 1.98 0 0 0 1.156 1.813 1.986 1.986 0 0 0 2.141-.299L10.312 26H27a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2M10.5 17.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(kB);const TB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M10 16V8a6 6 0 1 1 12 0v8a6 6 0 1 1-12 0m16 0a1 1 0 0 0-2 0 8 8 0 0 1-16 0 1 1 0 1 0-2 0 10.014 10.014 0 0 0 9 9.95V29a1 1 0 0 0 2 0v-3.05A10.014 10.014 0 0 0 26 16"})})};b.forwardRef(TB);const MB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5"})})},EB=b.forwardRef(MB),OB=EB,DB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m5 14H11a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2"})})};b.forwardRef(DB);const IB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 5H6a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h20a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3M20 27h-8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2"})})};b.forwardRef(IB);const _B=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.443 18.776a13.1 13.1 0 0 1-4.626 6.614A13 13 0 0 1 4 15a12.9 12.9 0 0 1 2.61-7.815 13.1 13.1 0 0 1 6.614-4.625 1 1 0 0 1 1.25 1.25 11.01 11.01 0 0 0 13.725 13.725 1 1 0 0 1 1.25 1.25z"})})};b.forwardRef(_B);const LB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M18 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0M7.5 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m17 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})},BB=b.forwardRef(LB),NB=BB,jB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M10.939 8.061a1.5 1.5 0 0 1 0-2.125l4-4a1.5 1.5 0 0 1 2.125 0l4 4a1.503 1.503 0 1 1-2.125 2.125L17.5 6.625V12a1.5 1.5 0 1 1-3 0V6.625l-1.439 1.436a1.5 1.5 0 0 1-2.122 0m8 15.875L17.5 25.375V20a1.5 1.5 0 1 0-3 0v5.375l-1.439-1.44a1.504 1.504 0 0 0-2.125 2.125l4 4a1.5 1.5 0 0 0 2.125 0l4-4a1.502 1.502 0 1 0-2.125-2.125zm11.125-9-4-4a1.503 1.503 0 0 0-2.125 2.125l1.436 1.439H20a1.5 1.5 0 0 0 0 3h5.375l-1.44 1.439a1.503 1.503 0 0 0 2.125 2.125l4-4a1.5 1.5 0 0 0 .001-2.125zM6.625 17.5H12a1.5 1.5 0 1 0 0-3H6.625l1.44-1.439a1.503 1.503 0 1 0-2.125-2.125l-4 4a1.5 1.5 0 0 0 0 2.125l4 4a1.503 1.503 0 0 0 2.125-2.125z"})})};b.forwardRef(jB);const FB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.615 3.214a.99.99 0 0 0-.857-.183l-16 4a1 1 0 0 0-.758.97v13.762a4.5 4.5 0 1 0 2 3.737V13.781l14-3.5v7.482a4.5 4.5 0 1 0 2 3.737V4a1 1 0 0 0-.385-.786"})})};b.forwardRef(FB);const VB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H14.5a1.5 1.5 0 1 1 0-3H27a1.5 1.5 0 0 1 1.5 1.5m-14-6.5H27a1.5 1.5 0 0 0 0-3H14.5a1.5 1.5 0 0 0 0 3m12.5 13H14.5a1.5 1.5 0 1 0 0 3H27a1.5 1.5 0 1 0 0-3M5.5 7.414V13a1.5 1.5 0 0 0 3 0V5a1.5 1.5 0 0 0-2.17-1.341l-2 1a1.5 1.5 0 0 0 1.17 2.75zm4.966 12.107a3.46 3.46 0 0 0-1.4-2.329 3.61 3.61 0 0 0-4.954.683 3.5 3.5 0 0 0-.52.942 1.5 1.5 0 0 0 2.818 1.027.5.5 0 0 1 .072-.125.6.6 0 0 1 .813-.103.48.48 0 0 1 .201.325.45.45 0 0 1-.096.347l-.016.02-3.585 4.794A1.5 1.5 0 0 0 5 27.5h4a1.5 1.5 0 1 0 0-3H8l1.785-2.389a3.43 3.43 0 0 0 .681-2.59"})})},HB=b.forwardRef(VB),PB=HB,WB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M17.2 8.254a4 4 0 1 1 1.082 1.682l-7.482 4.81q.04.125.074.254h10.252A4.002 4.002 0 0 1 29 16a4 4 0 0 1-7.874 1H10.874q-.033.128-.075.254l7.484 4.81a4 4 0 1 1-1.082 1.682l-7.484-4.81a4 4 0 1 1 0-5.871zM21 9a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4m2-11a2 2 0 1 0 4 0 2 2 0 0 0-4 0M7 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4",clipRule:"evenodd"})})};b.forwardRef(WB);const zB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M10.874 17A4.002 4.002 0 0 1 3 16a4 4 0 0 1 7.874-1h10.252A4.002 4.002 0 0 1 29 16a4 4 0 0 1-7.874 1zM7 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m18 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};b.forwardRef(zB);const UB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M28.924 16.384c-.05.12-.124.231-.217.324l-4 4a1 1 0 0 1-1.632-.324 1 1 0 0 1 .217-1.09L25.585 17H10.875A4.002 4.002 0 0 1 3 16a4 4 0 0 1 7.874-1h14.712l-2.294-2.293a1 1 0 0 1 1.415-1.415l4 4a1 1 0 0 1 .217 1.09M7 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};b.forwardRef(UB);const qB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 4a1 1 0 0 0-1-1c-5.51 0-11.164 6.214-14.304 10.329A7.5 7.5 0 0 0 4 20.5c0 3.86-2.443 5.591-2.559 5.671A1 1 0 0 0 2 28h9.5a7.5 7.5 0 0 0 7.171-9.696C22.788 15.164 29 9.51 29 4M15.553 14.194a48 48 0 0 1 1.26-1.569 9.5 9.5 0 0 1 2.562 2.561q-.738.618-1.569 1.262a7.6 7.6 0 0 0-2.254-2.254m5.337-.335a11.6 11.6 0 0 0-2.75-2.75c3.973-4.316 6.969-5.625 8.738-5.989-.357 1.77-1.672 4.766-5.988 8.739"})})};b.forwardRef(qB);const KB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31 13v6.25a2.01 2.01 0 0 1-1.45 1.922L17 24.75V29a1 1 0 0 1-2 0v-4.25a2.01 2.01 0 0 1 1.45-1.922L29 19.25V13h-2v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3H2a1 1 0 0 1 0-2h2V8a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v3h2a2 2 0 0 1 2 2"})})};b.forwardRef(KB);const GB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.096 6.736A12.9 12.9 0 0 0 16 3h-.134A13 13 0 0 0 3 16c0 5.375 3.323 9.883 8.67 11.771A4 4 0 0 0 17 24a2 2 0 0 1 2-2h5.776a3.976 3.976 0 0 0 3.9-3.11c.224-.984.332-1.99.324-3a12.9 12.9 0 0 0-3.904-9.154M10.5 21a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0-7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5-3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(GB);const YB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.925 5.543v.018L21.65 29.554A1.985 1.985 0 0 1 19.728 31a1.98 1.98 0 0 1-1.803-1.144l-4.464-9.423a.5.5 0 0 1 .099-.568l7.158-7.159a1 1 0 0 0-1.414-1.413l-7.169 7.157a.5.5 0 0 1-.567.099l-9.376-4.441A2.05 2.05 0 0 1 1 12.17a1.99 1.99 0 0 1 1.446-1.815L26.44 3.08h.018a2 2 0 0 1 2.468 2.463"})})};b.forwardRef(YB);const XB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.56 17.061-10.257 10.25a7.501 7.501 0 0 1-10.607-10.61l12.27-12.236a5 5 0 0 1 7.07 7.074l-.021.02L13.04 23.086a1.503 1.503 0 0 1-2.121-.041 1.5 1.5 0 0 1 .041-2.121L22.924 9.409a2 2 0 1 0-2.838-2.82L7.816 18.82a4.5 4.5 0 1 0 6.366 6.364l10.258-10.25a1.503 1.503 0 0 1 2.125 2.125z"})})};b.forwardRef(XB);const ZB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.5 8A1.5 1.5 0 0 1 5 6.5h22a1.5 1.5 0 0 1 0 3H5A1.5 1.5 0 0 1 3.5 8M5 14.5h16a1.5 1.5 0 1 0 0-3H5a1.5 1.5 0 1 0 0 3m22 2H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 1 0 0-3m-6 5H5a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(ZB);const QB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m28.414 9.171-5.585-5.586a2 2 0 0 0-2.829 0L4.586 19A1.98 1.98 0 0 0 4 20.414V26a2 2 0 0 0 2 2h5.586A1.98 1.98 0 0 0 13 27.414L28.414 12a2 2 0 0 0 0-2.829M24 13.585 18.414 8l3-3L27 10.585z"})})},JB=b.forwardRef(QB),eN=JB,tN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.985 21.885A7.03 7.03 0 0 1 22 28c-9.925 0-18-8.075-18-18a7.03 7.03 0 0 1 6.115-6.985 2 2 0 0 1 2.078 1.19l2.64 5.894v.015a2 2 0 0 1-.16 1.886 1 1 0 0 1-.07.096L12 15.181c.936 1.903 2.926 3.875 4.854 4.814l3.042-2.589q.045-.037.094-.07a2 2 0 0 1 1.896-.175l.017.008 5.888 2.639a2 2 0 0 1 1.194 2.077"})})};b.forwardRef(tN);const nN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.416 13-6.683 6.706c.57 1.584.806 4.236-1.65 7.5a2 2 0 0 1-1.458.794h-.141a2 2 0 0 1-1.415-.586l-6.033-6.04-5.328 5.333a1 1 0 1 1-1.415-1.415l5.332-5.328-6.037-6.038a2 2 0 0 1 .162-2.972c3.178-2.564 6.219-2.06 7.55-1.643L19 2.587a2 2 0 0 1 2.829 0l7.586 7.585A2 2 0 0 1 29.416 13"})})};b.forwardRef(nN);const rN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 2A11.013 11.013 0 0 0 5 13c0 9.413 10 16.521 10.426 16.819a1 1 0 0 0 1.148 0C17 29.52 27 22.413 27 13A11.01 11.01 0 0 0 16 2m0 7a4 4 0 1 1 0 8 4 4 0 0 1 0-8"})})};b.forwardRef(rN);const iN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 17v4a1 1 0 0 1-1.196.98L19.5 20.125v2.966l2.207 2.206A1 1 0 0 1 22 26v3a1 1 0 0 1-1.375.929L16 28.078l-4.625 1.85A1 1 0 0 1 10 29v-3a1 1 0 0 1 .293-.707l2.207-2.207v-2.961L3.196 21.98A1 1 0 0 1 2 21v-4a1 1 0 0 1 .553-.895l9.947-4.972V5.5a3.5 3.5 0 1 1 7 0v5.633l9.948 4.972A1 1 0 0 1 30 17"})})};b.forwardRef(iN);const oN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.676 18.884a7.6 7.6 0 0 1-3.978 1.107 9 9 0 0 1-3.42-.707A6.94 6.94 0 0 0 17 23.314V27a1 1 0 0 1-1.066 1A1.023 1.023 0 0 1 15 26.969v-1.555l-4.828-4.828A6.6 6.6 0 0 1 7.93 21a5.73 5.73 0 0 1-2.99-.834C2.216 18.511.75 14.702 1.034 9.974a1 1 0 0 1 .94-.94c4.728-.28 8.537 1.182 10.187 3.906a5.75 5.75 0 0 1 .806 3.56.5.5 0 0 1-.86.304l-2.4-2.513a1 1 0 0 0-1.415 1.414l6.736 6.906q.01-.146.026-.291a8.57 8.57 0 0 1 2.33-4.933l6.323-6.682a1 1 0 0 0-1.413-1.415l-6.125 6.477a.5.5 0 0 1-.848-.217c-.592-2.185-.331-4.36.8-6.228 2.233-3.685 7.428-5.657 13.898-5.277a1 1 0 0 1 .94.94c.375 6.471-1.598 11.666-5.283 13.899"})})};b.forwardRef(oN);const sN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 16a1.97 1.97 0 0 1-.95 1.689L11.04 28.706a2 2 0 0 1-2.767-.688A2 2 0 0 1 8 27.016V4.984a1.98 1.98 0 0 1 1.015-1.728 2 2 0 0 1 2.025.038L29.05 14.31A1.97 1.97 0 0 1 30 16"})})},aN=b.forwardRef(sN),lN=aN,cN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5h-9.5V27a1.5 1.5 0 1 1-3 0v-9.5H5a1.5 1.5 0 1 1 0-3h9.5V5a1.5 1.5 0 1 1 3 0v9.5H27a1.5 1.5 0 0 1 1.5 1.5"})})},uN=b.forwardRef(cN),hN=uN,fN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.016 13.016 0 0 0 16 3m5 14h-4v4a1 1 0 0 1-2 0v-4h-4a1 1 0 0 1 0-2h4v-4a1 1 0 0 1 2 0v4h4a1 1 0 0 1 0 2"})})};b.forwardRef(fN);const dN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H17V3a1 1 0 0 0-2 0v2H5a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h4.92l-2.701 3.375a1 1 0 0 0 1.562 1.25L12.48 24h7.04l3.699 4.625a1 1 0 1 0 1.562-1.25L22.08 24H27a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M13 18a1 1 0 0 1-2 0v-3a1 1 0 0 1 2 0zm4 0a1 1 0 0 1-2 0v-5a1 1 0 0 1 2 0zm4 0a1 1 0 0 1-2 0v-7a1 1 0 0 1 2 0z"})})};b.forwardRef(dN);const gN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.414 17 18 4.586A1.98 1.98 0 0 0 16.586 4H5a1 1 0 0 0-1 1v11.586A1.98 1.98 0 0 0 4.586 18L17 30.414a2 2 0 0 0 2.829 0l10.585-10.585a2 2 0 0 0 0-2.829M10.5 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(gN);const mN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M20.723 28H26a2 2 0 0 0 2-2v-4.706a1 1 0 0 0-1.383-.919 2.9 2.9 0 0 1-1.117.221c-1.654 0-3-1.387-3-3.091s1.346-3.091 3-3.091c.383 0 .763.075 1.117.221A1 1 0 0 0 28 13.706V9a2 2 0 0 0-2-2h-4.527a4.5 4.5 0 1 0-8.945 0H8a2 2 0 0 0-2 2v4.028a4.5 4.5 0 1 0 0 8.945V26a2 2 0 0 0 2 2h5.278"})})};b.forwardRef(mN);const pN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M18 22.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0M29.5 16A13.5 13.5 0 1 1 16 2.5 13.515 13.515 0 0 1 29.5 16m-3 0A10.5 10.5 0 1 0 16 26.5 10.51 10.51 0 0 0 26.5 16M16 8c-3.033 0-5.5 2.242-5.5 5v.5a1.5 1.5 0 1 0 3 0V13c0-1.102 1.125-2 2.5-2s2.5.898 2.5 2-1.125 2-2.5 2a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 2.966.32C19.79 17.235 21.5 15.296 21.5 13c0-2.758-2.468-5-5.5-5"})})};b.forwardRef(pN);const vN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M14.5 9v11a6.006 6.006 0 0 1-6 6 1 1 0 0 1 0-2 4 4 0 0 0 4-4v-1H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h7.5a2 2 0 0 1 2 2M27 7h-7.5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2H27v1a4 4 0 0 1-4 4 1 1 0 0 0 0 2 6.006 6.006 0 0 0 6-6V9a2 2 0 0 0-2-2"})})},bN=b.forwardRef(vN),wN=bN,xN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5v23a1 1 0 0 1-2 0v-6h-6a1 1 0 0 1-1-1c.046-2.395.349-4.779.902-7.11 1.223-5.061 3.54-8.454 6.704-9.809a1 1 0 0 1 1.394.92m-12.014-.164a.999.999 0 1 0-1.972.33L13.986 11H11V5a1 1 0 0 0-2 0v6H6.014l.972-5.835a1 1 0 1 0-1.972-.329l-1 6A1 1 0 0 0 4 11a6.01 6.01 0 0 0 5 5.915V28a1 1 0 1 0 2 0V16.915A6.01 6.01 0 0 0 16 11q0-.083-.014-.164z"})})};b.forwardRef(xN);const yN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19 28a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1m8.953-8.521-1.546 6.954a2 2 0 0 1-3.188 1.138l-3.405-2.57h-7.625L8.78 27.57a2 2 0 0 1-3.189-1.138l-1.545-6.954a2.01 2.01 0 0 1 .415-1.714l3.57-4.282c.12-1.574.482-3.12 1.072-4.584 1.612-4.043 4.5-6.579 5.671-7.481a2 2 0 0 1 2.45 0c1.167.902 4.059 3.438 5.671 7.48.59 1.465.952 3.01 1.072 4.585l3.57 4.282a2.01 2.01 0 0 1 .415 1.714m-17.404 4.25q-2.014-3.666-2.445-7.209L6 19.045 7.545 26l.022-.016zM17.5 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m8.5 6.545-2.104-2.525q-.428 3.535-2.445 7.211l2.982 2.25.022.017z"})})};b.forwardRef(yN);const CN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.716 14.141a1 1 0 0 1 .261-1.391l8.458-5.788a1 1 0 0 1 1.125 1.652L21.101 14.4a1 1 0 0 1-1.39-.261zm10.109 10.634a1 1 0 0 1-1.39.261L17 17.211l-5.315 3.636a4.5 4.5 0 1 1-1.125-1.65L15.229 16l-4.673-3.198a4.5 4.5 0 1 1 1.125-1.65l17.875 12.233a1 1 0 0 1 .269 1.39M9 22.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m0-13a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"})})};b.forwardRef(CN);const $N=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M225.86 102.82c-3.77-3.94-7.67-8-9.14-11.57-1.36-3.27-1.44-8.69-1.52-13.94-.15-9.76-.31-20.82-8-28.51s-18.75-7.85-28.51-8c-5.25-.08-10.67-.16-13.94-1.52-3.56-1.47-7.63-5.37-11.57-9.14C146.28 23.51 138.44 16 128 16s-18.27 7.51-25.18 14.14c-3.94 3.77-8 7.67-11.57 9.14-3.25 1.36-8.69 1.44-13.94 1.52-9.76.15-20.82.31-28.51 8s-7.8 18.75-8 28.51c-.08 5.25-.16 10.67-1.52 13.94-1.47 3.56-5.37 7.63-9.14 11.57C23.51 109.72 16 117.56 16 128s7.51 18.27 14.14 25.18c3.77 3.94 7.67 8 9.14 11.57 1.36 3.27 1.44 8.69 1.52 13.94.15 9.76.31 20.82 8 28.51s18.75 7.85 28.51 8c5.25.08 10.67.16 13.94 1.52 3.56 1.47 7.63 5.37 11.57 9.14 6.9 6.63 14.74 14.14 25.18 14.14s18.27-7.51 25.18-14.14c3.94-3.77 8-7.67 11.57-9.14 3.27-1.36 8.69-1.44 13.94-1.52 9.76-.15 20.82-.31 28.51-8s7.85-18.75 8-28.51c.08-5.25.16-10.67 1.52-13.94 1.47-3.56 5.37-7.63 9.14-11.57 6.63-6.9 14.14-14.74 14.14-25.18s-7.51-18.27-14.14-25.18m-52.2 6.84-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32"})})};b.forwardRef($N);const SN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.061 26.939 23.125 21A11.515 11.515 0 1 0 21 23.125l5.941 5.942a1.503 1.503 0 0 0 2.125-2.125zM5.5 14a8.5 8.5 0 1 1 8.5 8.5A8.51 8.51 0 0 1 5.5 14"})})},AN=b.forwardRef(SN),M3=AN,RN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 5H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M26 17H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m-3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(RN);const kN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 7v7.346c0 11.202-9.477 14.918-11.375 15.549a1.94 1.94 0 0 1-1.25 0C13.475 29.264 4 25.548 4 14.346V7a2 2 0 0 1 2-2h20a2 2 0 0 1 2 2"})})},TN=b.forwardRef(kN),MN=TN,EN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m30.949 7.653-6.47-3.528A1 1 0 0 0 24 4h-4a1 1 0 0 0-1 1 3 3 0 0 1-6 0 1 1 0 0 0-1-1H8a1 1 0 0 0-.48.125L1.051 7.653a1.97 1.97 0 0 0-.824 2.657l2.41 4.601A2.05 2.05 0 0 0 4.458 16H7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V16h2.543a2.05 2.05 0 0 0 1.822-1.089l2.409-4.601a1.97 1.97 0 0 0-.825-2.658M4.459 14a.08.08 0 0 1-.051-.016L2.01 9.408 7 6.685V14zm23.134-.018a.07.07 0 0 1-.052.018H25V6.685l4.99 2.723z"})})};b.forwardRef(EN);const ON=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M12 27a2 2 0 1 1-4 0 2 2 0 0 1 4 0m11-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4m5.805-16.594A1 1 0 0 0 28 8H6.04L5.026 4.45A2.01 2.01 0 0 0 3.103 3H1a1 1 0 0 0 0 2h2.103l4.522 15.824A3.01 3.01 0 0 0 10.509 23h12.014a2.99 2.99 0 0 0 2.867-2.117l3.566-11.59a1 1 0 0 0-.151-.887"})})};b.forwardRef(ON);const DN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M14.5 27a1.5 1.5 0 0 1-1.5 1.5H6A2.5 2.5 0 0 1 3.5 26V6A2.5 2.5 0 0 1 6 3.5h7a1.5 1.5 0 0 1 0 3H6.5v19H13a1.5 1.5 0 0 1 1.5 1.5m13.561-12.061-5-5a1.503 1.503 0 0 0-2.125 2.125l2.439 2.436H13a1.5 1.5 0 1 0 0 3h10.375l-2.44 2.439a1.503 1.503 0 0 0 2.125 2.125l5-5a1.5 1.5 0 0 0 .001-2.125"})})};b.forwardRef(DN);const IN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M4 10a1 1 0 0 1 1-1h4.646a3.5 3.5 0 0 1 6.708 0H27a1 1 0 1 1 0 2H16.354a3.5 3.5 0 0 1-6.708 0H5a1 1 0 0 1-1-1m23 11h-2.646a3.5 3.5 0 0 0-6.708 0H5a1 1 0 0 0 0 2h12.646a3.5 3.5 0 0 0 6.708 0H27a1 1 0 1 0 0-2"})})};b.forwardRef(IN);const _N=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 18a1.97 1.97 0 0 1-1.302 1.867l-6.457 2.375-2.375 6.452a1.99 1.99 0 0 1-3.735 0L9.75 22.25l-6.452-2.375a1.99 1.99 0 0 1 0-3.735l6.456-2.375 2.375-6.451a1.99 1.99 0 0 1 3.735 0l2.375 6.456 6.451 2.375A1.97 1.97 0 0 1 26 18M19 6h2v2a1 1 0 0 0 2 0V6h2a1 1 0 1 0 0-2h-2V2a1 1 0 1 0-2 0v2h-2a1 1 0 1 0 0 2m11 4h-1V9a1 1 0 1 0-2 0v1h-1a1 1 0 0 0 0 2h1v1a1 1 0 0 0 2 0v-1h1a1 1 0 0 0 0-2"})})};b.forwardRef(_N);const LN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15 7v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2m10-2h-6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M13 17H7a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m12 0h-6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2"})})};b.forwardRef(LN);const BN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:[p.jsx("path",{d:"M27.5 21.136 16 27.843 4.5 21.136a1 1 0 0 0-1 1.728l12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 1 0-1.008-1.728"}),p.jsx("path",{d:"M27.5 15.136 16 21.843 4.5 15.136a1 1 0 0 0-1 1.728l12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 1 0-1.008-1.728"}),p.jsx("path",{d:"m3.5 10.864 12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 0 0 0-1.728l-12-7a1 1 0 0 0-1.008 0l-12 7a1 1 0 0 0 0 1.728"})]})};b.forwardRef(BN);const NN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.313 14.298-5.638 4.92 1.689 7.325a2 2 0 0 1-2.98 2.167l-6.389-3.875L9.62 28.71a2 2 0 0 1-2.98-2.168l1.686-7.317-5.638-4.928a2 2 0 0 1 1.138-3.507l7.433-.644 2.901-6.92a1.994 1.994 0 0 1 3.68 0l2.91 6.92 7.43.644a2 2 0 0 1 1.139 3.508z"})})};b.forwardRef(NN);const jN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 19a4 4 0 1 0-4.991 3.875A1 1 0 0 0 24 23a4 4 0 0 1-4 4h-3a4 4 0 0 1-4-4v-5.065c3.934-.5 7-3.934 7-8.039V5a2 2 0 0 0-2-2h-2a1 1 0 1 0 0 2h2v4.896c0 3.323-2.656 6.061-5.92 6.104A6 6 0 0 1 6 10V5h2a1 1 0 0 0 0-2H6a2 2 0 0 0-2 2v5a8 8 0 0 0 7 7.936V23a6.006 6.006 0 0 0 6 6h3a6.006 6.006 0 0 0 6-6 1 1 0 0 0-.009-.125A4 4 0 0 0 29 19m-4 1a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})})};b.forwardRef(jN);const FN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M216 56v144a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h144a16 16 0 0 1 16 16"})})};b.forwardRef(FN);const VN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 12a1 1 0 0 0-.038-.275L27.17 5.45A2.01 2.01 0 0 0 25.25 4H6.75a2.01 2.01 0 0 0-1.919 1.45L3.04 11.725A1 1 0 0 0 3 12v2a5 5 0 0 0 2 4v8a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-8a5 5 0 0 0 2-4zm-18 2a3 3 0 0 1-4.39 2.657 1 1 0 0 0-.228-.132A3 3 0 0 1 5 14v-1h6zm8 0a3 3 0 0 1-6 0v-1h6zm8 0a3 3 0 0 1-1.384 2.525q-.12.051-.225.131A3 3 0 0 1 21 14v-1h6z"})})};b.forwardRef(VN);const HN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5h-3.767A5.19 5.19 0 0 1 24.5 21c0 1.806-.976 3.54-2.679 4.756C20.25 26.881 18.18 27.5 16 27.5s-4.25-.619-5.821-1.744C8.476 24.54 7.5 22.806 7.5 21a1.5 1.5 0 0 1 3 0c0 1.898 2.519 3.5 5.5 3.5s5.5-1.602 5.5-3.5c0-1.595-1.163-2.523-4.419-3.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5M9.389 12.5a1.5 1.5 0 0 0 1.5-1.5c0-2 2.197-3.5 5.111-3.5 2.17 0 3.921.831 4.685 2.223a1.5 1.5 0 0 0 2.625-1.446C22.016 5.914 19.281 4.5 16 4.5c-4.625 0-8.111 2.794-8.111 6.5a1.5 1.5 0 0 0 1.5 1.5"})})},PN=b.forwardRef(HN),WN=PN,zN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15 5V2a1 1 0 0 1 2 0v3a1 1 0 0 1-2 0m1 3a8 8 0 1 0 8 8 8.01 8.01 0 0 0-8-8m-8.707.707a1 1 0 1 0 1.414-1.415l-2-2a1 1 0 1 0-1.414 1.415zm0 14.586-2 2a1 1 0 1 0 1.414 1.415l2-2a1 1 0 1 0-1.415-1.415M24 9a1 1 0 0 0 .707-.293l2-2a1 1 0 0 0-1.415-1.414l-2 2A1 1 0 0 0 24 9m.707 14.293a1 1 0 1 0-1.415 1.415l2 2a1 1 0 0 0 1.415-1.415zM6 16a1 1 0 0 0-1-1H2a1 1 0 0 0 0 2h3a1 1 0 0 0 1-1m10 10a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0v-3a1 1 0 0 0-1-1m14-11h-3a1 1 0 0 0 0 2h3a1 1 0 0 0 0-2"})})};b.forwardRef(zN);const UN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 8h-8.586l4.293-4.292a1 1 0 0 0-1.415-1.415L16 7.586l-5.292-5.293a1 1 0 1 0-1.415 1.415L13.586 8H5a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2m0 17h-7V10h7zm-2-10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0 6a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"})})};b.forwardRef(UN);const qN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.978 19.625-1.5-12A3 3 0 0 0 25.5 5H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h5.383l4.722 9.448A1 1 0 0 0 15 30a5 5 0 0 0 5-5v-2h7a3 3 0 0 0 2.977-3.375M9 18H4V7h5z"})})};b.forwardRef(qN);const KN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.25 10.015A3 3 0 0 0 27 9h-7V7a5 5 0 0 0-5-5 1 1 0 0 0-.895.553L9.383 12H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h21.5a3 3 0 0 0 2.977-2.625l1.5-12a3 3 0 0 0-.727-2.36M4 14h5v11H4z"})})};b.forwardRef(KN);const GN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M23 3H9a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h1l-1.8 2.4a1 1 0 0 0 1.6 1.2l2.7-3.6h7l2.7 3.6a1 1 0 0 0 1.6-1.2L22 27h1a4 4 0 0 0 4-4V7a4 4 0 0 0-4-4M10.5 23a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m4.5-8H7v-5h8zm6.5 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3.5-8h-8v-5h8z"})})};b.forwardRef(GN);const YN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 6h-5V5a3 3 0 0 0-3-3h-6a3 3 0 0 0-3 3v1H5a1 1 0 0 0 0 2h1v18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h1a1 1 0 1 0 0-2M14 21a1 1 0 0 1-2 0v-8a1 1 0 0 1 2 0zm6 0a1 1 0 0 1-2 0v-8a1 1 0 0 1 2 0zm0-15h-8V5a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1z"})})},XN=b.forwardRef(YN),ZN=XN,QN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m23.54 2.267-3.711 3.377c1.7.52 3.298 1.397 4.653 2.631 4.684 4.266 4.684 11.184 0 15.45q-5.184 4.72-16.021 6.008l3.71-3.377a12.2 12.2 0 0 1-4.653-2.63c-4.684-4.267-4.712-11.16 0-15.45q5.184-4.721 16.021-6.01m-7.54 8.4c-3.314 0-6 2.388-6 5.333s2.686 5.333 6 5.333 6-2.387 6-5.333c0-2.945-2.686-5.333-6-5.333"})})};b.forwardRef(QN);const JN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.5 28a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 1 1 0-3h16a1.5 1.5 0 0 1 1.5 1.5M16 24.5a8.51 8.51 0 0 0 8.5-8.5V7a1.5 1.5 0 1 0-3 0v9a5.5 5.5 0 0 1-11 0V7a1.5 1.5 0 1 0-3 0v9a8.51 8.51 0 0 0 8.5 8.5"})})},ej=b.forwardRef(JN),tj=ej,nj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 19v7a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 26v-7a1.5 1.5 0 0 1 3 0v6.5h19V19a1.5 1.5 0 1 1 3 0m-16.439-7.939L14.5 8.625V19a1.5 1.5 0 1 0 3 0V8.625l2.439 2.44a1.503 1.503 0 0 0 2.125-2.125l-5-5a1.5 1.5 0 0 0-2.125 0l-5 5a1.503 1.503 0 1 0 2.125 2.125z"})})};b.forwardRef(nj);const rj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.866 27.5A1 1 0 0 1 28 28H4a1 1 0 0 1-.865-1.5c1.904-3.291 4.838-5.651 8.261-6.77a9 9 0 1 1 9.208 0c3.424 1.119 6.357 3.479 8.261 6.77a1 1 0 0 1 .001 1"})})};b.forwardRef(rj);const ij=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.44 3.101a1 1 0 0 0-1.054.11L9.656 10H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h5.656l8.73 6.789A1 1 0 0 0 20 28V4a1 1 0 0 0-.56-.899M28.414 16l2.293-2.292a1.001 1.001 0 0 0-1.415-1.415L27 14.586l-2.293-2.293a1 1 0 1 0-1.415 1.415L25.587 16l-2.293 2.293a1 1 0 0 0 1.415 1.415L27 17.414l2.293 2.294a1 1 0 0 0 1.415-1.415z"})})};b.forwardRef(ij);const oj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.439 3.101a1 1 0 0 0-1.053.11L9.656 10H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h5.656l8.73 6.789A1.001 1.001 0 0 0 20 28V4a1 1 0 0 0-.561-.899M9 20H4v-8h5zm15.75-7.305a5 5 0 0 1 0 6.61 1 1 0 0 1-1.5-1.322 3 3 0 0 0 0-3.966 1 1 0 0 1 1.5-1.322M31 16a10 10 0 0 1-2.546 6.668 1 1 0 0 1-1.49-1.334 8 8 0 0 0 0-10.666.998.998 0 0 1 .407-1.624 1 1 0 0 1 1.083.29A9.98 9.98 0 0 1 31 16"})})};b.forwardRef(oj);const sj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15 6a4 4 0 1 1 8 0 4 4 0 0 1-8 0m11 11c-3.58 0-5.226-1.662-6.969-3.421a25 25 0 0 0-1.375-1.323C13.031 8.24 5.63 15.098 5.316 15.391a1 1 0 0 0 1.369 1.458 20.5 20.5 0 0 1 3.815-2.724c1.723-.922 3.174-1.279 4.338-1.072L8.082 28.6a1 1 0 0 0 1.835.798l4.2-9.659L18 22.515V29a1 1 0 1 0 2 0v-7a1 1 0 0 0-.419-.814l-4.65-3.321L16.61 14c.33.305.657.634 1 .98C19.381 16.774 21.586 19 26 19a1 1 0 0 0 0-2"})})};b.forwardRef(sj);const aj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-1 7a1 1 0 0 1 2 0v7a1 1 0 0 1-2 0zm1 13a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})},lj=b.forwardRef(aj),E3=lj,cj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m31.316 24.949-3 1a1 1 0 0 1-1.211-.5l-3.724-7.45H13a1 1 0 0 1-1-1v-3.707A7 7 0 0 0 14 27c3.239 0 6.261-2.256 7.031-5.25a1 1 0 1 1 1.938.5C21.96 26.162 18.19 29 14 29a9 9 0 0 1-2-17.774V8.851a3.5 3.5 0 1 1 2 0V11h7a1 1 0 0 1 0 2h-7v3h10a1 1 0 0 1 .894.552l3.612 7.225 2.178-.726a1 1 0 1 1 .632 1.898"})})};b.forwardRef(cj);const O3="Avatar",[uj,ene]=bt(O3),[hj,D3]=uj(O3),fj=b.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[i,o]=b.useState("idle");return b.createElement(hj,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},b.createElement(ge.span,U({},r,{ref:e})))}),dj="AvatarImage",gj=b.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=t,s=D3(dj,n),a=vj(r),c=yt(h=>{i(h),s.onImageLoadingStatusChange(h)});return ut(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?b.createElement(ge.img,U({},o,{ref:e,src:r})):null}),mj="AvatarFallback",pj=b.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...i}=t,o=D3(mj,n),[s,a]=b.useState(r===void 0);return b.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&o.imageLoadingStatus!=="loaded"?b.createElement(ge.span,U({},i,{ref:e})):null});function vj(t){const[e,n]=b.useState("idle");return ut(()=>{if(!t){n("error");return}let r=!0;const i=new window.Image,o=s=>()=>{r&&n(s)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=t,()=>{r=!1}},[t]),e}const bj=fj,wj=gj,xj=pj,Fd="rovingFocusGroup.onEntryFocus",yj={bubbles:!1,cancelable:!0},Zg="RovingFocusGroup",[W0,I3,Cj]=Ch(Zg),[$j,Ks]=bt(Zg,[Cj]),[Sj,Aj]=$j(Zg),Rj=b.forwardRef((t,e)=>b.createElement(W0.Provider,{scope:t.__scopeRovingFocusGroup},b.createElement(W0.Slot,{scope:t.__scopeRovingFocusGroup},b.createElement(kj,U({},t,{ref:e}))))),kj=b.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:h,...f}=t,d=b.useRef(null),m=ye(e,d),v=To(o),[x=null,w]=It({prop:s,defaultProp:a,onChange:c}),[C,S]=b.useState(!1),R=yt(h),T=I3(n),E=b.useRef(!1),[O,L]=b.useState(0);return b.useEffect(()=>{const I=d.current;if(I)return I.addEventListener(Fd,R),()=>I.removeEventListener(Fd,R)},[R]),b.createElement(Sj,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:x,onItemFocus:b.useCallback(I=>w(I),[w]),onItemShiftTab:b.useCallback(()=>S(!0),[]),onFocusableItemAdd:b.useCallback(()=>L(I=>I+1),[]),onFocusableItemRemove:b.useCallback(()=>L(I=>I-1),[])},b.createElement(ge.div,U({tabIndex:C||O===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...t.style},onMouseDown:ie(t.onMouseDown,()=>{E.current=!0}),onFocus:ie(t.onFocus,I=>{const V=!E.current;if(I.target===I.currentTarget&&V&&!C){const F=new CustomEvent(Fd,yj);if(I.currentTarget.dispatchEvent(F),!F.defaultPrevented){const H=T().filter(re=>re.focusable),K=H.find(re=>re.active),W=H.find(re=>re.id===x),G=[K,W,...H].filter(Boolean).map(re=>re.ref.current);_3(G)}}E.current=!1}),onBlur:ie(t.onBlur,()=>S(!1))})))}),Tj="RovingFocusGroupItem",Mj=b.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=t,a=_t(),c=o||a,h=Aj(Tj,n),f=h.currentTabStopId===c,d=I3(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=h;return b.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),b.createElement(W0.ItemSlot,{scope:n,id:c,focusable:r,active:i},b.createElement(ge.span,U({tabIndex:f?0:-1,"data-orientation":h.orientation},s,{ref:e,onMouseDown:ie(t.onMouseDown,x=>{r?h.onItemFocus(c):x.preventDefault()}),onFocus:ie(t.onFocus,()=>h.onItemFocus(c)),onKeyDown:ie(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){h.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=Dj(x,h.orientation,h.dir);if(w!==void 0){x.preventDefault();let S=d().filter(R=>R.focusable).map(R=>R.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const R=S.indexOf(x.currentTarget);S=h.loop?Ij(S,R+1):S.slice(R+1)}setTimeout(()=>_3(S))}})})))}),Ej={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Oj(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Dj(t,e,n){const r=Oj(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ej[r]}function _3(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function Ij(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const Qg=Rj,Jg=Mj;var _j=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Jo=new WeakMap,Sc=new WeakMap,Ac={},Vd=0,L3=function(t){return t&&(t.host||L3(t.parentNode))},Lj=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=L3(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},Bj=function(t,e,n,r){var i=Lj(e,Array.isArray(t)?t:[t]);Ac[n]||(Ac[n]=new WeakMap);var o=Ac[n],s=[],a=new Set,c=new Set(i),h=function(d){!d||a.has(d)||(a.add(d),h(d.parentNode))};i.forEach(h);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(a.has(m))f(m);else try{var v=m.getAttribute(r),x=v!==null&&v!=="false",w=(Jo.get(m)||0)+1,C=(o.get(m)||0)+1;Jo.set(m,w),o.set(m,C),s.push(m),w===1&&x&&Sc.set(m,!0),C===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return f(e),a.clear(),Vd++,function(){s.forEach(function(d){var m=Jo.get(d)-1,v=o.get(d)-1;Jo.set(d,m),o.set(d,v),m||(Sc.has(d)||d.removeAttribute(r),Sc.delete(d)),v||d.removeAttribute(n)}),Vd--,Vd||(Jo=new WeakMap,Jo=new WeakMap,Sc=new WeakMap,Ac={})}},em=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=_j(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Bj(r,i,n,"aria-hidden")):function(){return null}},B3=vh(),Hd=function(){},Mh=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:Hd,onWheelCapture:Hd,onTouchMoveCapture:Hd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,m=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=Us(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,E=ph([n,e]),O=exports.__assign(exports.__assign({},R),i);return $.createElement($.Fragment,null,f&&$.createElement(T,{sideCar:B3,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},O),{ref:E})):$.createElement(S,exports.__assign({},O,{className:c,ref:E}),a))});Mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mh.classNames={fullWidth:co,zeroRight:lo};var z0=!1;if(typeof window<"u")try{var Rc=Object.defineProperty({},"passive",{get:function(){return z0=!0,!0}});window.addEventListener("test",Rc,Rc),window.removeEventListener("test",Rc,Rc)}catch{z0=!1}var es=z0?{passive:!1}:!1,Nj=function(t){return t.tagName==="TEXTAREA"},N3=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nj(t)&&n[e]==="visible")},jj=function(t){return N3(t,"overflowY")},Fj=function(t){return N3(t,"overflowX")},r5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=j3(t,n);if(r){var i=F3(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Vj=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Hj=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},j3=function(t,e){return t==="v"?jj(e):Fj(e)},F3=function(t,e){return t==="v"?Vj(e):Hj(e)},Pj=function(t,e){return t==="h"&&e==="rtl"?-1:1},Wj=function(t,e,n,r,i){var o=Pj(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,m=0;do{var v=F3(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&j3(t,a)&&(d+=S,m+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&d===0||!f&&m===0)&&(h=!0),h},kc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},i5=function(t){return[t.deltaX,t.deltaY]},o5=function(t){return t&&"current"in t?t.current:t},zj=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Uj=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},qj=0,ts=[];function Kj(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(qj++)[0],o=$.useState(function(){return ul()})[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=mh([t.lockRef.current],(t.shards||[]).map(o5),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=kc(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=r5(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=r5(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return Wj(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!ts.length||ts[ts.length-1]!==o)){var S="deltaY"in C?i5(C):kc(C),R=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&zj(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(o5).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=kc(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,i5(w),w.target,a(w,t.lockRef.current))},[]),m=$.useCallback(function(w){h(w.type,kc(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return ts.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,es),document.addEventListener("touchmove",c,es),document.addEventListener("touchstart",f,es),function(){ts=ts.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,es),document.removeEventListener("touchmove",c,es),document.removeEventListener("touchstart",f,es)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:Uj(i)}):null,v?$.createElement(xh,{gapMode:"margin"}):null)}const Gj=bh(B3,Kj);var V3=$.forwardRef(function(t,e){return $.createElement(Mh,exports.__assign({},t,{ref:e,sideCar:Gj}))});V3.classNames=Mh.classNames;const U0=["Enter"," "],Yj=["ArrowDown","PageUp","Home"],H3=["ArrowUp","PageDown","End"],Xj=[...Yj,...H3],Zj={ltr:[...U0,"ArrowRight"],rtl:[...U0,"ArrowLeft"]},Qj={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Eh="Menu",[Fa,Jj,eF]=Ch(Eh),[Mo,P3]=bt(Eh,[eF,Ni,Ks]),tm=Ni(),W3=Ks(),[tF,Eo]=Mo(Eh),[nF,gl]=Mo(Eh),rF=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=t,a=tm(e),[c,h]=b.useState(null),f=b.useRef(!1),d=yt(o),m=To(i);return b.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),b.createElement(al,a,b.createElement(tF,{scope:e,open:n,onOpenChange:d,content:c,onContentChange:h},b.createElement(nF,{scope:e,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:s},r)))},z3=b.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=tm(n);return b.createElement(Hs,U({},i,r,{ref:e}))}),U3="MenuPortal",[iF,q3]=Mo(U3,{forceMount:void 0}),oF=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,o=Eo(U3,e);return b.createElement(iF,{scope:e,forceMount:n},b.createElement(Tt,{present:n||o.open},b.createElement(Ps,{asChild:!0,container:i},r)))},Zn="MenuContent",[sF,nm]=Mo(Zn),aF=b.forwardRef((t,e)=>{const n=q3(Zn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,o=Eo(Zn,t.__scopeMenu),s=gl(Zn,t.__scopeMenu);return b.createElement(Fa.Provider,{scope:t.__scopeMenu},b.createElement(Tt,{present:r||o.open},b.createElement(Fa.Slot,{scope:t.__scopeMenu},s.modal?b.createElement(lF,U({},i,{ref:e})):b.createElement(cF,U({},i,{ref:e})))))}),lF=b.forwardRef((t,e)=>{const n=Eo(Zn,t.__scopeMenu),r=b.useRef(null),i=ye(e,r);return b.useEffect(()=>{const o=r.current;if(o)return em(o)},[]),b.createElement(rm,U({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ie(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),cF=b.forwardRef((t,e)=>{const n=Eo(Zn,t.__scopeMenu);return b.createElement(rm,U({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),rm=b.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:x,...w}=t,C=Eo(Zn,n),S=gl(Zn,n),R=tm(n),T=W3(n),E=Jj(n),[O,L]=b.useState(null),I=b.useRef(null),V=ye(e,I,C.onContentChange),F=b.useRef(0),H=b.useRef(""),K=b.useRef(0),W=b.useRef(null),J=b.useRef("right"),G=b.useRef(0),re=x?V3:b.Fragment,se=x?{as:Cr,allowPinchZoom:!0}:void 0,te=Y=>{var ce,me;const Ie=H.current+Y,we=E().filter(Re=>!Re.disabled),qe=document.activeElement,Te=(ce=we.find(Re=>Re.ref.current===qe))===null||ce===void 0?void 0:ce.textValue,Ve=we.map(Re=>Re.textValue),pe=yF(Ve,Ie,Te),De=(me=we.find(Re=>Re.textValue===pe))===null||me===void 0?void 0:me.ref.current;(function Re(Le){H.current=Le,window.clearTimeout(F.current),Le!==""&&(F.current=window.setTimeout(()=>Re(""),1e3))})(Ie),De&&setTimeout(()=>De.focus())};b.useEffect(()=>()=>window.clearTimeout(F.current),[]),Ws();const ne=b.useCallback(Y=>{var ce,me;return J.current===((ce=W.current)===null||ce===void 0?void 0:ce.side)&&$F(Y,(me=W.current)===null||me===void 0?void 0:me.area)},[]);return b.createElement(sF,{scope:n,searchRef:H,onItemEnter:b.useCallback(Y=>{ne(Y)&&Y.preventDefault()},[ne]),onItemLeave:b.useCallback(Y=>{var ce;ne(Y)||((ce=I.current)===null||ce===void 0||ce.focus(),L(null))},[ne]),onTriggerLeave:b.useCallback(Y=>{ne(Y)&&Y.preventDefault()},[ne]),pointerGraceTimerRef:K,onPointerGraceIntentChange:b.useCallback(Y=>{W.current=Y},[])},b.createElement(re,se,b.createElement(zs,{asChild:!0,trapped:i,onMountAutoFocus:ie(o,Y=>{var ce;Y.preventDefault(),(ce=I.current)===null||ce===void 0||ce.focus()}),onUnmountAutoFocus:s},b.createElement(ko,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v},b.createElement(Qg,U({asChild:!0},T,{dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:L,onEntryFocus:ie(c,Y=>{S.isUsingKeyboardRef.current||Y.preventDefault()})}),b.createElement(ll,U({role:"menu","aria-orientation":"vertical","data-state":Y3(C.open),"data-radix-menu-content":"",dir:S.dir},R,w,{ref:V,style:{outline:"none",...w.style},onKeyDown:ie(w.onKeyDown,Y=>{const me=Y.target.closest("[data-radix-menu-content]")===Y.currentTarget,Ie=Y.ctrlKey||Y.altKey||Y.metaKey,we=Y.key.length===1;me&&(Y.key==="Tab"&&Y.preventDefault(),!Ie&&we&&te(Y.key));const qe=I.current;if(Y.target!==qe||!Xj.includes(Y.key))return;Y.preventDefault();const Ve=E().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);H3.includes(Y.key)&&Ve.reverse(),wF(Ve)}),onBlur:ie(t.onBlur,Y=>{Y.currentTarget.contains(Y.target)||(window.clearTimeout(F.current),H.current="")}),onPointerMove:ie(t.onPointerMove,Va(Y=>{const ce=Y.target,me=G.current!==Y.clientX;if(Y.currentTarget.contains(ce)&&me){const Ie=Y.clientX>G.current?"right":"left";J.current=Ie,G.current=Y.clientX}}))})))))))}),uF=b.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return b.createElement(ge.div,U({},r,{ref:e}))}),q0="MenuItem",s5="menu.itemSelect",hF=b.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,o=b.useRef(null),s=gl(q0,t.__scopeMenu),a=nm(q0,t.__scopeMenu),c=ye(e,o),h=b.useRef(!1),f=()=>{const d=o.current;if(!n&&d){const m=new CustomEvent(s5,{bubbles:!0,cancelable:!0});d.addEventListener(s5,v=>r?.(v),{once:!0}),rx(d,m),m.defaultPrevented?h.current=!1:s.onClose()}};return b.createElement(K3,U({},i,{ref:c,disabled:n,onClick:ie(t.onClick,f),onPointerDown:d=>{var m;(m=t.onPointerDown)===null||m===void 0||m.call(t,d),h.current=!0},onPointerUp:ie(t.onPointerUp,d=>{var m;h.current||(m=d.currentTarget)===null||m===void 0||m.click()}),onKeyDown:ie(t.onKeyDown,d=>{const m=a.searchRef.current!=="";n||m&&d.key===" "||U0.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),K3=b.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=t,s=nm(q0,n),a=W3(n),c=b.useRef(null),h=ye(e,c),[f,d]=b.useState(!1),[m,v]=b.useState("");return b.useEffect(()=>{const x=c.current;if(x){var w;v(((w=x.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),b.createElement(Fa.ItemSlot,{scope:n,disabled:r,textValue:i??m},b.createElement(Jg,U({asChild:!0},a,{focusable:!r}),b.createElement(ge.div,U({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:h,onPointerMove:ie(t.onPointerMove,Va(x=>{r?s.onItemLeave(x):(s.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:ie(t.onPointerLeave,Va(x=>s.onItemLeave(x))),onFocus:ie(t.onFocus,()=>d(!0)),onBlur:ie(t.onBlur,()=>d(!1))}))))}),fF="MenuRadioGroup",[tne,nne]=Mo(fF,{value:void 0,onValueChange:()=>{}}),dF="MenuItemIndicator",[rne,ine]=Mo(dF,{checked:!1}),gF=b.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return b.createElement(ge.div,U({role:"separator","aria-orientation":"horizontal"},r,{ref:e}))}),mF="MenuSub",[one,G3]=Mo(mF),Tc="MenuSubTrigger",pF=b.forwardRef((t,e)=>{const n=Eo(Tc,t.__scopeMenu),r=gl(Tc,t.__scopeMenu),i=G3(Tc,t.__scopeMenu),o=nm(Tc,t.__scopeMenu),s=b.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,h={__scopeMenu:t.__scopeMenu},f=b.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return b.useEffect(()=>f,[f]),b.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),c(null)}},[a,c]),b.createElement(z3,U({asChild:!0},h),b.createElement(K3,U({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Y3(n.open)},t,{ref:ch(e,i.onTriggerChange),onClick:d=>{var m;(m=t.onClick)===null||m===void 0||m.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ie(t.onPointerMove,Va(d=>{o.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ie(t.onPointerLeave,Va(d=>{var m;f();const v=(m=n.content)===null||m===void 0?void 0:m.getBoundingClientRect();if(v){var x;const w=(x=n.content)===null||x===void 0?void 0:x.dataset.side,C=w==="right",S=C?-5:5,R=v[C?"left":"right"],T=v[C?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+S,y:d.clientY},{x:R,y:v.top},{x:T,y:v.top},{x:T,y:v.bottom},{x:R,y:v.bottom}],side:w}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ie(t.onKeyDown,d=>{const m=o.searchRef.current!=="";if(!(t.disabled||m&&d.key===" ")&&Zj[r.dir].includes(d.key)){var v;n.onOpenChange(!0),(v=n.content)===null||v===void 0||v.focus(),d.preventDefault()}})})))}),vF="MenuSubContent",bF=b.forwardRef((t,e)=>{const n=q3(Zn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,o=Eo(Zn,t.__scopeMenu),s=gl(Zn,t.__scopeMenu),a=G3(vF,t.__scopeMenu),c=b.useRef(null),h=ye(e,c);return b.createElement(Fa.Provider,{scope:t.__scopeMenu},b.createElement(Tt,{present:r||o.open},b.createElement(Fa.Slot,{scope:t.__scopeMenu},b.createElement(rm,U({id:a.contentId,"aria-labelledby":a.triggerId},i,{ref:h,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;s.isUsingKeyboardRef.current&&((d=c.current)===null||d===void 0||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ie(t.onFocusOutside,f=>{f.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ie(t.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:ie(t.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),m=Qj[s.dir].includes(f.key);if(d&&m){var v;o.onOpenChange(!1),(v=a.trigger)===null||v===void 0||v.focus(),f.preventDefault()}})})))))});function Y3(t){return t?"open":"closed"}function wF(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function xF(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function yF(t,e,n){const i=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let s=xF(t,Math.max(o,0));i.length===1&&(s=s.filter(h=>h!==n));const c=s.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function CF(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o].x,c=e[o].y,h=e[s].x,f=e[s].y;c>r!=f>r&&n<(h-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function $F(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return CF(n,e)}function Va(t){return e=>e.pointerType==="mouse"?t(e):void 0}const SF=rF,AF=z3,RF=oF,kF=aF,TF=uF,MF=hF,EF=gF,OF=pF,DF=bF,X3="DropdownMenu",[IF,sne]=bt(X3,[P3]),ii=P3(),[_F,Z3]=IF(X3),LF=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=t,c=ii(e),h=b.useRef(null),[f=!1,d]=It({prop:i,defaultProp:o,onChange:s});return b.createElement(_F,{scope:e,triggerId:_t(),triggerRef:h,contentId:_t(),open:f,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(m=>!m),[d]),modal:a},b.createElement(SF,U({},c,{open:f,onOpenChange:d,dir:r,modal:a}),n))},BF="DropdownMenuTrigger",NF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,o=Z3(BF,n),s=ii(n);return b.createElement(AF,U({asChild:!0},s),b.createElement(ge.button,U({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:ch(e,o.triggerRef),onPointerDown:ie(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ie(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),jF=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ii(e);return b.createElement(RF,U({},r,n))},FF="DropdownMenuContent",VF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Z3(FF,n),o=ii(n),s=b.useRef(!1);return b.createElement(kF,U({id:i.contentId,"aria-labelledby":i.triggerId},o,r,{ref:e,onCloseAutoFocus:ie(t.onCloseAutoFocus,a=>{var c;s.current||(c=i.triggerRef.current)===null||c===void 0||c.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:ie(t.onInteractOutside,a=>{const c=a.detail.originalEvent,h=c.button===0&&c.ctrlKey===!0,f=c.button===2||h;(!i.modal||f)&&(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),HF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(TF,U({},i,r,{ref:e}))}),PF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(MF,U({},i,r,{ref:e}))}),WF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(EF,U({},i,r,{ref:e}))}),zF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(OF,U({},i,r,{ref:e}))}),UF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(DF,U({},i,r,{ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),qF=LF,KF=NF,Q3=jF,GF=VF,YF=HF,XF=PF,ZF=WF,QF=zF,JF=UF,J3="Checkbox",[eV,ane]=bt(J3),[tV,nV]=eV(J3),rV=b.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:h,...f}=t,[d,m]=b.useState(null),v=ye(e,T=>m(T)),x=b.useRef(!1),w=d?!!d.closest("form"):!0,[C=!1,S]=It({prop:i,defaultProp:o,onChange:h}),R=b.useRef(C);return b.useEffect(()=>{const T=d?.form;if(T){const E=()=>S(R.current);return T.addEventListener("reset",E),()=>T.removeEventListener("reset",E)}},[d,S]),b.createElement(tV,{scope:n,state:C,disabled:a},b.createElement(ge.button,U({type:"button",role:"checkbox","aria-checked":ho(C)?"mixed":C,"aria-required":s,"data-state":ey(C),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:v,onKeyDown:ie(t.onKeyDown,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:ie(t.onClick,T=>{S(E=>ho(E)?!0:!E),w&&(x.current=T.isPropagationStopped(),x.current||T.stopPropagation())})})),w&&b.createElement(sV,{control:d,bubbles:!x.current,name:r,value:c,checked:C,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),iV="CheckboxIndicator",oV=b.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...i}=t,o=nV(iV,n);return b.createElement(Tt,{present:r||ho(o.state)||o.state===!0},b.createElement(ge.span,U({"data-state":ey(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),sV=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=b.useRef(null),s=$h(n),a=dh(e);return b.useEffect(()=>{const c=o.current,h=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&d){const m=new Event("click",{bubbles:r});c.indeterminate=ho(n),d.call(c,ho(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]),b.createElement("input",U({type:"checkbox","aria-hidden":!0,defaultChecked:ho(n)?!1:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ho(t){return t==="indeterminate"}function ey(t){return ho(t)?"indeterminate":t?"checked":"unchecked"}const aV=rV,lV=oV;function cV(t,e){return b.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const ty="ScrollArea",[ny,lne]=bt(ty),[uV,kr]=ny(ty),hV=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=t,[a,c]=b.useState(null),[h,f]=b.useState(null),[d,m]=b.useState(null),[v,x]=b.useState(null),[w,C]=b.useState(null),[S,R]=b.useState(0),[T,E]=b.useState(0),[O,L]=b.useState(!1),[I,V]=b.useState(!1),F=ye(e,K=>c(K)),H=To(i);return b.createElement(uV,{scope:n,type:r,dir:H,scrollHideDelay:o,scrollArea:a,viewport:h,onViewportChange:f,content:d,onContentChange:m,scrollbarX:v,onScrollbarXChange:x,scrollbarXEnabled:O,onScrollbarXEnabledChange:L,scrollbarY:w,onScrollbarYChange:C,scrollbarYEnabled:I,onScrollbarYEnabledChange:V,onCornerWidthChange:R,onCornerHeightChange:E},b.createElement(ge.div,U({dir:H},s,{ref:F,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":T+"px",...t.style}})))}),fV="ScrollAreaViewport",dV=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,...i}=t,o=kr(fV,n),s=b.useRef(null),a=ye(e,s,o.onViewportChange);return b.createElement(b.Fragment,null,b.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),b.createElement(ge.div,U({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style}}),b.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),oi="ScrollAreaScrollbar",gV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=kr(oi,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=t.orientation==="horizontal";return b.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?b.createElement(mV,U({},r,{ref:e,forceMount:n})):i.type==="scroll"?b.createElement(pV,U({},r,{ref:e,forceMount:n})):i.type==="auto"?b.createElement(ry,U({},r,{ref:e,forceMount:n})):i.type==="always"?b.createElement(im,U({},r,{ref:e})):null}),mV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=kr(oi,t.__scopeScrollArea),[o,s]=b.useState(!1);return b.useEffect(()=>{const a=i.scrollArea;let c=0;if(a){const h=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",h),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",h),a.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),b.createElement(Tt,{present:n||o},b.createElement(ry,U({"data-state":o?"visible":"hidden"},r,{ref:e})))}),pV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=kr(oi,t.__scopeScrollArea),o=t.orientation==="horizontal",s=Dh(()=>c("SCROLL_END"),100),[a,c]=cV("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(a==="idle"){const h=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(h)}},[a,i.scrollHideDelay,c]),b.useEffect(()=>{const h=i.viewport,f=o?"scrollLeft":"scrollTop";if(h){let d=h[f];const m=()=>{const v=h[f];d!==v&&(c("SCROLL"),s()),d=v};return h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[i.viewport,o,c,s]),b.createElement(Tt,{present:n||a!=="hidden"},b.createElement(im,U({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:e,onPointerEnter:ie(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ie(t.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),ry=b.forwardRef((t,e)=>{const n=kr(oi,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,s]=b.useState(!1),a=t.orientation==="horizontal",c=Dh(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?h:f)}},10);return Tu(n.viewport,c),Tu(n.content,c),b.createElement(Tt,{present:r||o},b.createElement(im,U({"data-state":o?"visible":"hidden"},i,{ref:e})))}),im=b.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,i=kr(oi,t.__scopeScrollArea),o=b.useRef(null),s=b.useRef(0),[a,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=sy(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:h>0&&h<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function d(m,v){return CV(m,s.current,a,v)}return n==="horizontal"?b.createElement(vV,U({},f,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,v=a5(m,a,i.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=d(m,i.dir))}})):n==="vertical"?b.createElement(bV,U({},f,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,v=a5(m,a);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=d(m))}})):null}),vV=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=kr(oi,t.__scopeScrollArea),[s,a]=b.useState(),c=b.useRef(null),h=ye(e,c,o.onScrollbarXChange);return b.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.createElement(oy,U({"data-orientation":"horizontal"},i,{ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oh(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(o.viewport){const m=o.viewport.scrollLeft+f.deltaX;t.onWheelScroll(m),ly(m,d)&&f.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:ku(s.paddingLeft),paddingEnd:ku(s.paddingRight)}})}}))}),bV=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=kr(oi,t.__scopeScrollArea),[s,a]=b.useState(),c=b.useRef(null),h=ye(e,c,o.onScrollbarYChange);return b.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.createElement(oy,U({"data-orientation":"vertical"},i,{ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oh(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(o.viewport){const m=o.viewport.scrollTop+f.deltaY;t.onWheelScroll(m),ly(m,d)&&f.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:ku(s.paddingTop),paddingEnd:ku(s.paddingBottom)}})}}))}),[wV,iy]=ny(oi),oy=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:h,onWheelScroll:f,onResize:d,...m}=t,v=kr(oi,n),[x,w]=b.useState(null),C=ye(e,F=>w(F)),S=b.useRef(null),R=b.useRef(""),T=v.viewport,E=r.content-r.viewport,O=yt(f),L=yt(c),I=Dh(d,10);function V(F){if(S.current){const H=F.clientX-S.current.left,K=F.clientY-S.current.top;h({x:H,y:K})}}return b.useEffect(()=>{const F=H=>{const K=H.target;x?.contains(K)&&O(H,E)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[T,x,E,O]),b.useEffect(L,[r,L]),Tu(x,I),Tu(v.content,I),b.createElement(wV,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:yt(o),onThumbPointerUp:yt(s),onThumbPositionChange:L,onThumbPointerDown:yt(a)},b.createElement(ge.div,U({},m,{ref:C,style:{position:"absolute",...m.style},onPointerDown:ie(t.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),S.current=x.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),V(F))}),onPointerMove:ie(t.onPointerMove,V),onPointerUp:ie(t.onPointerUp,F=>{const H=F.target;H.hasPointerCapture(F.pointerId)&&H.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=R.current,v.viewport&&(v.viewport.style.scrollBehavior=""),S.current=null})})))}),K0="ScrollAreaThumb",xV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=iy(K0,t.__scopeScrollArea);return b.createElement(Tt,{present:n||i.hasThumb},b.createElement(yV,U({ref:e},r)))}),yV=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,o=kr(K0,n),s=iy(K0,n),{onThumbPositionChange:a}=s,c=ye(e,d=>s.onThumbChange(d)),h=b.useRef(),f=Dh(()=>{h.current&&(h.current(),h.current=void 0)},100);return b.useEffect(()=>{const d=o.viewport;if(d){const m=()=>{if(f(),!h.current){const v=$V(d,a);h.current=v,a()}};return a(),d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[o.viewport,f,a]),b.createElement(ge.div,U({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ie(t.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),x=d.clientX-v.left,w=d.clientY-v.top;s.onThumbPointerDown({x,y:w})}),onPointerUp:ie(t.onPointerUp,s.onThumbPointerUp)}))});function ku(t){return t?parseInt(t,10):0}function sy(t,e){const n=t/e;return isNaN(n)?0:n}function Oh(t){const e=sy(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function CV(t,e,n,r="ltr"){const i=Oh(n),o=i/2,s=e||o,a=i-s,c=n.scrollbar.paddingStart+s,h=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return ay([c,h],d)(t)}function a5(t,e,n="ltr"){const r=Oh(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,a=o-r,c=n==="ltr"?[0,s]:[s*-1,0],h=L0(t,c);return ay([0,s],[0,a])(h)}function ay(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function ly(t,e){return t>0&&t<e}const $V=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&e(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Dh(t,e){const n=yt(t),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function Tu(t,e){const n=yt(e);ut(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const SV=hV,AV=dV,RV=gV,kV=xV;var cy=vh(),Pd=function(){},Ih=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:Pd,onWheelCapture:Pd,onTouchMoveCapture:Pd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,m=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=Us(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,E=ph([n,e]),O=exports.__assign(exports.__assign({},R),i);return $.createElement($.Fragment,null,f&&$.createElement(T,{sideCar:cy,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},O),{ref:E})):$.createElement(S,exports.__assign({},O,{className:c,ref:E}),a))});Ih.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ih.classNames={fullWidth:co,zeroRight:lo};var G0=!1;if(typeof window<"u")try{var Mc=Object.defineProperty({},"passive",{get:function(){return G0=!0,!0}});window.addEventListener("test",Mc,Mc),window.removeEventListener("test",Mc,Mc)}catch{G0=!1}var ns=G0?{passive:!1}:!1,TV=function(t){return t.tagName==="TEXTAREA"},uy=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!TV(t)&&n[e]==="visible")},MV=function(t){return uy(t,"overflowY")},EV=function(t){return uy(t,"overflowX")},l5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=hy(t,n);if(r){var i=fy(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},OV=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},DV=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},hy=function(t,e){return t==="v"?MV(e):EV(e)},fy=function(t,e){return t==="v"?OV(e):DV(e)},IV=function(t,e){return t==="h"&&e==="rtl"?-1:1},_V=function(t,e,n,r,i){var o=IV(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,m=0;do{var v=fy(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&hy(t,a)&&(d+=S,m+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&d===0||!f&&m===0)&&(h=!0),h},Ec=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},c5=function(t){return[t.deltaX,t.deltaY]},u5=function(t){return t&&"current"in t?t.current:t},LV=function(t,e){return t[0]===e[0]&&t[1]===e[1]},BV=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},NV=0,rs=[];function jV(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(NV++)[0],o=$.useState(function(){return ul()})[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=mh([t.lockRef.current],(t.shards||[]).map(u5),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=Ec(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=l5(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=l5(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return _V(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!rs.length||rs[rs.length-1]!==o)){var S="deltaY"in C?c5(C):Ec(C),R=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&LV(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(u5).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=Ec(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,c5(w),w.target,a(w,t.lockRef.current))},[]),m=$.useCallback(function(w){h(w.type,Ec(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return rs.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ns),document.addEventListener("touchmove",c,ns),document.addEventListener("touchstart",f,ns),function(){rs=rs.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,ns),document.removeEventListener("touchmove",c,ns),document.removeEventListener("touchstart",f,ns)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:BV(i)}):null,v?$.createElement(xh,{gapMode:"margin"}):null)}const FV=bh(cy,jV);var dy=$.forwardRef(function(t,e){return $.createElement(Ih,exports.__assign({},t,{ref:e,sideCar:FV}))});dy.classNames=Ih.classNames;const gy="Dialog",[my,py]=bt(gy),[VV,rr]=my(gy),HV=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=t,a=b.useRef(null),c=b.useRef(null),[h=!1,f]=It({prop:r,defaultProp:i,onChange:o});return b.createElement(VV,{scope:e,triggerRef:a,contentRef:c,contentId:_t(),titleId:_t(),descriptionId:_t(),open:h,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(d=>!d),[f]),modal:s},n)},PV="DialogTrigger",WV=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(PV,n),o=ye(e,i.triggerRef);return b.createElement(ge.button,U({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":om(i.open)},r,{ref:o,onClick:ie(t.onClick,i.onOpenToggle)}))}),vy="DialogPortal",[zV,by]=my(vy,{forceMount:void 0}),UV=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=rr(vy,e);return b.createElement(zV,{scope:e,forceMount:n},b.Children.map(r,s=>b.createElement(Tt,{present:n||o.open},b.createElement(Ps,{asChild:!0,container:i},s))))},Y0="DialogOverlay",qV=b.forwardRef((t,e)=>{const n=by(Y0,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=rr(Y0,t.__scopeDialog);return o.modal?b.createElement(Tt,{present:r||o.open},b.createElement(KV,U({},i,{ref:e}))):null}),KV=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(Y0,n);return b.createElement(dy,{as:Cr,allowPinchZoom:!0,shards:[i.contentRef]},b.createElement(ge.div,U({"data-state":om(i.open)},r,{ref:e,style:{pointerEvents:"auto",...r.style}})))}),Ts="DialogContent",GV=b.forwardRef((t,e)=>{const n=by(Ts,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=rr(Ts,t.__scopeDialog);return b.createElement(Tt,{present:r||o.open},o.modal?b.createElement(YV,U({},i,{ref:e})):b.createElement(XV,U({},i,{ref:e})))}),YV=b.forwardRef((t,e)=>{const n=rr(Ts,t.__scopeDialog),r=b.useRef(null),i=ye(e,n.contentRef,r);return b.useEffect(()=>{const o=r.current;if(o)return em(o)},[]),b.createElement(wy,U({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(t.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ie(t.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ie(t.onFocusOutside,o=>o.preventDefault())}))}),XV=b.forwardRef((t,e)=>{const n=rr(Ts,t.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return b.createElement(wy,U({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=t.onInteractOutside)===null||s===void 0||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),wy=b.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=t,a=rr(Ts,n),c=b.useRef(null),h=ye(e,c);return Ws(),b.createElement(b.Fragment,null,b.createElement(zs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},b.createElement(ko,U({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":om(a.open)},s,{ref:h,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),xy="DialogTitle",ZV=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(xy,n);return b.createElement(ge.h2,U({id:i.titleId},r,{ref:e}))}),QV="DialogDescription",JV=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(QV,n);return b.createElement(ge.p,U({id:i.descriptionId},r,{ref:e}))}),eH="DialogClose",tH=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(eH,n);return b.createElement(ge.button,U({type:"button"},r,{ref:e,onClick:ie(t.onClick,()=>i.onOpenChange(!1))}))});function om(t){return t?"open":"closed"}const nH="DialogTitleWarning",[rH,cne]=cg(nH,{contentName:Ts,titleName:xy,docsSlug:"dialog"}),yy=HV,Cy=WV,$y=UV,Sy=qV,Ay=GV,Ry=ZV,iH=JV,sm=tH,oH="AlertDialog",[sH,une]=bt(oH,[py]),si=py(),aH=t=>{const{__scopeAlertDialog:e,...n}=t,r=si(e);return b.createElement(yy,U({},r,n,{modal:!0}))},lH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(Cy,U({},i,r,{ref:e}))}),cH=t=>{const{__scopeAlertDialog:e,...n}=t,r=si(e);return b.createElement($y,U({},r,n))},uH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(Sy,U({},i,r,{ref:e}))}),ky="AlertDialogContent",[hH,fH]=sH(ky),dH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...i}=t,o=si(n),s=b.useRef(null),a=ye(e,s),c=b.useRef(null);return b.createElement(rH,{contentName:ky,titleName:gH,docsSlug:"alert-dialog"},b.createElement(hH,{scope:n,cancelRef:c},b.createElement(Ay,U({role:"alertdialog"},o,i,{ref:a,onOpenAutoFocus:ie(i.onOpenAutoFocus,h=>{var f;h.preventDefault(),(f=c.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault()}),b.createElement(ug,null,r),!1)))}),gH="AlertDialogTitle",mH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(Ry,U({},i,r,{ref:e}))}),pH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(iH,U({},i,r,{ref:e}))}),vH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(sm,U({},i,r,{ref:e}))}),bH="AlertDialogCancel",wH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:i}=fH(bH,n),o=si(n),s=ye(e,i);return b.createElement(sm,U({},o,r,{ref:s}))}),xH=aH,yH=lH,CH=cH,$H=uH,SH=dH,AH=vH,RH=wH,kH=mH,TH=pH;var su=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Mu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Mu(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Mu(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Ty(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function h5(t,e){const n=Ty(t);return Math.round(e*n)/n}function f5(t){const e=$.useRef(t);return su(()=>{e.current=t}),e}function MH(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:h}=t,[f,d]=$.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=$.useState(r);Mu(m,r)||v(r);const[x,w]=$.useState(null),[C,S]=$.useState(null),R=$.useCallback(te=>{te!==L.current&&(L.current=te,w(te))},[]),T=$.useCallback(te=>{te!==I.current&&(I.current=te,S(te))},[]),E=o||x,O=s||C,L=$.useRef(null),I=$.useRef(null),V=$.useRef(f),F=c!=null,H=f5(c),K=f5(i),W=$.useCallback(()=>{if(!L.current||!I.current)return;const te={placement:e,strategy:n,middleware:m};K.current&&(te.platform=K.current),wx(L.current,I.current,te).then(ne=>{const Y={...ne,isPositioned:!0};J.current&&!Mu(V.current,Y)&&(V.current=Y,Ro.flushSync(()=>{d(Y)}))})},[m,e,n,K]);su(()=>{h===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[h]);const J=$.useRef(!1);su(()=>(J.current=!0,()=>{J.current=!1}),[]),su(()=>{if(E&&(L.current=E),O&&(I.current=O),E&&O){if(H.current)return H.current(E,O,W);W()}},[E,O,W,H,F]);const G=$.useMemo(()=>({reference:L,floating:I,setReference:R,setFloating:T}),[R,T]),re=$.useMemo(()=>({reference:E,floating:O}),[E,O]),se=$.useMemo(()=>{const te={position:n,left:0,top:0};if(!re.floating)return te;const ne=h5(re.floating,f.x),Y=h5(re.floating,f.y);return a?{...te,transform:"translate("+ne+"px, "+Y+"px)",...Ty(re.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:Y}},[n,a,re.floating,f.x,f.y]);return $.useMemo(()=>({...f,update:W,refs:G,elements:re,floatingStyles:se}),[f,W,G,re,se])}const EH=(t,e)=>({...px(t),options:[t,e]}),OH=(t,e)=>({...vx(t),options:[t,e]}),DH=(t,e)=>({...bx(t),options:[t,e]}),My=1024;let IH=0,Wd=class{constructor(e,n){this.from=e,this.to=n}};class je{constructor(e={}){this.id=IH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=dn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}je.closedBy=new je({deserialize:t=>t.split(" ")});je.openedBy=new je({deserialize:t=>t.split(" ")});je.group=new je({deserialize:t=>t.split(" ")});je.isolate=new je({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});je.contextHash=new je({perNode:!0});je.lookAhead=new je({perNode:!0});je.mounted=new je({perNode:!0});class Eu{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[je.mounted.id]}}const _H=Object.create(null);class dn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):_H,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new dn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(je.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(je.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}dn.none=new dn("",Object.create(null),0,8);class am{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new dn(r.name,i,r.id,r.flags):r)}return new am(n)}}const Oc=new WeakMap,d5=new WeakMap;var Ot;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Ot||(Ot={}));class Ct{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Eu.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Z0(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Oc.get(this)||this.topNode,o=new Z0(i);return o.moveTo(e,n),Oc.set(this,o._tree),o}get topNode(){return new Fn(this,0,0,null)}resolve(e,n=0){let r=Ha(Oc.get(this)||this.topNode,e,n,!1);return Oc.set(this,r),r}resolveInner(e,n=0){let r=Ha(d5.get(this)||this.topNode,e,n,!0);return d5.set(this,r),r}resolveStack(e,n=0){return NH(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Ot.IncludeAnonymous)>0;for(let c=this.cursor(s|Ot.IncludeAnonymous);;){let h=!1;if(c.from<=o&&c.to>=i&&(!a&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&r&&(a||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:um(dn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Ct(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Ct(dn.none,n,r,i)))}static build(e){return jH(e)}}Ct.empty=new Ct(dn.none,[],[],0);class lm{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new lm(this.buffer,this.index)}}class Di{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return dn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let c=e;c!=n&&!(Ey(o,i,s[c+1],s[c+2])&&(a=c,r>0));c=s[c+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,c=0;a<n;){o[c++]=i[a++],o[c++]=i[a++]-r;let h=o[c++]=i[a++]-r;o[c++]=i[a++]-e,s=Math.max(s,h)}return new Di(o,s,this.set)}}function Ey(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Ha(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Fn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Ot.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Fn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class Oy{cursor(e=0){return new Z0(this,e)}getChild(e,n=null,r=null){let i=g5(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return g5(this,e,n,r)}resolve(e,n=0){return Ha(this,e,n,!1)}resolveInner(e,n=0){return Ha(this,e,n,!0)}matchContext(e){return X0(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Fn extends Oy{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:c}=s._tree,h=n>0?a.length:-1;e!=h;e+=n){let f=a[e],d=c[e]+s.from;if(Ey(i,r,d,d+f.length)){if(f instanceof Di){if(o&Ot.ExcludeBuffers)continue;let m=f.findChild(0,f.buffer.length,n,r-d,i);if(m>-1)return new Si(new LH(s,f,e,d),null,m)}else if(o&Ot.IncludeAnonymous||!f.type.isAnonymous||cm(f)){let m;if(!(o&Ot.IgnoreMounts)&&(m=Eu.get(f))&&!m.overlay)return new Fn(m.tree,d,e,s);let v=new Fn(f,d,e,s);return o&Ot.IncludeAnonymous||!v.type.isAnonymous?v:v.nextChild(n<0?f.children.length-1:0,n,r,i)}}}if(o&Ot.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Ot.IgnoreOverlays)&&(i=Eu.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new Fn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function g5(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function X0(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class LH{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Si extends Oy{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Si(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Ot.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Si(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Si(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Si(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Ct(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Dy(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Fn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new BH(i,n)}class BH{constructor(e,n){this.heads=e,this.node=n}get next(){return Dy(this.heads)}}function NH(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Fn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Eu.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Fn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Ha(a,e,n,!1))}}return i?Dy(i):r}class Z0{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Fn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Fn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Ot.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ot.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ot.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Ot.IncludeAnonymous||a instanceof Di||!a.type.isAnonymous||cm(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new Si(this.buffer,n,this.stack[i]);return this.bufferNode=new Si(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return X0(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return X0(this._tree,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function cm(t){return t.children.some(e=>e instanceof Di||!e.type.isAnonymous||cm(e))}function jH(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=My,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new lm(n,n.length):n,c=r.types,h=0,f=0;function d(O,L,I,V,F,H){let{id:K,start:W,end:J,size:G}=a,re=f,se=h;for(;G<0;)if(a.next(),G==-1){let me=o[K];I.push(me),V.push(W-O);return}else if(G==-3){h=K;return}else if(G==-4){f=K;return}else throw new RangeError(`Unrecognized record size: ${G}`);let te=c[K],ne,Y,ce=W-O;if(J-W<=i&&(Y=C(a.pos-L,F))){let me=new Uint16Array(Y.size-Y.skip),Ie=a.pos-Y.size,we=me.length;for(;a.pos>Ie;)we=S(Y.start,me,we);ne=new Di(me,J-Y.start,r),ce=Y.start-O}else{let me=a.pos-G;a.next();let Ie=[],we=[],qe=K>=s?K:-1,Te=0,Ve=J;for(;a.pos>me;)qe>=0&&a.id==qe&&a.size>=0?(a.end<=Ve-i&&(x(Ie,we,W,Te,a.end,Ve,qe,re,se),Te=Ie.length,Ve=a.end),a.next()):H>2500?m(W,me,Ie,we):d(W,me,Ie,we,qe,H+1);if(qe>=0&&Te>0&&Te<Ie.length&&x(Ie,we,W,Te,W,Ve,qe,re,se),Ie.reverse(),we.reverse(),qe>-1&&Te>0){let pe=v(te,se);ne=um(te,Ie,we,0,Ie.length,0,J-W,pe,pe)}else ne=w(te,Ie,we,J-W,re-J,se)}I.push(ne),V.push(ce)}function m(O,L,I,V){let F=[],H=0,K=-1;for(;a.pos>L;){let{id:W,start:J,end:G,size:re}=a;if(re>4)a.next();else{if(K>-1&&J<K)break;K<0&&(K=G-i),F.push(W,J,G),H++,a.next()}}if(H){let W=new Uint16Array(H*4),J=F[F.length-2];for(let G=F.length-3,re=0;G>=0;G-=3)W[re++]=F[G],W[re++]=F[G+1]-J,W[re++]=F[G+2]-J,W[re++]=re;I.push(new Di(W,F[2]-J,r)),V.push(J-O)}}function v(O,L){return(I,V,F)=>{let H=0,K=I.length-1,W,J;if(K>=0&&(W=I[K])instanceof Ct){if(!K&&W.type==O&&W.length==F)return W;(J=W.prop(je.lookAhead))&&(H=V[K]+W.length+J)}return w(O,I,V,F,H,L)}}function x(O,L,I,V,F,H,K,W,J){let G=[],re=[];for(;O.length>V;)G.push(O.pop()),re.push(L.pop()+I-F);O.push(w(r.types[K],G,re,H-F,W-H,J)),L.push(F-I)}function w(O,L,I,V,F,H,K){if(H){let W=[je.contextHash,H];K=K?[W].concat(K):[W]}if(F>25){let W=[je.lookAhead,F];K=K?[W].concat(K):[W]}return new Ct(O,L,I,V,K)}function C(O,L){let I=a.fork(),V=0,F=0,H=0,K=I.end-i,W={size:0,start:0,skip:0};e:for(let J=I.pos-O;I.pos>J;){let G=I.size;if(I.id==L&&G>=0){W.size=V,W.start=F,W.skip=H,H+=4,V+=4,I.next();continue}let re=I.pos-G;if(G<0||re<J||I.start<K)break;let se=I.id>=s?4:0,te=I.start;for(I.next();I.pos>re;){if(I.size<0)if(I.size==-3)se+=4;else break e;else I.id>=s&&(se+=4);I.next()}F=te,V+=G,H+=se}return(L<0||V==O)&&(W.size=V,W.start=F,W.skip=H),W.size>4?W:void 0}function S(O,L,I){let{id:V,start:F,end:H,size:K}=a;if(a.next(),K>=0&&V<s){let W=I;if(K>4){let J=a.pos-(K-4);for(;a.pos>J;)I=S(O,L,I)}L[--I]=W,L[--I]=H-O,L[--I]=F-O,L[--I]=V}else K==-3?h=V:K==-4&&(f=V);return I}let R=[],T=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,R,T,-1,0);let E=(e=t.length)!==null&&e!==void 0?e:R.length?T[0]+R[0].length:0;return new Ct(c[t.topID],R.reverse(),T.reverse(),E)}const m5=new WeakMap;function au(t,e){if(!t.isAnonymous||e instanceof Di||e.type!=t)return 1;let n=m5.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Ct)){n=1;break}n+=au(t,r)}m5.set(e,n)}return n}function um(t,e,n,r,i,o,s,a,c){let h=0;for(let x=r;x<i;x++)h+=au(t,e[x]);let f=Math.ceil(h*1.5/8),d=[],m=[];function v(x,w,C,S,R){for(let T=C;T<S;){let E=T,O=w[T],L=au(t,x[T]);for(T++;T<S;T++){let I=au(t,x[T]);if(L+I>=f)break;L+=I}if(T==E+1){if(L>f){let I=x[E];v(I.children,I.positions,0,I.children.length,w[E]+R);continue}d.push(x[E])}else{let I=w[T-1]+x[T-1].length-O;d.push(um(t,x,w,E,T,O,I,null,c))}m.push(O+R-o)}}return v(e,n,r,i,0),(a||c)(d,m,s)}class fo{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new fo(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,c=0,h=0;;a++){let f=a<n.length?n[a]:null,d=f?f.fromA:1e9;if(d-c>=r)for(;s&&s.from<d;){let m=s;if(c>=m.from||d<=m.to||h){let v=Math.max(m.from,c)-h,x=Math.min(m.to,d)-h;m=v>=x?null:new fo(v,x,m.tree,m.offset+h,a>0,!!f)}if(m&&i.push(m),s.to>d)break;s=o<e.length?e[o++]:null}if(!f)break;c=f.toA,h=f.toA-f.toB}return i}}class Iy{startParse(e,n,r){return typeof e=="string"&&(e=new FH(e)),r=r?r.length?r.map(i=>new Wd(i.from,i.to)):[new Wd(0,0)]:[new Wd(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class FH{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new je({perNode:!0});class Ou{constructor(e,n,r,i,o,s,a,c,h,f=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=c,this.curContext=h,this.lookAhead=f,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Ou(e,[],n,r,r,0,[],0,i?new p5(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-h;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let d=c?this.stack[c-1]:0,m=this.bufferBase+this.buffer.length-d;if(i<o.minRepeatTerm||e&131072){let v=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,v,m+4,!0)}if(e&262144)this.state=this.stack[c];else{let v=this.stack[c-3];this.state=o.getGoto(v,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Ou(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new VH(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,c)=>c&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let c=s&65535,h=this.stack.length-a*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return a<<19|65536|c}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new p5(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class p5{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class VH{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Du{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Du(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Du(this.stack,this.pos,this.index)}}function Dc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,a=!0),o+=c,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class lu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const v5=new lu;class HH{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=v5,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=v5,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class ps{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;PH(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}ps.prototype.contextual=ps.prototype.fallback=ps.prototype.extend=!1;ps.prototype.fallback=ps.prototype.extend=!1;function PH(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:c}=n.p.parser;e:for(;a&t[s];){let h=t[s+1];for(let v=s+3;v<h;v+=2)if((t[v+1]&a)>0){let x=t[v];if(c.allows(x)&&(e.token.value==-1||e.token.value==x||WH(x,e.token.value,i,o))){e.acceptToken(x);break}}let f=e.next,d=0,m=t[s+2];if(e.next<0&&m>d&&t[h+m*3-3]==65535){s=t[h+m*3-1];continue e}for(;d<m;){let v=d+m>>1,x=h+v+(v<<1),w=t[x],C=t[x+1]||65536;if(f<w)m=v;else if(f>=C)d=v+1;else{s=t[x+2],e.advance();continue e}}break}}function b5(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function WH(t,e,n,r){let i=b5(n,r,e);return i<0||b5(n,r,t)<i}const Cn=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let zd=null;function w5(t,e,n){let r=t.cursor(Ot.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class zH{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?w5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?w5(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Ct){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let c=o.prop(je.lookAhead);if(!c||a+c<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class UH{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new lu)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<o.length;h++){if(!(1<<h&s))continue;let f=o[h],d=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||d.start!=e.pos||d.mask!=s||d.context!=a)&&(this.updateCachedToken(d,f,e),d.mask=s,d.context=a),d.lookAhead>d.end+25&&(c=Math.max(d.lookAhead,c)),d.value!=0)){let m=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!f.extend&&(r=d,n>m))break}}for(;this.actions.length>n;)this.actions.pop();return c&&e.setLookAhead(c),!r&&e.pos==this.stream.end&&(r=new lu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new lu,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let c=0;c<2;c++)for(let h=s.stateSlot(o,c?2:1);;h+=3){if(a[h]==65535)if(a[h+1]==1)h=Wr(a,h+2);else{i==0&&a[h+1]==2&&(i=this.putAction(Wr(a,h+2),n,r,i));break}a[h]==n&&(i=this.putAction(Wr(a,h+1),n,r,i))}return i}}class qH{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new HH(n,i),this.tokens=new UH(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[Ou.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new zH(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let c=this.tokens.getMainToken(a);o.push(c.value,c.end)}}break}}if(!r.length){let s=i&&GH(i);if(s)return Cn&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Cn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return Cn&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,c)=>c.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let c=s+1;c<r.length;c++){let h=r[c];if(a.sameState(h)||a.buffer.length>500&&h.buffer.length>500)if((a.score-h.score||a.buffer.length-h.buffer.length)>0)r.splice(c--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=Cn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let m=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(m>-1&&d.length&&(!h||(d.prop(je.contextHash)||0)==f))return e.useNode(d,m),Cn&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Ct)||d.children.length==0||d.positions[0]>0)break;let v=d.children[0];if(v instanceof Ct&&d.positions[0]==0)d=v;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Cn&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let f=c[h++],d=c[h++],m=c[h++],v=h==c.length||!r,x=v?e:e.split(),w=this.tokens.mainToken;if(x.apply(f,d,w?w.start:x.pos,m),Cn&&console.log(s+this.stackID(x)+` (via ${f&65536?`reduce of ${o.getName(f&65535)}`:"shift"} for ${o.getName(d)} @ ${i}${x==e?"":", split"})`),v)return!0;x.pos>i?n.push(x):r.push(x)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return x5(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],c=n[s<<1],h=n[(s<<1)+1],f=Cn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Cn&&console.log(f+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let d=a.split(),m=f;for(let v=0;d.forceReduce()&&v<10&&(Cn&&console.log(m+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));v++)Cn&&(m=this.stackID(d)+" -> ");for(let v of a.recoverByInsert(c))Cn&&console.log(f+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,r);this.stream.end>a.pos?(h==a.pos&&(h++,c=0),a.recoverByDelete(c,h),Cn&&console.log(f+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),x5(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Ct.build({buffer:Du.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(zd||(zd=new WeakMap)).get(e);return n||zd.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function x5(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class KH{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class Iu extends Iy{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,c,h){i[a].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=je[c]);for(let h=1;h<a.length;){let f=a[h++];if(f>=0)o(f,c,a[h++]);else{let d=a[h+-f];for(let m=-f;m>0;m--)o(a[h++],c,d);h++}}}this.nodeSet=new am(n.map((a,c)=>dn.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=My;let s=Dc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(y5),this.states=Dc(e.states,Uint32Array),this.data=Dc(e.stateData),this.goto=Dc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ps(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new qH(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,c=i[o++];if(a&&r)return c;for(let h=o+(s>>1);o<h;o++)if(i[o]==e)return c;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Wr(r,o+2)];else{if(r[o+1]==2)return Wr(r,o+2);break}if(s==n||s==0)return Wr(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Wr(this.data,o+2);else break;i=n(Wr(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Wr(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Iu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=y5(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new KH(e,r,i)}static deserialize(e){return new Iu(e)}}function Wr(t,e){return t[e]|t[e+1]<<16}function GH(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function y5(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let YH=0,zr=class Q0{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=YH++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Q0&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let i=new Q0(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new _u(e);return r=>r.modified.indexOf(n)>-1?r:_u.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},XH=0;class _u{constructor(e){this.name=e,this.instances=[],this.id=XH++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&ZH(n,a.modified));if(r)return r;let i=[],o=new zr(e.name,i,e,n);for(let a of n)a.instances.push(o);let s=QH(n);for(let a of e.set)if(!a.modified.length)for(let c of s)i.push(_u.get(a,c));return o}}function ZH(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function QH(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function _y(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let d=0;;){if(a=="..."&&d>0&&d+3==i.length){s=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!m)throw new RangeError("Invalid path: "+i);if(o.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),d+=m[0].length,d==i.length)break;let v=i[d++];if(d==i.length&&v=="!"){s=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);a=i.slice(d)}let c=o.length-1,h=o[c];if(!h)throw new RangeError("Invalid path: "+i);let f=new Lu(r,s,c>0?o.slice(0,c):null);e[h]=f.sort(e[h])}}return Ly.add(e)}const Ly=new je;class Lu{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Lu.empty=new Lu([],2,null);function By(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let c of a.set){let h=n[c.id];if(h){s=s?s+" "+h:h;break}}return s},scope:r}}function JH(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function eP(t,e,n,r=0,i=t.length){let o=new tP(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class tP{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:c}=e;if(a>=r||c<=n)return;s.isTop&&(o=this.highlighters.filter(v=>!v.scope||v.scope(s)));let h=i,f=nP(e)||Lu.empty,d=JH(o,f.tags);if(d&&(h&&(h+=" "),h+=d,f.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,a),h),f.opaque)return;let m=e.tree&&e.tree.prop(je.mounted);if(m&&m.overlay){let v=e.node.enter(m.overlay[0].from+a,1),x=this.highlighters.filter(C=>!C.scope||C.scope(m.tree.type)),w=e.firstChild();for(let C=0,S=a;;C++){let R=C<m.overlay.length?m.overlay[C]:null,T=R?R.from+a:c,E=Math.max(n,S),O=Math.min(r,T);if(E<O&&w)for(;e.from<O&&(this.highlightRange(e,E,O,i,o),this.startSpan(Math.min(O,e.to),h),!(e.to>=T||!e.nextSibling())););if(!R||T>r)break;S=R.to+a,S>n&&(this.highlightRange(v.cursor(),Math.max(n,R.from+a),Math.min(r,S),"",x),this.startSpan(Math.min(r,S),h))}w&&e.parent()}else if(e.firstChild()){m&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function nP(t){let e=t.type.prop(Ly);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const oe=zr.define,Ic=oe(),yi=oe(),C5=oe(yi),$5=oe(yi),Ci=oe(),_c=oe(Ci),Ud=oe(Ci),fr=oe(),to=oe(fr),cr=oe(),ur=oe(),J0=oe(),pa=oe(J0),Lc=oe(),z={comment:Ic,lineComment:oe(Ic),blockComment:oe(Ic),docComment:oe(Ic),name:yi,variableName:oe(yi),typeName:C5,tagName:oe(C5),propertyName:$5,attributeName:oe($5),className:oe(yi),labelName:oe(yi),namespace:oe(yi),macroName:oe(yi),literal:Ci,string:_c,docString:oe(_c),character:oe(_c),attributeValue:oe(_c),number:Ud,integer:oe(Ud),float:oe(Ud),bool:oe(Ci),regexp:oe(Ci),escape:oe(Ci),color:oe(Ci),url:oe(Ci),keyword:cr,self:oe(cr),null:oe(cr),atom:oe(cr),unit:oe(cr),modifier:oe(cr),operatorKeyword:oe(cr),controlKeyword:oe(cr),definitionKeyword:oe(cr),moduleKeyword:oe(cr),operator:ur,derefOperator:oe(ur),arithmeticOperator:oe(ur),logicOperator:oe(ur),bitwiseOperator:oe(ur),compareOperator:oe(ur),updateOperator:oe(ur),definitionOperator:oe(ur),typeOperator:oe(ur),controlOperator:oe(ur),punctuation:J0,separator:oe(J0),bracket:pa,angleBracket:oe(pa),squareBracket:oe(pa),paren:oe(pa),brace:oe(pa),content:fr,heading:to,heading1:oe(to),heading2:oe(to),heading3:oe(to),heading4:oe(to),heading5:oe(to),heading6:oe(to),contentSeparator:oe(fr),list:oe(fr),quote:oe(fr),emphasis:oe(fr),strong:oe(fr),link:oe(fr),monospace:oe(fr),strikethrough:oe(fr),inserted:oe(),deleted:oe(),changed:oe(),invalid:oe(),meta:Lc,documentMeta:oe(Lc),annotation:oe(Lc),processingInstruction:oe(Lc),definition:zr.defineModifier("definition"),constant:zr.defineModifier("constant"),function:zr.defineModifier("function"),standard:zr.defineModifier("standard"),local:zr.defineModifier("local"),special:zr.defineModifier("special")};for(let t in z){let e=z[t];e instanceof zr&&(e.name=t)}By([{tag:z.link,class:"tok-link"},{tag:z.heading,class:"tok-heading"},{tag:z.emphasis,class:"tok-emphasis"},{tag:z.strong,class:"tok-strong"},{tag:z.keyword,class:"tok-keyword"},{tag:z.atom,class:"tok-atom"},{tag:z.bool,class:"tok-bool"},{tag:z.url,class:"tok-url"},{tag:z.labelName,class:"tok-labelName"},{tag:z.inserted,class:"tok-inserted"},{tag:z.deleted,class:"tok-deleted"},{tag:z.literal,class:"tok-literal"},{tag:z.string,class:"tok-string"},{tag:z.number,class:"tok-number"},{tag:[z.regexp,z.escape,z.special(z.string)],class:"tok-string2"},{tag:z.variableName,class:"tok-variableName"},{tag:z.local(z.variableName),class:"tok-variableName tok-local"},{tag:z.definition(z.variableName),class:"tok-variableName tok-definition"},{tag:z.special(z.variableName),class:"tok-variableName2"},{tag:z.definition(z.propertyName),class:"tok-propertyName tok-definition"},{tag:z.typeName,class:"tok-typeName"},{tag:z.namespace,class:"tok-namespace"},{tag:z.className,class:"tok-className"},{tag:z.macroName,class:"tok-macroName"},{tag:z.propertyName,class:"tok-propertyName"},{tag:z.operator,class:"tok-operator"},{tag:z.comment,class:"tok-comment"},{tag:z.meta,class:"tok-meta"},{tag:z.invalid,class:"tok-invalid"},{tag:z.punctuation,class:"tok-punctuation"}]);const rP=_y({String:z.string,Number:z.number,"True False":z.bool,PropertyName:z.propertyName,Null:z.null,", :":z.separator,"[ ]":z.squareBracket,"{ }":z.brace}),iP=Iu.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[rP],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let e1=[],Ny=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?Ny:e1).push(n=n+t[e])})();function oP(t){if(t<768)return!1;for(let e=0,n=e1.length;;){let r=e+n>>1;if(t<e1[r])n=r;else if(t>=Ny[r])e=r+1;else return!0;if(e==n)return!1}}function S5(t){return t>=127462&&t<=127487}const A5=8205;function sP(t,e,n=!0,r=!0){return(n?jy:aP)(t,e,r)}function jy(t,e,n){if(e==t.length)return e;e&&Fy(t.charCodeAt(e))&&Vy(t.charCodeAt(e-1))&&e--;let r=qd(t,e);for(e+=R5(r);e<t.length;){let i=qd(t,e);if(r==A5||i==A5||n&&oP(i))e+=R5(i),r=i;else if(S5(i)){let o=0,s=e-2;for(;s>=0&&S5(qd(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function aP(t,e,n){for(;e>0;){let r=jy(t,e-2,n);if(r<e)return r;e--}return 0}function qd(t,e){let n=t.charCodeAt(e);if(!Vy(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Fy(r)?(n-55296<<10)+(r-56320)+65536:n}function Fy(t){return t>=56320&&t<57344}function Vy(t){return t>=55296&&t<56320}function R5(t){return t<65536?1:2}class Ge{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Ms(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),dr.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Ms(this,e,n);let r=[];return this.decompose(e,n,r,0),dr.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Ma(this),o=new Ma(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Ma(this,e)}iterRange(e,n=this.length){return new Hy(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new Py(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ge.empty:e.length<=32?new mt(e):dr.from(mt.split(e,[]))}}class mt extends Ge{constructor(e,n=lP(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new cP(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new mt(k5(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=cu(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new mt(a,s.length+o.length));else{let c=a.length>>1;r.push(new mt(a.slice(0,c)),new mt(a.slice(c)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof mt))return super.replace(e,n,r);[e,n]=Ms(this,e,n);let i=cu(this.text,cu(r.text,k5(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new mt(i,o):dr.from(mt.split(i,[]),o)}sliceString(e,n=this.length,r=`
`){[e,n]=Ms(this,e,n);let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],c=o+a.length;o>e&&s&&(i+=r),e<c&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=c+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new mt(r,i)),r=[],i=-1);return i>-1&&n.push(new mt(r,i)),n}}class dr extends Ge{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,c=r+s.lines-1;if((n?c:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=c+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],c=s+a.length;if(e<=c&&n>=s){let h=i&((s<=e?1:0)|(c>=n?2:0));s>=e&&c<=n&&!h?r.push(a):a.decompose(e-s,n-s,r,h)}s=c+1}}replace(e,n,r){if([e,n]=Ms(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let c=s.replace(e-o,n-o,r),h=this.lines-s.lines+c.lines;if(c.lines<h>>4&&c.lines>h>>6){let f=this.children.slice();return f[i]=c,new dr(f,this.length-(n-e)+r.length)}return super.replace(o,a,c)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
`){[e,n]=Ms(this,e,n);let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],c=s+a.length;s>e&&o&&(i+=r),e<c&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=c+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof dr))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let c=this.children[i],h=e.children[o];if(c!=h)return r+c.scanIdentical(h,n);r+=c.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of e)r+=v.lines;if(r<32){let v=[];for(let x of e)x.flatten(v);return new mt(v,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],c=0,h=-1,f=[];function d(v){let x;if(v.lines>o&&v instanceof dr)for(let w of v.children)d(w);else v.lines>s&&(c>s||!c)?(m(),a.push(v)):v instanceof mt&&c&&(x=f[f.length-1])instanceof mt&&v.lines+x.lines<=32?(c+=v.lines,h+=v.length+1,f[f.length-1]=new mt(x.text.concat(v.text),x.length+1+v.length)):(c+v.lines>i&&m(),c+=v.lines,h+=v.length+1,f.push(v))}function m(){c!=0&&(a.push(f.length==1?f[0]:dr.from(f,h)),h=-1,c=f.length=0)}for(let v of e)d(v);return m(),a.length==1?a[0]:new dr(a,n)}}Ge.empty=new mt([""],0);function lP(t){let e=-1;for(let n of t)e+=n.length+1;return e}function cu(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],c=i+a.length;c>=n&&(c>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=c+1}return e}function k5(t,e,n){return cu(t,[""],e,n)}class Ma{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof mt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof mt?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof mt){let c=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,c.length>Math.max(0,e))return this.value=e==0?c:n>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=i.children[s+(n<0?-1:0)];e>c.length?(e-=c.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof mt?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Hy{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Ma(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Py{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ge.prototype[Symbol.iterator]=function(){return this.iter()},Ma.prototype[Symbol.iterator]=Hy.prototype[Symbol.iterator]=Py.prototype[Symbol.iterator]=function(){return this});class cP{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ms(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Ht(t,e,n=!0,r=!0){return sP(t,e,n,r)}function uP(t){return t>=56320&&t<57344}function hP(t){return t>=55296&&t<56320}function ln(t,e){let n=t.charCodeAt(e);if(!hP(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return uP(r)?(n-55296<<10)+(r-56320)+65536:n}function hm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function gr(t){return t<65536?1:2}const t1=/\r\n?|\n/;var Jt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Jt||(Jt={}));class xr{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){n1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new xr(e)}composeDesc(e){return this.empty?e:e.empty?this:Wy(this,e)}mapDesc(e,n=!1){return e.empty?this:r1(this,e,n)}mapPos(e,n=-1,r=Jt.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],c=this.sections[s++],h=i+a;if(c<0){if(h>e)return o+(e-i);o+=a}else{if(r!=Jt.Simple&&h>=e&&(r==Jt.TrackDel&&i<e&&h>e||r==Jt.TrackBefore&&i<e||r==Jt.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!a)return e==i||n<0?o:o+c;o+=c}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new xr(e)}static create(e){return new xr(e)}}class Rt extends xr{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return n1(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return r1(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(Ge.empty);r.push(s?e.slice(o,o+s):Ge.empty)}o+=s}return new Rt(n,r)}compose(e){return this.empty?e:e.empty?this:Wy(this,e,!0)}map(e,n=!1){return e.empty?this:r1(this,e,n,!0)}iterChanges(e,n=!1){n1(this,e,n)}get desc(){return xr.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Pa(this);e:for(let s=0,a=0;;){let c=s==e.length?1e9:e[s++];for(;a<c||a==c&&o.len==0;){if(o.done)break e;let f=Math.min(o.len,c-a);Ut(i,f,-1);let d=o.ins==-1?-1:o.off==0?o.ins:0;Ut(n,f,d),d>0&&Ai(r,n,o.text),o.forward(f),a+=f}let h=e[s++];for(;a<h;){if(o.done)break e;let f=Math.min(o.len,h-a);Ut(n,f,-1),Ut(i,f,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(f),a+=f}}return{changes:new Rt(n,r),filtered:xr.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function c(f=!1){if(!f&&!i.length)return;s<n&&Ut(i,n-s,-1);let d=new Rt(i,o);a=a?a.compose(d.map(a)):d,i=[],o=[],s=0}function h(f){if(Array.isArray(f))for(let d of f)h(d);else if(f instanceof Rt){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);c(),a=a?a.compose(f.map(a)):f}else{let{from:d,to:m=d,insert:v}=f;if(d>m||d<0||m>n)throw new RangeError(`Invalid change range ${d} to ${m} (in doc of length ${n})`);let x=v?typeof v=="string"?Ge.of(v.split(r||t1)):v:Ge.empty,w=x.length;if(d==m&&w==0)return;d<s&&c(),d>s&&Ut(i,d-s,-1),Ut(i,m-d,w),Ai(o,i,x),s=m}}return h(e),c(!a),a}static empty(e){return new Rt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Ge.empty);r[i]=Ge.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new Rt(n,r)}static createSet(e,n){return new Rt(e,n)}}function Ut(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ai(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ge.empty);t.push(n)}}function n1(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],c=t.sections[s++];if(c<0)i+=a,o+=a;else{let h=i,f=o,d=Ge.empty;for(;h+=a,f+=c,c&&r&&(d=d.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],c=t.sections[s++];e(i,h,o,f,d),i=h,o=f}}}function r1(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Pa(t),a=new Pa(e);for(let c=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let h=Math.min(s.len,a.len);Ut(i,h,-1),s.forward(h),a.forward(h)}else if(a.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let h=a.len;for(Ut(i,a.ins,-1);h;){let f=Math.min(s.len,h);s.ins>=0&&c<s.i&&s.len<=f&&(Ut(i,0,s.ins),o&&Ai(o,i,s.text),c=s.i),s.forward(f),h-=f}a.next()}else if(s.ins>=0){let h=0,f=s.len;for(;f;)if(a.ins==-1){let d=Math.min(f,a.len);h+=d,f-=d,a.forward(d)}else if(a.ins==0&&a.len<f)f-=a.len,a.next();else break;Ut(i,h,c<s.i?s.ins:0),o&&c<s.i&&Ai(o,i,s.text),c=s.i,s.forward(s.len-f)}else{if(s.done&&a.done)return o?Rt.createSet(i,o):xr.create(i);throw new Error("Mismatched change set lengths")}}}function Wy(t,e,n=!1){let r=[],i=n?[]:null,o=new Pa(t),s=new Pa(e);for(let a=!1;;){if(o.done&&s.done)return i?Rt.createSet(r,i):xr.create(r);if(o.ins==0)Ut(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)Ut(r,0,s.ins,a),i&&Ai(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(o.len2,s.len),h=r.length;if(o.ins==-1){let f=s.ins==-1?-1:s.off?0:s.ins;Ut(r,c,f,a),i&&f&&Ai(i,r,s.text)}else s.ins==-1?(Ut(r,o.off?0:o.len,c,a),i&&Ai(i,r,o.textBit(c))):(Ut(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&Ai(i,r,s.text));a=(o.ins>c||s.ins>=0&&s.len>c)&&(a||r.length>h),o.forward2(c),s.forward(c)}}}}class Pa{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ge.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ge.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class so{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new so(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Q.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Q.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,n,r){return new so(e,n,r)}}class Q{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Q.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Q([this.main],0)}addRange(e,n=!0){return Q.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Q.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(n=>so.fromJSON(n)),e.main)}static single(e,n=e){return new Q([Q.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return Q.normalized(e.slice(),n);r=o.to}return new Q(e,n)}static cursor(e,n=0,r,i){return so.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?so.create(n,e,48|o):so.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,c=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?Q.range(c,a):Q.range(a,c))}}return new Q(e,n)}}function zy(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let fm=0;class fe{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=fm++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new fe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:dm),!!e.static,e.enables)}of(e){return new uu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new uu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new uu(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function dm(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class uu{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=fm++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,c=!1,h=!1,f=[];for(let d of this.dependencies)d=="doc"?c=!0:d=="selection"?h=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||f.push(e[d.id]);return{create(d){return d.values[s]=r(d),1},update(d,m){if(c&&m.docChanged||h&&(m.docChanged||m.selection)||i1(d,f)){let v=r(d);if(a?!T5(v,d.values[s],i):!i(v,d.values[s]))return d.values[s]=v,1}return 0},reconfigure:(d,m)=>{let v,x=m.config.address[o];if(x!=null){let w=Nu(m,x);if(this.dependencies.every(C=>C instanceof fe?m.facet(C)===d.facet(C):C instanceof Lt?m.field(C,!1)==d.field(C,!1):!0)||(a?T5(v=r(d),w,i):i(v=r(d),w)))return d.values[s]=w,0}else v=r(d);return d.values[s]=v,1}}}}function T5(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function i1(t,e){let n=!1;for(let r of e)Ea(t,r)&1&&(n=!0);return n}function fP(t,e,n){let r=n.map(c=>t[c.id]),i=n.map(c=>c.type),o=r.filter(c=>!(c&1)),s=t[e.id]>>1;function a(c){let h=[];for(let f=0;f<r.length;f++){let d=Nu(c,r[f]);if(i[f]==2)for(let m of d)h.push(m);else h.push(d)}return e.combine(h)}return{create(c){for(let h of r)Ea(c,h);return c.values[s]=a(c),1},update(c,h){if(!i1(c,o))return 0;let f=a(c);return e.compare(f,c.values[s])?0:(c.values[s]=f,1)},reconfigure(c,h){let f=i1(c,r),d=h.config.facets[e.id],m=h.facet(e);if(d&&!f&&dm(n,d))return c.values[s]=m,0;let v=a(c);return e.compare(v,m)?(c.values[s]=m,0):(c.values[s]=v,1)}}}const Bc=fe.define({static:!0});class Lt{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new Lt(fm++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Bc).find(r=>r.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let o=r.facet(Bc),s=i.facet(Bc),a;return(a=o.find(c=>c.field==this))&&a!=s.find(c=>c.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Bc.of({field:this,create:e})]}get extension(){return this}}const ro={lowest:4,low:3,default:2,high:1,highest:0};function va(t){return e=>new Uy(e,t)}const Oo={highest:va(ro.highest),high:va(ro.high),default:va(ro.default),low:va(ro.low),lowest:va(ro.lowest)};class Uy{constructor(e,n){this.inner=e,this.prec=n}}class _h{of(e){return new o1(this,e)}reconfigure(e){return _h.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class o1{constructor(e,n){this.compartment=e,this.inner=n}}class Bu{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let m of dP(e,n,s))m instanceof Lt?i.push(m):(o[m.facet.id]||(o[m.facet.id]=[])).push(m);let a=Object.create(null),c=[],h=[];for(let m of i)a[m.id]=h.length<<1,h.push(v=>m.slot(v));let f=r?.config.facets;for(let m in o){let v=o[m],x=v[0].facet,w=f&&f[m]||[];if(v.every(C=>C.type==0))if(a[x.id]=c.length<<1|1,dm(w,v))c.push(r.facet(x));else{let C=x.combine(v.map(S=>S.value));c.push(r&&x.compare(C,r.facet(x))?r.facet(x):C)}else{for(let C of v)C.type==0?(a[C.id]=c.length<<1|1,c.push(C.value)):(a[C.id]=h.length<<1,h.push(S=>C.dynamicSlot(S)));a[x.id]=h.length<<1,h.push(C=>fP(C,x,v))}}let d=h.map(m=>m(a));return new Bu(e,s,d,a,c,o)}}function dP(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let c=i.get(s);if(c!=null){if(c<=a)return;let h=r[c].indexOf(s);h>-1&&r[c].splice(h,1),s instanceof o1&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let h of s)o(h,a);else if(s instanceof o1){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(s.compartment)||s.inner;n.set(s.compartment,h),o(h,a)}else if(s instanceof Uy)o(s.inner,s.prec);else if(s instanceof Lt)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof uu)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,ro.default);else{let h=s.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(h,a)}}return o(t,ro.default),r.reduce((s,a)=>s.concat(a))}function Ea(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Nu(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const qy=fe.define(),s1=fe.define({combine:t=>t.some(e=>e),static:!0}),Ky=fe.define({combine:t=>t.length?t[0]:void 0,static:!0}),Gy=fe.define(),Yy=fe.define(),Xy=fe.define(),Zy=fe.define({combine:t=>t.length?t[0]:!1});class Tr{constructor(e,n){this.type=e,this.value=n}static define(){return new gP}}class gP{of(e){return new Tr(this,e)}}class mP{constructor(e){this.map=e}of(e){return new Ee(this,e)}}class Ee{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ee(this.type,n)}is(e){return this.type==e}static define(e={}){return new mP(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Ee.reconfigure=Ee.define();Ee.appendConfig=Ee.define();class kt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&zy(r,n.newLength),o.some(a=>a.type==kt.time)||(this.annotations=o.concat(kt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new kt(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(kt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}kt.time=Tr.define();kt.userEvent=Tr.define();kt.addToHistory=Tr.define();kt.remote=Tr.define();function pP(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function Qy(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=Rt.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ee.mapEffects(t.effects,i).concat(Ee.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function a1(t,e,n){let r=e.selection,i=vs(e.annotations);return e.userEvent&&(i=i.concat(kt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Rt?e.changes:Rt.of(e.changes||[],n,t.facet(Ky)),selection:r&&(r instanceof Q?r:Q.single(r.anchor,r.head)),effects:vs(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function Jy(t,e,n){let r=a1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=Qy(r,a1(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=kt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return bP(n?vP(i):i)}function vP(t){let e=t.startState,n=!0;for(let i of e.facet(Gy)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:pP(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=Rt.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=kt.create(e,i,t.selection&&t.selection.map(o),Ee.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(Yy);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof kt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof kt?t=o[0]:t=Jy(e,vs(o),!1)}return t}function bP(t){let e=t.startState,n=e.facet(Xy),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=Qy(r,a1(e,o,t.changes.newLength),!0))}return r==t?t:kt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const wP=[];function vs(t){return t==null?wP:Array.isArray(t)?t:[t]}var lt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(lt||(lt={}));const xP=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let l1;try{l1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function yP(t){if(l1)return l1.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||xP.test(n)))return!0}return!1}function CP(t){return e=>{if(!/\S/.test(e))return lt.Space;if(yP(e))return lt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return lt.Word;return lt.Other}}class Ue{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Ea(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Ea(this,r),Nu(this,r)}update(...e){return Jy(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(_h.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,h)=>i.set(h,c)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Ee.reconfigure)?(n=null,r=a.value):a.is(Ee.appendConfig)&&(n=null,r=vs(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Bu.resolve(r,i,this),o=new Ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let s=e.startState.facet(s1)?e.newSelection:e.newSelection.asSingle();new Ue(n,e.newDoc,s,o,(a,c)=>c.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Q.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=vs(r.effects);for(let a=1;a<n.ranges.length;a++){let c=e(n.ranges[a]),h=this.changes(c.changes),f=h.map(i);for(let m=0;m<a;m++)o[m]=o[m].map(f);let d=i.mapDesc(h,!0);o.push(c.range.map(d)),i=i.compose(f),s=Ee.mapEffects(s,f).concat(Ee.mapEffects(vs(c.effects),d))}return{changes:i,selection:Q.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof Rt?e:Rt.of(e,this.doc.length,this.facet(Ue.lineSeparator))}toText(e){return Ge.of(e.split(this.facet(Ue.lineSeparator)||t1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Ea(this,n),Nu(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Lt&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(c=>s.spec.fromJSON(a,c)))}}return Ue.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Bu.resolve(e.extensions||[],new Map),r=e.doc instanceof Ge?e.doc:Ge.of((e.doc||"").split(n.staticFacet(Ue.lineSeparator)||t1)),i=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return zy(i,r.length),n.staticFacet(s1)||(i=i.asSingle()),new Ue(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(Ue.tabSize)}get lineBreak(){return this.facet(Ue.lineSeparator)||`
`}get readOnly(){return this.facet(Zy)}phrase(e,...n){for(let r of this.facet(Ue.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(qy))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return CP(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let c=Ht(n,s,!1);if(o(n.slice(c,s))!=lt.Word)break;s=c}for(;a<i;){let c=Ht(n,a);if(o(n.slice(a,c))!=lt.Word)break;a=c}return s==a?null:Q.range(s+r,a+r)}}Ue.allowMultipleSelections=s1;Ue.tabSize=fe.define({combine:t=>t.length?t[0]:4});Ue.lineSeparator=Ky;Ue.readOnly=Zy;Ue.phrases=fe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ue.languageData=qy;Ue.changeFilter=Gy;Ue.transactionFilter=Yy;Ue.transactionExtender=Xy;_h.reconfigure=Ee.define();function Mr(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class wo{eq(e){return this==e}range(e,n=e){return Wa.create(e,n,this)}}wo.prototype.startSide=wo.prototype.endSide=0;wo.prototype.point=!1;wo.prototype.mapMode=Jt.TrackDel;class Wa{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new Wa(e,n,r)}}function c1(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class gm{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let c=s+a>>1,h=o[c]-e||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return h>=0?s:a;h>=0?a=c:s=c+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],f=this.from[c]+e,d=this.to[c]+e,m,v;if(f==d){let x=n.mapPos(f,h.startSide,h.mapMode);if(x==null||(m=v=x,h.startSide!=h.endSide&&(v=n.mapPos(f,h.endSide),v<m)))continue}else if(m=n.mapPos(f,h.startSide),v=n.mapPos(d,h.endSide),m>v||m==v&&h.startSide>0&&h.endSide<=0)continue;(v-m||h.endSide-h.startSide)<0||(s<0&&(s=m),h.point&&(a=Math.max(a,v-m)),r.push(h),i.push(m-s),o.push(v-s))}return{mapped:r.length?new gm(i,o,r,a):null,pos:s}}}class Ke{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ke(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(c1)),this.isEmpty)return n.length?Ke.of(n):this;let a=new e6(this,null,-1).goto(0),c=0,h=[],f=new Jr;for(;a.value||c<n.length;)if(c<n.length&&(a.from-n[c].from||a.startSide-n[c].value.startSide)>=0){let d=n[c++];f.addInner(d.from,d.to,d.value)||h.push(d)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(a.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&f.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(f.addInner(a.from,a.to,a.value)||h.push(Wa.create(a.from,a.to,a.value))),a.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?Ke.empty:this.nextLayer.update({add:h,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],c=this.chunk[s],h=e.touchesRange(a,a+c.length);if(h===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(e.mapPos(a));else if(h===!0){let{mapped:f,pos:d}=c.map(a,e);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(d))}}let o=this.nextLayer.map(e);return n.length==0?o:new Ke(r,n,o||Ke.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return za.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return za.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),c=M5(s,a,r),h=new ba(s,c,o),f=new ba(a,c,o);r.iterGaps((d,m,v)=>E5(h,d,f,m,v,i)),r.empty&&r.length==0&&E5(h,0,f,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(f=>!f.isEmpty&&n.indexOf(f)<0),s=n.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=M5(o,s),c=new ba(o,a,0).goto(r),h=new ba(s,a,0).goto(r);for(;;){if(c.to!=h.to||!u1(c.active,h.active)||c.point&&(!h.point||!c.point.eq(h.point)))return!1;if(c.to>i)return!0;c.next(),h.next()}}static spans(e,n,r,i,o=-1){let s=new ba(e,null,o).goto(n),a=n,c=s.openStart;for(;;){let h=Math.min(s.to,r);if(s.point){let f=s.activeForPoint(s.to),d=s.pointFrom<n?f.length+1:s.point.startSide<0?f.length:Math.min(f.length,c);i.point(a,h,s.point,f,d,s.pointRank),c=Math.min(s.openEnd(h),f.length)}else h>a&&(i.span(a,h,s.active,c),c=s.openEnd(h));if(s.to>r)return c+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new Jr;for(let i of e instanceof Wa?[e]:n?$P(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ke.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ke.empty;i=i.nextLayer)n=new Ke(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ke.empty=new Ke([],[],null,-1);function $P(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(c1(e,r)>0)return t.slice().sort(c1);e=r}return t}Ke.empty.nextLayer=Ke.empty;class Jr{finishChunk(e){this.chunks.push(new gm(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Jr)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ke.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ke.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function M5(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!n?.touchesRange(a,a+o.chunk[s].length)&&i.add(o.chunk[s])}return i}class e6{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class za{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new e6(s,n,r,o));return i.length==1?i[0]:new za(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kd(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kd(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Kd(this.heap,0)}}}function Kd(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class ba{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=za.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Nc(this.active,e),Nc(this.activeTo,e),Nc(this.activeRank,e),this.minActive=O5(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;jc(this.active,n,r),jc(this.activeTo,n,i),jc(this.activeRank,n,o),e&&jc(e,n,this.cursor.from),this.minActive=O5(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Nc(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function E5(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,c=r-e;for(;;){let h=t.to+c-n.to,f=h||t.endSide-n.endSide,d=f<0?t.to+c:n.to,m=Math.min(d,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&u1(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,m,t.point,n.point):m>a&&!u1(t.active,n.active)&&o.compareRange(a,m,t.active,n.active),d>s)break;(h||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),a=d,f<=0&&t.next(),f>=0&&n.next()}}function u1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Nc(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function jc(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function O5(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Gs(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Ht(t,i));return r}function h1(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Ht(t,i)}return r===!0?-1:t.length}const f1="ͼ",D5=typeof Symbol>"u"?"__"+f1:Symbol.for(f1),d1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),I5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ii{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,c,h){let f=[],d=/^@(\w+)\b/.exec(s[0]),m=d&&d[1]=="keyframes";if(d&&a==null)return c.push(s[0]+";");for(let v in a){let x=a[v];if(/&/.test(v))o(v.split(/,\s*/).map(w=>s.map(C=>w.replace(/&/,C))).reduce((w,C)=>w.concat(C)),x,c);else if(x&&typeof x=="object"){if(!d)throw new RangeError("The value of a property ("+v+") should be a primitive value.");o(i(v),x,f,m)}else x!=null&&f.push(v.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+x+";")}(f.length||m)&&c.push((r&&!d&&!h?s.map(r):s).join(", ")+" {"+f.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=I5[D5]||1;return I5[D5]=e+1,f1+e.toString(36)}static mount(e,n,r){let i=e[d1],o=r&&r.nonce;i?o&&i.setNonce(o):i=new SP(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let _5=new Map;class SP{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=_5.get(r);if(o)return e[d1]=o;this.sheet=new i.CSSStyleSheet,_5.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[d1]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],c=this.modules.indexOf(a);if(c<o&&c>-1&&(this.modules.splice(c,1),o--,c=-1),c==-1){if(this.modules.splice(o++,0,a),r)for(let h=0;h<a.rules.length;h++)r.insertRule(a.rules[h],i++)}else{for(;o<c;)i+=this.modules[o++].rules.length;i+=a.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let s="";for(let c=0;c<this.modules.length;c++)s+=this.modules[c].getRules()+`
`;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var _i={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ua={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},AP=typeof navigator<"u"&&/Mac/.test(navigator.platform),RP=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Vt=0;Vt<10;Vt++)_i[48+Vt]=_i[96+Vt]=String(Vt);for(var Vt=1;Vt<=24;Vt++)_i[Vt+111]="F"+Vt;for(var Vt=65;Vt<=90;Vt++)_i[Vt]=String.fromCharCode(Vt+32),Ua[Vt]=String.fromCharCode(Vt);for(var Gd in _i)Ua.hasOwnProperty(Gd)||(Ua[Gd]=_i[Gd]);function kP(t){var e=AP&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||RP&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ua:_i)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function et(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)t6(t,arguments[e]);return t}function t6(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)t6(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}function qa(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function g1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function hu(t,e){if(!e.anchorNode)return!1;try{return g1(t,e.anchorNode)}catch{return!1}}function Es(t){return t.nodeType==3?yo(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Oa(t,e,n,r){return n?L5(t,e,n,r,-1)||L5(t,e,n,r,1):!1}function xo(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function ju(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function L5(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Sr(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=xo(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Sr(t):0}else return!1}}function Sr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ml(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function TP(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function n6(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function MP(t,e,n,r,i,o,s,a){let c=t.ownerDocument,h=c.defaultView||window;for(let f=t,d=!1;f&&!d;)if(f.nodeType==1){let m,v=f==c.body,x=1,w=1;if(v)m=TP(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(d=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let R=f.getBoundingClientRect();({scaleX:x,scaleY:w}=n6(f,R)),m={left:R.left,right:R.left+f.clientWidth*x,top:R.top,bottom:R.top+f.clientHeight*w}}let C=0,S=0;if(i=="nearest")e.top<m.top?(S=e.top-(m.top+s),n>0&&e.bottom>m.bottom+S&&(S=e.bottom-m.bottom+s)):e.bottom>m.bottom&&(S=e.bottom-m.bottom+s,n<0&&e.top-S<m.top&&(S=e.top-(m.top+s)));else{let R=e.bottom-e.top,T=m.bottom-m.top;S=(i=="center"&&R<=T?e.top+R/2-T/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-T+s)-m.top}if(r=="nearest"?e.left<m.left?(C=e.left-(m.left+o),n>0&&e.right>m.right+C&&(C=e.right-m.right+o)):e.right>m.right&&(C=e.right-m.right+o,n<0&&e.left<m.left+C&&(C=e.left-(m.left+o))):C=(r=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:r=="start"==a?e.left-o:e.right-(m.right-m.left)+o)-m.left,C||S)if(v)h.scrollBy(C,S);else{let R=0,T=0;if(S){let E=f.scrollTop;f.scrollTop+=S/w,T=(f.scrollTop-E)*w}if(C){let E=f.scrollLeft;f.scrollLeft+=C/x,R=(f.scrollLeft-E)*x}e={left:e.left-R,top:e.top-T,right:e.right-R,bottom:e.bottom-T},R&&Math.abs(R-C)<1&&(r="nearest"),T&&Math.abs(T-S)<1&&(i="nearest")}if(v)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function EP(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class OP{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Sr(n):0),r,Math.min(e.focusOffset,r?Sr(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let is=null;function r6(t){if(t.setActive)return t.setActive();if(is)return t.focus(is);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(is==null?{get preventScroll(){return is={preventScroll:!0},!0}}:void 0),!is){is=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let B5;function yo(t,e,n=e){let r=B5||(B5=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function bs(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function DP(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function i6(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function IP(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Sr(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Sr(n))}else{if(n==t)return!0;r=xo(n),n=n.parentNode}}function o6(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function s6(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Sr(n)}else if(n.parentNode&&!ju(n))r=xo(n),n=n.parentNode;else return null}}function a6(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!ju(n))r=xo(n)+1,n=n.parentNode;else return null}}class qt{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new qt(e.parentNode,xo(e),n)}static after(e,n){return new qt(e.parentNode,xo(e)+1,n)}}const mm=[];class nt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=nt.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=N5(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=N5(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Sr(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!nt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let c=0,h=r,f=r;c<this.children.length;c++){let d=this.children[c],m=h+d.length;if(h<e&&m>n)return d.domBoundsAround(e,n,h);if(m>=e&&i==-1&&(i=c,o=h),h>n&&d.dom.parentNode==this.dom){s=c,a=f;break}f=m,h=m+d.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=mm){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new l6(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}nt.prototype.breakAfter=0;function N5(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class l6{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function c6(t,e,n,r,i,o,s,a,c){let{children:h}=t,f=h.length?h[e]:null,d=o.length?o[o.length-1]:null,m=d?d.breakAfter:s;if(!(e==r&&f&&!s&&!m&&o.length<2&&f.merge(n,i,o.length?d:null,n==0,a,c))){if(r<h.length){let v=h[r];v&&(i<v.length||v.breakAfter&&d?.breakAfter)?(e==r&&(v=v.split(i),i=0),!m&&d&&v.merge(0,i,d,!0,0,c)?o[o.length-1]=v:((i||v.children.length&&!v.children[0].length)&&v.merge(0,i,null,!1,0,c),o.push(v))):v?.breakAfter&&(d?d.breakAfter=1:s=1),r++}for(f&&(f.breakAfter=s,n>0&&(!s&&o.length&&f.merge(n,f.length,o[0],!1,a,0)?f.breakAfter=o.shift().breakAfter:(n<f.length||f.children.length&&f.children[f.children.length-1].length==0)&&f.merge(n,f.length,null,!1,a,0),e++));e<r&&o.length;)if(h[r-1].become(o[o.length-1]))r--,o.pop(),c=o.length?0:a;else if(h[e].become(o[0]))e++,o.shift(),a=o.length?0:c;else break;!o.length&&e&&r<h.length&&!h[e-1].breakAfter&&h[r].merge(0,0,h[e-1],!1,a,c)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function u6(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:c}=s.findPos(n,1),{i:h,off:f}=s.findPos(e,-1),d=e-n;for(let m of r)d+=m.length;t.length+=d,c6(t,h,f,a,c,r,0,i,o)}let cn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},m1=typeof document<"u"?document:{documentElement:{style:{}}};const p1=/Edge\/(\d+)/.exec(cn.userAgent),h6=/MSIE \d/.test(cn.userAgent),v1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cn.userAgent),Lh=!!(h6||v1||p1),j5=!Lh&&/gecko\/(\d+)/i.test(cn.userAgent),Yd=!Lh&&/Chrome\/(\d+)/.exec(cn.userAgent),_P="webkitFontSmoothing"in m1.documentElement.style,f6=!Lh&&/Apple Computer/.test(cn.vendor),F5=f6&&(/Mobile\/\w+/.test(cn.userAgent)||cn.maxTouchPoints>2);var he={mac:F5||/Mac/.test(cn.platform),windows:/Win/.test(cn.platform),linux:/Linux|X11/.test(cn.platform),ie:Lh,ie_version:h6?m1.documentMode||6:v1?+v1[1]:p1?+p1[1]:0,gecko:j5,gecko_version:j5?+(/Firefox\/(\d+)/.exec(cn.userAgent)||[0,0])[1]:0,chrome:!!Yd,chrome_version:Yd?+Yd[1]:0,ios:F5,android:/Android\b/.test(cn.userAgent),safari:f6,webkit_version:_P?+(/\bAppleWebKit\/(\d+)/.exec(cn.userAgent)||[0,0])[1]:0,tabSize:m1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const LP=256;class er extends nt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof er)||this.length-(n-e)+r.length>LP||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new er(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new qt(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return BP(this.dom,e,n)}}class ei extends nt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(i6(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof ei&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(u6(this,e,n,r?r.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let c=r+a.length;c>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=c,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ei(this.mark,n,s)}domAtPos(e){return d6(this,e)}coordsAt(e,n){return m6(this,e,n)}}function BP(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?he.chrome||he.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=yo(t,i,o).getClientRects();if(!a.length)return null;let c=a[(s?s<0:n>=0)?0:a.length-1];return he.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(a,h=>h.width)||c),s?ml(c,s<0):c||null}class Ri extends nt{static create(e,n,r){return new Ri(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Ri.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof Ri)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Ri&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ge.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Ge.empty}domAtPos(e){return(this.length?e==0:this.side>0)?qt.before(this.dom):qt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return ml(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Os extends nt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Os&&e.side==this.side}split(){return new Os(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?qt.before(this.dom):qt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ge.empty}get isHidden(){return!0}}er.prototype.children=Ri.prototype.children=Os.prototype.children=mm;function d6(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new qt(n,0)}function g6(t,e,n){let r,{children:i}=t;n>0&&e instanceof ei&&i.length&&(r=i[i.length-1])instanceof ei&&r.mark.eq(e.mark)?g6(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function m6(t,e,n){let r=null,i=-1,o=null,s=-1;function a(h,f){for(let d=0,m=0;d<h.children.length&&m<=f;d++){let v=h.children[d],x=m+v.length;x>=f&&(v.children.length?a(v,f-m):(!o||o.isHidden&&(n>0||jP(o,v)))&&(x>f||m==x&&v.getSide()>0)?(o=v,s=f-m):(m<f||m==x&&v.getSide()<0&&!v.isHidden)&&(r=v,i=f-m)),m=x}}a(t,e);let c=(n<0?r:o)||r||o;return c?c.coordsAt(Math.max(0,c==r?i:s),n):NP(t)}function NP(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Es(e);return n[n.length-1]||null}function jP(t,e){let n=t.coordsAt(0,1),r=e.coordsAt(0,1);return n&&r&&r.top<n.bottom}function b1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const V5=Object.create(null);function Fu(t,e,n){if(t==e)return!0;t||(t=V5),e||(e=V5);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function w1(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function FP(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class ai{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var en=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(en||(en={}));class xe extends wo{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new pl(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Li(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=p6(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Li(e,r,i,n,e.widget||null,!0)}static line(e){return new vl(e)}static set(e,n=!1){return Ke.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Ke.empty;class pl extends xe{constructor(e){let{start:n,end:r}=p6(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof pl&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Fu(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}pl.prototype.point=!1;class vl extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof vl&&this.spec.class==e.spec.class&&Fu(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}vl.prototype.mapMode=Jt.TrackBefore;vl.prototype.point=!0;class Li extends xe{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?Jt.TrackBefore:Jt.TrackAfter:Jt.TrackDel}get type(){return this.startSide!=this.endSide?en.WidgetRange:this.startSide<=0?en.WidgetBefore:en.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Li&&VP(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Li.prototype.point=!0;function p6(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function VP(t,e){return t==e||!!(t&&e&&t.compare(e))}function fu(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class xt extends nt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof xt))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),u6(this,e,n,r?r.children.slice():[],o,s),!0}split(e){let n=new xt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Fu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){g6(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=b1(n,this.attrs||{})),r&&(this.attrs=b1({class:r},this.attrs||{}))}domAtPos(e){return d6(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(i6(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(w1(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&nt.get(i)instanceof ei;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=nt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!he.ios||!this.children.some(o=>o instanceof er))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof er)||/[^ -~]/.test(r.text))return null;let i=Es(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=m6(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return e instanceof xt&&this.children.length==0&&e.children.length==0&&Fu(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof xt)return o;if(s>n)break}i=s+o.breakAfter}return null}}class Yr extends nt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof Yr)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?qt.before(this.dom):qt.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new Yr(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return mm}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ge.empty}domBoundsAround(){return null}become(e){return e instanceof Yr&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof x1?null:ml(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class x1 extends ai{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Da{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Yr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new xt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Fc(new Os(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Yr)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(Fc(new er(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Li){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Li)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Yr(r.widget||Ds.block,a,r));else{let c=Ri.create(r.widget||Ds.inline,a,a?0:r.startSide),h=this.atCursorPos&&!c.isEditable&&o<=i.length&&(e<n||r.startSide>0),f=!c.isEditable&&(e<n||o>i.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!h&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),h&&(d.append(Fc(new Os(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(Fc(c,i),o),this.atCursorPos=f,this.pendingBuffer=f?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new Da(e,n,r,o);return s.openEnd=Ke.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function Fc(t,e){for(let n of e)t=new ei(n,[t],t.length);return t}class Ds extends ai{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ds.inline=new Ds("span");Ds.block=new Ds("div");var st=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(st||(st={}));const Co=st.LTR,pm=st.RTL;function v6(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const HP=v6("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),PP=v6("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),y1=Object.create(null),hr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);y1[e]=n,y1[n]=-e}function b6(t){return t<=247?HP[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?PP[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const WP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ki{get dir(){return this.level%2?pm:Co}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function w6(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!w6(r.inner,i.inner))return!1}return!0}const tt=[];function zP(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,c=o?256:i;for(let h=s,f=c,d=c;h<a;h++){let m=b6(t.charCodeAt(h));m==512?m=f:m==8&&d==4&&(m=16),tt[h]=m==4?2:m,m&7&&(d=m),f=m}for(let h=s,f=c,d=c;h<a;h++){let m=tt[h];if(m==128)h<a-1&&f==tt[h+1]&&f&24?m=tt[h]=f:tt[h]=256;else if(m==64){let v=h+1;for(;v<a&&tt[v]==64;)v++;let x=h&&f==8||v<n&&tt[v]==8?d==1?1:8:256;for(let w=h;w<v;w++)tt[w]=x;h=v-1}else m==8&&d==1&&(tt[h]=1);f=m,m&7&&(d=m)}}}function UP(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,c=0;s<=r.length;s++){let h=s?r[s-1].to:e,f=s<r.length?r[s].from:n;for(let d=h,m,v,x;d<f;d++)if(v=y1[m=t.charCodeAt(d)])if(v<0){for(let w=a-3;w>=0;w-=3)if(hr[w+1]==-v){let C=hr[w+2],S=C&2?i:C&4?C&1?o:i:0;S&&(tt[d]=tt[hr[w]]=S),a=w;break}}else{if(hr.length==189)break;hr[a++]=d,hr[a++]=m,hr[a++]=c}else if((x=tt[d])==2||x==1){let w=x==i;c=w?0:1;for(let C=a-3;C>=0;C-=3){let S=hr[C+2];if(S&2)break;if(w)hr[C+2]|=2;else{if(S&4)break;hr[C+2]|=4}}}}}function qP(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let c=s;c<a;){let h=tt[c];if(h==256){let f=c+1;for(;;)if(f==a){if(i==n.length)break;f=n[i++].to,a=i<n.length?n[i].from:e}else if(tt[f]==256)f++;else break;let d=o==1,m=(f<e?tt[f]:r)==1,v=d==m?d?1:2:r;for(let x=f,w=i,C=w?n[w-1].to:t;x>c;)x==C&&(x=n[--w].from,C=w?n[w-1].to:t),tt[--x]=v;c=f}else o=h,c++}}}function C1(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let c=e,h=0;c<n;){let f=!0,d=!1;if(h==o.length||c<o[h].from){let w=tt[c];w!=a&&(f=!1,d=w==16)}let m=!f&&a==1?[]:null,v=f?r:r+1,x=c;e:for(;;)if(h<o.length&&x==o[h].from){if(d)break e;let w=o[h];if(!f)for(let C=w.to,S=h+1;;){if(C==n)break e;if(S<o.length&&o[S].from==C)C=o[S++].to;else{if(tt[C]==a)break e;break}}if(h++,m)m.push(w);else{w.from>c&&s.push(new ki(c,w.from,v));let C=w.direction==Co!=!(v%2);$1(t,C?r+1:r,i,w.inner,w.from,w.to,s),c=w.to}x=w.to}else{if(x==n||(f?tt[x]!=a:tt[x]==a))break;x++}m?C1(t,c,x,r+1,i,m,s):c<x&&s.push(new ki(c,x,v)),c=x}else for(let c=n,h=o.length;c>e;){let f=!0,d=!1;if(!h||c>o[h-1].to){let w=tt[c-1];w!=a&&(f=!1,d=w==16)}let m=!f&&a==1?[]:null,v=f?r:r+1,x=c;e:for(;;)if(h&&x==o[h-1].to){if(d)break e;let w=o[--h];if(!f)for(let C=w.from,S=h;;){if(C==e)break e;if(S&&o[S-1].to==C)C=o[--S].from;else{if(tt[C-1]==a)break e;break}}if(m)m.push(w);else{w.to<c&&s.push(new ki(w.to,c,v));let C=w.direction==Co!=!(v%2);$1(t,C?r+1:r,i,w.inner,w.from,w.to,s),c=w.from}x=w.from}else{if(x==e||(f?tt[x-1]!=a:tt[x-1]==a))break;x--}m?C1(t,x,c,r+1,i,m,s):x<c&&s.push(new ki(x,c,v)),c=x}}function $1(t,e,n,r,i,o,s){let a=e%2?2:1;zP(t,i,o,r,a),UP(t,i,o,r,a),qP(i,o,r,a),C1(t,i,o,e,n,r,s)}function KP(t,e,n){if(!t)return[new ki(0,0,e==pm?1:0)];if(e==Co&&!n.length&&!WP.test(t))return x6(t.length);if(n.length)for(;t.length>tt.length;)tt[tt.length]=256;let r=[],i=e==Co?0:1;return $1(t,i,i,n,0,t.length,r),r}function x6(t){return[new ki(0,t,0)]}let y6="";function GP(t,e,n,r,i){var o;let s=r.head-t.from,a=ki.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),c=e[a],h=c.side(i,n);if(s==h){let m=a+=i?1:-1;if(m<0||m>=e.length)return null;c=e[a=m],s=c.side(!i,n),h=c.side(i,n)}let f=Ht(t.text,s,c.forward(i,n));(f<c.from||f>c.to)&&(f=h),y6=t.text.slice(Math.min(s,f),Math.max(s,f));let d=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return d&&f==h&&d.level+(i?0:1)<c.level?Q.cursor(d.side(!i,n)+t.from,d.forward(i,n)?1:-1,d.level):Q.cursor(f+t.from,c.forward(i,n)?-1:1,c.level)}function YP(t,e,n){for(let r=e;r<n;r++){let i=b6(t.charCodeAt(r));if(i==1)return Co;if(i==2||i==4)return pm}return Co}const C6=fe.define(),$6=fe.define(),S6=fe.define(),A6=fe.define(),S1=fe.define(),R6=fe.define(),k6=fe.define(),vm=fe.define(),bm=fe.define(),T6=fe.define({combine:t=>t.some(e=>e)}),M6=fe.define({combine:t=>t.some(e=>e)}),E6=fe.define();class ws{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new ws(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ws(Q.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Vc=Ee.define({map:(t,e)=>t.map(e)}),O6=Ee.define();function hn(t,e,n){let r=t.facet(A6);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const qr=fe.define({combine:t=>t.length?t[0]:!0});let XP=0;const us=fe.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class vt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=o(this),this.extension=this.baseExtensions.concat(us.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(us.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new vt(XP++,e,r,i,a=>{let c=[];return s&&c.push(Ka.of(h=>{let f=h.plugin(a);return f?s(f):xe.none})),o&&c.push(o(a)),c})}static fromClass(e,n){return vt.define((r,i)=>new e(r,i),n)}}class Xd{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(hn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){hn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){hn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const D6=fe.define(),wm=fe.define(),Ka=fe.define(),I6=fe.define(),xm=fe.define(),_6=fe.define();function H5(t,e){let n=t.state.facet(_6);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Ke.spans(r,e.from,e.to,{point(){},span(o,s,a,c){let h=o-e.from,f=s-e.from,d=i;for(let m=a.length-1;m>=0;m--,c--){let v=a[m].spec.bidiIsolate,x;if(v==null&&(v=YP(e.text,h,f)),c>0&&d.length&&(x=d[d.length-1]).to==h&&x.direction==v)x.to=f,d=x.inner;else{let w={from:h,to:f,direction:v,inner:[]};d.push(w),d=w.inner}}}}),i}const L6=fe.define();function ym(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(L6)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Sa=fe.define();class Vn{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Vn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let c=i==e.length?null:e[i],h=s-a,f=c?c.fromB:1e9;for(;o<n.length&&n[o]<f;){let d=n[o],m=n[o+1],v=Math.max(a,d),x=Math.min(f,m);if(v<=x&&new Vn(v+h,x+h,v,x).addToSet(r),m>f)break;o+=2}if(!c)return r;new Vn(c.fromA,c.toA,c.fromB,c.toB).addToSet(r),s=c.toA,a=c.toB}}}class Vu{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Rt.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,c)=>i.push(new Vn(o,s,a,c))),this.changedRanges=i}static create(e,n,r){return new Vu(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class P5 extends nt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=xe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new xt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vn(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:h,toA:f})=>f<this.minWidthFrom||h>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!rW(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?QP(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:f}=this.hasComposition;r=new Vn(h,f,e.changes.mapPos(h,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(he.ie||he.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),c=tW(s,a,e.changes);return r=Vn.extendWithRanges(r,c),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=he.chrome||he.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof Yr&&s.widget instanceof x1&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:c,toA:h,fromB:f,toB:d}=a,m,v,x,w;if(r&&r.range.fromB<d&&r.range.toB>f){let E=Da.build(this.view.state.doc,f,r.range.fromB,this.decorations,this.dynamicDecorationMap),O=Da.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);v=E.breakAtStart,x=E.openStart,w=O.openEnd;let L=this.compositionView(r);O.breakAtStart?L.breakAfter=1:O.content.length&&L.merge(L.length,L.length,O.content[0],!1,O.openStart,0)&&(L.breakAfter=O.content[0].breakAfter,O.content.shift()),E.content.length&&L.merge(0,0,E.content[E.content.length-1],!0,0,E.openEnd)&&E.content.pop(),m=E.content.concat(L).concat(O.content)}else({content:m,breakAtStart:v,openStart:x,openEnd:w}=Da.build(this.view.state.doc,f,d,this.decorations,this.dynamicDecorationMap));let{i:C,off:S}=o.findPos(h,1),{i:R,off:T}=o.findPos(c,-1);c6(this,R,T,C,S,m,v,x,w)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(O6)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new er(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new ei(i,[n],n.length);let r=new xt;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(s);let a=nt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(qr)||this.dom.tabIndex>-1)&&hu(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(he.gecko&&a.empty&&!this.hasComposition&&ZP(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=h=new qt(d,0),s=!0}let f=this.view.observer.selectionRange;(s||!f.focusNode||(!Oa(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Oa(h.node,h.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,a))&&(this.view.observer.ignore(()=>{he.android&&he.chrome&&this.dom.contains(f.focusNode)&&nW(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=qa(this.view.root);if(d)if(a.empty){if(he.gecko){let m=JP(c.node,c.offset);if(m&&m!=3){let v=(m==1?s6:a6)(c.node,c.offset);v&&(c=new qt(v.node,v.offset))}}d.collapse(c.node,c.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(h.node,h.offset)}catch{}}else{let m=document.createRange();a.anchor>a.head&&([c,h]=[h,c]),m.setEnd(h.node,h.offset),m.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(m)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new qt(f.anchorNode,f.anchorOffset),this.impreciseHead=h.precise?null:new qt(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Oa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=qa(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=xt.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let c=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!c||!h||c.bottom>h.top)return;let f=this.domAtPos(n.head+n.assoc);r.collapse(f.node,f.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=nt.get(n.childNodes[i]);o instanceof xt&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=nt.get(n.childNodes[i]);o instanceof xt&&(r=o.domAtPos(o.length))}return r?new qt(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=nt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof xt)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],c=o-a.breakAfter,h=c-a.length;if(c<e)break;if(h<=e&&(h<e||a.covers(-1))&&(c>e||a.covers(1))&&(!r||a instanceof xt&&!(r instanceof xt&&n>=0)))r=a,i=h;else if(r&&h==e&&c==e&&a instanceof Yr&&Math.abs(n)<2){if(a.deco.startSide<0)break;s&&(r=null)}o=h}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof xt))return null;for(;i.children.length;){let{i:a,off:c}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=c}if(!(i instanceof er))return null;let o=Ht(i.text,r);if(o==r)return null;let s=yo(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let c=s[a];if(a==s.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==st.LTR;for(let h=0,f=0;f<this.children.length;f++){let d=this.children[f],m=h+d.length;if(m>i)break;if(h>=r){let v=d.dom.getBoundingClientRect();if(n.push(v.height),s){let x=d.dom.lastChild,w=x?Es(x):[];if(w.length){let C=w[w.length-1],S=c?C.right-v.left:v.right-C.left;S>a&&(a=S,this.minWidth=o,this.minWidthFrom=h,this.minWidthTo=m)}}}h=m+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?st.RTL:st.LTR}measureTextSize(){for(let o of this.children)if(o instanceof xt){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Es(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new l6(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(xe.replace({widget:new x1(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return xe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Ka).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(I6).map((o,s)=>{let a=typeof o=="function";return a&&(r=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ke.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(E6))try{if(h(this.view,e.range,e))return!0}catch(f){hn(this.view.state,f,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=ym(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;MP(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==st.LTR)}}function ZP(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function B6(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=s6(n.focusNode,n.focusOffset),i=a6(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let a=nt.get(i.node);if(!a||a instanceof er&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let c=nt.get(r.node);!c||c instanceof er&&c.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function QP(t,e,n){let r=B6(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let c=e.invertedDesc,h=new Vn(c.mapPos(o),c.mapPos(s),o,s),f=[];for(let d=i.parentNode;;d=d.parentNode){let m=nt.get(d);if(m instanceof ei)f.push({node:d,deco:m.mark});else{if(m instanceof xt||d.nodeName=="DIV"&&d.parentNode==t.contentDOM)return{range:h,text:i,marks:f,line:d};if(d!=t.contentDOM)f.push({node:d,deco:new pl({inclusive:!0,attributes:FP(d),tagName:d.tagName.toLowerCase()})});else return null}}}function JP(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let eW=class{constructor(){this.changes=[]}compareRange(e,n){fu(e,n,this.changes)}comparePoint(e,n){fu(e,n,this.changes)}boundChange(e){fu(e,e,this.changes)}};function tW(t,e,n){let r=new eW;return Ke.compare(t,e,n,r),r.changes}function nW(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function rW(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function iW(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return Q.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Ht(i.text,o,!1):a=Ht(i.text,o);let c=r(i.text.slice(s,a));for(;s>0;){let h=Ht(i.text,s,!1);if(r(i.text.slice(h,s))!=c)break;s=h}for(;a<i.length;){let h=Ht(i.text,a);if(r(i.text.slice(a,h))!=c)break;a=h}return Q.range(s+i.from,a+i.from)}function oW(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function sW(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Zd(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function W5(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function z5(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function A1(t,e,n){let r,i,o,s,a=!1,c,h,f,d;for(let x=t.firstChild;x;x=x.nextSibling){let w=Es(x);for(let C=0;C<w.length;C++){let S=w[C];i&&Zd(i,S)&&(S=W5(z5(S,i.bottom),i.top));let R=oW(e,S),T=sW(n,S);if(R==0&&T==0)return x.nodeType==3?U5(x,e,n):A1(x,e,n);(!r||s>T||s==T&&o>R)&&(r=x,i=S,o=R,s=T,a=R?e<S.left?C>0:C<w.length-1:!0),R==0?n>S.bottom&&(!f||f.bottom<S.bottom)?(c=x,f=S):n<S.top&&(!d||d.top>S.top)&&(h=x,d=S):f&&Zd(f,S)?f=z5(f,S.bottom):d&&Zd(d,S)&&(d=W5(d,S.top))}}if(f&&f.bottom>=n?(r=c,i=f):d&&d.top<=n&&(r=h,i=d),!r)return{node:t,offset:0};let m=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return U5(r,m,n);if(a&&r.contentEditable!="false")return A1(r,m,n);let v=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:v}}function U5(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let c=yo(t,a,a+1).getClientRects();for(let h=0;h<c.length;h++){let f=c[h];if(f.top==f.bottom)continue;s||(s=e-f.left);let d=(f.top>n?f.top-n:n-f.bottom)-1;if(f.left-1<=e&&f.right+1>=e&&d<o){let m=e>=(f.left+f.right)/2,v=m;if((he.chrome||he.gecko)&&yo(t,a).getBoundingClientRect().left==f.right&&(v=!m),d<=0)return{node:t,offset:a+(v?1:0)};i=a+(v?1:0),o=d}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function N6(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,c,{docHeight:h}=t.viewState,{x:f,y:d}=e,m=d-a;if(m<0)return 0;if(m>h)return t.state.doc.length;for(let E=t.viewState.heightOracle.textHeight/2,O=!1;c=t.elementAtHeight(m),c.type!=en.Text;)for(;m=r>0?c.bottom+E:c.top-E,!(m>=0&&m<=h);){if(O)return n?null:0;O=!0,r=-r}d=a+m;let v=c.from;if(v<t.viewport.from)return t.viewport.from==0?0:n?null:q5(t,s,c,f,d);if(v>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:q5(t,s,c,f,d);let x=t.dom.ownerDocument,w=t.root.elementFromPoint?t.root:x,C=w.elementFromPoint(f,d);C&&!t.contentDOM.contains(C)&&(C=null),C||(f=Math.max(s.left+1,Math.min(s.right-1,f)),C=w.elementFromPoint(f,d),C&&!t.contentDOM.contains(C)&&(C=null));let S,R=-1;if(C&&((i=t.docView.nearest(C))===null||i===void 0?void 0:i.isEditable)!=!1){if(x.caretPositionFromPoint){let E=x.caretPositionFromPoint(f,d);E&&({offsetNode:S,offset:R}=E)}else if(x.caretRangeFromPoint){let E=x.caretRangeFromPoint(f,d);E&&({startContainer:S,startOffset:R}=E,(!t.contentDOM.contains(S)||he.safari&&aW(S,R,f)||he.chrome&&lW(S,R,f))&&(S=void 0))}S&&(R=Math.min(Sr(S),R))}if(!S||!t.docView.dom.contains(S)){let E=xt.find(t.docView,v);if(!E)return m>c.top+c.height/2?c.to:c.from;({node:S,offset:R}=A1(E.dom,f,d))}let T=t.docView.nearest(S);if(!T)return null;if(T.isWidget&&((o=T.dom)===null||o===void 0?void 0:o.nodeType)==1){let E=T.dom.getBoundingClientRect();return e.y<E.top||e.y<=E.bottom&&e.x<=(E.left+E.right)/2?T.posAtStart:T.posAtEnd}else return T.localPosFromDOM(S,R)+T.posAtStart}function q5(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);o+=c*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+h1(s,o,t.state.tabSize)}function aW(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let o=i.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let s=i.parentNode;if(!s||s.nodeName=="DIV")break;i=s}}return yo(t,r-1,r).getBoundingClientRect().right>n}function lW(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():yo(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function R1(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let o of r.type){if(o.from>e)break;if(!(o.to<e)){if(o.from<e&&o.to>e)return o;(!i||o.type==en.Text&&(i.type!=o.type||(n<0?o.from<e:o.to>e)))&&(i=o)}}return i||r}return r}function cW(t,e,n,r){let i=R1(t,e.head,e.assoc||-1),o=!r||i.type!=en.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),c=t.posAtCoords({x:n==(a==st.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(c!=null)return Q.cursor(c,n?-1:1)}return Q.cursor(n?i.to:i.from,n?-1:1)}function K5(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,c=null;;){let h=GP(i,o,s,a,n),f=y6;if(!h){if(i.number==(n?t.state.doc.lines:1))return a;f=`
`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),h=t.visualLineSide(i,!n)}if(c){if(!c(f))return a}else{if(!r)return h;c=r(f)}a=h}}function uW(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==lt.Space&&(i=s),i==s}}function hW(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return Q.cursor(i,e.assoc);let s=e.goalColumn,a,c=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(i,e.assoc||-1),f=t.documentTop;if(h)s==null&&(s=h.left-c.left),a=o<0?h.top:h.bottom;else{let v=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,t.defaultCharacterWidth*(i-v.from))),a=(o<0?v.top:v.bottom)+f}let d=c.left+s,m=r??t.viewState.heightOracle.textHeight>>1;for(let v=0;;v+=10){let x=a+(m+v)*o,w=N6(t,{x:d,y:x},!1,o);if(x<c.top||x>c.bottom||(o<0?w<i:w>i)){let C=t.docView.coordsForChar(w),S=!C||x<C.top?-1:1;return Q.cursor(w,S,void 0,s)}}}function du(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let c=r||n||(e-o<s-e?-1:1);e=c<0?o:s,r=c}});if(!r)return e}}function Qd(t,e,n){let r=du(t.state.facet(xm).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Q.cursor(r,r<n.from?1:-1)}const Aa="￿";class fW{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Aa}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=nt.get(i),c=nt.get(s);(a&&c?a.breakAfter:(a?a.breakAfter:ju(i))||ju(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=nt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(dW(e,r.node,r.offset)?n:0))}}function dW(t,e,n){for(;;){if(!e||n<Sr(e))return!1;if(e==t)return!0;n=xo(e)+1,e=e.parentNode}}class G5{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class gW{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:vW(e),c=new fW(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=bW(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!g1(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),h=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!g1(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),f=e.viewport;if((he.ios||he.chrome)&&e.state.selection.main.empty&&c!=h&&(f.from>0||f.to<e.state.doc.length)){let d=Math.min(c,h),m=Math.max(c,h),v=f.from-d,x=f.to-m;(v==0||v==1||d==0)&&(x==0||x==-1||m==e.state.doc.length)&&(c=0,h=e.state.doc.length)}this.newSel=Q.single(h,c)}}}function j6(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,c=i.from,h=null;(o===8||he.android&&e.text.length<a-s)&&(c=i.to,h="end");let f=pW(t.state.doc.sliceString(s,a,Aa),e.text,c-s,h);f&&(he.chrome&&o==13&&f.toB==f.from+2&&e.text.slice(f.from,f.toB)==Aa+Aa&&f.toB--,n={from:s+f.from,to:s+f.toA,insert:Ge.of(e.text.slice(f.from,f.toB).split(Aa))})}else r&&(!t.hasFocus&&t.state.facet(qr)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(he.mac||he.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Q.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Ge.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:he.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
 `&&t.lineWrapping&&(r&&(r=Q.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ge.of([" "])}),n)return Cm(t,n,r,o);if(r&&!r.main.eq(i)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function Cm(t,e,n,r=-1){if(he.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(he.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&bs(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&bs(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&bs(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,a=()=>s||(s=mW(t,e,n));return t.state.facet(R6).some(c=>c(t,e.from,e.to,o,a))||t.dispatch(a()),!0}function mW(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.from<e.from?i.sliceDoc(o.from,e.from):"",c=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let a=i.changes(e),c=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let h=t.state.sliceDoc(e.from,e.to),f,d=n&&B6(t,n.main.head);if(d){let x=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-x}}else f=t.state.doc.lineAt(o.head);let m=o.to-e.to,v=o.to-o.from;r=i.changeByRange(x=>{if(x.from==o.from&&x.to==o.to)return{changes:a,range:c||x.map(a)};let w=x.to-m,C=w-h.length;if(x.to-x.from!=v||t.state.sliceDoc(C,w)!=h||x.to>=f.from&&x.from<=f.to)return{range:x};let S=i.changes({from:C,to:w,insert:e.insert}),R=x.to-o.to;return{changes:S,range:c?Q.range(Math.max(0,c.anchor+R),Math.max(0,c.head+R)):x.map(S)}})}else r={changes:a,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function pW(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let c=Math.max(0,o-Math.min(s,a));n-=s+c-o}if(s<o&&t.length<e.length){let c=n<=o&&n>=s?o-n:0;o-=c,a=o+(a-s),s=o}else if(a<o){let c=n<=o&&n>=a?o-n:0;o-=c,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function vW(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new G5(n,r)),(i!=n||o!=r)&&e.push(new G5(i,o))),e}function bW(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Q.single(n+e,r+e):null}class wW{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,he.safari&&e.contentDOM.addEventListener("input",()=>null),he.gecko&&LW(e.contentDOM.ownerDocument)}handleEvent(e){!kW(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=xW(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&V6.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),he.android&&he.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return he.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=F6.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||yW.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,bs(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:he.safari&&!he.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Y5(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){hn(n.state,i)}}}function xW(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,o=i&&i.plugin.domEventHandlers,s=i&&i.plugin.domEventObservers;if(o)for(let a in o){let c=o[a];c&&n(a).handlers.push(Y5(r.value,c))}if(s)for(let a in s){let c=s[a];c&&n(a).observers.push(Y5(r.value,c))}}for(let r in tr)n(r).handlers.push(tr[r]);for(let r in Hn)n(r).observers.push(Hn[r]);return e}const F6=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],yW="dthko",V6=[16,17,18,20,91,92,224,225],Hc=6;function Pc(t){return Math.max(0,t)*.7+8}function CW(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class $W{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=EP(e.contentDOM),this.atoms=e.state.facet(xm).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ue.allowMultipleSelections)&&SW(e,n),this.dragging=RW(e,n)&&W6(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&CW(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=ym(this.view);e.clientX-c.left<=i+Hc?n=-Pc(i-e.clientX):e.clientX+c.right>=s-Hc&&(n=Pc(e.clientX-s)),e.clientY-c.top<=o+Hc?r=-Pc(o-e.clientY):e.clientY+c.bottom>=a-Hc&&(r=Pc(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=du(this.atoms,i.from,0);s!=i.from&&(o=Q.cursor(s,-1))}else{let s=du(this.atoms,i.from,-1),a=du(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=Q.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?Q.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function SW(t,e){let n=t.state.facet(C6);return n.length?n[0](e):he.mac?e.metaKey:e.ctrlKey}function AW(t,e){let n=t.state.facet($6);return n.length?n[0](e):he.mac?!e.altKey:!e.ctrlKey}function RW(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=qa(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function kW(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=nt.get(n))&&r.ignoreEvent(e))return!1;return!0}const tr=Object.create(null),Hn=Object.create(null),H6=he.ie&&he.ie_version<15||he.ios&&he.webkit_version<604;function TW(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),P6(t,n.value)},50)}function Bh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function P6(t,e){e=Bh(t.state,vm,e);let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(k1!=null&&n.selection.ranges.every(c=>c.empty)&&k1==o.toString()){let c=-1;r=n.changeByRange(h=>{let f=n.doc.lineAt(h.from);if(f.from==c)return{range:h};c=f.from;let d=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:f.from,insert:d},range:Q.cursor(h.from+d.length)}})}else s?r=n.changeByRange(c=>{let h=o.line(i++);return{changes:{from:c.from,to:c.to,insert:h.text},range:Q.cursor(c.from+h.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Hn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};tr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Hn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Hn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};tr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(S6))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=OW(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new $W(t,e,n,r)),r&&t.observer.ignore(()=>{r6(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function X5(t,e,n,r){if(r==1)return Q.cursor(e,n);if(r==2)return iW(t.state,e,n);{let i=xt.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,Q.range(s,a)}}let Z5=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function MW(t,e,n,r){let i=xt.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&Z5(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&Z5(n,r,a)?1:s&&s.bottom>=r?-1:1}function Q5(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:MW(t,n,e.clientX,e.clientY)}}const EW=he.ie&&he.ie_version<=11;let J5=null,eb=0,tb=0;function W6(t){if(!EW)return t.detail;let e=J5,n=tb;return J5=t,tb=Date.now(),eb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(eb+1)%3:1}function OW(t,e){let n=Q5(t,e),r=W6(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let c=Q5(t,o),h,f=X5(t,c.pos,c.bias,r);if(n.pos!=c.pos&&!s){let d=X5(t,n.pos,n.bias,r),m=Math.min(d.from,f.from),v=Math.max(d.to,f.to);f=m<f.from?Q.range(m,v):Q.range(v,m)}return s?i.replaceRange(i.main.extend(f.from,f.to)):a&&r==1&&i.ranges.length>1&&(h=DW(i,c.pos))?h:a?i.addRange(f):Q.create([f])}}}function DW(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return Q.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}tr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=Q.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Bh(t.state,bm,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};tr.dragend=t=>(t.inputState.draggedContent=null,!1);function nb(t,e,n,r){if(n=Bh(t.state,vm,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&AW(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},c=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}tr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&nb(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return nb(t,e,r,!0),!0}return!1};tr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=H6?null:e.clipboardData;return n?(P6(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(TW(t),!1)};function IW(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function _W(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Bh(t,bm,e.join(t.lineBreak)),ranges:n,linewise:r}}let k1=null;tr.copy=tr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=_W(t.state);if(!n&&!i)return!1;k1=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=H6?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(IW(t,n),!1)};const z6=Tr.define();function U6(t,e){let n=[];for(let r of t.facet(k6)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:z6.of(!0)}):null}function q6(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=U6(t.state,e);n?t.dispatch(n):t.update([])}},10)}Hn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),q6(t)};Hn.blur=t=>{t.observer.clearSelectionRange(),q6(t)};Hn.compositionstart=Hn.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Hn.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,he.chrome&&he.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Hn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};tr.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=e.getTargetRanges();if(o&&s.length){let a=s[0],c=t.posAtDOM(a.startContainer,a.startOffset),h=t.posAtDOM(a.endContainer,a.endOffset);return Cm(t,{from:c,to:h,insert:t.state.toText(o)},null),!0}}let i;if(he.chrome&&he.android&&(i=F6.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return he.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),he.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Hn.compositionend(t,e),20),!1};const rb=new Set;function LW(t){rb.has(t)||(rb.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const ib=["pre-wrap","normal","pre-line","break-spaces"];let Is=!1;function ob(){Is=!1}class BW{constructor(e){this.lineWrapping=e,this.doc=Ge.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ib.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=ib.indexOf(e)>-1,c=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,c){this.heightSamples={};for(let h=0;h<s.length;h++){let f=s[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return c}}class NW{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class mr{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?en.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Li?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new mr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var ot=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(ot||(ot={}));const gu=.001;class tn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>gu&&(Is=!0),this.height=e)}replace(e,n,r){return tn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:c,toA:h,fromB:f,toB:d}=i[a],m=o.lineAt(c,ot.ByPosNoHeight,r.setDoc(n),0,0),v=m.to>=h?m:o.lineAt(h,ot.ByPosNoHeight,r,0,0);for(d+=v.to-h,h=v.to;a>0&&m.from<=i[a-1].toA;)c=i[a-1].fromA,f=i[a-1].fromB,a--,c<m.from&&(m=o.lineAt(c,ot.ByPosNoHeight,r,0,0));f+=m.from-c,c=m.from;let x=$m.build(r.setDoc(s),e,f,d);o=Hu(o,o.replace(c,h,x))}return o.updateHeight(r,0)}static empty(){return new Sn(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new jW(tn.of(e.slice(0,n)),s,tn.of(e.slice(r)))}}function Hu(t,e){return t==e?t:(t.constructor!=e.constructor&&(Is=!0),e)}tn.prototype.size=1;class K6 extends tn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new mr(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Sn extends K6{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new mr(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Sn||i instanceof Ft&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ft?i=new Sn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):tn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ft extends tn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*o);s=c/o,this.length>o+1&&(a=(this.height-c)/(this.length-o-1))}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let h=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=n.doc.lineAt(h),d=a+f.length*c,m=Math.max(r,e-d/2);return new mr(f.from,f.length,m,d,0)}else{let h=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:f,length:d}=n.doc.line(o+h);return new mr(f,d,r+a*h,a,0)}}lineAt(e,n,r,i,o){if(n==ot.ByHeight)return this.blockAt(e,r,i,o);if(n==ot.ByPosNoHeight){let{from:v,to:x}=r.doc.lineAt(e);return new mr(v,x-v,0,0,0)}let{firstLine:s,perLine:a,perChar:c}=this.heightMetrics(r,o),h=r.doc.lineAt(e),f=a+h.length*c,d=h.number-s,m=i+a*d+c*(h.from-o-d);return new mr(h.from,h.length,Math.max(i,Math.min(m,i+this.height-f)),f,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:c,perChar:h}=this.heightMetrics(r,o);for(let f=e,d=i;f<=n;){let m=r.doc.lineAt(f);if(f==e){let x=m.number-a;d+=c*x+h*(e-o-x)}let v=c+h*m.length;s(new mr(m.from,m.length,d,v,0)),d+=v,f=m.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Ft?r[r.length-1]=new Ft(o.length+i):r.push(null,new Ft(i-1))}if(e>0){let o=r[0];o instanceof Ft?r[0]=new Ft(e+o.length):r.unshift(new Ft(e-1),null)}return tn.of(r)}decomposeLeft(e,n){n.push(new Ft(e-1),null)}decomposeRight(e,n){n.push(null,new Ft(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new Ft(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let f=e.doc.lineAt(a).length;s.length&&s.push(null);let d=i.heights[i.index++];c==-1?c=d:Math.abs(d-c)>=gu&&(c=-2);let m=new Sn(f,d);m.outdated=!1,s.push(m),a+=f+1}a<=o&&s.push(null,new Ft(o-a).updateHeight(e,a));let h=tn.of(s);return(c<0||Math.abs(h.height-this.height)>=gu||Math.abs(c-this.heightMetrics(e,n).perLine)>=gu)&&(Is=!0),Hu(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class jW extends tn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,c=n==ot.ByHeight?e<s:e<a,h=c?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(c?h.to<a:h.from>a))return h;let f=n==ot.ByPosNoHeight?ot.ByPosNoHeight:ot.ByPos;return c?h.join(this.right.lineAt(a,f,r,s,a)):this.left.lineAt(a,f,r,i,o).join(h)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,c=o+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,n,r,i,o,s),n>=c&&this.right.forEachLine(e,n,r,a,c,s);else{let h=this.lineAt(c,ot.ByPos,r,i,o);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,o,s),h.to>=e&&h.from<=n&&s(h),n>h.to&&this.right.forEachLine(h.to+1,n,r,a,c,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&sb(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),sb(o,a)}return tn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?tn.of(this.break?[e,null,n]:[e,n]):(this.left=Hu(this.left,e),this.right=Hu(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,c=null;return i&&i.from<=n+o.length&&i.more?c=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?c=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),c?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function sb(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Ft&&(r=t[e+1])instanceof Ft&&t.splice(e-1,3,new Ft(n.length+1+r.length))}const FW=5;class $m{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Sn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Sn(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new K6(s,i,r)):(s||o||i>=FW)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Sn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Ft(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Sn)return e;let n=new Sn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Sn)&&!this.isCovered?this.nodes.push(new Sn(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Sn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new $m(r,e);return Ke.spans(n,r,i,o,0),o.finish(r)}}function VW(t,e,n){let r=new HW;return Ke.compare(t,e,n,r,0),r.changes}class HW{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&fu(e,n,this.changes,5)}}function PW(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,d=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&d.overflow!="visible"){let m=f.getBoundingClientRect();o=Math.max(o,m.left),s=Math.min(s,m.right),a=Math.max(a,m.top),c=Math.min(h==t.parentNode?i.innerHeight:c,m.bottom)}h=d.position=="absolute"||d.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,c)-(n.top+e)}}function WW(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function zW(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Jd{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return xe.replace({widget:new UW(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class UW extends ai{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class ab{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=lb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=st.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(wm).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new BW(n),this.stateDeco=e.facet(Ka).filter(r=>typeof r!="function"),this.heightMap=tn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle.setDoc(e.doc),[new Vn(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new Wc(o,s))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?lb:new Sm(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ra(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Ka).filter(f=>typeof f!="function");let i=e.changedRanges,o=Vn.extendWithRanges(i,VW(r,this.stateDeco,e?e.changes:Rt.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);ob(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=s||Is)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=s);let c=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<c.from||n.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,n));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(M6)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?st.RTL:st.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),c=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,f=0;if(a.width&&a.height){let{scaleX:E,scaleY:O}=n6(n,a);(E>.005&&Math.abs(this.scaleX-E)>.005||O>.005&&Math.abs(this.scaleY-O)>.005)&&(this.scaleX=E,this.scaleY=O,h|=16,s=c=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,m=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=m)&&(this.paddingTop=d,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let v=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=v&&(this.scrollAnchorHeight=-1,this.scrollTop=v),this.scrolledToBottom=o6(e.scrollDOM);let x=(this.printing?zW:PW)(n,this.paddingTop),w=x.top-this.pixelViewport.top,C=x.bottom-this.pixelViewport.bottom;this.pixelViewport=x;let S=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(S!=this.inView&&(this.inView=S,S&&(c=!0)),!this.inView&&!this.scrollTarget&&!WW(e.dom))return 0;let R=a.width;if((this.contentDOMWidth!=R||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let E=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(E)&&(s=!0),s||i.lineWrapping&&Math.abs(R-this.contentDOMWidth)>i.charWidth){let{lineHeight:O,charWidth:L,textHeight:I}=e.docView.measureTextSize();s=O>0&&i.refresh(o,O,L,I,R/L,E),s&&(e.docView.minWidth=0,h|=16)}w>0&&C>0?f=Math.max(w,C):w<0&&C<0&&(f=Math.min(w,C)),ob();for(let O of this.viewports){let L=O.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(O);this.heightMap=(s?tn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle,[new Vn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new NW(O.from,L))}Is&&(h|=2)}let T=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,c=new Wc(i.lineAt(s-r*1e3,ot.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,ot.ByHeight,o,0,0).to);if(n){let{head:h}=n.range;if(h<c.from||h>c.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(h,ot.ByPos,o,0,0),m;n.y=="center"?m=(d.top+d.bottom)/2-f/2:n.y=="start"||n.y=="nearest"&&h<c.from?m=d.top:m=d.bottom-f,c=new Wc(i.lineAt(m-1e3/2,ot.ByHeight,o,0,0).from,i.lineAt(m+f+1e3/2,ot.ByHeight,o,0,0).to)}}return c}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Wc(this.heightMap.lineAt(r,ot.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,ot.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,ot.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,ot.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new Jd(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=st.LTR&&!r)return[];let a=[],c=(f,d,m,v)=>{if(d-f<o)return;let x=this.state.selection.main,w=[x.from];x.empty||w.push(x.to);for(let S of w)if(S>f&&S<d){c(f,S-10,m,v),c(S+10,d,m,v);return}let C=KW(e,S=>S.from>=m.from&&S.to<=m.to&&Math.abs(S.from-f)<o&&Math.abs(S.to-d)<o&&!w.some(R=>S.from<R&&S.to>R));if(!C){if(d<m.to&&n&&r&&n.visibleRanges.some(T=>T.from<=d&&T.to>=d)){let T=n.moveToLineBoundary(Q.cursor(d),!1,!0).head;T>f&&(d=T)}let S=this.gapSize(m,f,d,v),R=r||S<2e6?S:2e6;C=new Jd(f,d,S,R)}a.push(C)},h=f=>{if(f.length<s||f.type!=en.Text)return;let d=qW(f.from,f.to,this.stateDeco);if(d.total<s)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,v,x;if(r){let w=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,S;if(m!=null){let R=Uc(d,m),T=((this.visibleBottom-this.visibleTop)/2+w)/f.height;C=R-T,S=R+T}else C=(this.visibleTop-f.top-w)/f.height,S=(this.visibleBottom-f.top+w)/f.height;v=zc(d,C),x=zc(d,S)}else{let w=d.total*this.heightOracle.charWidth,C=i*this.heightOracle.charWidth,S=0;if(w>2e6)for(let L of e)L.from>=f.from&&L.from<f.to&&L.size!=L.displaySize&&L.from*this.heightOracle.charWidth+S<this.pixelViewport.left&&(S=L.size-L.displaySize);let R=this.pixelViewport.left+S,T=this.pixelViewport.right+S,E,O;if(m!=null){let L=Uc(d,m),I=((T-R)/2+C)/w;E=L-I,O=L+I}else E=(R-C)/w,O=(T+C)/w;v=zc(d,E),x=zc(d,O)}v>f.from&&c(f.from,v,f,d),x<f.to&&c(x,f.to,f,d)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return a}gapSize(e,n,r,i){let o=Uc(i,r)-Uc(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){Jd.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=xe.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ke.spans(n,this.viewport.from,this.viewport.to,{span(o,s){r.push({from:o,to:s})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o<r.length&&!(i&8);o++){let s=this.visibleRanges[o],a=r[o];(s.from!=a.from||s.to!=a.to)&&(i|=4,e&&e.mapPos(s.from,-1)==a.from&&e.mapPos(s.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ra(this.heightMap.lineAt(e,ot.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Ra(this.heightMap.lineAt(this.scaler.fromDOM(e),ot.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Ra(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}let Wc=class{constructor(e,n){this.from=e,this.to=n}};function qW(t,e,n){let r=[],i=t,o=0;return Ke.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function zc({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function Uc(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function KW(t,e){for(let n of t)if(e(n))return n}const lb={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class Sm{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:c})=>{let h=n.lineAt(a,ot.ByPos,e,0,0).top,f=n.lineAt(c,ot.ByPos,e,0,0).bottom;return i+=f-h,{from:a,to:c,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}eq(e){return e instanceof Sm?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Ra(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new mr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Ra(i,e)):t._content)}const qc=fe.define({combine:t=>t.join(" ")}),T1=fe.define({combine:t=>t.indexOf(!0)>-1}),M1=Ii.newName(),G6=Ii.newName(),Y6=Ii.newName(),X6={"&light":"."+G6,"&dark":"."+Y6};function E1(t,e,n){return new Ii(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const GW=E1("."+M1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},X6),YW={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},e0=he.ie&&he.ie_version<=11;class XW{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new OP,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(he.ie&&he.ie_version<=11||he.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&he.android&&e.constructor.EDIT_CONTEXT!==!1&&!(he.chrome&&he.chrome_version<126)&&(this.editContext=new QW(e),e.state.facet(qr)&&(e.contentDOM.editContext=this.editContext.editContext)),e0&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(qr)?r.root.activeElement!=this.dom:!hu(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(he.ie&&he.ie_version<=11||he.android&&he.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Oa(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=qa(e.root);if(!n)return!1;let r=he.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&ZW(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=hu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&IP(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,YW),e0&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),e0&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&bs(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&hu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new gW(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=j6(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=cb(n,e.previousSibling||e.target.previousSibling,-1),i=cb(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(qr)!=e.state.facet(qr)&&(e.view.contentDOM.editContext=e.state.facet(qr)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function cb(t,e,n){for(;e;){let r=nt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function ub(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return Oa(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function ZW(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return ub(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?ub(t,n):null}class QW{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:s}=i,a=this.toEditorPos(r.updateRangeStart),c=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let h={from:a,to:c,insert:Ge.of(r.text.split(`
`))};if(h.from==this.from&&o<this.from?h.from=o:h.to==this.to&&o>this.to&&(h.to=o),h.from==h.to&&!h.insert.length){let f=Q.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));f.main.eq(i)||e.dispatch({selection:f,userEvent:"select"});return}if((he.mac||he.android)&&h.from==s-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:c,insert:Ge.of([r.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);Cm(e,h,Q.single(this.toEditorPos(r.selectionStart,f),this.toEditorPos(r.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let s=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);s<a;s++){let c=e.coordsForChar(s);o=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||o||new DOMRect,i.push(o)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let o of r.getTextFormats()){let s=o.underlineStyle,a=o.underlineThickness;if(s!="None"&&a!="None"){let c=this.toEditorPos(o.rangeStart),h=this.toEditorPos(o.rangeEnd);if(c<h){let f=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;i.push(xe.mark({attributes:{style:f}}).range(c,h))}}}e.dispatch({effects:O6.of(xe.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=qa(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,s,a,c,h)=>{if(r)return;let f=h.length-(s-o);if(i&&s>=i.to)if(i.from==o&&i.to==s&&i.insert.eq(h)){i=this.pendingContextChange=null,n+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(o+=n,s+=n,s<=this.from)this.from+=f,this.to+=f;else if(o<this.to){if(o<this.from||s>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(s),h.toString()),this.to+=f}n+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class le{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||DP(e.parent)||document,this.viewState=new ab(e.state||Ue.create(e)),e.scrollTo&&e.scrollTo.is(Vc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(us).map(i=>new Xd(i));for(let i of this.plugins)i.update(this);this.observer=new XW(this),this.inputState=new wW(this),this.inputState.ensureHandlers(this.plugins),this.docView=new P5(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof kt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let m of e){if(m.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=m.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,c=null;e.some(m=>m.annotation(z6))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=U6(o,s),c||(a=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(f=null)):this.observer.clear(),o.facet(Ue.phrases)!=this.state.facet(Ue.phrases))return this.setState(o);i=Vu.create(this,o,e),i.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(d&&(d=d.map(m.changes)),m.scrollIntoView){let{main:v}=m.state.selection;d=new ws(v.empty?v:Q.cursor(v.head,v.head>v.anchor?-1:1))}for(let v of m.effects)v.is(Vc)&&(d=v.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Pu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Sa)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(qc)!=i.state.facet(qc)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let m of this.state.facet(S1))try{m(i)}catch(v){hn(this.state,v,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!j6(this,f)&&h.force&&bs(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new ab(e),this.plugins=e.facet(us).map(r=>new Xd(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new P5(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(us),r=e.state.facet(us);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new Xd(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){hn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(o6(r))o=-1,s=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);o=v.from,s=v.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(v=>{try{return v.read(this)}catch(x){return hn(this.state,x),hb}}),d=Vu.create(this,this.state,[]),m=!1;d.flags|=c,n?n.flags|=c:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),m=this.docView.update(d),m&&this.docViewUpdate());for(let v=0;v<h.length;v++)if(f[v]!=hb)try{let x=h[v];x.write&&x.write(f[v],this)}catch(x){hn(this.state,x)}if(m&&this.docView.updateSelection(!0),!d.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let x=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(x>1||x<-1){i=i+x,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(S1))a(n)}get themeClasses(){return M1+" "+(this.state.facet(T1)?Y6:G6)+" "+this.state.facet(qc)}updateAttrs(){let e=fb(this,D6,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(qr)?"true":"false",class:"cm-content",style:`${he.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),fb(this,wm,n);let r=this.observer.ignore(()=>{let i=w1(this.contentDOM,this.contentAttrs,n),o=w1(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(le.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Sa);let e=this.state.facet(le.cspNonce);Ii.mount(this.root,this.styleModules.concat(GW).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return Qd(this,e,K5(this,e,n,r))}moveByGroup(e,n){return Qd(this,e,K5(this,e,n,r=>uW(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return Q.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return cW(this,e,n,r)}moveVertically(e,n,r){return Qd(this,e,hW(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),N6(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[ki.find(o,e-i.from,-1,n)];return ml(r,s.dir==st.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(T6)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>JW)return x6(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||w6(o.isolates,r=H5(this,e))))return o.order;r||(r=H5(this,e));let i=KP(e.text,n,r);return this.bidiCache.push(new Pu(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||he.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{r6(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Vc.of(new ws(typeof e=="number"?Q.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Vc.of(new ws(Q.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return vt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return vt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ii.newName(),i=[qc.of(r),Sa.of(E1(`.${r}`,e))];return n&&n.dark&&i.push(T1.of(!0)),i}static baseTheme(e){return Oo.lowest(Sa.of(E1("."+M1,e,X6)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&nt.get(r)||nt.get(e);return((n=i?.rootView)===null||n===void 0?void 0:n.view)||null}}le.styleModule=Sa;le.inputHandler=R6;le.clipboardInputFilter=vm;le.clipboardOutputFilter=bm;le.scrollHandler=E6;le.focusChangeEffect=k6;le.perLineTextDirection=T6;le.exceptionSink=A6;le.updateListener=S1;le.editable=qr;le.mouseSelectionStyle=S6;le.dragMovesSelection=$6;le.clickAddsSelectionRange=C6;le.decorations=Ka;le.outerDecorations=I6;le.atomicRanges=xm;le.bidiIsolatedRanges=_6;le.scrollMargins=L6;le.darkTheme=T1;le.cspNonce=fe.define({combine:t=>t.length?t[0]:""});le.contentAttributes=wm;le.editorAttributes=D6;le.lineWrapping=le.contentAttributes.of({class:"cm-lineWrapping"});le.announce=Ee.define();const JW=4096,hb={};class Pu{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:st.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new Pu(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function fb(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&b1(s,n)}return n}const ez=he.mac?"mac":he.windows?"win":he.linux?"linux":"key";function tz(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,a;for(let c=0;c<n.length-1;++c){const h=n[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))o=!0;else if(/^s(hift)?$/i.test(h))s=!0;else if(/^mod$/i.test(h))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function Kc(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const nz=Oo.default(le.domEventHandlers({keydown(t,e){return Q6(Z6(e.state),t,e,"editor")}})),Nh=fe.define({enables:nz}),db=new WeakMap;function Z6(t){let e=t.facet(Nh),n=db.get(e);return n||db.set(e,n=oz(e.reduce((r,i)=>r.concat(i),[]))),n}function rz(t,e,n){return Q6(Z6(t.state),e,t,n)}let $i=null;const iz=4e3;function oz(t,e=ez){let n=Object.create(null),r=Object.create(null),i=(s,a)=>{let c=r[s];if(c==null)r[s]=a;else if(c!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,c,h,f)=>{var d,m;let v=n[s]||(n[s]=Object.create(null)),x=a.split(/ (?!$)/).map(S=>tz(S,e));for(let S=1;S<x.length;S++){let R=x.slice(0,S).join(" ");i(R,!0),v[R]||(v[R]={preventDefault:!0,stopPropagation:!1,run:[T=>{let E=$i={view:T,prefix:R,scope:s};return setTimeout(()=>{$i==E&&($i=null)},iz),!0}]})}let w=x.join(" ");i(w,!1);let C=v[w]||(v[w]={preventDefault:!1,stopPropagation:!1,run:((m=(d=v._any)===null||d===void 0?void 0:d.run)===null||m===void 0?void 0:m.slice())||[]});c&&C.run.push(c),h&&(C.preventDefault=!0),f&&(C.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let h of a){let f=n[h]||(n[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=s;for(let m in f)f[m].run.push(v=>d(v,O1))}let c=s[e]||s.key;if(c)for(let h of a)o(h,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(h,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}let O1=null;function Q6(t,e,n,r){O1=e;let i=kP(e),o=ln(i,0),s=gr(o)==i.length&&i!=" ",a="",c=!1,h=!1,f=!1;$i&&$i.view==n&&$i.scope==r&&(a=$i.prefix+" ",V6.indexOf(e.keyCode)<0&&(h=!0,$i=null));let d=new Set,m=C=>{if(C){for(let S of C.run)if(!d.has(S)&&(d.add(S),S(n)))return C.stopPropagation&&(f=!0),!0;C.preventDefault&&(C.stopPropagation&&(f=!0),h=!0)}return!1},v=t[r],x,w;return v&&(m(v[a+Kc(i,e,!s)])?c=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(he.windows&&e.ctrlKey&&e.altKey)&&(x=_i[e.keyCode])&&x!=i?(m(v[a+Kc(x,e,!0)])||e.shiftKey&&(w=Ua[e.keyCode])!=i&&w!=x&&m(v[a+Kc(w,e,!1)]))&&(c=!0):s&&e.shiftKey&&m(v[a+Kc(i,e,!0)])&&(c=!0),!c&&m(v._any)&&(c=!0)),h&&(c=!0),c&&f&&e.stopPropagation(),O1=null,c}class bl{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=J6(e);return[new bl(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return sz(e,n,r)}}function J6(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==st.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function gb(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),s=(i.top+i.bottom)/2,a=t.posAtCoords({x:o.left+1,y:s}),c=t.posAtCoords({x:o.right-1,y:s});return a==null||c==null?r:{from:Math.max(r.from,Math.min(a,c)),to:Math.min(r.to,Math.max(a,c))}}function sz(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==st.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),c=J6(t),h=s.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),d=a.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),m=a.right-(f?parseInt(f.paddingRight):0),v=R1(t,r,1),x=R1(t,i,-1),w=v.type==en.Text?v:null,C=x.type==en.Text?x:null;if(w&&(t.lineWrapping||v.widgetLineBreaks)&&(w=gb(t,r,1,w)),C&&(t.lineWrapping||x.widgetLineBreaks)&&(C=gb(t,i,-1,C)),w&&C&&w.from==C.from&&w.to==C.to)return R(T(n.from,n.to,w));{let O=w?T(n.from,null,w):E(v,!1),L=C?T(null,n.to,C):E(x,!0),I=[];return(w||v).to<(C||x).from-(w&&C?1:0)||v.widgetLineBreaks>1&&O.bottom+t.defaultLineHeight/2<L.top?I.push(S(d,O.bottom,m,L.top)):O.bottom<L.top&&t.elementAtHeight((O.bottom+L.top)/2).type==en.Text&&(O.bottom=L.top=(O.bottom+L.top)/2),R(O).concat(I).concat(R(L))}function S(O,L,I,V){return new bl(e,O-c.left,L-c.top,I-O,V-L)}function R({top:O,bottom:L,horizontal:I}){let V=[];for(let F=0;F<I.length;F+=2)V.push(S(I[F],O,I[F+1],L));return V}function T(O,L,I){let V=1e9,F=-1e9,H=[];function K(G,re,se,te,ne){let Y=t.coordsAtPos(G,G==I.to?-2:2),ce=t.coordsAtPos(se,se==I.from?2:-2);!Y||!ce||(V=Math.min(Y.top,ce.top,V),F=Math.max(Y.bottom,ce.bottom,F),ne==st.LTR?H.push(o&&re?d:Y.left,o&&te?m:ce.right):H.push(!o&&te?d:ce.left,!o&&re?m:Y.right))}let W=O??I.from,J=L??I.to;for(let G of t.visibleRanges)if(G.to>W&&G.from<J)for(let re=Math.max(G.from,W),se=Math.min(G.to,J);;){let te=t.state.doc.lineAt(re);for(let ne of t.bidiSpans(te)){let Y=ne.from+te.from,ce=ne.to+te.from;if(Y>=se)break;ce>re&&K(Math.max(Y,re),O==null&&Y<=W,Math.min(ce,se),L==null&&ce>=J,ne.dir)}if(re=te.to+1,re>=se)break}return H.length==0&&K(W,O==null,J,L==null,t.textDirection),{top:V,bottom:F,horizontal:H}}function E(O,L){let I=a.top+(L?O.top:O.bottom);return{top:I,bottom:I,horizontal:[]}}}function az(t,e){return t.constructor==e.constructor&&t.eq(e)}class lz{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(mu)!=e.state.facet(mu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(mu);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!az(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const mu=fe.define();function e4(t){return[vt.define(e=>new lz(e,t)),mu.of(t)]}const Ga=fe.define({combine(t){return Mr(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function cz(t={}){return[Ga.of(t),uz,hz,fz,M6.of(!0)]}function t4(t){return t.startState.facet(Ga)!=t.state.facet(Ga)}const uz=e4({above:!0,markers(t){let{state:e}=t,n=e.facet(Ga),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:Q.cursor(i.head,i.head>i.anchor?-1:1);for(let c of bl.forRange(t,s,a))r.push(c)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=t4(t);return n&&mb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){mb(e.state,t)},class:"cm-cursorLayer"});function mb(t,e){e.style.animationDuration=t.facet(Ga).cursorBlinkRate+"ms"}const hz=e4({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:bl.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||t4(t)},class:"cm-selectionLayer"}),fz=Oo.highest(le.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),n4=Ee.define({map(t,e){return t==null?null:e.mapPos(t)}}),ka=Lt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(n4)?r.value:n,t)}}),dz=vt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(ka);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(ka)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(ka),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(ka)!=t&&this.view.dispatch({effects:n4.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function gz(){return[ka,dz]}function pb(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function mz(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class pz{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,c,h,f)=>i(f,h,h+a[0].length,a,c);else if(typeof r=="function")this.addMatch=(a,c,h,f)=>{let d=r(a,c,h);d&&f(h,h+a[0].length,d)};else if(r)this.addMatch=(a,c,h,f)=>f(h,h+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new Jr,r=n.add.bind(n);for(let{from:i,to:o}of mz(e,this.maxLength))pb(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(c,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),a=Math.min(o.to,i);if(a>=s){let c=e.state.doc.lineAt(s),h=c.to<a?e.state.doc.lineAt(a):c,f=Math.max(o.from,c.from),d=Math.min(o.to,h.to);if(this.boundary){for(;s>c.from;s--)if(this.boundary.test(c.text[s-1-c.from])){f=s;break}for(;a<h.to;a++)if(this.boundary.test(h.text[a-h.from])){d=a;break}}let m=[],v,x=(w,C,S)=>m.push(S.range(w,C));if(c==h)for(this.regexp.lastIndex=f-c.from;(v=this.regexp.exec(c.text))&&v.index<d-c.from;)this.addMatch(v,e,v.index+c.from,x);else pb(e.state.doc,this.regexp,f,d,(w,C)=>this.addMatch(C,e,w,x));n=n.update({filterFrom:f,filterTo:d,filter:(w,C)=>w<f||C>d,add:m})}}return n}}const D1=/x/.unicode!=null?"gu":"g",vz=new RegExp(`[\0-\b
--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,D1),bz={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let t0=null;function wz(){var t;if(t0==null&&typeof document<"u"&&document.body){let e=document.body.style;t0=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return t0||!1}const pu=fe.define({combine(t){let e=Mr(t,{render:null,specialChars:vz,addSpecialChars:null});return(e.replaceTabs=!wz())&&(e.specialChars=new RegExp("	|"+e.specialChars.source,D1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,D1)),e}});function xz(t={}){return[pu.of(t),yz()]}let vb=null;function yz(){return vb||(vb=vt.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(pu)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new pz({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=ln(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,c=Gs(s.text,a,r-s.from);return xe.replace({widget:new Az((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=xe.replace({widget:new Sz(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(pu);t.startState.facet(pu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Cz="•";function $z(t){return t>=32?Cz:t==10?"␤":String.fromCharCode(9216+t)}class Sz extends ai{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=$z(this.code),r=e.state.phrase("Control character")+" "+(bz[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Az extends ai{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="	",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Rz(){return Tz}const kz=xe.line({class:"cm-activeLine"}),Tz=vt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(kz.range(i.from)),e=i.from)}return xe.set(n)}},{decorations:t=>t.decorations});class Mz extends ai{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Es(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=ml(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function Ez(t){let e=vt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?xe.set([xe.widget({widget:new Mz(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,le.contentAttributes.of({"aria-placeholder":t})]:e}const I1=2e3;function Oz(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>I1||n.off>I1||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let c=r;c<=i;c++){let h=t.doc.line(c);h.length<=a&&o.push(Q.range(h.from+s,h.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let c=r;c<=i;c++){let h=t.doc.line(c),f=h1(h.text,s,t.tabSize,!0);if(f<0)o.push(Q.cursor(h.to));else{let d=h1(h.text,a,t.tabSize);o.push(Q.range(h.from+f,h.from+d))}}}return o}function Dz(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function bb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>I1?-1:i==r.length?Dz(t,e.clientX):Gs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function Iz(t,e){let n=bb(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=bb(t,i);if(!a)return r;let c=Oz(t.state,n,a);return c.length?s?Q.create(c.concat(r.ranges)):Q.create(c):r}}:null}function _z(t){let e=n=>n.altKey&&n.button==0;return le.mouseSelectionStyle.of((n,r)=>e(r)?Iz(n,r):null)}const Lz={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Bz={style:"cursor: crosshair"};function Nz(t={}){let[e,n]=Lz[t.key||"Alt"],r=vt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,le.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?Bz:null})]}const wa="-10000px";class r4{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=r(s,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(c=>c);if(i===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let s=[],a=n?[]:null;for(let c=0;c<o.length;c++){let h=o[c],f=-1;if(h){for(let d=0;d<this.tooltips.length;d++){let m=this.tooltips[d];m&&m.create==h.create&&(f=d)}if(f<0)s[c]=this.createTooltipView(h,c?s[c-1]:null),a&&(a[c]=!!h.above);else{let d=s[c]=this.tooltipViews[f];a&&(a[c]=n[f]),d.update&&d.update(e)}}}for(let c of this.tooltipViews)s.indexOf(c)<0&&(this.removeTooltipView(c),(r=c.destroy)===null||r===void 0||r.call(c));return n&&(a.forEach((c,h)=>n[h]=c),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function jz(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const n0=fe.define({combine:t=>{var e,n,r;return{position:he.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||jz}}}),wb=new WeakMap,Am=vt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(n0);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new r4(t,Rm,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(n0);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=wa,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(he.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==wa&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=ym(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(n0).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:f}=h,d=t.pos[a],m=t.size[a];if(!d||c.clip!==!1&&(d.bottom<=Math.max(n.top,r.top)||d.top>=Math.min(n.bottom,r.bottom)||d.right<Math.max(n.left,r.left)-.1||d.left>Math.min(n.right,r.right)+.1)){f.style.top=wa;continue}let v=c.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,x=v?7:0,w=m.right-m.left,C=(e=wb.get(h))!==null&&e!==void 0?e:m.bottom-m.top,S=h.offset||Vz,R=this.view.textDirection==st.LTR,T=m.width>r.right-r.left?R?r.left:r.right-m.width:R?Math.max(r.left,Math.min(d.left-(v?14:0)+S.x,r.right-w)):Math.min(Math.max(r.left,d.left-w+(v?14:0)-S.x),r.right-w),E=this.above[a];!c.strictSide&&(E?d.top-C-x-S.y<r.top:d.bottom+C+x+S.y>r.bottom)&&E==r.bottom-d.bottom>d.top-r.top&&(E=this.above[a]=!E);let O=(E?d.top-r.top:r.bottom-d.bottom)-x;if(O<C&&h.resize!==!1){if(O<this.view.defaultLineHeight){f.style.top=wa;continue}wb.set(h,C),f.style.height=(C=O)/o+"px"}else f.style.height&&(f.style.height="");let L=E?d.top-C-x-S.y:d.bottom+x+S.y,I=T+w;if(h.overlap!==!0)for(let V of s)V.left<I&&V.right>T&&V.top<L+C&&V.bottom>L&&(L=E?V.top-C-2-x:V.bottom+x+2);if(this.position=="absolute"?(f.style.top=(L-t.parent.top)/o+"px",xb(f,(T-t.parent.left)/i)):(f.style.top=L/o+"px",xb(f,T/i)),v){let V=d.left+(R?S.x:-S.x)-(T+14-7);v.style.left=V/i+"px"}h.overlap!==!0&&s.push({left:T,top:L,right:I,bottom:L+C}),f.classList.toggle("cm-tooltip-above",E),f.classList.toggle("cm-tooltip-below",!E),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=wa}},{eventObservers:{scroll(){this.maybeMeasure()}}});function xb(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const Fz=le.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Vz={x:0,y:0},Rm=fe.define({enables:[Am,Fz]}),Wu=fe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class jh{static create(e){return new jh(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new r4(e,Wu,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Hz=Rm.compute([Wu],t=>{let e=t.facet(Wu);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:jh.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Pz{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Ri)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(i)).find(f=>f.from<=i&&f.to>=i),h=c&&c.dir==st.RTL?-1:1;o=n.x<a.left?-h:h}let s=this.source(e,i,o);if(s?.then){let a=this.pending={pos:i};s.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>hn(e.state,c,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(Am),n=e?e.manager.tooltips.findIndex(r=>r.create==jh.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!Wz(o.dom,e)||this.pending){let{pos:s}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!zz(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Gc=4;function Wz(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),s;if(s=t.querySelector(".cm-tooltip-arrow")){let a=s.getBoundingClientRect();i=Math.min(a.top,i),o=Math.max(a.bottom,o)}return e.clientX>=n-Gc&&e.clientX<=r+Gc&&e.clientY>=i-Gc&&e.clientY<=o+Gc}function zz(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let c=t.posAtCoords({x:r,y:i},!1);return c>=e&&c<=n}function Uz(t,e={}){let n=Ee.define(),r=Lt.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of i){let c=o.changes.mapPos(a.pos,-1,Jt.TrackDel);if(c!=null){let h=Object.assign(Object.create(null),a);h.pos=c,h.end!=null&&(h.end=o.changes.mapPos(h.end)),s.push(h)}}i=s}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(qz)&&(i=[]);return i},provide:i=>Wu.from(i)});return{active:r,extension:[r,vt.define(i=>new Pz(i,t,r,n,e.hoverTime||300)),Hz]}}function i4(t,e){let n=t.plugin(Am);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const qz=Ee.define(),yb=fe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Ya(t,e){let n=t.plugin(o4),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const o4=vt.fromClass(class{constructor(t){this.input=t.state.facet(Xa),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(yb);this.top=new Yc(t,!0,e.topContainer),this.bottom=new Yc(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(yb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Yc(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Yc(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Xa);if(n!=this.input){let r=n.filter(c=>c),i=[],o=[],s=[],a=[];for(let c of r){let h=this.specs.indexOf(c),f;h<0?(f=c(t.view),a.push(f)):(f=this.panels[h],f.update&&f.update(t)),i.push(f),(f.top?o:s).push(f)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Yc{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Cb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Cb(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Cb(t){let e=t.nextSibling;return t.remove(),e}const Xa=fe.define({enables:o4});class ti extends wo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ti.prototype.elementClass="";ti.prototype.toDOM=void 0;ti.prototype.mapMode=Jt.TrackBefore;ti.prototype.startSide=ti.prototype.endSide=-1;ti.prototype.point=!0;const vu=fe.define(),Kz=fe.define(),Gz={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ke.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Ia=fe.define();function Yz(t){return[s4(),Ia.of({...Gz,...t})]}const $b=fe.define({combine:t=>t.some(e=>e)});function s4(t){return[Xz]}const Xz=vt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Ia).map(e=>new Ab(t,e)),this.fixed=!t.state.facet($b);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet($b)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ke.iter(this.view.state.facet(vu),this.view.viewport.from),r=[],i=this.gutters.map(o=>new Zz(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==en.Text&&s){_1(n,r,a.from);for(let c of i)c.line(this.view,a,r);s=!1}else if(a.widget)for(let c of i)c.widget(this.view,a)}else if(o.type==en.Text){_1(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Ia),n=t.state.facet(Ia),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ke.eq(t.startState.facet(vu),t.state.facet(vu),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new Ab(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==st.LTR?{left:r,right:i}:{right:r,left:i}})});function Sb(t){return Array.isArray(t)?t:[t]}function _1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Zz{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ke.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new a4(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];_1(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(Kz)){let s=o(e,n.widget,n);s&&(i||(i=[])).push(s)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Ab{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let c=o.getBoundingClientRect();s=(c.top+c.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=Sb(n.markers(e)),n.initialSpacer&&(this.spacer=new a4(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Sb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ke.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class a4{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),Qz(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,c=o<n.length?n[o++]:null,h=!1;if(c){let f=c.elementClass;f&&(r+=" "+f);for(let d=s;d<this.markers.length;d++)if(this.markers[d].compare(c)){a=d,h=!0;break}}else a=this.markers.length;for(;s<a;){let f=this.markers[s++];if(f.toDOM){f.destroy(i);let d=i.nextSibling;i.remove(),i=d}}if(!c)break;c.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(c.toDOM(e),i)),h&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function Qz(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const Jz=fe.define(),eU=fe.define(),hs=fe.define({combine(t){return Mr(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,c,h)=>o(a,c,h)||s(a,c,h):s}return r}})}});class r0 extends ti{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function i0(t,e){return t.state.facet(hs).formatNumber(e,t.state)}const tU=Ia.compute([hs],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Jz)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new r0(i0(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(eU)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(hs)!=e.state.facet(hs),initialSpacer(e){return new r0(i0(e,Rb(e.state.doc.lines)))},updateSpacer(e,n){let r=i0(n.view,Rb(n.view.state.doc.lines));return r==e.number?e:new r0(r)},domEventHandlers:t.facet(hs).domEventHandlers,side:"before"}));function nU(t={}){return[hs.of(t),s4(),tU]}function Rb(t){let e=9;for(;e<t;)e=e*10+9;return e}const rU=new class extends ti{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},iU=vu.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(rU.range(i)))}return Ke.of(e)});function oU(){return iU}var o0;const fs=new je;function sU(t){return fe.define({combine:t?e=>e.concat(t):void 0})}const aU=new je;class Xn{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ue.prototype.hasOwnProperty("tree")||Object.defineProperty(Ue.prototype,"tree",{get(){return Kt(this)}}),this.parser=n,this.extension=[Bi.of(this),Ue.languageData.of((o,s,a)=>{let c=kb(o,s,a),h=c.type.prop(fs);if(!h)return[];let f=o.facet(h),d=c.type.prop(aU);if(d){let m=c.resolve(s-c.from,a);for(let v of d)if(v.test(m,o)){let x=o.facet(v.facet);return v.type=="replace"?x:x.concat(f)}}return f})].concat(r)}isActiveAt(e,n,r=-1){return kb(e,n,r).type.prop(fs)==this.data}findRegions(e){let n=e.facet(Bi);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(fs)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(je.mounted);if(a){if(a.tree.prop(fs)==this.data){if(a.overlay)for(let c of a.overlay)r.push({from:c.from+s,to:c.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let c=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>c)return}}for(let c=0;c<o.children.length;c++){let h=o.children[c];h instanceof Ct&&i(h,o.positions[c]+s)}};return i(Kt(e),0),r}get allowsNesting(){return!0}}Xn.setState=Ee.define();function kb(t,e,n){let r=t.facet(Bi),i=Kt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Ot.ExcludeBuffers))o.type.isTop&&(i=o);return i}class zu extends Xn{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=sU(e.languageData);return new zu(n,e.parser.configure({props:[fs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new zu(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Kt(t){let e=t.field(Xn.state,!1);return e?e.tree:Ct.empty}class lU{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let xa=null;class Uu{constructor(e,n,r=[],i,o,s,a,c){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Uu(e,n,[],Ct.empty,0,r,[],null)}startParse(){return this.parser.startParse(new lU(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ct.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(fo.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(fo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=xa;xa=this;try{return e()}finally{xa=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Tb(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,f,d,m)=>c.push({fromA:h,toA:f,fromB:d,toB:m})),r=fo.applyChanges(r,c),i=Ct.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),d=e.mapPos(h.to,-1);f<d&&a.push({from:f,to:d})}}}return new Uu(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=Tb(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Iy{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let c=xa;if(c){for(let h of i)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=s,new Ct(dn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return xa}}function Tb(t,e,n){return fo.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class _s{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new _s(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Uu.create(e.facet(Bi).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new _s(r)}}Xn.state=Lt.define({create:_s.init,update(t,e){for(let n of e.effects)if(n.is(Xn.setState))return n.value;return e.startState.facet(Bi)!=e.state.facet(Bi)?_s.init(e.state):t.apply(e)}});let l4=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(l4=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const s0=typeof navigator<"u"&&(!((o0=navigator.scheduling)===null||o0===void 0)&&o0.isInputPending)?()=>navigator.scheduling.isInputPending():null,cU=vt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Xn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Xn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=l4(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Xn.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!s0?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,c=o.context.work(()=>s0&&s0()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Xn.setState.of(new _s(o.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>hn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Bi=fe.define({combine(t){return t.length?t[0]:null},enables:t=>[Xn.state,cU,le.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class uU{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const hU=fe.define(),Fh=fe.define({combine:t=>{if(!t.length)return"  ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function qu(t){let e=t.facet(Fh);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Za(t,e){let n="",r=t.tabSize,i=t.facet(Fh)[0];if(i=="	"){for(;e>=r;)n+="	",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function km(t,e){t instanceof Ue&&(t=new Vh(t));for(let r of t.state.facet(hU)){let i=r(t,e);if(i!==void 0)return i}let n=Kt(t.state);return n.length>=e?fU(t,n,e):null}class Vh{constructor(e,n={}){this.state=e,this.options=n,this.unit=qu(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Gs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const c4=new je;function fU(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s&&!(s.from<r.node.from||s.to>r.node.to||s.from==r.node.from&&s.type==r.node.type);s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return u4(r,t,n)}function u4(t,e,n){for(let r=t;r;r=r.next){let i=gU(r.node);if(i)return i(Tm.create(e,n,r))}return 0}function dU(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function gU(t){let e=t.type.prop(c4);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(je.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>bU(s,!0,1,void 0,o&&!dU(s)?i.from:void 0)}return t.parent==null?mU:null}function mU(){return 0}class Tm extends Vh{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new Tm(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(pU(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return u4(this.context.next,this.base,this.pos)}}function pU(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function vU(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let c=e.childAfter(a);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let h=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+h}}a=c.to}}function bU(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==t.pos+s,c=vU(t);return c?a?t.column(c.from):t.column(c.to):t.baseIndent+(a?0:t.unit*n)}function Mb({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const wU=200;function xU(){return Ue.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+wU)return t;let o=n.sliceString(i.from,r);if(!e.some(h=>h.test(o)))return t;let{state:s}=t,a=-1,c=[];for(let{head:h}of s.selection.ranges){let f=s.doc.lineAt(h);if(f.from==a)continue;a=f.from;let d=km(s,f.from);if(d==null)continue;let m=/^\s*/.exec(f.text)[0],v=Za(s,d);m!=v&&c.push({from:f.from,to:f.from+m.length,insert:v})}return c.length?[t,{changes:c,sequential:!0}]:t})}const yU=fe.define(),h4=new je;function CU(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function $U(t,e,n){let r=Kt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let c=a.type.prop(h4);if(c&&(a.to<r.length-50||r.length==t.doc.length||!SU(a))){let h=c(a,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(o=h)}}return o}function SU(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Ku(t,e,n){for(let r of t.facet(yU)){let i=r(t,e,n);if(i)return i}return $U(t,e,n)}function f4(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Hh=Ee.define({map:f4}),wl=Ee.define({map:f4});function d4(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const $o=Lt.define({create(){return xe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=Eb(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Hh)&&!AU(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(p4),i=r?xe.replace({widget:new DU(r(e.state,n.value))}):Ob;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(wl)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=Eb(t,e.selection.main.head)),t},provide:t=>le.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(Ob.range(r,i))}return xe.set(e,!0)}});function Eb(t,e,n=e){let r=!1;return t.between(e,n,(i,o)=>{i<n&&o>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,o)=>i>=n||o<=e}):t}function Gu(t,e,n){var r;let i=null;return(r=t.field($o,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function AU(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function g4(t,e){return t.field($o,!1)?e:e.concat(Ee.appendConfig.of(v4()))}const RU=t=>{for(let e of d4(t)){let n=Ku(t.state,e.from,e.to);if(n)return t.dispatch({effects:g4(t.state,[Hh.of(n),m4(t,n)])}),!0}return!1},kU=t=>{if(!t.state.field($o,!1))return!1;let e=[];for(let n of d4(t)){let r=Gu(t.state,n.from,n.to);r&&e.push(wl.of(r),m4(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function m4(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return le.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const TU=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Ku(e,i.from,i.to);o&&n.push(Hh.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:g4(t.state,n)}),!!n.length},MU=t=>{let e=t.state.field($o,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(wl.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},EU=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:RU},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:kU},{key:"Ctrl-Alt-[",run:TU},{key:"Ctrl-Alt-]",run:MU}],OU={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},p4=fe.define({combine(t){return Mr(t,OU)}});function v4(t){return[$o,LU]}function b4(t,e){let{state:n}=t,r=n.facet(p4),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),c=Gu(t.state,a.from,a.to);c&&t.dispatch({effects:wl.of(c)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const Ob=xe.replace({widget:new class extends ai{toDOM(t){return b4(t,null)}}});class DU extends ai{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return b4(e,this.value)}}const IU={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class a0 extends ti{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function _U(t={}){let e={...IU,...t},n=new a0(e,!0),r=new a0(e,!1),i=vt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Bi)!=s.state.facet(Bi)||s.startState.field($o,!1)!=s.state.field($o,!1)||Kt(s.startState)!=Kt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new Jr;for(let c of s.viewportLineBlocks){let h=Gu(s.state,c.from,c.to)?r:Ku(s.state,c.from,c.to)?n:null;h&&a.add(c.from,c.from,h)}return a.finish()}}),{domEventHandlers:o}=e;return[i,Yz({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||Ke.empty},initialSpacer(){return new a0(e,!1)},domEventHandlers:{...o,click:(s,a,c)=>{if(o.click&&o.click(s,a,c))return!0;let h=Gu(s.state,a.from,a.to);if(h)return s.dispatch({effects:wl.of(h)}),!0;let f=Ku(s.state,a.from,a.to);return f?(s.dispatch({effects:Hh.of(f)}),!0):!1}}}),v4()]}const LU=le.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class xl{constructor(e,n){this.specs=e;let r;function i(a){let c=Ii.newName();return(r||(r=Object.create(null)))["."+c]=a,c}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Xn?a=>a.prop(fs)==s.data:s?a=>a==s:void 0,this.style=By(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new Ii(r):null,this.themeType=n.themeType}static define(e,n){return new xl(e,n||{})}}const L1=fe.define(),w4=fe.define({combine(t){return t.length?[t[0]]:null}});function l0(t){let e=t.facet(L1);return e.length?e:t.facet(w4)}function x4(t,e){let n=[NU],r;return t instanceof xl&&(t.module&&n.push(le.styleModule.of(t.module)),r=t.themeType),e?.fallback?n.push(w4.of(t)):r?n.push(L1.computeN([le.darkTheme],i=>i.facet(le.darkTheme)==(r=="dark")?[t]:[])):n.push(L1.of(t)),n}class BU{constructor(e){this.markCache=Object.create(null),this.tree=Kt(e.state),this.decorations=this.buildDeco(e,l0(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Kt(e.state),r=l0(e.state),i=r!=l0(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return xe.none;let r=new Jr;for(let{from:i,to:o}of e.visibleRanges)eP(this.tree,n,(s,a,c)=>{r.add(s,a,this.markCache[c]||(this.markCache[c]=xe.mark({class:c})))},i,o);return r.finish()}}const NU=Oo.high(vt.fromClass(BU,{decorations:t=>t.decorations})),jU=xl.define([{tag:z.meta,color:"#404740"},{tag:z.link,textDecoration:"underline"},{tag:z.heading,textDecoration:"underline",fontWeight:"bold"},{tag:z.emphasis,fontStyle:"italic"},{tag:z.strong,fontWeight:"bold"},{tag:z.strikethrough,textDecoration:"line-through"},{tag:z.keyword,color:"#708"},{tag:[z.atom,z.bool,z.url,z.contentSeparator,z.labelName],color:"#219"},{tag:[z.literal,z.inserted],color:"#164"},{tag:[z.string,z.deleted],color:"#a11"},{tag:[z.regexp,z.escape,z.special(z.string)],color:"#e40"},{tag:z.definition(z.variableName),color:"#00f"},{tag:z.local(z.variableName),color:"#30a"},{tag:[z.typeName,z.namespace],color:"#085"},{tag:z.className,color:"#167"},{tag:[z.special(z.variableName),z.macroName],color:"#256"},{tag:z.definition(z.propertyName),color:"#00c"},{tag:z.comment,color:"#940"},{tag:z.invalid,color:"#f00"}]),FU=le.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),y4=1e4,C4="()[]{}",$4=fe.define({combine(t){return Mr(t,{afterCursor:!0,brackets:C4,maxScanDistance:y4,renderMatch:PU})}}),VU=xe.mark({class:"cm-matchingBracket"}),HU=xe.mark({class:"cm-nonmatchingBracket"});function PU(t){let e=[],n=t.matched?VU:HU;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const WU=Lt.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet($4);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=vr(e.state,i.head,-1,r)||i.head>0&&vr(e.state,i.head-1,1,r)||r.afterCursor&&(vr(e.state,i.head,1,r)||i.head<e.state.doc.length&&vr(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return xe.set(n,!0)},provide:t=>le.decorations.from(t)}),zU=[WU,FU];function UU(t={}){return[$4.of(t),zU]}const qU=new je;function B1(t,e,n){let r=t.prop(e<0?je.openedBy:je.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function N1(t){let e=t.type.prop(qU);return e?e(t.node):t}function vr(t,e,n,r={}){let i=r.maxScanDistance||y4,o=r.brackets||C4,s=Kt(t),a=s.resolveInner(e,n);for(let c=a;c;c=c.parent){let h=B1(c.type,n,o);if(h&&c.from<c.to){let f=N1(c);if(f&&(n>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return KU(t,e,n,c,f,h,o)}}return GU(t,e,n,s,a.type,i,o)}function KU(t,e,n,r,i,o,s){let a=r.parent,c={from:i.from,to:i.to},h=0,f=a?.cursor();if(f&&(n<0?f.childBefore(r.from):f.childAfter(r.to)))do if(n<0?f.to<=r.from:f.from>=r.to){if(h==0&&o.indexOf(f.type.name)>-1&&f.from<f.to){let d=N1(f);return{start:c,end:d?{from:d.from,to:d.to}:void 0,matched:!0}}else if(B1(f.type,n,s))h++;else if(B1(f.type,-n,s)){if(h==0){let d=N1(f);return{start:c,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}h--}}while(n<0?f.prevSibling():f.nextSibling());return{start:c,matched:!1}}function GU(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),c=s.indexOf(a);if(c<0||c%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},f=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let m=0;!f.next().done&&m<=o;){let v=f.value;n<0&&(m+=v.length);let x=e+m*n;for(let w=n>0?0:v.length-1,C=n>0?v.length:-1;w!=C;w+=n){let S=s.indexOf(v[w]);if(!(S<0||r.resolveInner(x+w,1).type!=i))if(S%2==0==n>0)d++;else{if(d==1)return{start:h,end:{from:x+w,to:x+w+1},matched:S>>1==c>>1};d--}}n>0&&(m+=v.length)}return f.done?{start:h,matched:!1}:null}const YU=Object.create(null),Db=[dn.none],Ib=[],_b=Object.create(null),XU=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])XU[t]=ZU(YU,e);function c0(t,e){Ib.indexOf(t)>-1||(Ib.push(t),console.warn(e))}function ZU(t,e){let n=[];for(let a of e.split(" ")){let c=[];for(let h of a.split(".")){let f=t[h]||z[h];f?typeof f=="function"?c.length?c=c.map(f):c0(h,`Modifier ${h} used at start of tag`):c.length?c0(h,`Tag ${h} used as modifier`):c=Array.isArray(f)?f:[f]:c0(h,`Unknown highlighting tag ${h}`)}for(let h of c)n.push(h)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),o=_b[i];if(o)return o.id;let s=_b[i]=dn.define({id:Db.length,name:r,props:[_y({[r]:n})]});return Db.push(s),s.id}st.RTL,st.LTR;const QU=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=JU(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function JU(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const eq=zu.define({name:"json",parser:iP.configure({props:[c4.add({Object:Mb({except:/^\s*\}/}),Array:Mb({except:/^\s*\]/})}),h4.add({"Object Array":CU})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function tq(){return new uU(eq)}function nq(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}const rq=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=Em(t.state,n.from);return r.line?iq(t):r.block?sq(t):!1};function Mm(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const iq=Mm(cq,0),oq=Mm(S4,0),sq=Mm((t,e)=>S4(t,e,lq(e)),0);function Em(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const ya=50;function aq(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-ya,r),s=t.sliceDoc(i,i+ya),a=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(s)[0].length,h=o.length-a;if(o.slice(h-e.length,h)==e&&s.slice(c,c+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+c,margin:c&&1}};let f,d;i-r<=2*ya?f=d=t.sliceDoc(r,i):(f=t.sliceDoc(r,r+ya),d=t.sliceDoc(i-ya,i));let m=/^\s*/.exec(f)[0].length,v=/\s*$/.exec(d)[0].length,x=d.length-v-n.length;return f.slice(m,m+e.length)==e&&d.slice(x,x+n.length)==n?{open:{pos:r+m+e.length,margin:/\s/.test(f.charAt(m+e.length))?1:0},close:{pos:i-v-n.length,margin:/\s/.test(d.charAt(x-1))?1:0}}:null}function lq(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function S4(t,e,n=e.selection.ranges){let r=n.map(o=>Em(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>aq(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let c=r[s],{open:h,close:f}=a;o.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+c.close.length})}return{changes:o}}return null}function cq(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,c=1e9,h=Em(e,o).line;if(h){for(let f=o;f<=s;){let d=e.doc.lineAt(f);if(d.from>i&&(o==s||s>d.from)){i=d.from;let m=/^\s*/.exec(d.text)[0].length,v=m==d.length,x=d.text.slice(m,m+h.length)==h?m:-1;m<d.text.length&&m<c&&(c=m),r.push({line:d,comment:x,token:h,indent:m,empty:v,single:!1})}f=d.to+1}if(c<1e9)for(let f=a;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=c);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:c,indent:h,empty:f,single:d}of r)(d||!f)&&o.push({from:a.from+h,insert:c+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:c}of r)if(a>=0){let h=s.from+a,f=h+c.length;s.text[f-s.from]==" "&&f++,o.push({from:h,to:f})}return{changes:o}}return null}const j1=Tr.define(),uq=Tr.define(),hq=fe.define(),A4=fe.define({combine(t){return Mr(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),R4=Lt.define({create(){return br.empty},update(t,e){let n=e.state.facet(A4),r=e.annotation(j1);if(r){let c=fn.fromTransaction(e,r.selection),h=r.side,f=h==0?t.undone:t.done;return c?f=Yu(f,f.length,n.minDepth,c):f=M4(f,e.startState.selection),new br(h==0?r.rest:f,h==0?f:r.rest)}let i=e.annotation(uq);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(kt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=fn.fromTransaction(e),s=e.annotation(kt.time),a=e.annotation(kt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new br(t.done.map(fn.fromJSON),t.undone.map(fn.fromJSON))}});function fq(t={}){return[R4,A4.of(t),le.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?k4:e.inputType=="historyRedo"?F1:null;return r?(e.preventDefault(),r(n)):!1}})]}function Ph(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(R4,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const k4=Ph(0,!1),F1=Ph(1,!1),dq=Ph(0,!0),gq=Ph(1,!0);class fn{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new fn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new fn(e.changes&&Rt.fromJSON(e.changes),[],e.mapped&&xr.fromJSON(e.mapped),e.startSelection&&Q.fromJSON(e.startSelection),e.selectionsAfter.map(Q.fromJSON))}static fromTransaction(e,n){let r=Nn;for(let i of e.startState.facet(hq)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new fn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Nn)}static selection(e){return new fn(void 0,Nn,void 0,void 0,e)}}function Yu(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function mq(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let c=0;c<n.length;){let h=n[c++],f=n[c++];a>=h&&s<=f&&(r=!0)}}),r}function pq(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function T4(t,e){return t.length?e.length?t.concat(e):t:e}const Nn=[],vq=200;function M4(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-vq));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Yu(t,t.length-1,1e9,n.setSelAfter(r)))}else return[fn.selection([e])]}function bq(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function u0(t,e){if(!t.length)return t;let n=t.length,r=Nn;for(;n;){let i=wq(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[fn.selection(r)]:Nn}function wq(t,e,n){let r=T4(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Nn,n);if(!t.changes)return fn.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new fn(i,Ee.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const xq=/^(input\.type|delete)($|\.)/;class br{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new br(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||xq.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,mq(a.changes,e.changes))||r=="input.type.compose")?s=Yu(s,s.length-1,i.minDepth,new fn(e.changes.compose(a.changes),T4(Ee.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Nn)):s=Yu(s,s.length,i.minDepth,e),new br(s,Nn,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Nn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&pq(o[o.length-1],e)?this:new br(M4(this.done,e),this.undone,n,r)}addMapping(e){return new br(u0(this.done,e),u0(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],s=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:j1.of({side:e,rest:bq(i),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Nn:i.slice(0,i.length-1);return o.mapped&&(a=u0(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:j1.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}br.empty=new br(Nn,Nn);const yq=[{key:"Mod-z",run:k4,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:F1,preventDefault:!0},{linux:"Ctrl-Shift-z",run:F1,preventDefault:!0},{key:"Mod-u",run:dq,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:gq,preventDefault:!0}];function Ys(t,e){return Q.create(t.ranges.map(e),t.mainIndex)}function Er(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ir({state:t,dispatch:e},n){let r=Ys(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Er(t,r)),!0)}function Wh(t,e){return Q.cursor(e?t.to:t.from)}function E4(t,e){return ir(t,n=>n.empty?t.moveByChar(n,e):Wh(n,e))}function Gt(t){return t.textDirectionAt(t.state.selection.main.head)==st.LTR}const O4=t=>E4(t,!Gt(t)),D4=t=>E4(t,Gt(t));function I4(t,e){return ir(t,n=>n.empty?t.moveByGroup(n,e):Wh(n,e))}const Cq=t=>I4(t,!Gt(t)),$q=t=>I4(t,Gt(t));function Sq(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function zh(t,e,n){let r=Kt(t).resolveInner(e.head),i=n?je.closedBy:je.openedBy;for(let c=e.head;;){let h=n?r.childAfter(c):r.childBefore(c);if(!h)break;Sq(t,h,i)?r=h:c=n?h.to:h.from}let o=r.type.prop(i),s,a;return o&&(s=n?vr(t,r.from,1):vr(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,Q.cursor(a,n?-1:1)}const Aq=t=>ir(t,e=>zh(t.state,e,!Gt(t))),Rq=t=>ir(t,e=>zh(t.state,e,Gt(t)));function _4(t,e){return ir(t,n=>{if(!n.empty)return Wh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const L4=t=>_4(t,!1),B4=t=>_4(t,!0);function N4(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(le.scrollMargins)){let s=o(t);s?.top&&(n=Math.max(s?.top,n)),s?.bottom&&(r=Math.max(s?.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function j4(t,e){let n=N4(t),{state:r}=t,i=Ys(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Wh(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),c=a.top+n.marginTop,h=a.bottom-n.marginBottom;s&&s.top>c&&s.bottom<h&&(o=le.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-c}))}return t.dispatch(Er(r,i),{effects:o}),!0}const Lb=t=>j4(t,!1),V1=t=>j4(t,!0);function Hi(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=Q.cursor(r.from+o))}return i}const kq=t=>ir(t,e=>Hi(t,e,!0)),Tq=t=>ir(t,e=>Hi(t,e,!1)),Mq=t=>ir(t,e=>Hi(t,e,!Gt(t))),Eq=t=>ir(t,e=>Hi(t,e,Gt(t))),Oq=t=>ir(t,e=>Q.cursor(t.lineBlockAt(e.head).from,1)),Dq=t=>ir(t,e=>Q.cursor(t.lineBlockAt(e.head).to,-1));function Iq(t,e,n){let r=!1,i=Ys(t.selection,o=>{let s=vr(t,o.head,-1)||vr(t,o.head,1)||o.head>0&&vr(t,o.head-1,1)||o.head<t.doc.length&&vr(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return Q.cursor(a)});return r?(e(Er(t,i)),!0):!1}const _q=({state:t,dispatch:e})=>Iq(t,e);function Pn(t,e){let n=Ys(t.state.selection,r=>{let i=e(r);return Q.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Er(t.state,n)),!0)}function F4(t,e){return Pn(t,n=>t.moveByChar(n,e))}const V4=t=>F4(t,!Gt(t)),H4=t=>F4(t,Gt(t));function P4(t,e){return Pn(t,n=>t.moveByGroup(n,e))}const Lq=t=>P4(t,!Gt(t)),Bq=t=>P4(t,Gt(t)),Nq=t=>Pn(t,e=>zh(t.state,e,!Gt(t))),jq=t=>Pn(t,e=>zh(t.state,e,Gt(t)));function W4(t,e){return Pn(t,n=>t.moveVertically(n,e))}const z4=t=>W4(t,!1),U4=t=>W4(t,!0);function q4(t,e){return Pn(t,n=>t.moveVertically(n,e,N4(t).height))}const Bb=t=>q4(t,!1),Nb=t=>q4(t,!0),Fq=t=>Pn(t,e=>Hi(t,e,!0)),Vq=t=>Pn(t,e=>Hi(t,e,!1)),Hq=t=>Pn(t,e=>Hi(t,e,!Gt(t))),Pq=t=>Pn(t,e=>Hi(t,e,Gt(t))),Wq=t=>Pn(t,e=>Q.cursor(t.lineBlockAt(e.head).from)),zq=t=>Pn(t,e=>Q.cursor(t.lineBlockAt(e.head).to)),jb=({state:t,dispatch:e})=>(e(Er(t,{anchor:0})),!0),Fb=({state:t,dispatch:e})=>(e(Er(t,{anchor:t.doc.length})),!0),Vb=({state:t,dispatch:e})=>(e(Er(t,{anchor:t.selection.main.anchor,head:0})),!0),Hb=({state:t,dispatch:e})=>(e(Er(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Uq=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),qq=({state:t,dispatch:e})=>{let n=Uh(t).map(({from:r,to:i})=>Q.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Q.create(n),userEvent:"select"})),!0},Kq=({state:t,dispatch:e})=>{let n=Ys(t.selection,r=>{let i=Kt(t),o=i.resolveStack(r.from,1);if(r.empty){let s=i.resolveStack(r.from,-1);s.node.from>=o.node.from&&s.node.to<=o.node.to&&(o=s)}for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&s.next)return Q.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Er(t,n)),!0)},Gq=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Q.create([n.main]):n.main.empty||(r=Q.create([Q.cursor(n.main.head)])),r?(e(Er(t,r)),!0):!1};function yl(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let c=e(o);c<s?(n="delete.backward",c=Xc(t,c,!1)):c>s&&(n="delete.forward",c=Xc(t,c,!0)),s=Math.min(s,c),a=Math.max(a,c)}else s=Xc(t,s,!1),a=Xc(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:Q.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?le.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Xc(t,e,n){if(t instanceof le)for(let r of t.state.facet(le.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const K4=(t,e,n)=>yl(t,r=>{let i=r.from,{state:o}=t,s=o.doc.lineAt(i),a,c;if(n&&!e&&i>s.from&&i<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,i-s.from))){if(a[a.length-1]=="	")return i-1;let h=Gs(a,o.tabSize),f=h%qu(o)||qu(o);for(let d=0;d<f&&a[a.length-1-d]==" ";d++)i--;c=i}else c=Ht(s.text,i-s.from,e,e)+s.from,c==i&&s.number!=(e?o.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(s.text.slice(c-s.from,i-s.from))&&(c=Ht(s.text,c-s.from,!1,!1)+s.from);return c}),H1=t=>K4(t,!1,!0),G4=t=>K4(t,!0,!1),Y4=(t,e)=>yl(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let c=Ht(o.text,r-o.from,e)+o.from,h=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),f=s(h);if(a!=null&&f!=a)break;(h!=" "||r!=n.head)&&(a=f),r=c}return r}),X4=t=>Y4(t,!1),Yq=t=>Y4(t,!0),Xq=t=>yl(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Zq=t=>yl(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Qq=t=>yl(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Jq=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ge.of(["",""])},range:Q.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},eK=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:Ht(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:Ht(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:Q.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Uh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function Z4(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Uh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let c of o.ranges)i.push(Q.range(Math.min(t.doc.length,c.anchor+a),Math.min(t.doc.length,c.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let c of o.ranges)i.push(Q.range(c.anchor-a,c.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Q.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const tK=({state:t,dispatch:e})=>Z4(t,e,!1),nK=({state:t,dispatch:e})=>Z4(t,e,!0);function Q4(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Uh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const rK=({state:t,dispatch:e})=>Q4(t,e,!1),iK=({state:t,dispatch:e})=>Q4(t,e,!0),oK=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Uh(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=Ys(e.selection,i=>{let o;if(t.lineWrapping){let s=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(o=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function sK(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Kt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(je.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const Pb=J4(!1),aK=J4(!0);function J4(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),c=!t&&o==s&&sK(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let h=new Vh(e,{simulateBreak:o,simulateDoubleBreak:!!c}),f=km(h,o);for(f==null&&(f=Gs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;c?{from:o,to:s}=c:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let d=["",Za(e,f)];return c&&d.push(Za(e,h.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:Ge.of(d)},range:Q.cursor(o+1+d[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Om(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:Q.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const lK=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Vh(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=Om(t,(o,s,a)=>{let c=km(r,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let h=/^\s*/.exec(o.text)[0],f=Za(t,c);(h!=f||a.from<o.from+h.length)&&(n[o.from]=c,s.push({from:o.from,to:o.from+h.length,insert:f}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},eC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Om(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Fh)})}),{userEvent:"input.indent"})),!0),tC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Om(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Gs(i,t.tabSize),s=0,a=Za(t,Math.max(0,o-qu(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),cK=t=>(t.setTabFocusMode(),!0),uK=[{key:"Ctrl-b",run:O4,shift:V4,preventDefault:!0},{key:"Ctrl-f",run:D4,shift:H4},{key:"Ctrl-p",run:L4,shift:z4},{key:"Ctrl-n",run:B4,shift:U4},{key:"Ctrl-a",run:Oq,shift:Wq},{key:"Ctrl-e",run:Dq,shift:zq},{key:"Ctrl-d",run:G4},{key:"Ctrl-h",run:H1},{key:"Ctrl-k",run:Xq},{key:"Ctrl-Alt-h",run:X4},{key:"Ctrl-o",run:Jq},{key:"Ctrl-t",run:eK},{key:"Ctrl-v",run:V1}],hK=[{key:"ArrowLeft",run:O4,shift:V4,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Cq,shift:Lq,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Mq,shift:Hq,preventDefault:!0},{key:"ArrowRight",run:D4,shift:H4,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:$q,shift:Bq,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Eq,shift:Pq,preventDefault:!0},{key:"ArrowUp",run:L4,shift:z4,preventDefault:!0},{mac:"Cmd-ArrowUp",run:jb,shift:Vb},{mac:"Ctrl-ArrowUp",run:Lb,shift:Bb},{key:"ArrowDown",run:B4,shift:U4,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Fb,shift:Hb},{mac:"Ctrl-ArrowDown",run:V1,shift:Nb},{key:"PageUp",run:Lb,shift:Bb},{key:"PageDown",run:V1,shift:Nb},{key:"Home",run:Tq,shift:Vq,preventDefault:!0},{key:"Mod-Home",run:jb,shift:Vb},{key:"End",run:kq,shift:Fq,preventDefault:!0},{key:"Mod-End",run:Fb,shift:Hb},{key:"Enter",run:Pb,shift:Pb},{key:"Mod-a",run:Uq},{key:"Backspace",run:H1,shift:H1},{key:"Delete",run:G4},{key:"Mod-Backspace",mac:"Alt-Backspace",run:X4},{key:"Mod-Delete",mac:"Alt-Delete",run:Yq},{mac:"Mod-Backspace",run:Zq},{mac:"Mod-Delete",run:Qq}].concat(uK.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),fK=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Aq,shift:Nq},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Rq,shift:jq},{key:"Alt-ArrowUp",run:tK},{key:"Shift-Alt-ArrowUp",run:rK},{key:"Alt-ArrowDown",run:nK},{key:"Shift-Alt-ArrowDown",run:iK},{key:"Escape",run:Gq},{key:"Mod-Enter",run:aK},{key:"Alt-l",mac:"Ctrl-l",run:qq},{key:"Mod-i",run:Kq,preventDefault:!0},{key:"Mod-[",run:tC},{key:"Mod-]",run:eC},{key:"Mod-Alt-\\",run:lK},{key:"Shift-Mod-k",run:oK},{key:"Shift-Mod-\\",run:_q},{key:"Mod-/",run:rq},{key:"Alt-A",run:oq},{key:"Ctrl-m",mac:"Shift-Alt-m",run:cK}].concat(hK),dK={key:"Tab",run:eC,shift:tC},Wb=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Ls{constructor(e,n,r=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?a=>o(Wb(a)):Wb,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=hm(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=gr(e);let i=this.normalize(n);if(i.length)for(let o=0,s=r;;o++){let a=i.charCodeAt(o),c=this.match(a,s,this.bufferPos+this.bufferStart);if(o==i.length-1){if(c)return this.value=c,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Ls.prototype[Symbol.iterator]=function(){return this});const nC={from:-1,to:-1,match:/.*/.exec("")},Dm="gm"+(/x/.unicode==null?"":"u");class rC{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=nC,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new iC(e,n,r,i,o);this.re=new RegExp(n,Dm+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=Xu(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Xu(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const h0=new WeakMap;class xs{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=h0.get(e);if(!i||i.from>=r||i.to<=n){let a=new xs(n,e.sliceString(n,r));return h0.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),h0.set(e,new xs(s,o)),new xs(n,o.slice(n-s,r-s))}}class iC{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=nC,this.matchPos=Xu(e,i),this.re=new RegExp(n,Dm+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=xs.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Xu(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=xs.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(rC.prototype[Symbol.iterator]=iC.prototype[Symbol.iterator]=function(){return this});function gK(t){try{return new RegExp(t,Dm),!0}catch{return!1}}function Xu(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function P1(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=et("input",{class:"cm-textfield",name:"line",value:e}),r=et("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:_a.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},et("label",t.state.phrase("Go to line"),": ",n)," ",et("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),et("button",{name:"close",onclick:()=>{t.dispatch({effects:_a.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,c,h,f,d]=o,m=f?+f.slice(1):0,v=h?+h:a.number;if(h&&d){let C=v/100;c&&(C=C*(c=="-"?-1:1)+a.number/s.doc.lines),v=Math.round(s.doc.lines*C)}else h&&c&&(v=v*(c=="-"?-1:1)+a.number);let x=s.doc.line(Math.max(1,Math.min(s.doc.lines,v))),w=Q.cursor(x.from+Math.max(0,Math.min(m,x.length)));t.dispatch({effects:[_a.of(!1),le.scrollIntoView(w.from,{y:"center"})],selection:w}),t.focus()}return{dom:r}}const _a=Ee.define(),zb=Lt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(_a)&&(t=n.value);return t},provide:t=>Xa.from(t,e=>e?P1:null)}),mK=t=>{let e=Ya(t,P1);if(!e){let n=[_a.of(!0)];t.state.field(zb,!1)==null&&n.push(Ee.appendConfig.of([zb,pK])),t.dispatch({effects:n}),e=Ya(t,P1)}return e&&e.dom.querySelector("input").select(),!0},pK=le.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),vK={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},bK=fe.define({combine(t){return Mr(t,vK,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function wK(t){return[SK,$K]}const xK=xe.mark({class:"cm-selectionMatch"}),yK=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ub(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=lt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=lt.Word)}function CK(t,e,n,r){return t(e.sliceDoc(n,n+1))==lt.Word&&t(e.sliceDoc(r-1,r))==lt.Word}const $K=vt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(bK),{state:n}=t,r=n.selection;if(r.ranges.length>1)return xe.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return xe.none;let c=n.wordAt(i.head);if(!c)return xe.none;s=n.charCategorizer(i.head),o=n.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<e.minSelectionLength||c>200)return xe.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(Ub(s,n,i.from,i.to)&&CK(s,n,i.from,i.to)))return xe.none}else if(o=n.sliceDoc(i.from,i.to),!o)return xe.none}let a=[];for(let c of t.visibleRanges){let h=new Ls(n.doc,o,c.from,c.to);for(;!h.next().done;){let{from:f,to:d}=h.value;if((!s||Ub(s,n,f,d))&&(i.empty&&f<=i.from&&d>=i.to?a.push(yK.range(f,d)):(f>=i.to||d<=i.from)&&a.push(xK.range(f,d)),a.length>e.maxMatches))return xe.none}}return xe.set(a)}},{decorations:t=>t.decorations}),SK=le.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),AK=({state:t,dispatch:e})=>{let{selection:n}=t,r=Q.create(n.ranges.map(i=>t.wordAt(i.head)||Q.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function RK(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new Ls(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new Ls(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(c=>c.from==a.value.from))continue;if(o){let c=t.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const kK=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return AK({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=RK(t,r);return i?(e(t.update({selection:t.selection.addRange(Q.range(i.from,i.to),!1),effects:le.scrollIntoView(i.to)})),!0):!1},Xs=fe.define({combine(t){return Mr(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new FK(e),scrollToMatch:e=>le.scrollIntoView(e)})}});class oC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||gK(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
`:r=="r"?"\r":r=="t"?"	":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new OK(this):new MK(this)}getCursor(e,n=0,r){let i=e.doc?e:Ue.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ls(this,i,n,r):as(this,i,n,r)}}class sC{constructor(e){this.spec=e}}function as(t,e,n,r){return new Ls(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?TK(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function TK(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Zu(i,n-o))!=lt.Word||e(Qu(i,n-o))!=lt.Word)&&(e(Qu(i,r-o))!=lt.Word||e(Zu(i,r-o))!=lt.Word))}class MK extends sC{constructor(e){super(e)}nextMatch(e,n,r){let i=as(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=as(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=as(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=as(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=as(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function ls(t,e,n,r){return new rC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?EK(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Zu(t,e){return t.slice(Ht(t,e,!1),e)}function Qu(t,e){return t.slice(e,Ht(t,e))}function EK(t){return(e,n,r)=>!r[0].length||(t(Zu(r.input,r.index))!=lt.Word||t(Qu(r.input,r.index))!=lt.Word)&&(t(Qu(r.input,r.index+r[0].length))!=lt.Word||t(Zu(r.input,r.index+r[0].length))!=lt.Word)}class OK extends sC{nextMatch(e,n,r){let i=ls(this.spec,e,r,e.doc.length).next();return i.done&&(i=ls(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=ls(this.spec,e,o,r),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o<e.match.length)return e.match[o]+r.slice(i)}return n})}matchAll(e,n){let r=ls(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=ls(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const Qa=Ee.define(),Im=Ee.define(),Ti=Lt.define({create(t){return new f0(W1(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Qa)?t=new f0(n.value.create(),t.panel):n.is(Im)&&(t=new f0(t.query,n.value?_m:null));return t},provide:t=>Xa.from(t,e=>e.panel)});class f0{constructor(e,n){this.query=e,this.panel=n}}const DK=xe.mark({class:"cm-searchMatch"}),IK=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),_K=vt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ti))}update(t){let e=t.state.field(Ti);(e!=t.startState.field(Ti)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,r=new Jr;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:c}=o[i];for(;i<s-1&&c>o[i+1].from-2*250;)c=o[++i].to;t.highlight(n.state,a,c,(h,f)=>{let d=n.state.selection.ranges.some(m=>m.from==h&&m.to==f);r.add(h,f,d?IK:DK)})}return r.finish()}},{decorations:t=>t.decorations});function Cl(t){return e=>{let n=e.state.field(Ti,!1);return n&&n.query.spec.valid?t(e,n):cC(e)}}const Ju=Cl((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Q.single(r.from,r.to),o=t.state.facet(Xs);return t.dispatch({selection:i,effects:[Lm(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),lC(t),!0}),eh=Cl((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=Q.single(i.from,i.to),s=t.state.facet(Xs);return t.dispatch({selection:o,effects:[Lm(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),lC(t),!0}),LK=Cl((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Q.create(n.map(r=>Q.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),BK=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new Ls(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(Q.range(a.value.from,a.value.to))}return e(t.update({selection:Q.create(o,s),userEvent:"select.search.matches"})),!0},qb=Cl((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=o,a=[],c,h,f=[];s.from==r&&s.to==i&&(h=n.toText(e.getReplacement(s)),a.push({from:s.from,to:s.to,insert:h}),s=e.nextMatch(n,s.from,s.to),f.push(le.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=t.state.changes(a);return s&&(c=Q.single(s.from,s.to).map(d),f.push(Lm(t,s)),f.push(n.facet(Xs).scrollToMatch(c.main,t))),t.dispatch({changes:d,selection:c,effects:f,userEvent:"input.replace"}),!0}),NK=Cl((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:le.announce.of(r),userEvent:"input.replace.all"}),!0});function _m(t){return t.state.facet(Xs).createPanel(t)}function W1(t,e){var n,r,i,o,s;let a=t.selection.main,c=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!c)return e;let h=t.facet(Xs);return new oC({search:((n=e?.literal)!==null&&n!==void 0?n:h.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:h.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:h.literal,regexp:(o=e?.regexp)!==null&&o!==void 0?o:h.regexp,wholeWord:(s=e?.wholeWord)!==null&&s!==void 0?s:h.wholeWord})}function aC(t){let e=Ya(t,_m);return e&&e.dom.querySelector("[main-field]")}function lC(t){let e=aC(t);e&&e==t.root.activeElement&&e.select()}const cC=t=>{let e=t.state.field(Ti,!1);if(e&&e.panel){let n=aC(t);if(n&&n!=t.root.activeElement){let r=W1(t.state,e.query.spec);r.valid&&t.dispatch({effects:Qa.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Im.of(!0),e?Qa.of(W1(t.state,e.query.spec)):Ee.appendConfig.of(HK)]});return!0},uC=t=>{let e=t.state.field(Ti,!1);if(!e||!e.panel)return!1;let n=Ya(t,_m);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Im.of(!1)}),!0},jK=[{key:"Mod-f",run:cC,scope:"editor search-panel"},{key:"F3",run:Ju,shift:eh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ju,shift:eh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:uC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:BK},{key:"Mod-Alt-g",run:mK},{key:"Mod-d",run:kK,preventDefault:!0}];class FK{constructor(e){this.view=e;let n=this.query=e.state.field(Ti).query.spec;this.commit=this.commit.bind(this),this.searchField=et("input",{value:n.search,placeholder:$n(e,"Find"),"aria-label":$n(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=et("input",{value:n.replace,placeholder:$n(e,"Replace"),"aria-label":$n(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=et("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=et("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=et("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return et("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=et("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Ju(e),[$n(e,"next")]),r("prev",()=>eh(e),[$n(e,"previous")]),r("select",()=>LK(e),[$n(e,"all")]),et("label",null,[this.caseField,$n(e,"match case")]),et("label",null,[this.reField,$n(e,"regexp")]),et("label",null,[this.wordField,$n(e,"by word")]),...e.state.readOnly?[]:[et("br"),this.replaceField,r("replace",()=>qb(e),[$n(e,"replace")]),r("replaceAll",()=>NK(e),[$n(e,"replace all")])],et("button",{name:"close",onclick:()=>uC(e),"aria-label":$n(e,"close"),type:"button"},["×"])])}commit(){let e=new oC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Qa.of(e)}))}keydown(e){rz(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?eh:Ju)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),qb(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Qa)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Xs).top}}function $n(t,e){return t.state.phrase(e)}const Zc=30,Qc=/[\s\.,:;?!]/;function Lm(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Zc),s=Math.min(i,n+Zc),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let c=0;c<Zc;c++)if(!Qc.test(a[c+1])&&Qc.test(a[c])){a=a.slice(c);break}}if(s!=i){for(let c=a.length-1;c>a.length-Zc;c--)if(!Qc.test(a[c-1])&&Qc.test(a[c])){a=a.slice(0,c);break}}return le.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const VK=le.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),HK=[Ti,Oo.low(_K),VK];class hC{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Kt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(fC(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function Kb(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function PK(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=Kb(e)+Kb(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function WK(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:PK(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}let Gb=class{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}};function go(t){return t.selection.main.from}function fC(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const dC=Tr.define();function zK(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r))return{range:a};let c=t.toText(e);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:c},range:Q.cursor(a.from+o+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const Yb=new WeakMap;function UK(t){if(!Array.isArray(t))return t;let e=Yb.get(t);return e||Yb.set(t,e=WK(t)),e}const th=Ee.define(),Ja=Ee.define();class qK{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ln(e,n),i=gr(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(ln(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let R=ln(e,0),T=gr(R),E=T==e.length?0:-100;if(R!=n[0])if(R==r[0])E+=-200;else return null;return this.ret(E,[0,T])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=n.length,h=0;if(a<0){for(let R=0,T=Math.min(e.length,200);R<T&&h<c;){let E=ln(e,R);(E==n[h]||E==r[h])&&(i[h++]=R),R+=gr(E)}if(h<c)return null}let f=0,d=0,m=!1,v=0,x=-1,w=-1,C=/[a-z]/.test(e),S=!0;for(let R=0,T=Math.min(e.length,200),E=0;R<T&&d<c;){let O=ln(e,R);a<0&&(f<c&&O==n[f]&&(o[f++]=R),v<c&&(O==n[v]||O==r[v]?(v==0&&(x=R),w=R+1,v++):v=0));let L,I=O<255?O>=48&&O<=57||O>=97&&O<=122?2:O>=65&&O<=90?1:0:(L=hm(O))!=L.toLowerCase()?1:L!=L.toUpperCase()?2:0;(!R||I==1&&C||E==0&&I!=0)&&(n[d]==O||r[d]==O&&(m=!0)?s[d++]=R:s.length&&(S=!1)),E=I,R+=gr(O)}return d==c&&s[0]==0&&S?this.result(-100+(m?-200:0),s,e):v==c&&x==0?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):v==c?this.ret(-900-e.length,[x,w]):d==c?this.result(-100+(m?-200:0)+-700+(S?0:-1100),s,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?gr(ln(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}class KK{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Dt=fe.define({combine(t){return Mr(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:GK,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>Xb(e(r),n(r)),optionClass:(e,n)=>r=>Xb(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function Xb(t,e){return t?e?t+" "+e:t:e}function GK(t,e,n,r,i,o){let s=t.textDirection==st.RTL,a=s,c=!1,h="top",f,d,m=e.left-i.left,v=i.right-e.right,x=r.right-r.left,w=r.bottom-r.top;if(a&&m<Math.min(x,v)?a=!1:!a&&v<Math.min(x,m)&&(a=!0),x<=(a?m:v))f=Math.max(i.top,Math.min(n.top,i.bottom-w))-e.top,d=Math.min(400,a?m:v);else{c=!0,d=Math.min(400,(s?e.right:i.right-e.left)-30);let R=i.bottom-e.bottom;R>=w||R>e.top?f=n.bottom-e.top:(h="bottom",f=e.bottom-n.top)}let C=(e.bottom-e.top)/o.offsetHeight,S=(e.right-e.left)/o.offsetWidth;return{style:`${h}: ${f/C}px; max-width: ${d/S}px`,class:"cm-completionInfo-"+(c?s?"left-narrow":"right-narrow":a?"left":"right")}}function YK(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,c=0;for(let h=0;h<o.length;){let f=o[h++],d=o[h++];f>c&&s.appendChild(document.createTextNode(a.slice(c,f)));let m=s.appendChild(document.createElement("span"));m.appendChild(document.createTextNode(a.slice(f,d))),m.className="cm-completionMatchedText",c=d}return c<a.length&&s.appendChild(document.createTextNode(a.slice(c))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function d0(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class XK{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(Dt);this.optionContent=YK(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=d0(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:h}=e.state.field(n).open;for(let f=c.target,d;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(d=/-(\d+)$/.exec(f.id))&&+d[1]<h.length){this.applyCompletion(e,h[+d[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Dt).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:Ja.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=d0(o.length,s,e.state.facet(Dt).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=d0(n.options.length,n.selected,this.view.state.facet(Dt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>hn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&QK(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:s.clientWidth,bottom:s.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(Dt).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",s=>{s.target==i&&s.preventDefault()});let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:c}=e[s],{section:h}=a;if(h){let m=typeof h=="string"?h:h.name;if(m!=o&&(s>r.from||r.from==0))if(o=m,typeof h!="string"&&h.header)i.appendChild(h.header(h));else{let v=i.appendChild(document.createElement("completion-section"));v.textContent=m}}const f=i.appendChild(document.createElement("li"));f.id=n+"-"+s,f.setAttribute("role","option");let d=this.optionClass(a);d&&(f.className=d);for(let m of this.optionContent){let v=m(a,this.view.state,this.view,c);v&&f.appendChild(v)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function ZK(t,e){return n=>new XK(n,t,e)}function QK(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function Zb(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function JK(t,e){let n=[],r=null,i=h=>{n.push(h);let{section:f}=h.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(m=>m.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(Dt);for(let h of t)if(h.hasResult()){let f=h.result.getMatch;if(h.result.filter===!1)for(let d of h.result.options)i(new Gb(d,h.source,f?f(d):[],1e9-n.length));else{let d=e.sliceDoc(h.from,h.to),m,v=o.filterStrict?new KK(d):new qK(d);for(let x of h.result.options)if(m=v.match(x.label)){let w=x.displayLabel?f?f(x,m.matched):[]:m.matched;i(new Gb(x,h.source,w,m.score+(x.boost||0)))}}}if(r){let h=Object.create(null),f=0,d=(m,v)=>{var x,w;return((x=m.rank)!==null&&x!==void 0?x:1e9)-((w=v.rank)!==null&&w!==void 0?w:1e9)||(m.name<v.name?-1:1)};for(let m of r.sort(d))f-=1e5,h[m.name]=f;for(let m of n){let{section:v}=m.completion;v&&(m.score+=h[typeof v=="string"?v:v.name])}}let s=[],a=null,c=o.compareCompletions;for(let h of n.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=h.completion;!a||a.label!=f.label||a.detail!=f.detail||a.type!=null&&f.type!=null&&a.type!=f.type||a.apply!=f.apply||a.boost!=f.boost?s.push(h):Zb(h.completion)>Zb(a)&&(s[s.length-1]=h),a=h.completion}return s}class ds{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ds(this.options,Qb(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,s){if(i&&!s&&e.some(h=>h.isPending))return i.setDisabled();let a=JK(e,n);if(!a.length)return i&&e.some(h=>h.isPending)?i.setDisabled():null;let c=n.facet(Dt).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let h=i.options[i.selected].completion;for(let f=0;f<a.length;f++)if(a[f].completion==h){c=f;break}}return new ds(a,Qb(r,c),{pos:e.reduce((h,f)=>f.hasResult()?Math.min(h,f.from):h,1e8),create:oG,above:o.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(e){return new ds(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new ds(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class nh{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new nh(rG,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Dt),o=(r.override||n.languageDataAt("autocomplete",go(n)).map(UK)).map(c=>(this.active.find(f=>f.source==c)||new jn(c,this.active.some(f=>f.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((c,h)=>c==this.active[h])&&(o=this.active);let s=this.open,a=e.effects.some(c=>c.is(Bm));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!eG(o,this.active)||a?s=ds.build(o,n,this.id,s,r,a):s&&s.disabled&&!o.some(c=>c.isPending)&&(s=null),!s&&o.every(c=>!c.isPending)&&o.some(c=>c.hasResult())&&(o=o.map(c=>c.hasResult()?new jn(c.source,0):c));for(let c of e.effects)c.is(mC)&&(s=s&&s.setSelected(c.value,this.id));return o==this.active&&s==this.open?this:new nh(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?tG:nG}}function eG(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const tG={"aria-autocomplete":"list"},nG={};function Qb(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const rG=[];function gC(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(dC);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class jn{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=gC(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new jn(i.source,0)),r&4&&i.state==0&&(i=new jn(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(th))i=new jn(i.source,1,o.value);else if(o.is(Ja))i=new jn(i.source,0);else if(o.is(Bm))for(let s of o.value)s.source==i.source&&(i=s);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(go(e.state))}}class ys extends jn{constructor(e,n,r,i,o,s){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=s}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=go(e.state);if(a>s||!i||n&2&&(go(e.startState)==this.from||a<this.limit))return new jn(this.source,n&4?1:0);let c=e.changes.mapPos(this.limit);return iG(i.validFor,e.state,o,s)?new ys(this.source,this.explicit,c,i,o,s):i.update&&(i=i.update(i,o,s,new hC(e.state,a,!1)))?new ys(this.source,this.explicit,c,i,i.from,(r=i.to)!==null&&r!==void 0?r:go(e.state)):new jn(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ys(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new jn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function iG(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):fC(t,!0).test(i)}const Bm=Ee.define({map(t,e){return t.map(n=>n.map(e))}}),mC=Ee.define(),un=Lt.define({create(){return nh.start()},update(t,e){return t.update(e)},provide:t=>[Rm.from(t,e=>e.tooltip),le.contentAttributes.from(t,e=>e.attrs)]});function Nm(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(un).active.find(i=>i.source==e.source);return r instanceof ys?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},zK(t.state,n,r.from,r.to)),{annotations:dC.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const oG=ZK(un,Nm);function Jc(t,e="option"){return n=>{let r=n.state.field(un,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Dt).interactionDelay)return!1;let i=1,o;e=="page"&&(o=i4(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:mC.of(a)}),!0}}const sG=t=>{let e=t.state.field(un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Dt).interactionDelay?!1:Nm(t,e.open.options[e.open.selected])},Jb=t=>t.state.field(un,!1)?(t.dispatch({effects:th.of(!0)}),!0):!1,aG=t=>{let e=t.state.field(un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Ja.of(null)}),!0)};class lG{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const cG=50,uG=1e3,hG=vt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(un).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(un),n=t.state.facet(Dt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(un)==e)return;let r=t.transactions.some(o=>{let s=gC(o,n);return s&8||(o.selection||o.docChanged)&&!(s&3)});for(let o=0;o<this.running.length;o++){let s=this.running[o];if(r||s.context.abortOnDocChange&&t.docChanged||s.updates.length+t.transactions.length>cG&&Date.now()-s.time>uG){for(let a of s.context.abortListeners)try{a()}catch(c){hn(this.view.state,c)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(th)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(un);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Dt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=go(e),r=new hC(e,n,t.explicit,this.view),i=new lG(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:Ja.of(null)}),hn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Dt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Dt),r=this.view.state.field(un);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let a=go(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(a,o.done.from+(o.active.explicit?0:1)),h=new ys(o.active.source,o.active.explicit,c,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:a);for(let f of o.updates)h=h.update(f,n);if(h.hasResult()){e.push(h);continue}}let s=r.active.find(a=>a.source==o.active.source);if(s&&s.isPending)if(o.done==null){let a=new jn(o.active.source,0);for(let c of o.updates)a=a.update(c,n);a.isPending||e.push(a)}else this.startQuery(s)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Bm.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(un,!1);if(e&&e.tooltip&&this.view.state.facet(Dt).closeOnBlur){let n=e.open&&i4(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Ja.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:th.of(!1)}),20),this.composing=0}}}),fG=typeof navigator=="object"&&/Win/.test(navigator.platform),dG=Oo.highest(le.domEventHandlers({keydown(t,e){let n=e.state.field(un,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(fG&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(s=>s.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&Nm(e,r),!1}})),gG=le.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),el={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ao=Ee.define({map(t,e){let n=e.mapPos(t,-1,Jt.TrackAfter);return n??void 0}}),jm=new class extends wo{};jm.startSide=1;jm.endSide=-1;const pC=Lt.define({create(){return Ke.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(ao)&&(t=t.update({add:[jm.range(n.value,n.value+1)]}));return t}});function mG(){return[vG,pC]}const g0="()[]{}<>«»»«[]{}";function vC(t){for(let e=0;e<g0.length;e+=2)if(g0.charCodeAt(e)==t)return g0.charAt(e+1);return hm(t<128?t:t+1)}function bC(t,e){return t.languageDataAt("closeBrackets",e)[0]||el}const pG=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vG=le.inputHandler.of((t,e,n,r)=>{if((pG?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&gr(ln(r,0))==1||e!=i.from||n!=i.to)return!1;let o=xG(t.state,r);return o?(t.dispatch(o),!0):!1}),bG=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=bC(t,t.selection.main.head).brackets||el.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=yG(t.doc,s.head);for(let c of r)if(c==a&&qh(t.doc,s.head)==vC(ln(c,0)))return{changes:{from:s.head-c.length,to:s.head+c.length},range:Q.cursor(s.head-c.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},wG=[{key:"Backspace",run:bG}];function xG(t,e){let n=bC(t,t.selection.main.head),r=n.brackets||el.brackets;for(let i of r){let o=vC(ln(i,0));if(e==i)return o==i?SG(t,i,r.indexOf(i+i+i)>-1,n):CG(t,i,o,n.before||el.before);if(e==o&&wC(t,t.selection.main.from))return $G(t,i,o)}return null}function wC(t,e){let n=!1;return t.field(pC).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function qh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,gr(ln(n,0)))}function yG(t,e){let n=t.sliceString(e-2,e);return gr(ln(n,0))==n.length?n:n.slice(1)}function CG(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:ao.of(s.to+e.length),range:Q.range(s.anchor+e.length,s.head+e.length)};let a=qh(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:ao.of(s.head+e.length),range:Q.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function $G(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&qh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:Q.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function SG(t,e,n,r){let i=r.stringPrefixes||el.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:ao.of(a.to+e.length),range:Q.range(a.anchor+e.length,a.head+e.length)};let c=a.head,h=qh(t.doc,c),f;if(h==e){if(ew(t,c))return{changes:{insert:e+e,from:c},effects:ao.of(c+e.length),range:Q.cursor(c+e.length)};if(wC(t,c)){let m=n&&t.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+m.length,insert:m},range:Q.cursor(c+m.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(f=tw(t,c-2*e.length,i))>-1&&ew(t,f))return{changes:{insert:e+e+e+e,from:c},effects:ao.of(c+e.length),range:Q.cursor(c+e.length)};if(t.charCategorizer(c)(h)!=lt.Word&&tw(t,c,i)>-1&&!AG(t,c,e,i))return{changes:{insert:e+e,from:c},effects:ao.of(c+e.length),range:Q.cursor(c+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ew(t,e){let n=Kt(t).resolveInner(e+1);return n.parent&&n.from==e}function AG(t,e,n,r){let i=Kt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=a.indexOf(n);if(!c||c>-1&&r.indexOf(a.slice(0,c))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>n.length+c;){if(t.sliceDoc(f.to-n.length,f.to)==n)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function tw(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=lt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=lt.Word)return o}return-1}function RG(t={}){return[dG,un,Dt.of(t),hG,kG,gG]}const xC=[{key:"Ctrl-Space",run:Jb},{mac:"Alt-`",run:Jb},{key:"Escape",run:aG},{key:"ArrowDown",run:Jc(!0)},{key:"ArrowUp",run:Jc(!1)},{key:"PageDown",run:Jc(!0,"page")},{key:"PageUp",run:Jc(!1,"page")},{key:"Enter",run:sG}],kG=Oo.highest(Nh.computeN([Dt],t=>t.facet(Dt).defaultKeymap?[xC]:[]));class nw{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class io{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(tl).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((f,d)=>f.from-d.from||f.to-d.to),s=new Jr,a=[],c=0;for(let f=0;;){let d=f==o.length?null:o[f];if(!d&&!a.length)break;let m,v;for(a.length?(m=c,v=a.reduce((w,C)=>Math.min(w,C.to),d&&d.from>m?d.from:1e8)):(m=d.from,v=d.to,a.push(d),f++);f<o.length;){let w=o[f];if(w.from==m&&(w.to>w.from||w.to==m))a.push(w),f++,v=Math.min(w.to,v);else{v=Math.min(w.from,v);break}}let x=VG(a);if(a.some(w=>w.from==w.to||w.from==w.to-1&&r.doc.lineAt(w.from).to==w.from))s.add(m,m,xe.widget({widget:new BG(x),diagnostics:a.slice()}));else{let w=a.reduce((C,S)=>S.markClass?C+" "+S.markClass:C,"");s.add(m,v,xe.mark({class:"cm-lintRange cm-lintRange-"+x+w,diagnostics:a.slice(),inclusiveEnd:a.some(C=>C.to>v)}))}c=v;for(let w=0;w<a.length;w++)a[w].to<=c&&a.splice(w--,1)}let h=s.finish();return new io(h,n,Bs(h))}}function Bs(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostics.indexOf(e)<0))if(!r)r=new nw(i,o,e||s.diagnostics[0]);else{if(s.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new nw(r.from,o,r.diagnostic)}}),r}function TG(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(tl).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(yC))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function MG(t,e){return t.field(Rn,!1)?e:e.concat(Ee.appendConfig.of(HG))}const yC=Ee.define(),Fm=Ee.define(),CC=Ee.define(),Rn=Lt.define({create(){return new io(xe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Bs(n,t.selected.diagnostic,o)||Bs(n,null,o)}!n.size&&i&&e.state.facet(tl).autoPanel&&(i=null),t=new io(n,i,r)}for(let n of e.effects)if(n.is(yC)){let r=e.state.facet(tl).autoPanel?n.value.length?nl.open:null:t.panel;t=io.init(n.value,r,e.state)}else n.is(Fm)?t=new io(t.diagnostics,n.value?nl.open:null,t.selected):n.is(CC)&&(t=new io(t.diagnostics,t.panel,n.value));return t},provide:t=>[Xa.from(t,e=>e.panel),le.decorations.from(t,e=>e.diagnostics)]}),EG=xe.mark({class:"cm-lintRange cm-lintRange-active"});function OG(t,e,n){let{diagnostics:r}=t.state.field(Rn),i,o=-1,s=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(c,h,{spec:f})=>{if(e>=c&&e<=h&&(c==h||(e>c||n>0)&&(e<h||n<0)))return i=f.diagnostics,o=c,s=h,!1});let a=t.state.facet(tl).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:DG(t,i)}}}:null}function DG(t,e){return et("ul",{class:"cm-tooltip-lint"},e.map(n=>SC(t,n,!1)))}const IG=t=>{let e=t.state.field(Rn,!1);(!e||!e.panel)&&t.dispatch({effects:MG(t.state,[Fm.of(!0)])});let n=Ya(t,nl.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},rw=t=>{let e=t.state.field(Rn,!1);return!e||!e.panel?!1:(t.dispatch({effects:Fm.of(!1)}),!0)},_G=t=>{let e=t.state.field(Rn,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},LG=[{key:"Mod-Shift-m",run:IG,preventDefault:!0},{key:"F8",run:_G}],tl=fe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Mr(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function $C(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function SC(t,e,n){var r;let i=n?$C(e.actions):[];return et("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},et("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,c=m=>{if(m.preventDefault(),a)return;a=!0;let v=Bs(t.state.field(Rn).diagnostics,e);v&&o.apply(t,v.from,v.to)},{name:h}=o,f=i[s]?h.indexOf(i[s]):-1,d=f<0?h:[h.slice(0,f),et("u",h.slice(f,f+1)),h.slice(f+1)];return et("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${h}${f<0?"":` (access key "${i[s]})"`}.`},d)}),e.source&&et("div",{class:"cm-diagnosticSource"},e.source))}class BG extends ai{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return et("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class iw{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=SC(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nl{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)rw(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=$C(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let c=Bs(this.view.state.field(Rn).diagnostics,o);c&&o.actions[a].apply(e,c.from,c.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=et("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=et("div",{class:"cm-panel-lint"},this.list,et("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>rw(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Rn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Rn),r=0,i=!1,o=null,s=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:h})=>{for(let f of h.diagnostics){if(s.has(f))continue;s.add(f);let d=-1,m;for(let v=r;v<this.items.length;v++)if(this.items[v].diagnostic==f){d=v;break}d<0?(m=new iw(this.view,f),this.items.splice(r,0,m),i=!0):(m=this.items[d],d>r&&(this.items.splice(r,d-r),i=!0)),n&&m.diagnostic==n.diagnostic?m.dom.hasAttribute("aria-selected")||(m.dom.setAttribute("aria-selected","true"),o=m):m.dom.hasAttribute("aria-selected")&&m.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new iw(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let h=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/h:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Rn),r=Bs(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:CC.of(r)})}static open(e){return new nl(e)}}function NG(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function eu(t){return NG(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const jG=le.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:eu("#d11")},".cm-lintRange-warning":{backgroundImage:eu("orange")},".cm-lintRange-info":{backgroundImage:eu("#999")},".cm-lintRange-hint":{backgroundImage:eu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function FG(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function VG(t){let e="hint",n=1;for(let r of t){let i=FG(r.severity);i>n&&(n=i,e=r.severity)}return e}const HG=[Rn,le.decorations.compute([Rn],t=>{let{selected:e,panel:n}=t.field(Rn);return!e||!n||e.from==e.to?xe.none:xe.set([EG.range(e.from,e.to)])}),Uz(OG,{hideOn:TG}),jG];var ow=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(wG)),e.defaultKeymap!==!1&&(r=r.concat(fK)),e.searchKeymap!==!1&&(r=r.concat(jK)),e.historyKeymap!==!1&&(r=r.concat(yq)),e.foldKeymap!==!1&&(r=r.concat(EU)),e.completionKeymap!==!1&&(r=r.concat(xC)),e.lintKeymap!==!1&&(r=r.concat(LG));var i=[];return e.lineNumbers!==!1&&i.push(nU()),e.highlightActiveLineGutter!==!1&&i.push(oU()),e.highlightSpecialChars!==!1&&i.push(xz()),e.history!==!1&&i.push(fq()),e.foldGutter!==!1&&i.push(_U()),e.drawSelection!==!1&&i.push(cz()),e.dropCursor!==!1&&i.push(gz()),e.allowMultipleSelections!==!1&&i.push(Ue.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(xU()),e.syntaxHighlighting!==!1&&i.push(x4(jU,{fallback:!0})),e.bracketMatching!==!1&&i.push(UU()),e.closeBrackets!==!1&&i.push(mG()),e.autocompletion!==!1&&i.push(RG()),e.rectangularSelection!==!1&&i.push(_z()),n!==!1&&i.push(Nz()),e.highlightActiveLine!==!1&&i.push(Rz()),e.highlightSelectionMatches!==!1&&i.push(wK()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Fh.of(" ".repeat(e.tabSize))),i.concat([Nh.of(r.flat())]).filter(Boolean)};const PG="#e5c07b",sw="#e06c75",WG="#56b6c2",zG="#ffffff",bu="#abb2bf",z1="#7d8799",UG="#61afef",qG="#98c379",aw="#d19a66",KG="#c678dd",GG="#21252b",lw="#2c313a",cw="#282c34",m0="#353a42",YG="#3E4451",uw="#528bff",XG=le.theme({"&":{color:bu,backgroundColor:cw},".cm-content":{caretColor:uw},".cm-cursor, .cm-dropCursor":{borderLeftColor:uw},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:YG},".cm-panels":{backgroundColor:GG,color:bu},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:cw,color:z1,border:"none"},".cm-activeLineGutter":{backgroundColor:lw},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:m0},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:m0,borderBottomColor:m0},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:lw,color:bu}}},{dark:!0}),ZG=xl.define([{tag:z.keyword,color:KG},{tag:[z.name,z.deleted,z.character,z.propertyName,z.macroName],color:sw},{tag:[z.function(z.variableName),z.labelName],color:UG},{tag:[z.color,z.constant(z.name),z.standard(z.name)],color:aw},{tag:[z.definition(z.name),z.separator],color:bu},{tag:[z.typeName,z.className,z.number,z.changed,z.annotation,z.modifier,z.self,z.namespace],color:PG},{tag:[z.operator,z.operatorKeyword,z.url,z.escape,z.regexp,z.link,z.special(z.string)],color:WG},{tag:[z.meta,z.comment],color:z1},{tag:z.strong,fontWeight:"bold"},{tag:z.emphasis,fontStyle:"italic"},{tag:z.strikethrough,textDecoration:"line-through"},{tag:z.link,color:z1,textDecoration:"underline"},{tag:z.heading,fontWeight:"bold",color:sw},{tag:[z.atom,z.bool,z.special(z.variableName)],color:aw},{tag:[z.processingInstruction,z.string,z.inserted],color:qG},{tag:z.invalid,color:zG}]),QG=[XG,x4(ZG)];var JG=le.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),eY=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,c=[];switch(n&&c.unshift(Nh.of([dK])),a&&(typeof a=="boolean"?c.unshift(ow()):c.unshift(ow(a))),s&&c.unshift(Ez(s)),o){case"light":c.push(JG);break;case"dark":c.push(QG);break;case"none":break;default:c.push(o);break}return r===!1&&c.push(le.editable.of(!1)),i&&c.push(Ue.readOnly.of(!0)),[...c]},tY=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),hw=Tr.define(),nY=[];function AC(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=nY,autoFocus:c,theme:h="light",height:f=null,minHeight:d=null,maxHeight:m=null,width:v=null,minWidth:x=null,maxWidth:w=null,placeholder:C="",editable:S=!0,readOnly:R=!1,indentWithTab:T=!0,basicSetup:E=!0,root:O,initialState:L}=t,[I,V]=b.useState(),[F,H]=b.useState(),[K,W]=b.useState(),J=le.theme({"&":{height:f,minHeight:d,maxHeight:m,width:v,minWidth:x,maxWidth:w},"& .cm-scroller":{height:"100% !important"}}),G=le.updateListener.of(te=>{if(te.docChanged&&typeof r=="function"&&!te.transactions.some(ce=>ce.annotation(hw))){var ne=te.state.doc,Y=ne.toString();r(Y,te)}i&&i(tY(te))}),re=eY({theme:h,editable:S,readOnly:R,placeholder:C,indentWithTab:T,basicSetup:E}),se=[G,J,...re];return s&&typeof s=="function"&&se.push(le.updateListener.of(s)),se=se.concat(a),b.useEffect(()=>{if(I&&!K){var te={doc:e,selection:n,extensions:se},ne=L?Ue.fromJSON(L.json,te,L.fields):Ue.create(te);if(W(ne),!F){var Y=new le({state:ne,parent:I,root:O});H(Y),o&&o(Y,ne)}}return()=>{F&&(W(void 0),H(void 0))}},[I,K]),b.useEffect(()=>V(t.container),[t.container]),b.useEffect(()=>()=>{F&&(F.destroy(),H(void 0))},[F]),b.useEffect(()=>{c&&F&&F.focus()},[c,F]),b.useEffect(()=>{F&&F.dispatch({effects:Ee.reconfigure.of(se)})},[h,a,f,d,m,v,x,w,C,S,R,T,E,r,s]),b.useEffect(()=>{if(e!==void 0){var te=F?F.state.doc.toString():"";F&&e!==te&&F.dispatch({changes:{from:0,to:te.length,insert:e||""},annotations:[hw.of(!0)]})}},[e,F]),{state:K,setState:W,view:F,setView:H,container:I,setContainer:V}}var rY=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],iY=b.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:c,onUpdate:h,autoFocus:f,theme:d="light",height:m,minHeight:v,maxHeight:x,width:w,minWidth:C,maxWidth:S,basicSetup:R,placeholder:T,indentWithTab:E,editable:O,readOnly:L,root:I,initialState:V}=t,F=nq(t,rY),H=b.useRef(null),{state:K,view:W,container:J}=AC({container:H.current,root:I,value:r,autoFocus:f,theme:d,height:m,minHeight:v,maxHeight:x,width:w,minWidth:C,maxWidth:S,basicSetup:R,placeholder:T,indentWithTab:E,editable:O,readOnly:L,selection:i,onChange:s,onStatistics:a,onCreateEditor:c,onUpdate:h,extensions:o,initialState:V});if(b.useImperativeHandle(e,()=>({editor:H.current,state:K,view:W}),[H,J,K,W]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var G=typeof d=="string"?"cm-theme-"+d:"cm-theme";return p.jsx("div",U({ref:H,className:""+G+(n?" "+n:"")},F))});iY.displayName="CodeMirror";let p0=new Map,U1=!1;try{U1=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let rh=!1;try{rh=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const RC={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class kC{format(e){let n="";if(!U1&&this.options.signDisplay!=null?n=sY(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!rh){var r;let{unit:i,unitDisplay:o="short",locale:s}=this.resolvedOptions();if(!i)return n;let a=(r=RC[i])===null||r===void 0?void 0:r[o];n+=a[s]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!U1&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!rh&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=oY(e,n),this.options=n}}function oY(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!rh){var r;let{unit:s,unitDisplay:a="short"}=e;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=RC[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let i=t+(e?Object.entries(e).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if(p0.has(i))return p0.get(i);let o=new Intl.NumberFormat(t,e);return p0.set(i,o),o}function sY(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=t.format(-n),o=t.format(n),s=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(s,"+").replace("!!!",o)}else return t.format(n)}}const aY=new RegExp("^.*\\(.*\\).*$"),lY=["latn","arab","hanidec"];class TC{parse(e){return v0(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,r){return v0(this.locale,this.options,e).isValidPartialNumber(e,n,r)}getNumberingSystem(e){return v0(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}}const fw=new Map;function v0(t,e,n){let r=dw(t,e);if(!t.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of lY)if(i!==r.options.numberingSystem){let o=dw(t+(t.includes("-u-")?"-nu-":"-u-nu-")+i,e);if(o.isValidPartialNumber(n))return o}}return r}function dw(t,e){let n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():""),r=fw.get(n);return r||(r=new cY(t,e),fw.set(n,r)),r}class cY{parse(e){let n=this.sanitize(e);if(this.symbols.group&&(n=tu(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=n.indexOf("-");n=n.replace("-","");let a=n.indexOf(".");a===-1&&(a=n.length),n=n.replace(".",""),a-2===0?n=`0.${n}`:a-2===-1?n=`0.0${n}`:a-2===-2?n="0.00":n=`${n.slice(0,a-2)}.${n.slice(a-2)}`,s>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var i,o;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)+2,20)};return new TC(this.locale,s).parse(new kC(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&aY.test(e)&&(r=-1*r),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=tu(e,".",this.symbols.group))),this.options.locale==="fr-FR"&&(e=tu(e,"."," ")),e}isValidPartialNumber(e,n=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=tu(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,n={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=hY(e,this.formatter,this.options,n);var r,i;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const gw=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),uY=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function hY(t,e,n,r){var i,o,s,a;let c=new Intl.NumberFormat(t,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),h=c.formatToParts(-10000.111),f=c.formatToParts(10000.111),d=uY.map(H=>c.formatToParts(H));var m;let v=(m=(i=h.find(H=>H.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&m!==void 0?m:"-",x=(o=f.find(H=>H.type==="plusSign"))===null||o===void 0?void 0:o.value;!x&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(x="+");let C=(s=new Intl.NumberFormat(t,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(H=>H.type==="decimal"))===null||s===void 0?void 0:s.value,S=(a=h.find(H=>H.type==="group"))===null||a===void 0?void 0:a.value,R=h.filter(H=>!gw.has(H.type)).map(H=>mw(H.value)),T=d.flatMap(H=>H.filter(K=>!gw.has(K.type)).map(K=>mw(K.value))),E=[...new Set([...R,...T])].sort((H,K)=>K.length-H.length),O=E.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${E.join("|")}|[\\p{White_Space}]`,"gu"),L=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),I=new Map(L.map((H,K)=>[H,K])),V=new RegExp(`[${L.join("")}]`,"g");return{minusSign:v,plusSign:x,decimal:C,group:S,literals:O,numeral:V,index:H=>String(I.get(H))}}function tu(t,e,n){return t.replaceAll?t.replaceAll(e,n):t.split(e).join(n)}function mw(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var MC=vh(),b0=function(){},Kh=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:b0,onWheelCapture:b0,onTouchMoveCapture:b0}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,m=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=Us(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,E=ph([n,e]),O=exports.__assign(exports.__assign({},R),i);return $.createElement($.Fragment,null,f&&$.createElement(T,{sideCar:MC,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},O),{ref:E})):$.createElement(S,exports.__assign({},O,{className:c,ref:E}),a))});Kh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kh.classNames={fullWidth:co,zeroRight:lo};var q1=!1;if(typeof window<"u")try{var nu=Object.defineProperty({},"passive",{get:function(){return q1=!0,!0}});window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch{q1=!1}var os=q1?{passive:!1}:!1,fY=function(t){return t.tagName==="TEXTAREA"},EC=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!fY(t)&&n[e]==="visible")},dY=function(t){return EC(t,"overflowY")},gY=function(t){return EC(t,"overflowX")},pw=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=OC(t,n);if(r){var i=DC(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},mY=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},pY=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},OC=function(t,e){return t==="v"?dY(e):gY(e)},DC=function(t,e){return t==="v"?mY(e):pY(e)},vY=function(t,e){return t==="h"&&e==="rtl"?-1:1},bY=function(t,e,n,r,i){var o=vY(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,m=0;do{var v=DC(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&OC(t,a)&&(d+=S,m+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&d===0||!f&&m===0)&&(h=!0),h},ru=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},vw=function(t){return[t.deltaX,t.deltaY]},bw=function(t){return t&&"current"in t?t.current:t},wY=function(t,e){return t[0]===e[0]&&t[1]===e[1]},xY=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},yY=0,ss=[];function CY(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(yY++)[0],o=$.useState(function(){return ul()})[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=mh([t.lockRef.current],(t.shards||[]).map(bw),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=ru(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=pw(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=pw(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return bY(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!ss.length||ss[ss.length-1]!==o)){var S="deltaY"in C?vw(C):ru(C),R=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&wY(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(bw).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=ru(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,vw(w),w.target,a(w,t.lockRef.current))},[]),m=$.useCallback(function(w){h(w.type,ru(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return ss.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,os),document.addEventListener("touchmove",c,os),document.addEventListener("touchstart",f,os),function(){ss=ss.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,os),document.removeEventListener("touchmove",c,os),document.removeEventListener("touchstart",f,os)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:xY(i)}):null,v?$.createElement(xh,{gapMode:"margin"}):null)}const $Y=bh(MC,CY);var IC=$.forwardRef(function(t,e){return $.createElement(Kh,exports.__assign({},t,{ref:e,sideCar:$Y}))});IC.classNames=Kh.classNames;const _C="Popover",[LC,pne]=bt(_C,[Ni]),Gh=Ni(),[SY,Do]=LC(_C),AY=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=t,a=Gh(e),c=b.useRef(null),[h,f]=b.useState(!1),[d=!1,m]=It({prop:r,defaultProp:i,onChange:o});return b.createElement(al,a,b.createElement(SY,{scope:e,contentId:_t(),triggerRef:c,open:d,onOpenChange:m,onOpenToggle:b.useCallback(()=>m(v=>!v),[m]),hasCustomAnchor:h,onCustomAnchorAdd:b.useCallback(()=>f(!0),[]),onCustomAnchorRemove:b.useCallback(()=>f(!1),[]),modal:s},n))},RY="PopoverAnchor",kY=b.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Do(RY,n),o=Gh(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return b.useEffect(()=>(s(),()=>a()),[s,a]),b.createElement(Hs,U({},o,r,{ref:e}))}),TY="PopoverTrigger",MY=b.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Do(TY,n),o=Gh(n),s=ye(e,i.triggerRef),a=b.createElement(ge.button,U({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jC(i.open)},r,{ref:s,onClick:ie(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:b.createElement(Hs,U({asChild:!0},o),a)}),BC="PopoverPortal",[EY,OY]=LC(BC,{forceMount:void 0}),DY=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,o=Do(BC,e);return b.createElement(EY,{scope:e,forceMount:n},b.createElement(Tt,{present:n||o.open},b.createElement(Ps,{asChild:!0,container:i},r)))},rl="PopoverContent",IY=b.forwardRef((t,e)=>{const n=OY(rl,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,o=Do(rl,t.__scopePopover);return b.createElement(Tt,{present:r||o.open},o.modal?b.createElement(_Y,U({},i,{ref:e})):b.createElement(LY,U({},i,{ref:e})))}),_Y=b.forwardRef((t,e)=>{const n=Do(rl,t.__scopePopover),r=b.useRef(null),i=ye(e,r),o=b.useRef(!1);return b.useEffect(()=>{const s=r.current;if(s)return em(s)},[]),b.createElement(IC,{as:Cr,allowPinchZoom:!0},b.createElement(NC,U({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(t.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:ie(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,h=a.button===2||c;o.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ie(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),LY=b.forwardRef((t,e)=>{const n=Do(rl,t.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return b.createElement(NC,U({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=t.onInteractOutside)===null||s===void 0||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),NC=b.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:h,onInteractOutside:f,...d}=t,m=Do(rl,n),v=Gh(n);return Ws(),b.createElement(zs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},b.createElement(ko,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:h,onDismiss:()=>m.onOpenChange(!1)},b.createElement(ll,U({"data-state":jC(m.open),role:"dialog",id:m.contentId},v,d,{ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function jC(t){return t?"open":"closed"}const BY=AY,NY=kY,jY=MY,FY=DY,VY=IY,FC="Progress",Yh=100,[HY,vne]=bt(FC),[PY,WY]=HY(FC),VC=b.forwardRef((t,e)=>{const{__scopeProgress:n,value:r,max:i,getValueLabel:o=qY,...s}=t,a=K1(i)?i:Yh,c=PC(r,a)?r:null,h=ih(c)?o(c,a):void 0;return b.createElement(PY,{scope:n,value:c,max:a},b.createElement(ge.div,U({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ih(c)?c:void 0,"aria-valuetext":h,role:"progressbar","data-state":HC(c,a),"data-value":c??void 0,"data-max":a},s,{ref:e})))});VC.propTypes={max(t,e,n){const r=t[e],i=String(r);return r&&!K1(r)?new Error(KY(i,n)):null},value(t,e,n){const r=t[e],i=String(r),o=K1(t.max)?t.max:Yh;return r!=null&&!PC(r,o)?new Error(GY(i,n)):null}};const zY="ProgressIndicator",UY=b.forwardRef((t,e)=>{var n;const{__scopeProgress:r,...i}=t,o=WY(zY,r);return b.createElement(ge.div,U({"data-state":HC(o.value,o.max),"data-value":(n=o.value)!==null&&n!==void 0?n:void 0,"data-max":o.max},i,{ref:e}))});function qY(t,e){return`${Math.round(t/e*100)}%`}function HC(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function ih(t){return typeof t=="number"}function K1(t){return ih(t)&&!isNaN(t)&&t>0}function PC(t,e){return ih(t)&&!isNaN(t)&&t<=e&&t>=0}function KY(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Yh}\`.`}function GY(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${Yh} if no \`max\` prop is set)
  - \`null\` if the progress is indeterminate.

Defaulting to \`null\`.`}const YY=VC,XY=UY,WC="Radio",[ZY,zC]=bt(WC),[QY,JY]=ZY(WC),eX=b.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:c,...h}=t,[f,d]=b.useState(null),m=ye(e,w=>d(w)),v=b.useRef(!1),x=f?!!f.closest("form"):!0;return b.createElement(QY,{scope:n,checked:i,disabled:s},b.createElement(ge.button,U({type:"button",role:"radio","aria-checked":i,"data-state":UC(i),"data-disabled":s?"":void 0,disabled:s,value:a},h,{ref:m,onClick:ie(t.onClick,w=>{i||c?.(),x&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),x&&b.createElement(rX,{control:f,bubbles:!v.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))}),tX="RadioIndicator",nX=b.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,o=JY(tX,n);return b.createElement(Tt,{present:r||o.checked},b.createElement(ge.span,U({"data-state":UC(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:e})))}),rX=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=b.useRef(null),s=$h(n),a=dh(e);return b.useEffect(()=>{const c=o.current,h=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[s,n,r]),b.createElement("input",U({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function UC(t){return t?"checked":"unchecked"}const iX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],qC="RadioGroup",[oX,bne]=bt(qC,[Ks,zC]),KC=Ks(),GC=zC(),[sX,aX]=oX(qC),lX=b.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:c,dir:h,loop:f=!0,onValueChange:d,...m}=t,v=KC(n),x=To(h),[w,C]=It({prop:o,defaultProp:i,onChange:d});return b.createElement(sX,{scope:n,name:r,required:s,disabled:a,value:w,onValueChange:C},b.createElement(Qg,U({asChild:!0},v,{orientation:c,dir:x,loop:f}),b.createElement(ge.div,U({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x},m,{ref:e}))))}),cX="RadioGroupItem",uX=b.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,o=aX(cX,n),s=o.disabled||r,a=KC(n),c=GC(n),h=b.useRef(null),f=ye(e,h),d=o.value===i.value,m=b.useRef(!1);return b.useEffect(()=>{const v=w=>{iX.includes(w.key)&&(m.current=!0)},x=()=>m.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),b.createElement(Jg,U({asChild:!0},a,{focusable:!s,active:d}),b.createElement(eX,U({disabled:s,required:o.required,checked:d},c,i,{name:o.name,ref:f,onCheck:()=>o.onValueChange(i.value),onKeyDown:ie(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:ie(i.onFocus,()=>{var v;m.current&&((v=h.current)===null||v===void 0||v.click())})})))}),hX=b.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=GC(n);return b.createElement(nX,U({},i,r,{ref:e}))}),fX=lX,dX=uX,gX=hX,YC="Switch",[mX,wne]=bt(YC),[pX,vX]=mX(YC),bX=b.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:h,...f}=t,[d,m]=b.useState(null),v=ye(e,R=>m(R)),x=b.useRef(!1),w=d?!!d.closest("form"):!0,[C=!1,S]=It({prop:i,defaultProp:o,onChange:h});return b.createElement(pX,{scope:n,checked:C,disabled:a},b.createElement(ge.button,U({type:"button",role:"switch","aria-checked":C,"aria-required":s,"data-state":XC(C),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:v,onClick:ie(t.onClick,R=>{S(T=>!T),w&&(x.current=R.isPropagationStopped(),x.current||R.stopPropagation())})})),w&&b.createElement(yX,{control:d,bubbles:!x.current,name:r,value:c,checked:C,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),wX="SwitchThumb",xX=b.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,i=vX(wX,n);return b.createElement(ge.span,U({"data-state":XC(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:e}))}),yX=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=b.useRef(null),s=$h(n),a=dh(e);return b.useEffect(()=>{const c=o.current,h=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&d){const m=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(m)}},[s,n,r]),b.createElement("input",U({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function XC(t){return t?"checked":"unchecked"}const CX=bX,$X=xX,ZC="Tabs",[SX,xne]=bt(ZC,[Ks]),QC=Ks(),[AX,Vm]=SX(ZC),RX=b.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:c="automatic",...h}=t,f=To(a),[d,m]=It({prop:r,onChange:i,defaultProp:o});return b.createElement(AX,{scope:n,baseId:_t(),value:d,onValueChange:m,orientation:s,dir:f,activationMode:c},b.createElement(ge.div,U({dir:f,"data-orientation":s},h,{ref:e})))}),kX="TabsList",TX=b.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,o=Vm(kX,n),s=QC(n);return b.createElement(Qg,U({asChild:!0},s,{orientation:o.orientation,dir:o.dir,loop:r}),b.createElement(ge.div,U({role:"tablist","aria-orientation":o.orientation},i,{ref:e})))}),MX="TabsTrigger",EX=b.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=t,s=Vm(MX,n),a=QC(n),c=JC(s.baseId,r),h=e$(s.baseId,r),f=r===s.value;return b.createElement(Jg,U({asChild:!0},a,{focusable:!i,active:f}),b.createElement(ge.button,U({type:"button",role:"tab","aria-selected":f,"aria-controls":h,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},o,{ref:e,onMouseDown:ie(t.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:ie(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:ie(t.onFocus,()=>{const d=s.activationMode!=="manual";!f&&!i&&d&&s.onValueChange(r)})})))}),OX="TabsContent",DX=b.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=t,a=Vm(OX,n),c=JC(a.baseId,r),h=e$(a.baseId,r),f=r===a.value,d=b.useRef(f);return b.useEffect(()=>{const m=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(m)},[]),b.createElement(Tt,{present:i||f},({present:m})=>b.createElement(ge.div,U({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:h,tabIndex:0},s,{ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0}}),m&&o))});function JC(t,e){return`${t}-trigger-${e}`}function e$(t,e){return`${t}-content-${e}`}const IX=RX,_X=TX,LX=EX,BX=DX;var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function NX(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function jX(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var oh={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */oh.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",d=1,m=2,v=4,x=1,w=2,C=1,S=2,R=4,T=8,E=16,O=32,L=64,I=128,V=256,F=512,H=30,K="...",W=800,J=16,G=1,re=2,se=3,te=1/0,ne=9007199254740991,Y=17976931348623157e292,ce=NaN,me=4294967295,Ie=me-1,we=me>>>1,qe=[["ary",I],["bind",C],["bindKey",S],["curry",T],["curryRight",E],["flip",F],["partial",O],["partialRight",L],["rearg",V]],Te="[object Arguments]",Ve="[object Array]",pe="[object AsyncFunction]",De="[object Boolean]",Re="[object Date]",Le="[object DOMException]",Ae="[object Error]",He="[object Function]",wt="[object GeneratorFunction]",Ze="[object Map]",Pe="[object Number]",Yt="[object Null]",ft="[object Object]",_o="[object Promise]",Qs="[object Proxy]",or="[object RegExp]",Mt="[object Set]",li="[object String]",ci="[object Symbol]",Lo="[object Undefined]",Wi="[object WeakMap]",Js="[object WeakSet]",zi="[object ArrayBuffer]",ui="[object DataView]",Ui="[object Float32Array]",Bt="[object Float64Array]",of="[object Int8Array]",sf="[object Int16Array]",af="[object Int32Array]",lf="[object Uint8Array]",cf="[object Uint8ClampedArray]",uf="[object Uint16Array]",hf="[object Uint32Array]",J$=/\b__p \+= '';/g,e8=/\b(__p \+=) '' \+/g,t8=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qm=/&(?:amp|lt|gt|quot|#39);/g,Jm=/[&<>"']/g,n8=RegExp(Qm.source),r8=RegExp(Jm.source),i8=/<%-([\s\S]+?)%>/g,o8=/<%([\s\S]+?)%>/g,ep=/<%=([\s\S]+?)%>/g,s8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a8=/^\w*$/,l8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ff=/[\\^$.*+?()[\]{}|]/g,c8=RegExp(ff.source),df=/^\s+/,u8=/\s/,h8=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f8=/\{\n\/\* \[wrapped with (.+)\] \*/,d8=/,? & /,g8=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,m8=/[()=,{}\[\]\/\s]/,p8=/\\(\\)?/g,v8=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tp=/\w*$/,b8=/^[-+]0x[0-9a-f]+$/i,w8=/^0b[01]+$/i,x8=/^\[object .+?Constructor\]$/,y8=/^0o[0-7]+$/i,C8=/^(?:0|[1-9]\d*)$/,$8=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tl=/($^)/,S8=/['\n\r\u2028\u2029\\]/g,Ml="\\ud800-\\udfff",A8="\\u0300-\\u036f",R8="\\ufe20-\\ufe2f",k8="\\u20d0-\\u20ff",np=A8+R8+k8,rp="\\u2700-\\u27bf",ip="a-z\\xdf-\\xf6\\xf8-\\xff",T8="\\xac\\xb1\\xd7\\xf7",M8="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",E8="\\u2000-\\u206f",O8=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",op="A-Z\\xc0-\\xd6\\xd8-\\xde",sp="\\ufe0e\\ufe0f",ap=T8+M8+E8+O8,gf="['’]",D8="["+Ml+"]",lp="["+ap+"]",El="["+np+"]",cp="\\d+",I8="["+rp+"]",up="["+ip+"]",hp="[^"+Ml+ap+cp+rp+ip+op+"]",mf="\\ud83c[\\udffb-\\udfff]",_8="(?:"+El+"|"+mf+")",fp="[^"+Ml+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",vf="[\\ud800-\\udbff][\\udc00-\\udfff]",Bo="["+op+"]",dp="\\u200d",gp="(?:"+up+"|"+hp+")",L8="(?:"+Bo+"|"+hp+")",mp="(?:"+gf+"(?:d|ll|m|re|s|t|ve))?",pp="(?:"+gf+"(?:D|LL|M|RE|S|T|VE))?",vp=_8+"?",bp="["+sp+"]?",B8="(?:"+dp+"(?:"+[fp,pf,vf].join("|")+")"+bp+vp+")*",N8="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",j8="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wp=bp+vp+B8,F8="(?:"+[I8,pf,vf].join("|")+")"+wp,V8="(?:"+[fp+El+"?",El,pf,vf,D8].join("|")+")",H8=RegExp(gf,"g"),P8=RegExp(El,"g"),bf=RegExp(mf+"(?="+mf+")|"+V8+wp,"g"),W8=RegExp([Bo+"?"+up+"+"+mp+"(?="+[lp,Bo,"$"].join("|")+")",L8+"+"+pp+"(?="+[lp,Bo+gp,"$"].join("|")+")",Bo+"?"+gp+"+"+mp,Bo+"+"+pp,j8,N8,cp,F8].join("|"),"g"),z8=RegExp("["+dp+Ml+np+sp+"]"),U8=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,q8=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],K8=-1,it={};it[Ui]=it[Bt]=it[of]=it[sf]=it[af]=it[lf]=it[cf]=it[uf]=it[hf]=!0,it[Te]=it[Ve]=it[zi]=it[De]=it[ui]=it[Re]=it[Ae]=it[He]=it[Ze]=it[Pe]=it[ft]=it[or]=it[Mt]=it[li]=it[Wi]=!1;var rt={};rt[Te]=rt[Ve]=rt[zi]=rt[ui]=rt[De]=rt[Re]=rt[Ui]=rt[Bt]=rt[of]=rt[sf]=rt[af]=rt[Ze]=rt[Pe]=rt[ft]=rt[or]=rt[Mt]=rt[li]=rt[ci]=rt[lf]=rt[cf]=rt[uf]=rt[hf]=!0,rt[Ae]=rt[He]=rt[Wi]=!1;var G8={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Y8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},X8={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Z8={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Q8=parseFloat,J8=parseInt,xp=typeof cs=="object"&&cs&&cs.Object===Object&&cs,e7=typeof self=="object"&&self&&self.Object===Object&&self,Nt=xp||e7||Function("return this")(),wf=e&&!e.nodeType&&e,qi=wf&&!0&&t&&!t.nodeType&&t,yp=qi&&qi.exports===wf,xf=yp&&xp.process,Mn=function(){try{var N=qi&&qi.require&&qi.require("util").types;return N||xf&&xf.binding&&xf.binding("util")}catch{}}(),Cp=Mn&&Mn.isArrayBuffer,$p=Mn&&Mn.isDate,Sp=Mn&&Mn.isMap,Ap=Mn&&Mn.isRegExp,Rp=Mn&&Mn.isSet,kp=Mn&&Mn.isTypedArray;function pn(N,q,P){switch(P.length){case 0:return N.call(q);case 1:return N.call(q,P[0]);case 2:return N.call(q,P[0],P[1]);case 3:return N.call(q,P[0],P[1],P[2])}return N.apply(q,P)}function t7(N,q,P,de){for(var Me=-1,Ye=N==null?0:N.length;++Me<Ye;){var $t=N[Me];q(de,$t,P($t),N)}return de}function En(N,q){for(var P=-1,de=N==null?0:N.length;++P<de&&q(N[P],P,N)!==!1;);return N}function n7(N,q){for(var P=N==null?0:N.length;P--&&q(N[P],P,N)!==!1;);return N}function Tp(N,q){for(var P=-1,de=N==null?0:N.length;++P<de;)if(!q(N[P],P,N))return!1;return!0}function hi(N,q){for(var P=-1,de=N==null?0:N.length,Me=0,Ye=[];++P<de;){var $t=N[P];q($t,P,N)&&(Ye[Me++]=$t)}return Ye}function Ol(N,q){var P=N==null?0:N.length;return!!P&&No(N,q,0)>-1}function yf(N,q,P){for(var de=-1,Me=N==null?0:N.length;++de<Me;)if(P(q,N[de]))return!0;return!1}function at(N,q){for(var P=-1,de=N==null?0:N.length,Me=Array(de);++P<de;)Me[P]=q(N[P],P,N);return Me}function fi(N,q){for(var P=-1,de=q.length,Me=N.length;++P<de;)N[Me+P]=q[P];return N}function Cf(N,q,P,de){var Me=-1,Ye=N==null?0:N.length;for(de&&Ye&&(P=N[++Me]);++Me<Ye;)P=q(P,N[Me],Me,N);return P}function r7(N,q,P,de){var Me=N==null?0:N.length;for(de&&Me&&(P=N[--Me]);Me--;)P=q(P,N[Me],Me,N);return P}function $f(N,q){for(var P=-1,de=N==null?0:N.length;++P<de;)if(q(N[P],P,N))return!0;return!1}var i7=Sf("length");function o7(N){return N.split("")}function s7(N){return N.match(g8)||[]}function Mp(N,q,P){var de;return P(N,function(Me,Ye,$t){if(q(Me,Ye,$t))return de=Ye,!1}),de}function Dl(N,q,P,de){for(var Me=N.length,Ye=P+(de?1:-1);de?Ye--:++Ye<Me;)if(q(N[Ye],Ye,N))return Ye;return-1}function No(N,q,P){return q===q?b7(N,q,P):Dl(N,Ep,P)}function a7(N,q,P,de){for(var Me=P-1,Ye=N.length;++Me<Ye;)if(de(N[Me],q))return Me;return-1}function Ep(N){return N!==N}function Op(N,q){var P=N==null?0:N.length;return P?Rf(N,q)/P:ce}function Sf(N){return function(q){return q==null?n:q[N]}}function Af(N){return function(q){return N==null?n:N[q]}}function Dp(N,q,P,de,Me){return Me(N,function(Ye,$t,Je){P=de?(de=!1,Ye):q(P,Ye,$t,Je)}),P}function l7(N,q){var P=N.length;for(N.sort(q);P--;)N[P]=N[P].value;return N}function Rf(N,q){for(var P,de=-1,Me=N.length;++de<Me;){var Ye=q(N[de]);Ye!==n&&(P=P===n?Ye:P+Ye)}return P}function kf(N,q){for(var P=-1,de=Array(N);++P<N;)de[P]=q(P);return de}function c7(N,q){return at(q,function(P){return[P,N[P]]})}function Ip(N){return N&&N.slice(0,Np(N)+1).replace(df,"")}function vn(N){return function(q){return N(q)}}function Tf(N,q){return at(q,function(P){return N[P]})}function ea(N,q){return N.has(q)}function _p(N,q){for(var P=-1,de=N.length;++P<de&&No(q,N[P],0)>-1;);return P}function Lp(N,q){for(var P=N.length;P--&&No(q,N[P],0)>-1;);return P}function u7(N,q){for(var P=N.length,de=0;P--;)N[P]===q&&++de;return de}var h7=Af(G8),f7=Af(Y8);function d7(N){return"\\"+Z8[N]}function g7(N,q){return N==null?n:N[q]}function jo(N){return z8.test(N)}function m7(N){return U8.test(N)}function p7(N){for(var q,P=[];!(q=N.next()).done;)P.push(q.value);return P}function Mf(N){var q=-1,P=Array(N.size);return N.forEach(function(de,Me){P[++q]=[Me,de]}),P}function Bp(N,q){return function(P){return N(q(P))}}function di(N,q){for(var P=-1,de=N.length,Me=0,Ye=[];++P<de;){var $t=N[P];($t===q||$t===f)&&(N[P]=f,Ye[Me++]=P)}return Ye}function Il(N){var q=-1,P=Array(N.size);return N.forEach(function(de){P[++q]=de}),P}function v7(N){var q=-1,P=Array(N.size);return N.forEach(function(de){P[++q]=[de,de]}),P}function b7(N,q,P){for(var de=P-1,Me=N.length;++de<Me;)if(N[de]===q)return de;return-1}function w7(N,q,P){for(var de=P+1;de--;)if(N[de]===q)return de;return de}function Fo(N){return jo(N)?y7(N):i7(N)}function Wn(N){return jo(N)?C7(N):o7(N)}function Np(N){for(var q=N.length;q--&&u8.test(N.charAt(q)););return q}var x7=Af(X8);function y7(N){for(var q=bf.lastIndex=0;bf.test(N);)++q;return q}function C7(N){return N.match(bf)||[]}function $7(N){return N.match(W8)||[]}var S7=function N(q){q=q==null?Nt:Vo.defaults(Nt.Object(),q,Vo.pick(Nt,q8));var P=q.Array,de=q.Date,Me=q.Error,Ye=q.Function,$t=q.Math,Je=q.Object,Ef=q.RegExp,A7=q.String,On=q.TypeError,_l=P.prototype,R7=Ye.prototype,Ho=Je.prototype,Ll=q["__core-js_shared__"],Bl=R7.toString,Qe=Ho.hasOwnProperty,k7=0,jp=function(){var l=/[^.]+$/.exec(Ll&&Ll.keys&&Ll.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Nl=Ho.toString,T7=Bl.call(Je),M7=Nt._,E7=Ef("^"+Bl.call(Qe).replace(ff,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jl=yp?q.Buffer:n,gi=q.Symbol,Fl=q.Uint8Array,Fp=jl?jl.allocUnsafe:n,Vl=Bp(Je.getPrototypeOf,Je),Vp=Je.create,Hp=Ho.propertyIsEnumerable,Hl=_l.splice,Pp=gi?gi.isConcatSpreadable:n,ta=gi?gi.iterator:n,Ki=gi?gi.toStringTag:n,Pl=function(){try{var l=Qi(Je,"defineProperty");return l({},"",{}),l}catch{}}(),O7=q.clearTimeout!==Nt.clearTimeout&&q.clearTimeout,D7=de&&de.now!==Nt.Date.now&&de.now,I7=q.setTimeout!==Nt.setTimeout&&q.setTimeout,Wl=$t.ceil,zl=$t.floor,Of=Je.getOwnPropertySymbols,_7=jl?jl.isBuffer:n,Wp=q.isFinite,L7=_l.join,B7=Bp(Je.keys,Je),St=$t.max,Pt=$t.min,N7=de.now,j7=q.parseInt,zp=$t.random,F7=_l.reverse,Df=Qi(q,"DataView"),na=Qi(q,"Map"),If=Qi(q,"Promise"),Po=Qi(q,"Set"),ra=Qi(q,"WeakMap"),ia=Qi(Je,"create"),Ul=ra&&new ra,Wo={},V7=Ji(Df),H7=Ji(na),P7=Ji(If),W7=Ji(Po),z7=Ji(ra),ql=gi?gi.prototype:n,oa=ql?ql.valueOf:n,Up=ql?ql.toString:n;function M(l){if(ht(l)&&!Oe(l)&&!(l instanceof We)){if(l instanceof Dn)return l;if(Qe.call(l,"__wrapped__"))return q2(l)}return new Dn(l)}var zo=function(){function l(){}return function(u){if(!ct(u))return{};if(Vp)return Vp(u);l.prototype=u;var g=new l;return l.prototype=n,g}}();function Kl(){}function Dn(l,u){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=n}M.templateSettings={escape:i8,evaluate:o8,interpolate:ep,variable:"",imports:{_:M}},M.prototype=Kl.prototype,M.prototype.constructor=M,Dn.prototype=zo(Kl.prototype),Dn.prototype.constructor=Dn;function We(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=me,this.__views__=[]}function U7(){var l=new We(this.__wrapped__);return l.__actions__=rn(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=rn(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=rn(this.__views__),l}function q7(){if(this.__filtered__){var l=new We(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function K7(){var l=this.__wrapped__.value(),u=this.__dir__,g=Oe(l),y=u<0,A=g?l.length:0,D=o9(0,A,this.__views__),_=D.start,B=D.end,j=B-_,X=y?B:_-1,Z=this.__iteratees__,ee=Z.length,ae=0,ve=Pt(j,this.__takeCount__);if(!g||!y&&A==j&&ve==j)return m2(l,this.__actions__);var $e=[];e:for(;j--&&ae<ve;){X+=u;for(var Be=-1,Se=l[X];++Be<ee;){var Fe=Z[Be],ze=Fe.iteratee,xn=Fe.type,Qt=ze(Se);if(xn==re)Se=Qt;else if(!Qt){if(xn==G)continue e;break e}}$e[ae++]=Se}return $e}We.prototype=zo(Kl.prototype),We.prototype.constructor=We;function Gi(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var y=l[u];this.set(y[0],y[1])}}function G7(){this.__data__=ia?ia(null):{},this.size=0}function Y7(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function X7(l){var u=this.__data__;if(ia){var g=u[l];return g===c?n:g}return Qe.call(u,l)?u[l]:n}function Z7(l){var u=this.__data__;return ia?u[l]!==n:Qe.call(u,l)}function Q7(l,u){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=ia&&u===n?c:u,this}Gi.prototype.clear=G7,Gi.prototype.delete=Y7,Gi.prototype.get=X7,Gi.prototype.has=Z7,Gi.prototype.set=Q7;function Or(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var y=l[u];this.set(y[0],y[1])}}function J7(){this.__data__=[],this.size=0}function eS(l){var u=this.__data__,g=Gl(u,l);if(g<0)return!1;var y=u.length-1;return g==y?u.pop():Hl.call(u,g,1),--this.size,!0}function tS(l){var u=this.__data__,g=Gl(u,l);return g<0?n:u[g][1]}function nS(l){return Gl(this.__data__,l)>-1}function rS(l,u){var g=this.__data__,y=Gl(g,l);return y<0?(++this.size,g.push([l,u])):g[y][1]=u,this}Or.prototype.clear=J7,Or.prototype.delete=eS,Or.prototype.get=tS,Or.prototype.has=nS,Or.prototype.set=rS;function Dr(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var y=l[u];this.set(y[0],y[1])}}function iS(){this.size=0,this.__data__={hash:new Gi,map:new(na||Or),string:new Gi}}function oS(l){var u=sc(this,l).delete(l);return this.size-=u?1:0,u}function sS(l){return sc(this,l).get(l)}function aS(l){return sc(this,l).has(l)}function lS(l,u){var g=sc(this,l),y=g.size;return g.set(l,u),this.size+=g.size==y?0:1,this}Dr.prototype.clear=iS,Dr.prototype.delete=oS,Dr.prototype.get=sS,Dr.prototype.has=aS,Dr.prototype.set=lS;function Yi(l){var u=-1,g=l==null?0:l.length;for(this.__data__=new Dr;++u<g;)this.add(l[u])}function cS(l){return this.__data__.set(l,c),this}function uS(l){return this.__data__.has(l)}Yi.prototype.add=Yi.prototype.push=cS,Yi.prototype.has=uS;function zn(l){var u=this.__data__=new Or(l);this.size=u.size}function hS(){this.__data__=new Or,this.size=0}function fS(l){var u=this.__data__,g=u.delete(l);return this.size=u.size,g}function dS(l){return this.__data__.get(l)}function gS(l){return this.__data__.has(l)}function mS(l,u){var g=this.__data__;if(g instanceof Or){var y=g.__data__;if(!na||y.length<i-1)return y.push([l,u]),this.size=++g.size,this;g=this.__data__=new Dr(y)}return g.set(l,u),this.size=g.size,this}zn.prototype.clear=hS,zn.prototype.delete=fS,zn.prototype.get=dS,zn.prototype.has=gS,zn.prototype.set=mS;function qp(l,u){var g=Oe(l),y=!g&&eo(l),A=!g&&!y&&wi(l),D=!g&&!y&&!A&&Go(l),_=g||y||A||D,B=_?kf(l.length,A7):[],j=B.length;for(var X in l)(u||Qe.call(l,X))&&!(_&&(X=="length"||A&&(X=="offset"||X=="parent")||D&&(X=="buffer"||X=="byteLength"||X=="byteOffset")||Br(X,j)))&&B.push(X);return B}function Kp(l){var u=l.length;return u?l[zf(0,u-1)]:n}function pS(l,u){return ac(rn(l),Xi(u,0,l.length))}function vS(l){return ac(rn(l))}function _f(l,u,g){(g!==n&&!Un(l[u],g)||g===n&&!(u in l))&&Ir(l,u,g)}function sa(l,u,g){var y=l[u];(!(Qe.call(l,u)&&Un(y,g))||g===n&&!(u in l))&&Ir(l,u,g)}function Gl(l,u){for(var g=l.length;g--;)if(Un(l[g][0],u))return g;return-1}function bS(l,u,g,y){return mi(l,function(A,D,_){u(y,A,g(A),_)}),y}function Gp(l,u){return l&&ar(u,Et(u),l)}function wS(l,u){return l&&ar(u,sn(u),l)}function Ir(l,u,g){u=="__proto__"&&Pl?Pl(l,u,{configurable:!0,enumerable:!0,value:g,writable:!0}):l[u]=g}function Lf(l,u){for(var g=-1,y=u.length,A=P(y),D=l==null;++g<y;)A[g]=D?n:md(l,u[g]);return A}function Xi(l,u,g){return l===l&&(g!==n&&(l=l<=g?l:g),u!==n&&(l=l>=u?l:u)),l}function In(l,u,g,y,A,D){var _,B=u&d,j=u&m,X=u&v;if(g&&(_=A?g(l,y,A,D):g(l)),_!==n)return _;if(!ct(l))return l;var Z=Oe(l);if(Z){if(_=a9(l),!B)return rn(l,_)}else{var ee=Wt(l),ae=ee==He||ee==wt;if(wi(l))return b2(l,B);if(ee==ft||ee==Te||ae&&!A){if(_=j||ae?{}:N2(l),!B)return j?XS(l,wS(_,l)):YS(l,Gp(_,l))}else{if(!rt[ee])return A?l:{};_=l9(l,ee,B)}}D||(D=new zn);var ve=D.get(l);if(ve)return ve;D.set(l,_),fv(l)?l.forEach(function(Se){_.add(In(Se,u,g,Se,l,D))}):uv(l)&&l.forEach(function(Se,Fe){_.set(Fe,In(Se,u,g,Fe,l,D))});var $e=X?j?td:ed:j?sn:Et,Be=Z?n:$e(l);return En(Be||l,function(Se,Fe){Be&&(Fe=Se,Se=l[Fe]),sa(_,Fe,In(Se,u,g,Fe,l,D))}),_}function xS(l){var u=Et(l);return function(g){return Yp(g,l,u)}}function Yp(l,u,g){var y=g.length;if(l==null)return!y;for(l=Je(l);y--;){var A=g[y],D=u[A],_=l[A];if(_===n&&!(A in l)||!D(_))return!1}return!0}function Xp(l,u,g){if(typeof l!="function")throw new On(s);return da(function(){l.apply(n,g)},u)}function aa(l,u,g,y){var A=-1,D=Ol,_=!0,B=l.length,j=[],X=u.length;if(!B)return j;g&&(u=at(u,vn(g))),y?(D=yf,_=!1):u.length>=i&&(D=ea,_=!1,u=new Yi(u));e:for(;++A<B;){var Z=l[A],ee=g==null?Z:g(Z);if(Z=y||Z!==0?Z:0,_&&ee===ee){for(var ae=X;ae--;)if(u[ae]===ee)continue e;j.push(Z)}else D(u,ee,y)||j.push(Z)}return j}var mi=$2(sr),Zp=$2(Nf,!0);function yS(l,u){var g=!0;return mi(l,function(y,A,D){return g=!!u(y,A,D),g}),g}function Yl(l,u,g){for(var y=-1,A=l.length;++y<A;){var D=l[y],_=u(D);if(_!=null&&(B===n?_===_&&!wn(_):g(_,B)))var B=_,j=D}return j}function CS(l,u,g,y){var A=l.length;for(g=_e(g),g<0&&(g=-g>A?0:A+g),y=y===n||y>A?A:_e(y),y<0&&(y+=A),y=g>y?0:gv(y);g<y;)l[g++]=u;return l}function Qp(l,u){var g=[];return mi(l,function(y,A,D){u(y,A,D)&&g.push(y)}),g}function jt(l,u,g,y,A){var D=-1,_=l.length;for(g||(g=u9),A||(A=[]);++D<_;){var B=l[D];u>0&&g(B)?u>1?jt(B,u-1,g,y,A):fi(A,B):y||(A[A.length]=B)}return A}var Bf=S2(),Jp=S2(!0);function sr(l,u){return l&&Bf(l,u,Et)}function Nf(l,u){return l&&Jp(l,u,Et)}function Xl(l,u){return hi(u,function(g){return Nr(l[g])})}function Zi(l,u){u=vi(u,l);for(var g=0,y=u.length;l!=null&&g<y;)l=l[lr(u[g++])];return g&&g==y?l:n}function e2(l,u,g){var y=u(l);return Oe(l)?y:fi(y,g(l))}function Xt(l){return l==null?l===n?Lo:Yt:Ki&&Ki in Je(l)?i9(l):v9(l)}function jf(l,u){return l>u}function $S(l,u){return l!=null&&Qe.call(l,u)}function SS(l,u){return l!=null&&u in Je(l)}function AS(l,u,g){return l>=Pt(u,g)&&l<St(u,g)}function Ff(l,u,g){for(var y=g?yf:Ol,A=l[0].length,D=l.length,_=D,B=P(D),j=1/0,X=[];_--;){var Z=l[_];_&&u&&(Z=at(Z,vn(u))),j=Pt(Z.length,j),B[_]=!g&&(u||A>=120&&Z.length>=120)?new Yi(_&&Z):n}Z=l[0];var ee=-1,ae=B[0];e:for(;++ee<A&&X.length<j;){var ve=Z[ee],$e=u?u(ve):ve;if(ve=g||ve!==0?ve:0,!(ae?ea(ae,$e):y(X,$e,g))){for(_=D;--_;){var Be=B[_];if(!(Be?ea(Be,$e):y(l[_],$e,g)))continue e}ae&&ae.push($e),X.push(ve)}}return X}function RS(l,u,g,y){return sr(l,function(A,D,_){u(y,g(A),D,_)}),y}function la(l,u,g){u=vi(u,l),l=H2(l,u);var y=l==null?l:l[lr(Ln(u))];return y==null?n:pn(y,l,g)}function t2(l){return ht(l)&&Xt(l)==Te}function kS(l){return ht(l)&&Xt(l)==zi}function TS(l){return ht(l)&&Xt(l)==Re}function ca(l,u,g,y,A){return l===u?!0:l==null||u==null||!ht(l)&&!ht(u)?l!==l&&u!==u:MS(l,u,g,y,ca,A)}function MS(l,u,g,y,A,D){var _=Oe(l),B=Oe(u),j=_?Ve:Wt(l),X=B?Ve:Wt(u);j=j==Te?ft:j,X=X==Te?ft:X;var Z=j==ft,ee=X==ft,ae=j==X;if(ae&&wi(l)){if(!wi(u))return!1;_=!0,Z=!1}if(ae&&!Z)return D||(D=new zn),_||Go(l)?_2(l,u,g,y,A,D):n9(l,u,j,g,y,A,D);if(!(g&x)){var ve=Z&&Qe.call(l,"__wrapped__"),$e=ee&&Qe.call(u,"__wrapped__");if(ve||$e){var Be=ve?l.value():l,Se=$e?u.value():u;return D||(D=new zn),A(Be,Se,g,y,D)}}return ae?(D||(D=new zn),r9(l,u,g,y,A,D)):!1}function ES(l){return ht(l)&&Wt(l)==Ze}function Vf(l,u,g,y){var A=g.length,D=A,_=!y;if(l==null)return!D;for(l=Je(l);A--;){var B=g[A];if(_&&B[2]?B[1]!==l[B[0]]:!(B[0]in l))return!1}for(;++A<D;){B=g[A];var j=B[0],X=l[j],Z=B[1];if(_&&B[2]){if(X===n&&!(j in l))return!1}else{var ee=new zn;if(y)var ae=y(X,Z,j,l,u,ee);if(!(ae===n?ca(Z,X,x|w,y,ee):ae))return!1}}return!0}function n2(l){if(!ct(l)||f9(l))return!1;var u=Nr(l)?E7:x8;return u.test(Ji(l))}function OS(l){return ht(l)&&Xt(l)==or}function DS(l){return ht(l)&&Wt(l)==Mt}function IS(l){return ht(l)&&dc(l.length)&&!!it[Xt(l)]}function r2(l){return typeof l=="function"?l:l==null?an:typeof l=="object"?Oe(l)?s2(l[0],l[1]):o2(l):Av(l)}function Hf(l){if(!fa(l))return B7(l);var u=[];for(var g in Je(l))Qe.call(l,g)&&g!="constructor"&&u.push(g);return u}function _S(l){if(!ct(l))return p9(l);var u=fa(l),g=[];for(var y in l)y=="constructor"&&(u||!Qe.call(l,y))||g.push(y);return g}function Pf(l,u){return l<u}function i2(l,u){var g=-1,y=on(l)?P(l.length):[];return mi(l,function(A,D,_){y[++g]=u(A,D,_)}),y}function o2(l){var u=rd(l);return u.length==1&&u[0][2]?F2(u[0][0],u[0][1]):function(g){return g===l||Vf(g,l,u)}}function s2(l,u){return od(l)&&j2(u)?F2(lr(l),u):function(g){var y=md(g,l);return y===n&&y===u?pd(g,l):ca(u,y,x|w)}}function Zl(l,u,g,y,A){l!==u&&Bf(u,function(D,_){if(A||(A=new zn),ct(D))LS(l,u,_,g,Zl,y,A);else{var B=y?y(ad(l,_),D,_+"",l,u,A):n;B===n&&(B=D),_f(l,_,B)}},sn)}function LS(l,u,g,y,A,D,_){var B=ad(l,g),j=ad(u,g),X=_.get(j);if(X){_f(l,g,X);return}var Z=D?D(B,j,g+"",l,u,_):n,ee=Z===n;if(ee){var ae=Oe(j),ve=!ae&&wi(j),$e=!ae&&!ve&&Go(j);Z=j,ae||ve||$e?Oe(B)?Z=B:dt(B)?Z=rn(B):ve?(ee=!1,Z=b2(j,!0)):$e?(ee=!1,Z=w2(j,!0)):Z=[]:ga(j)||eo(j)?(Z=B,eo(B)?Z=mv(B):(!ct(B)||Nr(B))&&(Z=N2(j))):ee=!1}ee&&(_.set(j,Z),A(Z,j,y,D,_),_.delete(j)),_f(l,g,Z)}function a2(l,u){var g=l.length;if(g)return u+=u<0?g:0,Br(u,g)?l[u]:n}function l2(l,u,g){u.length?u=at(u,function(D){return Oe(D)?function(_){return Zi(_,D.length===1?D[0]:D)}:D}):u=[an];var y=-1;u=at(u,vn(Ce()));var A=i2(l,function(D,_,B){var j=at(u,function(X){return X(D)});return{criteria:j,index:++y,value:D}});return l7(A,function(D,_){return GS(D,_,g)})}function BS(l,u){return c2(l,u,function(g,y){return pd(l,y)})}function c2(l,u,g){for(var y=-1,A=u.length,D={};++y<A;){var _=u[y],B=Zi(l,_);g(B,_)&&ua(D,vi(_,l),B)}return D}function NS(l){return function(u){return Zi(u,l)}}function Wf(l,u,g,y){var A=y?a7:No,D=-1,_=u.length,B=l;for(l===u&&(u=rn(u)),g&&(B=at(l,vn(g)));++D<_;)for(var j=0,X=u[D],Z=g?g(X):X;(j=A(B,Z,j,y))>-1;)B!==l&&Hl.call(B,j,1),Hl.call(l,j,1);return l}function u2(l,u){for(var g=l?u.length:0,y=g-1;g--;){var A=u[g];if(g==y||A!==D){var D=A;Br(A)?Hl.call(l,A,1):Kf(l,A)}}return l}function zf(l,u){return l+zl(zp()*(u-l+1))}function jS(l,u,g,y){for(var A=-1,D=St(Wl((u-l)/(g||1)),0),_=P(D);D--;)_[y?D:++A]=l,l+=g;return _}function Uf(l,u){var g="";if(!l||u<1||u>ne)return g;do u%2&&(g+=l),u=zl(u/2),u&&(l+=l);while(u);return g}function Ne(l,u){return ld(V2(l,u,an),l+"")}function FS(l){return Kp(Yo(l))}function VS(l,u){var g=Yo(l);return ac(g,Xi(u,0,g.length))}function ua(l,u,g,y){if(!ct(l))return l;u=vi(u,l);for(var A=-1,D=u.length,_=D-1,B=l;B!=null&&++A<D;){var j=lr(u[A]),X=g;if(j==="__proto__"||j==="constructor"||j==="prototype")return l;if(A!=_){var Z=B[j];X=y?y(Z,j,B):n,X===n&&(X=ct(Z)?Z:Br(u[A+1])?[]:{})}sa(B,j,X),B=B[j]}return l}var h2=Ul?function(l,u){return Ul.set(l,u),l}:an,HS=Pl?function(l,u){return Pl(l,"toString",{configurable:!0,enumerable:!1,value:bd(u),writable:!0})}:an;function PS(l){return ac(Yo(l))}function _n(l,u,g){var y=-1,A=l.length;u<0&&(u=-u>A?0:A+u),g=g>A?A:g,g<0&&(g+=A),A=u>g?0:g-u>>>0,u>>>=0;for(var D=P(A);++y<A;)D[y]=l[y+u];return D}function WS(l,u){var g;return mi(l,function(y,A,D){return g=u(y,A,D),!g}),!!g}function Ql(l,u,g){var y=0,A=l==null?y:l.length;if(typeof u=="number"&&u===u&&A<=we){for(;y<A;){var D=y+A>>>1,_=l[D];_!==null&&!wn(_)&&(g?_<=u:_<u)?y=D+1:A=D}return A}return qf(l,u,an,g)}function qf(l,u,g,y){var A=0,D=l==null?0:l.length;if(D===0)return 0;u=g(u);for(var _=u!==u,B=u===null,j=wn(u),X=u===n;A<D;){var Z=zl((A+D)/2),ee=g(l[Z]),ae=ee!==n,ve=ee===null,$e=ee===ee,Be=wn(ee);if(_)var Se=y||$e;else X?Se=$e&&(y||ae):B?Se=$e&&ae&&(y||!ve):j?Se=$e&&ae&&!ve&&(y||!Be):ve||Be?Se=!1:Se=y?ee<=u:ee<u;Se?A=Z+1:D=Z}return Pt(D,Ie)}function f2(l,u){for(var g=-1,y=l.length,A=0,D=[];++g<y;){var _=l[g],B=u?u(_):_;if(!g||!Un(B,j)){var j=B;D[A++]=_===0?0:_}}return D}function d2(l){return typeof l=="number"?l:wn(l)?ce:+l}function bn(l){if(typeof l=="string")return l;if(Oe(l))return at(l,bn)+"";if(wn(l))return Up?Up.call(l):"";var u=l+"";return u=="0"&&1/l==-te?"-0":u}function pi(l,u,g){var y=-1,A=Ol,D=l.length,_=!0,B=[],j=B;if(g)_=!1,A=yf;else if(D>=i){var X=u?null:e9(l);if(X)return Il(X);_=!1,A=ea,j=new Yi}else j=u?[]:B;e:for(;++y<D;){var Z=l[y],ee=u?u(Z):Z;if(Z=g||Z!==0?Z:0,_&&ee===ee){for(var ae=j.length;ae--;)if(j[ae]===ee)continue e;u&&j.push(ee),B.push(Z)}else A(j,ee,g)||(j!==B&&j.push(ee),B.push(Z))}return B}function Kf(l,u){return u=vi(u,l),l=H2(l,u),l==null||delete l[lr(Ln(u))]}function g2(l,u,g,y){return ua(l,u,g(Zi(l,u)),y)}function Jl(l,u,g,y){for(var A=l.length,D=y?A:-1;(y?D--:++D<A)&&u(l[D],D,l););return g?_n(l,y?0:D,y?D+1:A):_n(l,y?D+1:0,y?A:D)}function m2(l,u){var g=l;return g instanceof We&&(g=g.value()),Cf(u,function(y,A){return A.func.apply(A.thisArg,fi([y],A.args))},g)}function Gf(l,u,g){var y=l.length;if(y<2)return y?pi(l[0]):[];for(var A=-1,D=P(y);++A<y;)for(var _=l[A],B=-1;++B<y;)B!=A&&(D[A]=aa(D[A]||_,l[B],u,g));return pi(jt(D,1),u,g)}function p2(l,u,g){for(var y=-1,A=l.length,D=u.length,_={};++y<A;){var B=y<D?u[y]:n;g(_,l[y],B)}return _}function Yf(l){return dt(l)?l:[]}function Xf(l){return typeof l=="function"?l:an}function vi(l,u){return Oe(l)?l:od(l,u)?[l]:U2(Xe(l))}var zS=Ne;function bi(l,u,g){var y=l.length;return g=g===n?y:g,!u&&g>=y?l:_n(l,u,g)}var v2=O7||function(l){return Nt.clearTimeout(l)};function b2(l,u){if(u)return l.slice();var g=l.length,y=Fp?Fp(g):new l.constructor(g);return l.copy(y),y}function Zf(l){var u=new l.constructor(l.byteLength);return new Fl(u).set(new Fl(l)),u}function US(l,u){var g=u?Zf(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function qS(l){var u=new l.constructor(l.source,tp.exec(l));return u.lastIndex=l.lastIndex,u}function KS(l){return oa?Je(oa.call(l)):{}}function w2(l,u){var g=u?Zf(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function x2(l,u){if(l!==u){var g=l!==n,y=l===null,A=l===l,D=wn(l),_=u!==n,B=u===null,j=u===u,X=wn(u);if(!B&&!X&&!D&&l>u||D&&_&&j&&!B&&!X||y&&_&&j||!g&&j||!A)return 1;if(!y&&!D&&!X&&l<u||X&&g&&A&&!y&&!D||B&&g&&A||!_&&A||!j)return-1}return 0}function GS(l,u,g){for(var y=-1,A=l.criteria,D=u.criteria,_=A.length,B=g.length;++y<_;){var j=x2(A[y],D[y]);if(j){if(y>=B)return j;var X=g[y];return j*(X=="desc"?-1:1)}}return l.index-u.index}function y2(l,u,g,y){for(var A=-1,D=l.length,_=g.length,B=-1,j=u.length,X=St(D-_,0),Z=P(j+X),ee=!y;++B<j;)Z[B]=u[B];for(;++A<_;)(ee||A<D)&&(Z[g[A]]=l[A]);for(;X--;)Z[B++]=l[A++];return Z}function C2(l,u,g,y){for(var A=-1,D=l.length,_=-1,B=g.length,j=-1,X=u.length,Z=St(D-B,0),ee=P(Z+X),ae=!y;++A<Z;)ee[A]=l[A];for(var ve=A;++j<X;)ee[ve+j]=u[j];for(;++_<B;)(ae||A<D)&&(ee[ve+g[_]]=l[A++]);return ee}function rn(l,u){var g=-1,y=l.length;for(u||(u=P(y));++g<y;)u[g]=l[g];return u}function ar(l,u,g,y){var A=!g;g||(g={});for(var D=-1,_=u.length;++D<_;){var B=u[D],j=y?y(g[B],l[B],B,g,l):n;j===n&&(j=l[B]),A?Ir(g,B,j):sa(g,B,j)}return g}function YS(l,u){return ar(l,id(l),u)}function XS(l,u){return ar(l,L2(l),u)}function ec(l,u){return function(g,y){var A=Oe(g)?t7:bS,D=u?u():{};return A(g,l,Ce(y,2),D)}}function Uo(l){return Ne(function(u,g){var y=-1,A=g.length,D=A>1?g[A-1]:n,_=A>2?g[2]:n;for(D=l.length>3&&typeof D=="function"?(A--,D):n,_&&Zt(g[0],g[1],_)&&(D=A<3?n:D,A=1),u=Je(u);++y<A;){var B=g[y];B&&l(u,B,y,D)}return u})}function $2(l,u){return function(g,y){if(g==null)return g;if(!on(g))return l(g,y);for(var A=g.length,D=u?A:-1,_=Je(g);(u?D--:++D<A)&&y(_[D],D,_)!==!1;);return g}}function S2(l){return function(u,g,y){for(var A=-1,D=Je(u),_=y(u),B=_.length;B--;){var j=_[l?B:++A];if(g(D[j],j,D)===!1)break}return u}}function ZS(l,u,g){var y=u&C,A=ha(l);function D(){var _=this&&this!==Nt&&this instanceof D?A:l;return _.apply(y?g:this,arguments)}return D}function A2(l){return function(u){u=Xe(u);var g=jo(u)?Wn(u):n,y=g?g[0]:u.charAt(0),A=g?bi(g,1).join(""):u.slice(1);return y[l]()+A}}function qo(l){return function(u){return Cf($v(Cv(u).replace(H8,"")),l,"")}}function ha(l){return function(){var u=arguments;switch(u.length){case 0:return new l;case 1:return new l(u[0]);case 2:return new l(u[0],u[1]);case 3:return new l(u[0],u[1],u[2]);case 4:return new l(u[0],u[1],u[2],u[3]);case 5:return new l(u[0],u[1],u[2],u[3],u[4]);case 6:return new l(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new l(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var g=zo(l.prototype),y=l.apply(g,u);return ct(y)?y:g}}function QS(l,u,g){var y=ha(l);function A(){for(var D=arguments.length,_=P(D),B=D,j=Ko(A);B--;)_[B]=arguments[B];var X=D<3&&_[0]!==j&&_[D-1]!==j?[]:di(_,j);if(D-=X.length,D<g)return E2(l,u,tc,A.placeholder,n,_,X,n,n,g-D);var Z=this&&this!==Nt&&this instanceof A?y:l;return pn(Z,this,_)}return A}function R2(l){return function(u,g,y){var A=Je(u);if(!on(u)){var D=Ce(g,3);u=Et(u),g=function(B){return D(A[B],B,A)}}var _=l(u,g,y);return _>-1?A[D?u[_]:_]:n}}function k2(l){return Lr(function(u){var g=u.length,y=g,A=Dn.prototype.thru;for(l&&u.reverse();y--;){var D=u[y];if(typeof D!="function")throw new On(s);if(A&&!_&&oc(D)=="wrapper")var _=new Dn([],!0)}for(y=_?y:g;++y<g;){D=u[y];var B=oc(D),j=B=="wrapper"?nd(D):n;j&&sd(j[0])&&j[1]==(I|T|O|V)&&!j[4].length&&j[9]==1?_=_[oc(j[0])].apply(_,j[3]):_=D.length==1&&sd(D)?_[B]():_.thru(D)}return function(){var X=arguments,Z=X[0];if(_&&X.length==1&&Oe(Z))return _.plant(Z).value();for(var ee=0,ae=g?u[ee].apply(this,X):Z;++ee<g;)ae=u[ee].call(this,ae);return ae}})}function tc(l,u,g,y,A,D,_,B,j,X){var Z=u&I,ee=u&C,ae=u&S,ve=u&(T|E),$e=u&F,Be=ae?n:ha(l);function Se(){for(var Fe=arguments.length,ze=P(Fe),xn=Fe;xn--;)ze[xn]=arguments[xn];if(ve)var Qt=Ko(Se),yn=u7(ze,Qt);if(y&&(ze=y2(ze,y,A,ve)),D&&(ze=C2(ze,D,_,ve)),Fe-=yn,ve&&Fe<X){var gt=di(ze,Qt);return E2(l,u,tc,Se.placeholder,g,ze,gt,B,j,X-Fe)}var qn=ee?g:this,Fr=ae?qn[l]:l;return Fe=ze.length,B?ze=b9(ze,B):$e&&Fe>1&&ze.reverse(),Z&&j<Fe&&(ze.length=j),this&&this!==Nt&&this instanceof Se&&(Fr=Be||ha(Fr)),Fr.apply(qn,ze)}return Se}function T2(l,u){return function(g,y){return RS(g,l,u(y),{})}}function nc(l,u){return function(g,y){var A;if(g===n&&y===n)return u;if(g!==n&&(A=g),y!==n){if(A===n)return y;typeof g=="string"||typeof y=="string"?(g=bn(g),y=bn(y)):(g=d2(g),y=d2(y)),A=l(g,y)}return A}}function Qf(l){return Lr(function(u){return u=at(u,vn(Ce())),Ne(function(g){var y=this;return l(u,function(A){return pn(A,y,g)})})})}function rc(l,u){u=u===n?" ":bn(u);var g=u.length;if(g<2)return g?Uf(u,l):u;var y=Uf(u,Wl(l/Fo(u)));return jo(u)?bi(Wn(y),0,l).join(""):y.slice(0,l)}function JS(l,u,g,y){var A=u&C,D=ha(l);function _(){for(var B=-1,j=arguments.length,X=-1,Z=y.length,ee=P(Z+j),ae=this&&this!==Nt&&this instanceof _?D:l;++X<Z;)ee[X]=y[X];for(;j--;)ee[X++]=arguments[++B];return pn(ae,A?g:this,ee)}return _}function M2(l){return function(u,g,y){return y&&typeof y!="number"&&Zt(u,g,y)&&(g=y=n),u=jr(u),g===n?(g=u,u=0):g=jr(g),y=y===n?u<g?1:-1:jr(y),jS(u,g,y,l)}}function ic(l){return function(u,g){return typeof u=="string"&&typeof g=="string"||(u=Bn(u),g=Bn(g)),l(u,g)}}function E2(l,u,g,y,A,D,_,B,j,X){var Z=u&T,ee=Z?_:n,ae=Z?n:_,ve=Z?D:n,$e=Z?n:D;u|=Z?O:L,u&=~(Z?L:O),u&R||(u&=-4);var Be=[l,u,A,ve,ee,$e,ae,B,j,X],Se=g.apply(n,Be);return sd(l)&&P2(Se,Be),Se.placeholder=y,W2(Se,l,u)}function Jf(l){var u=$t[l];return function(g,y){if(g=Bn(g),y=y==null?0:Pt(_e(y),292),y&&Wp(g)){var A=(Xe(g)+"e").split("e"),D=u(A[0]+"e"+(+A[1]+y));return A=(Xe(D)+"e").split("e"),+(A[0]+"e"+(+A[1]-y))}return u(g)}}var e9=Po&&1/Il(new Po([,-0]))[1]==te?function(l){return new Po(l)}:yd;function O2(l){return function(u){var g=Wt(u);return g==Ze?Mf(u):g==Mt?v7(u):c7(u,l(u))}}function _r(l,u,g,y,A,D,_,B){var j=u&S;if(!j&&typeof l!="function")throw new On(s);var X=y?y.length:0;if(X||(u&=-97,y=A=n),_=_===n?_:St(_e(_),0),B=B===n?B:_e(B),X-=A?A.length:0,u&L){var Z=y,ee=A;y=A=n}var ae=j?n:nd(l),ve=[l,u,g,y,A,Z,ee,D,_,B];if(ae&&m9(ve,ae),l=ve[0],u=ve[1],g=ve[2],y=ve[3],A=ve[4],B=ve[9]=ve[9]===n?j?0:l.length:St(ve[9]-X,0),!B&&u&(T|E)&&(u&=-25),!u||u==C)var $e=ZS(l,u,g);else u==T||u==E?$e=QS(l,u,B):(u==O||u==(C|O))&&!A.length?$e=JS(l,u,g,y):$e=tc.apply(n,ve);var Be=ae?h2:P2;return W2(Be($e,ve),l,u)}function D2(l,u,g,y){return l===n||Un(l,Ho[g])&&!Qe.call(y,g)?u:l}function I2(l,u,g,y,A,D){return ct(l)&&ct(u)&&(D.set(u,l),Zl(l,u,n,I2,D),D.delete(u)),l}function t9(l){return ga(l)?n:l}function _2(l,u,g,y,A,D){var _=g&x,B=l.length,j=u.length;if(B!=j&&!(_&&j>B))return!1;var X=D.get(l),Z=D.get(u);if(X&&Z)return X==u&&Z==l;var ee=-1,ae=!0,ve=g&w?new Yi:n;for(D.set(l,u),D.set(u,l);++ee<B;){var $e=l[ee],Be=u[ee];if(y)var Se=_?y(Be,$e,ee,u,l,D):y($e,Be,ee,l,u,D);if(Se!==n){if(Se)continue;ae=!1;break}if(ve){if(!$f(u,function(Fe,ze){if(!ea(ve,ze)&&($e===Fe||A($e,Fe,g,y,D)))return ve.push(ze)})){ae=!1;break}}else if(!($e===Be||A($e,Be,g,y,D))){ae=!1;break}}return D.delete(l),D.delete(u),ae}function n9(l,u,g,y,A,D,_){switch(g){case ui:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case zi:return!(l.byteLength!=u.byteLength||!D(new Fl(l),new Fl(u)));case De:case Re:case Pe:return Un(+l,+u);case Ae:return l.name==u.name&&l.message==u.message;case or:case li:return l==u+"";case Ze:var B=Mf;case Mt:var j=y&x;if(B||(B=Il),l.size!=u.size&&!j)return!1;var X=_.get(l);if(X)return X==u;y|=w,_.set(l,u);var Z=_2(B(l),B(u),y,A,D,_);return _.delete(l),Z;case ci:if(oa)return oa.call(l)==oa.call(u)}return!1}function r9(l,u,g,y,A,D){var _=g&x,B=ed(l),j=B.length,X=ed(u),Z=X.length;if(j!=Z&&!_)return!1;for(var ee=j;ee--;){var ae=B[ee];if(!(_?ae in u:Qe.call(u,ae)))return!1}var ve=D.get(l),$e=D.get(u);if(ve&&$e)return ve==u&&$e==l;var Be=!0;D.set(l,u),D.set(u,l);for(var Se=_;++ee<j;){ae=B[ee];var Fe=l[ae],ze=u[ae];if(y)var xn=_?y(ze,Fe,ae,u,l,D):y(Fe,ze,ae,l,u,D);if(!(xn===n?Fe===ze||A(Fe,ze,g,y,D):xn)){Be=!1;break}Se||(Se=ae=="constructor")}if(Be&&!Se){var Qt=l.constructor,yn=u.constructor;Qt!=yn&&"constructor"in l&&"constructor"in u&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof yn=="function"&&yn instanceof yn)&&(Be=!1)}return D.delete(l),D.delete(u),Be}function Lr(l){return ld(V2(l,n,Y2),l+"")}function ed(l){return e2(l,Et,id)}function td(l){return e2(l,sn,L2)}var nd=Ul?function(l){return Ul.get(l)}:yd;function oc(l){for(var u=l.name+"",g=Wo[u],y=Qe.call(Wo,u)?g.length:0;y--;){var A=g[y],D=A.func;if(D==null||D==l)return A.name}return u}function Ko(l){var u=Qe.call(M,"placeholder")?M:l;return u.placeholder}function Ce(){var l=M.iteratee||wd;return l=l===wd?r2:l,arguments.length?l(arguments[0],arguments[1]):l}function sc(l,u){var g=l.__data__;return h9(u)?g[typeof u=="string"?"string":"hash"]:g.map}function rd(l){for(var u=Et(l),g=u.length;g--;){var y=u[g],A=l[y];u[g]=[y,A,j2(A)]}return u}function Qi(l,u){var g=g7(l,u);return n2(g)?g:n}function i9(l){var u=Qe.call(l,Ki),g=l[Ki];try{l[Ki]=n;var y=!0}catch{}var A=Nl.call(l);return y&&(u?l[Ki]=g:delete l[Ki]),A}var id=Of?function(l){return l==null?[]:(l=Je(l),hi(Of(l),function(u){return Hp.call(l,u)}))}:Cd,L2=Of?function(l){for(var u=[];l;)fi(u,id(l)),l=Vl(l);return u}:Cd,Wt=Xt;(Df&&Wt(new Df(new ArrayBuffer(1)))!=ui||na&&Wt(new na)!=Ze||If&&Wt(If.resolve())!=_o||Po&&Wt(new Po)!=Mt||ra&&Wt(new ra)!=Wi)&&(Wt=function(l){var u=Xt(l),g=u==ft?l.constructor:n,y=g?Ji(g):"";if(y)switch(y){case V7:return ui;case H7:return Ze;case P7:return _o;case W7:return Mt;case z7:return Wi}return u});function o9(l,u,g){for(var y=-1,A=g.length;++y<A;){var D=g[y],_=D.size;switch(D.type){case"drop":l+=_;break;case"dropRight":u-=_;break;case"take":u=Pt(u,l+_);break;case"takeRight":l=St(l,u-_);break}}return{start:l,end:u}}function s9(l){var u=l.match(f8);return u?u[1].split(d8):[]}function B2(l,u,g){u=vi(u,l);for(var y=-1,A=u.length,D=!1;++y<A;){var _=lr(u[y]);if(!(D=l!=null&&g(l,_)))break;l=l[_]}return D||++y!=A?D:(A=l==null?0:l.length,!!A&&dc(A)&&Br(_,A)&&(Oe(l)||eo(l)))}function a9(l){var u=l.length,g=new l.constructor(u);return u&&typeof l[0]=="string"&&Qe.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function N2(l){return typeof l.constructor=="function"&&!fa(l)?zo(Vl(l)):{}}function l9(l,u,g){var y=l.constructor;switch(u){case zi:return Zf(l);case De:case Re:return new y(+l);case ui:return US(l,g);case Ui:case Bt:case of:case sf:case af:case lf:case cf:case uf:case hf:return w2(l,g);case Ze:return new y;case Pe:case li:return new y(l);case or:return qS(l);case Mt:return new y;case ci:return KS(l)}}function c9(l,u){var g=u.length;if(!g)return l;var y=g-1;return u[y]=(g>1?"& ":"")+u[y],u=u.join(g>2?", ":" "),l.replace(h8,`{
/* [wrapped with `+u+`] */
`)}function u9(l){return Oe(l)||eo(l)||!!(Pp&&l&&l[Pp])}function Br(l,u){var g=typeof l;return u=u??ne,!!u&&(g=="number"||g!="symbol"&&C8.test(l))&&l>-1&&l%1==0&&l<u}function Zt(l,u,g){if(!ct(g))return!1;var y=typeof u;return(y=="number"?on(g)&&Br(u,g.length):y=="string"&&u in g)?Un(g[u],l):!1}function od(l,u){if(Oe(l))return!1;var g=typeof l;return g=="number"||g=="symbol"||g=="boolean"||l==null||wn(l)?!0:a8.test(l)||!s8.test(l)||u!=null&&l in Je(u)}function h9(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function sd(l){var u=oc(l),g=M[u];if(typeof g!="function"||!(u in We.prototype))return!1;if(l===g)return!0;var y=nd(g);return!!y&&l===y[0]}function f9(l){return!!jp&&jp in l}var d9=Ll?Nr:$d;function fa(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||Ho;return l===g}function j2(l){return l===l&&!ct(l)}function F2(l,u){return function(g){return g==null?!1:g[l]===u&&(u!==n||l in Je(g))}}function g9(l){var u=hc(l,function(y){return g.size===h&&g.clear(),y}),g=u.cache;return u}function m9(l,u){var g=l[1],y=u[1],A=g|y,D=A<(C|S|I),_=y==I&&g==T||y==I&&g==V&&l[7].length<=u[8]||y==(I|V)&&u[7].length<=u[8]&&g==T;if(!(D||_))return l;y&C&&(l[2]=u[2],A|=g&C?0:R);var B=u[3];if(B){var j=l[3];l[3]=j?y2(j,B,u[4]):B,l[4]=j?di(l[3],f):u[4]}return B=u[5],B&&(j=l[5],l[5]=j?C2(j,B,u[6]):B,l[6]=j?di(l[5],f):u[6]),B=u[7],B&&(l[7]=B),y&I&&(l[8]=l[8]==null?u[8]:Pt(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=A,l}function p9(l){var u=[];if(l!=null)for(var g in Je(l))u.push(g);return u}function v9(l){return Nl.call(l)}function V2(l,u,g){return u=St(u===n?l.length-1:u,0),function(){for(var y=arguments,A=-1,D=St(y.length-u,0),_=P(D);++A<D;)_[A]=y[u+A];A=-1;for(var B=P(u+1);++A<u;)B[A]=y[A];return B[u]=g(_),pn(l,this,B)}}function H2(l,u){return u.length<2?l:Zi(l,_n(u,0,-1))}function b9(l,u){for(var g=l.length,y=Pt(u.length,g),A=rn(l);y--;){var D=u[y];l[y]=Br(D,g)?A[D]:n}return l}function ad(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var P2=z2(h2),da=I7||function(l,u){return Nt.setTimeout(l,u)},ld=z2(HS);function W2(l,u,g){var y=u+"";return ld(l,c9(y,w9(s9(y),g)))}function z2(l){var u=0,g=0;return function(){var y=N7(),A=J-(y-g);if(g=y,A>0){if(++u>=W)return arguments[0]}else u=0;return l.apply(n,arguments)}}function ac(l,u){var g=-1,y=l.length,A=y-1;for(u=u===n?y:u;++g<u;){var D=zf(g,A),_=l[D];l[D]=l[g],l[g]=_}return l.length=u,l}var U2=g9(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(l8,function(g,y,A,D){u.push(A?D.replace(p8,"$1"):y||g)}),u});function lr(l){if(typeof l=="string"||wn(l))return l;var u=l+"";return u=="0"&&1/l==-te?"-0":u}function Ji(l){if(l!=null){try{return Bl.call(l)}catch{}try{return l+""}catch{}}return""}function w9(l,u){return En(qe,function(g){var y="_."+g[0];u&g[1]&&!Ol(l,y)&&l.push(y)}),l.sort()}function q2(l){if(l instanceof We)return l.clone();var u=new Dn(l.__wrapped__,l.__chain__);return u.__actions__=rn(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function x9(l,u,g){(g?Zt(l,u,g):u===n)?u=1:u=St(_e(u),0);var y=l==null?0:l.length;if(!y||u<1)return[];for(var A=0,D=0,_=P(Wl(y/u));A<y;)_[D++]=_n(l,A,A+=u);return _}function y9(l){for(var u=-1,g=l==null?0:l.length,y=0,A=[];++u<g;){var D=l[u];D&&(A[y++]=D)}return A}function C9(){var l=arguments.length;if(!l)return[];for(var u=P(l-1),g=arguments[0],y=l;y--;)u[y-1]=arguments[y];return fi(Oe(g)?rn(g):[g],jt(u,1))}var $9=Ne(function(l,u){return dt(l)?aa(l,jt(u,1,dt,!0)):[]}),S9=Ne(function(l,u){var g=Ln(u);return dt(g)&&(g=n),dt(l)?aa(l,jt(u,1,dt,!0),Ce(g,2)):[]}),A9=Ne(function(l,u){var g=Ln(u);return dt(g)&&(g=n),dt(l)?aa(l,jt(u,1,dt,!0),n,g):[]});function R9(l,u,g){var y=l==null?0:l.length;return y?(u=g||u===n?1:_e(u),_n(l,u<0?0:u,y)):[]}function k9(l,u,g){var y=l==null?0:l.length;return y?(u=g||u===n?1:_e(u),u=y-u,_n(l,0,u<0?0:u)):[]}function T9(l,u){return l&&l.length?Jl(l,Ce(u,3),!0,!0):[]}function M9(l,u){return l&&l.length?Jl(l,Ce(u,3),!0):[]}function E9(l,u,g,y){var A=l==null?0:l.length;return A?(g&&typeof g!="number"&&Zt(l,u,g)&&(g=0,y=A),CS(l,u,g,y)):[]}function K2(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var A=g==null?0:_e(g);return A<0&&(A=St(y+A,0)),Dl(l,Ce(u,3),A)}function G2(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var A=y-1;return g!==n&&(A=_e(g),A=g<0?St(y+A,0):Pt(A,y-1)),Dl(l,Ce(u,3),A,!0)}function Y2(l){var u=l==null?0:l.length;return u?jt(l,1):[]}function O9(l){var u=l==null?0:l.length;return u?jt(l,te):[]}function D9(l,u){var g=l==null?0:l.length;return g?(u=u===n?1:_e(u),jt(l,u)):[]}function I9(l){for(var u=-1,g=l==null?0:l.length,y={};++u<g;){var A=l[u];y[A[0]]=A[1]}return y}function X2(l){return l&&l.length?l[0]:n}function _9(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var A=g==null?0:_e(g);return A<0&&(A=St(y+A,0)),No(l,u,A)}function L9(l){var u=l==null?0:l.length;return u?_n(l,0,-1):[]}var B9=Ne(function(l){var u=at(l,Yf);return u.length&&u[0]===l[0]?Ff(u):[]}),N9=Ne(function(l){var u=Ln(l),g=at(l,Yf);return u===Ln(g)?u=n:g.pop(),g.length&&g[0]===l[0]?Ff(g,Ce(u,2)):[]}),j9=Ne(function(l){var u=Ln(l),g=at(l,Yf);return u=typeof u=="function"?u:n,u&&g.pop(),g.length&&g[0]===l[0]?Ff(g,n,u):[]});function F9(l,u){return l==null?"":L7.call(l,u)}function Ln(l){var u=l==null?0:l.length;return u?l[u-1]:n}function V9(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var A=y;return g!==n&&(A=_e(g),A=A<0?St(y+A,0):Pt(A,y-1)),u===u?w7(l,u,A):Dl(l,Ep,A,!0)}function H9(l,u){return l&&l.length?a2(l,_e(u)):n}var P9=Ne(Z2);function Z2(l,u){return l&&l.length&&u&&u.length?Wf(l,u):l}function W9(l,u,g){return l&&l.length&&u&&u.length?Wf(l,u,Ce(g,2)):l}function z9(l,u,g){return l&&l.length&&u&&u.length?Wf(l,u,n,g):l}var U9=Lr(function(l,u){var g=l==null?0:l.length,y=Lf(l,u);return u2(l,at(u,function(A){return Br(A,g)?+A:A}).sort(x2)),y});function q9(l,u){var g=[];if(!(l&&l.length))return g;var y=-1,A=[],D=l.length;for(u=Ce(u,3);++y<D;){var _=l[y];u(_,y,l)&&(g.push(_),A.push(y))}return u2(l,A),g}function cd(l){return l==null?l:F7.call(l)}function K9(l,u,g){var y=l==null?0:l.length;return y?(g&&typeof g!="number"&&Zt(l,u,g)?(u=0,g=y):(u=u==null?0:_e(u),g=g===n?y:_e(g)),_n(l,u,g)):[]}function G9(l,u){return Ql(l,u)}function Y9(l,u,g){return qf(l,u,Ce(g,2))}function X9(l,u){var g=l==null?0:l.length;if(g){var y=Ql(l,u);if(y<g&&Un(l[y],u))return y}return-1}function Z9(l,u){return Ql(l,u,!0)}function Q9(l,u,g){return qf(l,u,Ce(g,2),!0)}function J9(l,u){var g=l==null?0:l.length;if(g){var y=Ql(l,u,!0)-1;if(Un(l[y],u))return y}return-1}function eA(l){return l&&l.length?f2(l):[]}function tA(l,u){return l&&l.length?f2(l,Ce(u,2)):[]}function nA(l){var u=l==null?0:l.length;return u?_n(l,1,u):[]}function rA(l,u,g){return l&&l.length?(u=g||u===n?1:_e(u),_n(l,0,u<0?0:u)):[]}function iA(l,u,g){var y=l==null?0:l.length;return y?(u=g||u===n?1:_e(u),u=y-u,_n(l,u<0?0:u,y)):[]}function oA(l,u){return l&&l.length?Jl(l,Ce(u,3),!1,!0):[]}function sA(l,u){return l&&l.length?Jl(l,Ce(u,3)):[]}var aA=Ne(function(l){return pi(jt(l,1,dt,!0))}),lA=Ne(function(l){var u=Ln(l);return dt(u)&&(u=n),pi(jt(l,1,dt,!0),Ce(u,2))}),cA=Ne(function(l){var u=Ln(l);return u=typeof u=="function"?u:n,pi(jt(l,1,dt,!0),n,u)});function uA(l){return l&&l.length?pi(l):[]}function hA(l,u){return l&&l.length?pi(l,Ce(u,2)):[]}function fA(l,u){return u=typeof u=="function"?u:n,l&&l.length?pi(l,n,u):[]}function ud(l){if(!(l&&l.length))return[];var u=0;return l=hi(l,function(g){if(dt(g))return u=St(g.length,u),!0}),kf(u,function(g){return at(l,Sf(g))})}function Q2(l,u){if(!(l&&l.length))return[];var g=ud(l);return u==null?g:at(g,function(y){return pn(u,n,y)})}var dA=Ne(function(l,u){return dt(l)?aa(l,u):[]}),gA=Ne(function(l){return Gf(hi(l,dt))}),mA=Ne(function(l){var u=Ln(l);return dt(u)&&(u=n),Gf(hi(l,dt),Ce(u,2))}),pA=Ne(function(l){var u=Ln(l);return u=typeof u=="function"?u:n,Gf(hi(l,dt),n,u)}),vA=Ne(ud);function bA(l,u){return p2(l||[],u||[],sa)}function wA(l,u){return p2(l||[],u||[],ua)}var xA=Ne(function(l){var u=l.length,g=u>1?l[u-1]:n;return g=typeof g=="function"?(l.pop(),g):n,Q2(l,g)});function J2(l){var u=M(l);return u.__chain__=!0,u}function yA(l,u){return u(l),l}function lc(l,u){return u(l)}var CA=Lr(function(l){var u=l.length,g=u?l[0]:0,y=this.__wrapped__,A=function(D){return Lf(D,l)};return u>1||this.__actions__.length||!(y instanceof We)||!Br(g)?this.thru(A):(y=y.slice(g,+g+(u?1:0)),y.__actions__.push({func:lc,args:[A],thisArg:n}),new Dn(y,this.__chain__).thru(function(D){return u&&!D.length&&D.push(n),D}))});function $A(){return J2(this)}function SA(){return new Dn(this.value(),this.__chain__)}function AA(){this.__values__===n&&(this.__values__=dv(this.value()));var l=this.__index__>=this.__values__.length,u=l?n:this.__values__[this.__index__++];return{done:l,value:u}}function RA(){return this}function kA(l){for(var u,g=this;g instanceof Kl;){var y=q2(g);y.__index__=0,y.__values__=n,u?A.__wrapped__=y:u=y;var A=y;g=g.__wrapped__}return A.__wrapped__=l,u}function TA(){var l=this.__wrapped__;if(l instanceof We){var u=l;return this.__actions__.length&&(u=new We(this)),u=u.reverse(),u.__actions__.push({func:lc,args:[cd],thisArg:n}),new Dn(u,this.__chain__)}return this.thru(cd)}function MA(){return m2(this.__wrapped__,this.__actions__)}var EA=ec(function(l,u,g){Qe.call(l,g)?++l[g]:Ir(l,g,1)});function OA(l,u,g){var y=Oe(l)?Tp:yS;return g&&Zt(l,u,g)&&(u=n),y(l,Ce(u,3))}function DA(l,u){var g=Oe(l)?hi:Qp;return g(l,Ce(u,3))}var IA=R2(K2),_A=R2(G2);function LA(l,u){return jt(cc(l,u),1)}function BA(l,u){return jt(cc(l,u),te)}function NA(l,u,g){return g=g===n?1:_e(g),jt(cc(l,u),g)}function ev(l,u){var g=Oe(l)?En:mi;return g(l,Ce(u,3))}function tv(l,u){var g=Oe(l)?n7:Zp;return g(l,Ce(u,3))}var jA=ec(function(l,u,g){Qe.call(l,g)?l[g].push(u):Ir(l,g,[u])});function FA(l,u,g,y){l=on(l)?l:Yo(l),g=g&&!y?_e(g):0;var A=l.length;return g<0&&(g=St(A+g,0)),gc(l)?g<=A&&l.indexOf(u,g)>-1:!!A&&No(l,u,g)>-1}var VA=Ne(function(l,u,g){var y=-1,A=typeof u=="function",D=on(l)?P(l.length):[];return mi(l,function(_){D[++y]=A?pn(u,_,g):la(_,u,g)}),D}),HA=ec(function(l,u,g){Ir(l,g,u)});function cc(l,u){var g=Oe(l)?at:i2;return g(l,Ce(u,3))}function PA(l,u,g,y){return l==null?[]:(Oe(u)||(u=u==null?[]:[u]),g=y?n:g,Oe(g)||(g=g==null?[]:[g]),l2(l,u,g))}var WA=ec(function(l,u,g){l[g?0:1].push(u)},function(){return[[],[]]});function zA(l,u,g){var y=Oe(l)?Cf:Dp,A=arguments.length<3;return y(l,Ce(u,4),g,A,mi)}function UA(l,u,g){var y=Oe(l)?r7:Dp,A=arguments.length<3;return y(l,Ce(u,4),g,A,Zp)}function qA(l,u){var g=Oe(l)?hi:Qp;return g(l,fc(Ce(u,3)))}function KA(l){var u=Oe(l)?Kp:FS;return u(l)}function GA(l,u,g){(g?Zt(l,u,g):u===n)?u=1:u=_e(u);var y=Oe(l)?pS:VS;return y(l,u)}function YA(l){var u=Oe(l)?vS:PS;return u(l)}function XA(l){if(l==null)return 0;if(on(l))return gc(l)?Fo(l):l.length;var u=Wt(l);return u==Ze||u==Mt?l.size:Hf(l).length}function ZA(l,u,g){var y=Oe(l)?$f:WS;return g&&Zt(l,u,g)&&(u=n),y(l,Ce(u,3))}var QA=Ne(function(l,u){if(l==null)return[];var g=u.length;return g>1&&Zt(l,u[0],u[1])?u=[]:g>2&&Zt(u[0],u[1],u[2])&&(u=[u[0]]),l2(l,jt(u,1),[])}),uc=D7||function(){return Nt.Date.now()};function JA(l,u){if(typeof u!="function")throw new On(s);return l=_e(l),function(){if(--l<1)return u.apply(this,arguments)}}function nv(l,u,g){return u=g?n:u,u=l&&u==null?l.length:u,_r(l,I,n,n,n,n,u)}function rv(l,u){var g;if(typeof u!="function")throw new On(s);return l=_e(l),function(){return--l>0&&(g=u.apply(this,arguments)),l<=1&&(u=n),g}}var hd=Ne(function(l,u,g){var y=C;if(g.length){var A=di(g,Ko(hd));y|=O}return _r(l,y,u,g,A)}),iv=Ne(function(l,u,g){var y=C|S;if(g.length){var A=di(g,Ko(iv));y|=O}return _r(u,y,l,g,A)});function ov(l,u,g){u=g?n:u;var y=_r(l,T,n,n,n,n,n,u);return y.placeholder=ov.placeholder,y}function sv(l,u,g){u=g?n:u;var y=_r(l,E,n,n,n,n,n,u);return y.placeholder=sv.placeholder,y}function av(l,u,g){var y,A,D,_,B,j,X=0,Z=!1,ee=!1,ae=!0;if(typeof l!="function")throw new On(s);u=Bn(u)||0,ct(g)&&(Z=!!g.leading,ee="maxWait"in g,D=ee?St(Bn(g.maxWait)||0,u):D,ae="trailing"in g?!!g.trailing:ae);function ve(gt){var qn=y,Fr=A;return y=A=n,X=gt,_=l.apply(Fr,qn),_}function $e(gt){return X=gt,B=da(Fe,u),Z?ve(gt):_}function Be(gt){var qn=gt-j,Fr=gt-X,Rv=u-qn;return ee?Pt(Rv,D-Fr):Rv}function Se(gt){var qn=gt-j,Fr=gt-X;return j===n||qn>=u||qn<0||ee&&Fr>=D}function Fe(){var gt=uc();if(Se(gt))return ze(gt);B=da(Fe,Be(gt))}function ze(gt){return B=n,ae&&y?ve(gt):(y=A=n,_)}function xn(){B!==n&&v2(B),X=0,y=j=A=B=n}function Qt(){return B===n?_:ze(uc())}function yn(){var gt=uc(),qn=Se(gt);if(y=arguments,A=this,j=gt,qn){if(B===n)return $e(j);if(ee)return v2(B),B=da(Fe,u),ve(j)}return B===n&&(B=da(Fe,u)),_}return yn.cancel=xn,yn.flush=Qt,yn}var eR=Ne(function(l,u){return Xp(l,1,u)}),tR=Ne(function(l,u,g){return Xp(l,Bn(u)||0,g)});function nR(l){return _r(l,F)}function hc(l,u){if(typeof l!="function"||u!=null&&typeof u!="function")throw new On(s);var g=function(){var y=arguments,A=u?u.apply(this,y):y[0],D=g.cache;if(D.has(A))return D.get(A);var _=l.apply(this,y);return g.cache=D.set(A,_)||D,_};return g.cache=new(hc.Cache||Dr),g}hc.Cache=Dr;function fc(l){if(typeof l!="function")throw new On(s);return function(){var u=arguments;switch(u.length){case 0:return!l.call(this);case 1:return!l.call(this,u[0]);case 2:return!l.call(this,u[0],u[1]);case 3:return!l.call(this,u[0],u[1],u[2])}return!l.apply(this,u)}}function rR(l){return rv(2,l)}var iR=zS(function(l,u){u=u.length==1&&Oe(u[0])?at(u[0],vn(Ce())):at(jt(u,1),vn(Ce()));var g=u.length;return Ne(function(y){for(var A=-1,D=Pt(y.length,g);++A<D;)y[A]=u[A].call(this,y[A]);return pn(l,this,y)})}),fd=Ne(function(l,u){var g=di(u,Ko(fd));return _r(l,O,n,u,g)}),lv=Ne(function(l,u){var g=di(u,Ko(lv));return _r(l,L,n,u,g)}),oR=Lr(function(l,u){return _r(l,V,n,n,n,u)});function sR(l,u){if(typeof l!="function")throw new On(s);return u=u===n?u:_e(u),Ne(l,u)}function aR(l,u){if(typeof l!="function")throw new On(s);return u=u==null?0:St(_e(u),0),Ne(function(g){var y=g[u],A=bi(g,0,u);return y&&fi(A,y),pn(l,this,A)})}function lR(l,u,g){var y=!0,A=!0;if(typeof l!="function")throw new On(s);return ct(g)&&(y="leading"in g?!!g.leading:y,A="trailing"in g?!!g.trailing:A),av(l,u,{leading:y,maxWait:u,trailing:A})}function cR(l){return nv(l,1)}function uR(l,u){return fd(Xf(u),l)}function hR(){if(!arguments.length)return[];var l=arguments[0];return Oe(l)?l:[l]}function fR(l){return In(l,v)}function dR(l,u){return u=typeof u=="function"?u:n,In(l,v,u)}function gR(l){return In(l,d|v)}function mR(l,u){return u=typeof u=="function"?u:n,In(l,d|v,u)}function pR(l,u){return u==null||Yp(l,u,Et(u))}function Un(l,u){return l===u||l!==l&&u!==u}var vR=ic(jf),bR=ic(function(l,u){return l>=u}),eo=t2(function(){return arguments}())?t2:function(l){return ht(l)&&Qe.call(l,"callee")&&!Hp.call(l,"callee")},Oe=P.isArray,wR=Cp?vn(Cp):kS;function on(l){return l!=null&&dc(l.length)&&!Nr(l)}function dt(l){return ht(l)&&on(l)}function xR(l){return l===!0||l===!1||ht(l)&&Xt(l)==De}var wi=_7||$d,yR=$p?vn($p):TS;function CR(l){return ht(l)&&l.nodeType===1&&!ga(l)}function $R(l){if(l==null)return!0;if(on(l)&&(Oe(l)||typeof l=="string"||typeof l.splice=="function"||wi(l)||Go(l)||eo(l)))return!l.length;var u=Wt(l);if(u==Ze||u==Mt)return!l.size;if(fa(l))return!Hf(l).length;for(var g in l)if(Qe.call(l,g))return!1;return!0}function SR(l,u){return ca(l,u)}function AR(l,u,g){g=typeof g=="function"?g:n;var y=g?g(l,u):n;return y===n?ca(l,u,n,g):!!y}function dd(l){if(!ht(l))return!1;var u=Xt(l);return u==Ae||u==Le||typeof l.message=="string"&&typeof l.name=="string"&&!ga(l)}function RR(l){return typeof l=="number"&&Wp(l)}function Nr(l){if(!ct(l))return!1;var u=Xt(l);return u==He||u==wt||u==pe||u==Qs}function cv(l){return typeof l=="number"&&l==_e(l)}function dc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=ne}function ct(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function ht(l){return l!=null&&typeof l=="object"}var uv=Sp?vn(Sp):ES;function kR(l,u){return l===u||Vf(l,u,rd(u))}function TR(l,u,g){return g=typeof g=="function"?g:n,Vf(l,u,rd(u),g)}function MR(l){return hv(l)&&l!=+l}function ER(l){if(d9(l))throw new Me(o);return n2(l)}function OR(l){return l===null}function DR(l){return l==null}function hv(l){return typeof l=="number"||ht(l)&&Xt(l)==Pe}function ga(l){if(!ht(l)||Xt(l)!=ft)return!1;var u=Vl(l);if(u===null)return!0;var g=Qe.call(u,"constructor")&&u.constructor;return typeof g=="function"&&g instanceof g&&Bl.call(g)==T7}var gd=Ap?vn(Ap):OS;function IR(l){return cv(l)&&l>=-ne&&l<=ne}var fv=Rp?vn(Rp):DS;function gc(l){return typeof l=="string"||!Oe(l)&&ht(l)&&Xt(l)==li}function wn(l){return typeof l=="symbol"||ht(l)&&Xt(l)==ci}var Go=kp?vn(kp):IS;function _R(l){return l===n}function LR(l){return ht(l)&&Wt(l)==Wi}function BR(l){return ht(l)&&Xt(l)==Js}var NR=ic(Pf),jR=ic(function(l,u){return l<=u});function dv(l){if(!l)return[];if(on(l))return gc(l)?Wn(l):rn(l);if(ta&&l[ta])return p7(l[ta]());var u=Wt(l),g=u==Ze?Mf:u==Mt?Il:Yo;return g(l)}function jr(l){if(!l)return l===0?l:0;if(l=Bn(l),l===te||l===-te){var u=l<0?-1:1;return u*Y}return l===l?l:0}function _e(l){var u=jr(l),g=u%1;return u===u?g?u-g:u:0}function gv(l){return l?Xi(_e(l),0,me):0}function Bn(l){if(typeof l=="number")return l;if(wn(l))return ce;if(ct(l)){var u=typeof l.valueOf=="function"?l.valueOf():l;l=ct(u)?u+"":u}if(typeof l!="string")return l===0?l:+l;l=Ip(l);var g=w8.test(l);return g||y8.test(l)?J8(l.slice(2),g?2:8):b8.test(l)?ce:+l}function mv(l){return ar(l,sn(l))}function FR(l){return l?Xi(_e(l),-ne,ne):l===0?l:0}function Xe(l){return l==null?"":bn(l)}var VR=Uo(function(l,u){if(fa(u)||on(u)){ar(u,Et(u),l);return}for(var g in u)Qe.call(u,g)&&sa(l,g,u[g])}),pv=Uo(function(l,u){ar(u,sn(u),l)}),mc=Uo(function(l,u,g,y){ar(u,sn(u),l,y)}),HR=Uo(function(l,u,g,y){ar(u,Et(u),l,y)}),PR=Lr(Lf);function WR(l,u){var g=zo(l);return u==null?g:Gp(g,u)}var zR=Ne(function(l,u){l=Je(l);var g=-1,y=u.length,A=y>2?u[2]:n;for(A&&Zt(u[0],u[1],A)&&(y=1);++g<y;)for(var D=u[g],_=sn(D),B=-1,j=_.length;++B<j;){var X=_[B],Z=l[X];(Z===n||Un(Z,Ho[X])&&!Qe.call(l,X))&&(l[X]=D[X])}return l}),UR=Ne(function(l){return l.push(n,I2),pn(vv,n,l)});function qR(l,u){return Mp(l,Ce(u,3),sr)}function KR(l,u){return Mp(l,Ce(u,3),Nf)}function GR(l,u){return l==null?l:Bf(l,Ce(u,3),sn)}function YR(l,u){return l==null?l:Jp(l,Ce(u,3),sn)}function XR(l,u){return l&&sr(l,Ce(u,3))}function ZR(l,u){return l&&Nf(l,Ce(u,3))}function QR(l){return l==null?[]:Xl(l,Et(l))}function JR(l){return l==null?[]:Xl(l,sn(l))}function md(l,u,g){var y=l==null?n:Zi(l,u);return y===n?g:y}function ek(l,u){return l!=null&&B2(l,u,$S)}function pd(l,u){return l!=null&&B2(l,u,SS)}var tk=T2(function(l,u,g){u!=null&&typeof u.toString!="function"&&(u=Nl.call(u)),l[u]=g},bd(an)),nk=T2(function(l,u,g){u!=null&&typeof u.toString!="function"&&(u=Nl.call(u)),Qe.call(l,u)?l[u].push(g):l[u]=[g]},Ce),rk=Ne(la);function Et(l){return on(l)?qp(l):Hf(l)}function sn(l){return on(l)?qp(l,!0):_S(l)}function ik(l,u){var g={};return u=Ce(u,3),sr(l,function(y,A,D){Ir(g,u(y,A,D),y)}),g}function ok(l,u){var g={};return u=Ce(u,3),sr(l,function(y,A,D){Ir(g,A,u(y,A,D))}),g}var sk=Uo(function(l,u,g){Zl(l,u,g)}),vv=Uo(function(l,u,g,y){Zl(l,u,g,y)}),ak=Lr(function(l,u){var g={};if(l==null)return g;var y=!1;u=at(u,function(D){return D=vi(D,l),y||(y=D.length>1),D}),ar(l,td(l),g),y&&(g=In(g,d|m|v,t9));for(var A=u.length;A--;)Kf(g,u[A]);return g});function lk(l,u){return bv(l,fc(Ce(u)))}var ck=Lr(function(l,u){return l==null?{}:BS(l,u)});function bv(l,u){if(l==null)return{};var g=at(td(l),function(y){return[y]});return u=Ce(u),c2(l,g,function(y,A){return u(y,A[0])})}function uk(l,u,g){u=vi(u,l);var y=-1,A=u.length;for(A||(A=1,l=n);++y<A;){var D=l==null?n:l[lr(u[y])];D===n&&(y=A,D=g),l=Nr(D)?D.call(l):D}return l}function hk(l,u,g){return l==null?l:ua(l,u,g)}function fk(l,u,g,y){return y=typeof y=="function"?y:n,l==null?l:ua(l,u,g,y)}var wv=O2(Et),xv=O2(sn);function dk(l,u,g){var y=Oe(l),A=y||wi(l)||Go(l);if(u=Ce(u,4),g==null){var D=l&&l.constructor;A?g=y?new D:[]:ct(l)?g=Nr(D)?zo(Vl(l)):{}:g={}}return(A?En:sr)(l,function(_,B,j){return u(g,_,B,j)}),g}function gk(l,u){return l==null?!0:Kf(l,u)}function mk(l,u,g){return l==null?l:g2(l,u,Xf(g))}function pk(l,u,g,y){return y=typeof y=="function"?y:n,l==null?l:g2(l,u,Xf(g),y)}function Yo(l){return l==null?[]:Tf(l,Et(l))}function vk(l){return l==null?[]:Tf(l,sn(l))}function bk(l,u,g){return g===n&&(g=u,u=n),g!==n&&(g=Bn(g),g=g===g?g:0),u!==n&&(u=Bn(u),u=u===u?u:0),Xi(Bn(l),u,g)}function wk(l,u,g){return u=jr(u),g===n?(g=u,u=0):g=jr(g),l=Bn(l),AS(l,u,g)}function xk(l,u,g){if(g&&typeof g!="boolean"&&Zt(l,u,g)&&(u=g=n),g===n&&(typeof u=="boolean"?(g=u,u=n):typeof l=="boolean"&&(g=l,l=n)),l===n&&u===n?(l=0,u=1):(l=jr(l),u===n?(u=l,l=0):u=jr(u)),l>u){var y=l;l=u,u=y}if(g||l%1||u%1){var A=zp();return Pt(l+A*(u-l+Q8("1e-"+((A+"").length-1))),u)}return zf(l,u)}var yk=qo(function(l,u,g){return u=u.toLowerCase(),l+(g?yv(u):u)});function yv(l){return vd(Xe(l).toLowerCase())}function Cv(l){return l=Xe(l),l&&l.replace($8,h7).replace(P8,"")}function Ck(l,u,g){l=Xe(l),u=bn(u);var y=l.length;g=g===n?y:Xi(_e(g),0,y);var A=g;return g-=u.length,g>=0&&l.slice(g,A)==u}function $k(l){return l=Xe(l),l&&r8.test(l)?l.replace(Jm,f7):l}function Sk(l){return l=Xe(l),l&&c8.test(l)?l.replace(ff,"\\$&"):l}var Ak=qo(function(l,u,g){return l+(g?"-":"")+u.toLowerCase()}),Rk=qo(function(l,u,g){return l+(g?" ":"")+u.toLowerCase()}),kk=A2("toLowerCase");function Tk(l,u,g){l=Xe(l),u=_e(u);var y=u?Fo(l):0;if(!u||y>=u)return l;var A=(u-y)/2;return rc(zl(A),g)+l+rc(Wl(A),g)}function Mk(l,u,g){l=Xe(l),u=_e(u);var y=u?Fo(l):0;return u&&y<u?l+rc(u-y,g):l}function Ek(l,u,g){l=Xe(l),u=_e(u);var y=u?Fo(l):0;return u&&y<u?rc(u-y,g)+l:l}function Ok(l,u,g){return g||u==null?u=0:u&&(u=+u),j7(Xe(l).replace(df,""),u||0)}function Dk(l,u,g){return(g?Zt(l,u,g):u===n)?u=1:u=_e(u),Uf(Xe(l),u)}function Ik(){var l=arguments,u=Xe(l[0]);return l.length<3?u:u.replace(l[1],l[2])}var _k=qo(function(l,u,g){return l+(g?"_":"")+u.toLowerCase()});function Lk(l,u,g){return g&&typeof g!="number"&&Zt(l,u,g)&&(u=g=n),g=g===n?me:g>>>0,g?(l=Xe(l),l&&(typeof u=="string"||u!=null&&!gd(u))&&(u=bn(u),!u&&jo(l))?bi(Wn(l),0,g):l.split(u,g)):[]}var Bk=qo(function(l,u,g){return l+(g?" ":"")+vd(u)});function Nk(l,u,g){return l=Xe(l),g=g==null?0:Xi(_e(g),0,l.length),u=bn(u),l.slice(g,g+u.length)==u}function jk(l,u,g){var y=M.templateSettings;g&&Zt(l,u,g)&&(u=n),l=Xe(l),u=mc({},u,y,D2);var A=mc({},u.imports,y.imports,D2),D=Et(A),_=Tf(A,D),B,j,X=0,Z=u.interpolate||Tl,ee="__p += '",ae=Ef((u.escape||Tl).source+"|"+Z.source+"|"+(Z===ep?v8:Tl).source+"|"+(u.evaluate||Tl).source+"|$","g"),ve="//# sourceURL="+(Qe.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++K8+"]")+`
`;l.replace(ae,function(Se,Fe,ze,xn,Qt,yn){return ze||(ze=xn),ee+=l.slice(X,yn).replace(S8,d7),Fe&&(B=!0,ee+=`' +
__e(`+Fe+`) +
'`),Qt&&(j=!0,ee+=`';
`+Qt+`;
__p += '`),ze&&(ee+=`' +
((__t = (`+ze+`)) == null ? '' : __t) +
'`),X=yn+Se.length,Se}),ee+=`';
`;var $e=Qe.call(u,"variable")&&u.variable;if(!$e)ee=`with (obj) {
`+ee+`
}
`;else if(m8.test($e))throw new Me(a);ee=(j?ee.replace(J$,""):ee).replace(e8,"$1").replace(t8,"$1;"),ee="function("+($e||"obj")+`) {
`+($e?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(B?", __e = _.escape":"")+(j?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ee+`return __p
}`;var Be=Sv(function(){return Ye(D,ve+"return "+ee).apply(n,_)});if(Be.source=ee,dd(Be))throw Be;return Be}function Fk(l){return Xe(l).toLowerCase()}function Vk(l){return Xe(l).toUpperCase()}function Hk(l,u,g){if(l=Xe(l),l&&(g||u===n))return Ip(l);if(!l||!(u=bn(u)))return l;var y=Wn(l),A=Wn(u),D=_p(y,A),_=Lp(y,A)+1;return bi(y,D,_).join("")}function Pk(l,u,g){if(l=Xe(l),l&&(g||u===n))return l.slice(0,Np(l)+1);if(!l||!(u=bn(u)))return l;var y=Wn(l),A=Lp(y,Wn(u))+1;return bi(y,0,A).join("")}function Wk(l,u,g){if(l=Xe(l),l&&(g||u===n))return l.replace(df,"");if(!l||!(u=bn(u)))return l;var y=Wn(l),A=_p(y,Wn(u));return bi(y,A).join("")}function zk(l,u){var g=H,y=K;if(ct(u)){var A="separator"in u?u.separator:A;g="length"in u?_e(u.length):g,y="omission"in u?bn(u.omission):y}l=Xe(l);var D=l.length;if(jo(l)){var _=Wn(l);D=_.length}if(g>=D)return l;var B=g-Fo(y);if(B<1)return y;var j=_?bi(_,0,B).join(""):l.slice(0,B);if(A===n)return j+y;if(_&&(B+=j.length-B),gd(A)){if(l.slice(B).search(A)){var X,Z=j;for(A.global||(A=Ef(A.source,Xe(tp.exec(A))+"g")),A.lastIndex=0;X=A.exec(Z);)var ee=X.index;j=j.slice(0,ee===n?B:ee)}}else if(l.indexOf(bn(A),B)!=B){var ae=j.lastIndexOf(A);ae>-1&&(j=j.slice(0,ae))}return j+y}function Uk(l){return l=Xe(l),l&&n8.test(l)?l.replace(Qm,x7):l}var qk=qo(function(l,u,g){return l+(g?" ":"")+u.toUpperCase()}),vd=A2("toUpperCase");function $v(l,u,g){return l=Xe(l),u=g?n:u,u===n?m7(l)?$7(l):s7(l):l.match(u)||[]}var Sv=Ne(function(l,u){try{return pn(l,n,u)}catch(g){return dd(g)?g:new Me(g)}}),Kk=Lr(function(l,u){return En(u,function(g){g=lr(g),Ir(l,g,hd(l[g],l))}),l});function Gk(l){var u=l==null?0:l.length,g=Ce();return l=u?at(l,function(y){if(typeof y[1]!="function")throw new On(s);return[g(y[0]),y[1]]}):[],Ne(function(y){for(var A=-1;++A<u;){var D=l[A];if(pn(D[0],this,y))return pn(D[1],this,y)}})}function Yk(l){return xS(In(l,d))}function bd(l){return function(){return l}}function Xk(l,u){return l==null||l!==l?u:l}var Zk=k2(),Qk=k2(!0);function an(l){return l}function wd(l){return r2(typeof l=="function"?l:In(l,d))}function Jk(l){return o2(In(l,d))}function eT(l,u){return s2(l,In(u,d))}var tT=Ne(function(l,u){return function(g){return la(g,l,u)}}),nT=Ne(function(l,u){return function(g){return la(l,g,u)}});function xd(l,u,g){var y=Et(u),A=Xl(u,y);g==null&&!(ct(u)&&(A.length||!y.length))&&(g=u,u=l,l=this,A=Xl(u,Et(u)));var D=!(ct(g)&&"chain"in g)||!!g.chain,_=Nr(l);return En(A,function(B){var j=u[B];l[B]=j,_&&(l.prototype[B]=function(){var X=this.__chain__;if(D||X){var Z=l(this.__wrapped__),ee=Z.__actions__=rn(this.__actions__);return ee.push({func:j,args:arguments,thisArg:l}),Z.__chain__=X,Z}return j.apply(l,fi([this.value()],arguments))})}),l}function rT(){return Nt._===this&&(Nt._=M7),this}function yd(){}function iT(l){return l=_e(l),Ne(function(u){return a2(u,l)})}var oT=Qf(at),sT=Qf(Tp),aT=Qf($f);function Av(l){return od(l)?Sf(lr(l)):NS(l)}function lT(l){return function(u){return l==null?n:Zi(l,u)}}var cT=M2(),uT=M2(!0);function Cd(){return[]}function $d(){return!1}function hT(){return{}}function fT(){return""}function dT(){return!0}function gT(l,u){if(l=_e(l),l<1||l>ne)return[];var g=me,y=Pt(l,me);u=Ce(u),l-=me;for(var A=kf(y,u);++g<l;)u(g);return A}function mT(l){return Oe(l)?at(l,lr):wn(l)?[l]:rn(U2(Xe(l)))}function pT(l){var u=++k7;return Xe(l)+u}var vT=nc(function(l,u){return l+u},0),bT=Jf("ceil"),wT=nc(function(l,u){return l/u},1),xT=Jf("floor");function yT(l){return l&&l.length?Yl(l,an,jf):n}function CT(l,u){return l&&l.length?Yl(l,Ce(u,2),jf):n}function $T(l){return Op(l,an)}function ST(l,u){return Op(l,Ce(u,2))}function AT(l){return l&&l.length?Yl(l,an,Pf):n}function RT(l,u){return l&&l.length?Yl(l,Ce(u,2),Pf):n}var kT=nc(function(l,u){return l*u},1),TT=Jf("round"),MT=nc(function(l,u){return l-u},0);function ET(l){return l&&l.length?Rf(l,an):0}function OT(l,u){return l&&l.length?Rf(l,Ce(u,2)):0}return M.after=JA,M.ary=nv,M.assign=VR,M.assignIn=pv,M.assignInWith=mc,M.assignWith=HR,M.at=PR,M.before=rv,M.bind=hd,M.bindAll=Kk,M.bindKey=iv,M.castArray=hR,M.chain=J2,M.chunk=x9,M.compact=y9,M.concat=C9,M.cond=Gk,M.conforms=Yk,M.constant=bd,M.countBy=EA,M.create=WR,M.curry=ov,M.curryRight=sv,M.debounce=av,M.defaults=zR,M.defaultsDeep=UR,M.defer=eR,M.delay=tR,M.difference=$9,M.differenceBy=S9,M.differenceWith=A9,M.drop=R9,M.dropRight=k9,M.dropRightWhile=T9,M.dropWhile=M9,M.fill=E9,M.filter=DA,M.flatMap=LA,M.flatMapDeep=BA,M.flatMapDepth=NA,M.flatten=Y2,M.flattenDeep=O9,M.flattenDepth=D9,M.flip=nR,M.flow=Zk,M.flowRight=Qk,M.fromPairs=I9,M.functions=QR,M.functionsIn=JR,M.groupBy=jA,M.initial=L9,M.intersection=B9,M.intersectionBy=N9,M.intersectionWith=j9,M.invert=tk,M.invertBy=nk,M.invokeMap=VA,M.iteratee=wd,M.keyBy=HA,M.keys=Et,M.keysIn=sn,M.map=cc,M.mapKeys=ik,M.mapValues=ok,M.matches=Jk,M.matchesProperty=eT,M.memoize=hc,M.merge=sk,M.mergeWith=vv,M.method=tT,M.methodOf=nT,M.mixin=xd,M.negate=fc,M.nthArg=iT,M.omit=ak,M.omitBy=lk,M.once=rR,M.orderBy=PA,M.over=oT,M.overArgs=iR,M.overEvery=sT,M.overSome=aT,M.partial=fd,M.partialRight=lv,M.partition=WA,M.pick=ck,M.pickBy=bv,M.property=Av,M.propertyOf=lT,M.pull=P9,M.pullAll=Z2,M.pullAllBy=W9,M.pullAllWith=z9,M.pullAt=U9,M.range=cT,M.rangeRight=uT,M.rearg=oR,M.reject=qA,M.remove=q9,M.rest=sR,M.reverse=cd,M.sampleSize=GA,M.set=hk,M.setWith=fk,M.shuffle=YA,M.slice=K9,M.sortBy=QA,M.sortedUniq=eA,M.sortedUniqBy=tA,M.split=Lk,M.spread=aR,M.tail=nA,M.take=rA,M.takeRight=iA,M.takeRightWhile=oA,M.takeWhile=sA,M.tap=yA,M.throttle=lR,M.thru=lc,M.toArray=dv,M.toPairs=wv,M.toPairsIn=xv,M.toPath=mT,M.toPlainObject=mv,M.transform=dk,M.unary=cR,M.union=aA,M.unionBy=lA,M.unionWith=cA,M.uniq=uA,M.uniqBy=hA,M.uniqWith=fA,M.unset=gk,M.unzip=ud,M.unzipWith=Q2,M.update=mk,M.updateWith=pk,M.values=Yo,M.valuesIn=vk,M.without=dA,M.words=$v,M.wrap=uR,M.xor=gA,M.xorBy=mA,M.xorWith=pA,M.zip=vA,M.zipObject=bA,M.zipObjectDeep=wA,M.zipWith=xA,M.entries=wv,M.entriesIn=xv,M.extend=pv,M.extendWith=mc,xd(M,M),M.add=vT,M.attempt=Sv,M.camelCase=yk,M.capitalize=yv,M.ceil=bT,M.clamp=bk,M.clone=fR,M.cloneDeep=gR,M.cloneDeepWith=mR,M.cloneWith=dR,M.conformsTo=pR,M.deburr=Cv,M.defaultTo=Xk,M.divide=wT,M.endsWith=Ck,M.eq=Un,M.escape=$k,M.escapeRegExp=Sk,M.every=OA,M.find=IA,M.findIndex=K2,M.findKey=qR,M.findLast=_A,M.findLastIndex=G2,M.findLastKey=KR,M.floor=xT,M.forEach=ev,M.forEachRight=tv,M.forIn=GR,M.forInRight=YR,M.forOwn=XR,M.forOwnRight=ZR,M.get=md,M.gt=vR,M.gte=bR,M.has=ek,M.hasIn=pd,M.head=X2,M.identity=an,M.includes=FA,M.indexOf=_9,M.inRange=wk,M.invoke=rk,M.isArguments=eo,M.isArray=Oe,M.isArrayBuffer=wR,M.isArrayLike=on,M.isArrayLikeObject=dt,M.isBoolean=xR,M.isBuffer=wi,M.isDate=yR,M.isElement=CR,M.isEmpty=$R,M.isEqual=SR,M.isEqualWith=AR,M.isError=dd,M.isFinite=RR,M.isFunction=Nr,M.isInteger=cv,M.isLength=dc,M.isMap=uv,M.isMatch=kR,M.isMatchWith=TR,M.isNaN=MR,M.isNative=ER,M.isNil=DR,M.isNull=OR,M.isNumber=hv,M.isObject=ct,M.isObjectLike=ht,M.isPlainObject=ga,M.isRegExp=gd,M.isSafeInteger=IR,M.isSet=fv,M.isString=gc,M.isSymbol=wn,M.isTypedArray=Go,M.isUndefined=_R,M.isWeakMap=LR,M.isWeakSet=BR,M.join=F9,M.kebabCase=Ak,M.last=Ln,M.lastIndexOf=V9,M.lowerCase=Rk,M.lowerFirst=kk,M.lt=NR,M.lte=jR,M.max=yT,M.maxBy=CT,M.mean=$T,M.meanBy=ST,M.min=AT,M.minBy=RT,M.stubArray=Cd,M.stubFalse=$d,M.stubObject=hT,M.stubString=fT,M.stubTrue=dT,M.multiply=kT,M.nth=H9,M.noConflict=rT,M.noop=yd,M.now=uc,M.pad=Tk,M.padEnd=Mk,M.padStart=Ek,M.parseInt=Ok,M.random=xk,M.reduce=zA,M.reduceRight=UA,M.repeat=Dk,M.replace=Ik,M.result=uk,M.round=TT,M.runInContext=N,M.sample=KA,M.size=XA,M.snakeCase=_k,M.some=ZA,M.sortedIndex=G9,M.sortedIndexBy=Y9,M.sortedIndexOf=X9,M.sortedLastIndex=Z9,M.sortedLastIndexBy=Q9,M.sortedLastIndexOf=J9,M.startCase=Bk,M.startsWith=Nk,M.subtract=MT,M.sum=ET,M.sumBy=OT,M.template=jk,M.times=gT,M.toFinite=jr,M.toInteger=_e,M.toLength=gv,M.toLower=Fk,M.toNumber=Bn,M.toSafeInteger=FR,M.toString=Xe,M.toUpper=Vk,M.trim=Hk,M.trimEnd=Pk,M.trimStart=Wk,M.truncate=zk,M.unescape=Uk,M.uniqueId=pT,M.upperCase=qk,M.upperFirst=vd,M.each=ev,M.eachRight=tv,M.first=X2,xd(M,function(){var l={};return sr(M,function(u,g){Qe.call(M.prototype,g)||(l[g]=u)}),l}(),{chain:!1}),M.VERSION=r,En(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){M[l].placeholder=M}),En(["drop","take"],function(l,u){We.prototype[l]=function(g){g=g===n?1:St(_e(g),0);var y=this.__filtered__&&!u?new We(this):this.clone();return y.__filtered__?y.__takeCount__=Pt(g,y.__takeCount__):y.__views__.push({size:Pt(g,me),type:l+(y.__dir__<0?"Right":"")}),y},We.prototype[l+"Right"]=function(g){return this.reverse()[l](g).reverse()}}),En(["filter","map","takeWhile"],function(l,u){var g=u+1,y=g==G||g==se;We.prototype[l]=function(A){var D=this.clone();return D.__iteratees__.push({iteratee:Ce(A,3),type:g}),D.__filtered__=D.__filtered__||y,D}}),En(["head","last"],function(l,u){var g="take"+(u?"Right":"");We.prototype[l]=function(){return this[g](1).value()[0]}}),En(["initial","tail"],function(l,u){var g="drop"+(u?"":"Right");We.prototype[l]=function(){return this.__filtered__?new We(this):this[g](1)}}),We.prototype.compact=function(){return this.filter(an)},We.prototype.find=function(l){return this.filter(l).head()},We.prototype.findLast=function(l){return this.reverse().find(l)},We.prototype.invokeMap=Ne(function(l,u){return typeof l=="function"?new We(this):this.map(function(g){return la(g,l,u)})}),We.prototype.reject=function(l){return this.filter(fc(Ce(l)))},We.prototype.slice=function(l,u){l=_e(l);var g=this;return g.__filtered__&&(l>0||u<0)?new We(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),u!==n&&(u=_e(u),g=u<0?g.dropRight(-u):g.take(u-l)),g)},We.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},We.prototype.toArray=function(){return this.take(me)},sr(We.prototype,function(l,u){var g=/^(?:filter|find|map|reject)|While$/.test(u),y=/^(?:head|last)$/.test(u),A=M[y?"take"+(u=="last"?"Right":""):u],D=y||/^find/.test(u);A&&(M.prototype[u]=function(){var _=this.__wrapped__,B=y?[1]:arguments,j=_ instanceof We,X=B[0],Z=j||Oe(_),ee=function(Fe){var ze=A.apply(M,fi([Fe],B));return y&&ae?ze[0]:ze};Z&&g&&typeof X=="function"&&X.length!=1&&(j=Z=!1);var ae=this.__chain__,ve=!!this.__actions__.length,$e=D&&!ae,Be=j&&!ve;if(!D&&Z){_=Be?_:new We(this);var Se=l.apply(_,B);return Se.__actions__.push({func:lc,args:[ee],thisArg:n}),new Dn(Se,ae)}return $e&&Be?l.apply(this,B):(Se=this.thru(ee),$e?y?Se.value()[0]:Se.value():Se)})}),En(["pop","push","shift","sort","splice","unshift"],function(l){var u=_l[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",y=/^(?:pop|shift)$/.test(l);M.prototype[l]=function(){var A=arguments;if(y&&!this.__chain__){var D=this.value();return u.apply(Oe(D)?D:[],A)}return this[g](function(_){return u.apply(Oe(_)?_:[],A)})}}),sr(We.prototype,function(l,u){var g=M[u];if(g){var y=g.name+"";Qe.call(Wo,y)||(Wo[y]=[]),Wo[y].push({name:u,func:g})}}),Wo[tc(n,S).name]=[{name:"wrapper",func:n}],We.prototype.clone=U7,We.prototype.reverse=q7,We.prototype.value=K7,M.prototype.at=CA,M.prototype.chain=$A,M.prototype.commit=SA,M.prototype.next=AA,M.prototype.plant=kA,M.prototype.reverse=TA,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=MA,M.prototype.first=M.prototype.head,ta&&(M.prototype[ta]=RA),M},Vo=S7();qi?((qi.exports=Vo)._=Vo,wf._=Vo):Nt._=Vo}).call(cs)})(oh,oh.exports);var FX=oh.exports;const $l=(t,e)=>{const n=$.createContext(e),r=o=>{const{children:s,...a}=o,c=$.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:c,children:s})};function i(o){const s=$.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return r.displayName=`${t}Provider`,[r,i]};function VX(t,e){return typeof t=="string"?!1:e in t}function wu(t,e,n){return t&&e&&VX(t,e)?t[e]:n}const ww={padding:["padding-block-start","padding-inline-end","padding-block-end","padding-inline-start"],paddingTop:"padding-block-start",paddingRight:"padding-inline-end",paddingBottom:"padding-block-end",paddingLeft:"padding-inline-start",margin:["margin-block-start","margin-inline-end","margin-block-end","margin-inline-start"],marginLeft:"margin-inline-start",marginRight:"margin-inline-end",marginTop:"margin-block-start",marginBottom:"margin-block-end",borderRadius:"border-radius",borderStyle:"border-style",borderWidth:"border-width",borderColor:"border-color",fontSize:"font-size",fontWeight:"font-weight",lineHeight:"line-height",zIndex:"z-index",boxShadow:"box-shadow",pointerEvents:"pointer-events",textAlign:"text-align",textTransform:"text-transform",textDecoration:"text-decoration",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexBasis:"flex-basis",minWidth:"min-width",maxWidth:"max-width",minHeight:"min-height",maxHeight:"max-height",flexDirection:"flex-direction",flexWrap:"flex-wrap",justifyContent:"justify-content",alignItems:"align-items"},HX=t=>{const[e,n,r,i]=t,o=n??e;return[e,o,r??e,i??o]};function PX(t,e){switch(t){case"gap":case"padding":case"margin":case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":case"marginTop":case"marginLeft":case"marginRight":case"marginBottom":case"left":case"right":case"top":case"bottom":case"width":case"maxWidth":case"minWidth":case"height":case"maxHeight":case"minHeight":case"borderRadius":case"borderWidth":return e.spaces;case"color":case"background":case"borderColor":return e.colors;case"fontSize":return e.fontSizes;case"fontWeight":return e.fontWeights;case"lineHeight":return e.lineHeights;case"zIndex":return e.zIndices;case"boxShadow":return e.shadows;default:return null}}const Xh=(t,e)=>{const n=Object.entries(t).reduce((r,i)=>{const[o,s]=i,a=PX(o,e),c=Object.prototype.hasOwnProperty.call(ww,o)?ww[o]:o;return c&&(s||s===0)&&(typeof s=="object"&&!Array.isArray(s)?Object.entries(s).forEach(([h,f])=>{r[h]={...r[h],...xw(c,f,a)}}):r.initial={...r.initial,...xw(c,s,a)}),r},{initial:{},small:{},medium:{},large:{}});return Object.entries(n).reduce((r,[i,o])=>{if(o&&Object.keys(o).length>0){const s=Object.entries(o).reduce((a,[c,h])=>(a.push(`${c}: ${h};`),a),[]).join(`
`);i==="initial"?r.push(s):r.push(`${e.breakpoints[i]}{ ${s} }`)}return r},[]).join(`
`)},xw=(t,e,n)=>{if(Array.isArray(t)&&Array.isArray(e)){const r=HX(e);return t.reduce((i,o,s)=>(i[o]=wu(n,r[s],r[s]),i),{})}else return Array.isArray(t)&&!Array.isArray(e)?t.reduce((r,i)=>(r[i]=wu(n,e,e),r),{}):!Array.isArray(t)&&!Array.isArray(e)?{[t]:wu(n,e,e)}:(console.warn("You've passed an array of values to a property that does not support it. Please check the property and value you're passing."),{})},nn=$.forwardRef,be=nn((t,e)=>{const{background:n,basis:r,borderColor:i,color:o,flex:s,fontSize:a,grow:c,hasRadius:h,padding:f,paddingBottom:d,paddingLeft:m,paddingRight:v,paddingTop:x,margin:w,marginLeft:C,marginBottom:S,marginRight:R,marginTop:T,shadow:E,shrink:O,lineHeight:L,fontWeight:I,width:V,minWidth:F,maxWidth:H,height:K,minHeight:W,maxHeight:J,top:G,left:re,bottom:se,right:te,borderRadius:ne,borderStyle:Y,borderWidth:ce,tag:me,pointerEvents:Ie,display:we,position:qe,zIndex:Te,overflow:Ve,cursor:pe,transition:De,transform:Re,animation:Le,textAlign:Ae,textTransform:He,...wt}=t,Ze=me||"div",Pe={$background:n,$basis:r,$borderColor:i,$color:o,$flex:s,$fontSize:a,$grow:c,$hasRadius:h,$padding:f,$paddingBottom:d,$paddingLeft:m,$paddingRight:v,$paddingTop:x,$margin:w,$marginLeft:C,$marginBottom:S,$marginRight:R,$marginTop:T,$shadow:E,$shrink:O,$lineHeight:L,$fontWeight:I,$width:V,$minWidth:F,$maxWidth:H,$height:K,$minHeight:W,$maxHeight:J,$top:G,$left:re,$bottom:se,$right:te,$borderRadius:ne,$borderStyle:Y,$borderWidth:ce,$pointerEvents:Ie,$display:we,$position:qe,$zIndex:Te,$overflow:Ve,$cursor:pe,$transition:De,$transform:Re,$animation:Le,$textAlign:Ae,$textTransform:He};return p.jsx(WX,{as:Ze,ref:e,...Pe,...wt})}),WX=k.styled.div`
  ${({theme:t,...e})=>Xh({padding:e.$padding,paddingTop:e.$paddingTop,paddingBottom:e.$paddingBottom,paddingLeft:e.$paddingLeft,paddingRight:e.$paddingRight,margin:e.$margin,marginTop:e.$marginTop,marginBottom:e.$marginBottom,marginLeft:e.$marginLeft,marginRight:e.$marginRight,top:e.$top,left:e.$left,bottom:e.$bottom,right:e.$right,width:e.$width,minWidth:e.$minWidth,maxWidth:e.$maxWidth,height:e.$height,minHeight:e.$minHeight,maxHeight:e.$maxHeight,color:e.$color,background:e.$background,fontSize:e.$fontSize,fontWeight:e.$fontWeight,lineHeight:e.$lineHeight,borderRadius:e.$hasRadius?t.borderRadius:e.$borderRadius,borderStyle:e.$borderColor&&!e.$borderStyle?"solid":e.$borderStyle,borderWidth:e.$borderColor&&!e.$borderWidth?"1px":e.$borderWidth,borderColor:e.$borderColor,zIndex:e.$zIndex,boxShadow:e.$shadow,display:e.$display,pointerEvents:e.$pointerEvents,cursor:e.$cursor,textAlign:e.$textAlign,textTransform:e.$textTransform,transition:e.$transition,transform:e.$transform,animation:e.$animation,position:e.$position,overflow:e.$overflow,flex:e.$flex,flexShrink:e.$shrink,flexGrow:e.$grow,flexBasis:e.$basis},t)};
`,ue=nn((t,e)=>{const{className:n,alignItems:r,direction:i,inline:o,gap:s,justifyContent:a,wrap:c,...h}=t,f={$alignItems:r,$direction:i,$gap:s,$justifyContent:a,$wrap:c,$inline:o};return p.jsx(zX,{className:n,ref:e,...f,...h})}),zX=k.styled(be)`
  ${({theme:t,$display:e="flex",$alignItems:n="center",$direction:r="row",...i})=>Xh({gap:i.$gap,alignItems:n,justifyContent:i.$justifyContent,flexWrap:i.$wrap,flexDirection:r,display:i.$inline?"inline-flex":e},t)};
`,UX="alpha",qX="beta",KX="delta",GX="epsilon",yw="omega",YX="pi",XX="sigma",t$=k.css`
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,ZX=({$variant:t=yw,theme:e})=>{switch(t){case UX:return`
        font-weight: ${e.fontWeights.bold};
        font-size: ${e.fontSizes[5]};
        line-height: ${e.lineHeights[2]};
      `;case qX:return`
        font-weight: ${e.fontWeights.bold};
        font-size: ${e.fontSizes[4]};
        line-height: ${e.lineHeights[1]};
      `;case KX:return`
        font-weight: ${e.fontWeights.semiBold};
        font-size: ${e.fontSizes[3]};
        line-height: ${e.lineHeights[2]};
      `;case GX:return`
        font-size: ${e.fontSizes[3]};
        line-height: ${e.lineHeights[6]};
      `;case yw:return`
        font-size: ${e.fontSizes[2]};
        line-height: ${e.lineHeights[4]};
      `;case YX:return`
        font-size: ${e.fontSizes[1]};
        line-height: ${e.lineHeights[3]};
      `;case XX:return`
        font-weight: ${e.fontWeights.bold};
        font-size: ${e.fontSizes[0]};
        line-height: ${e.lineHeights[5]};
        text-transform: uppercase;
      `;default:return`
        font-size: ${e.fontSizes[2]};
      `}},ke=nn((t,e)=>{const{ellipsis:n,textColor:r="currentcolor",textDecoration:i,textTransform:o,variant:s,lineHeight:a,fontWeight:c,fontSize:h,...f}=t,d={$ellipsis:n,$textColor:r,$textDecoration:i,$textTransform:o,$variant:s,$lineHeight:a,$fontWeight:c,$fontSize:h};return p.jsx(QX,{ref:e,tag:"span",...d,...f})}),QX=k.styled(be)`
  ${ZX}
  ${({$ellipsis:t})=>t?t$:""}

  ${({theme:t,...e})=>Xh({color:e.$textColor,textDecoration:e.$textDecoration,textTransform:e.$textTransform,lineHeight:e.$lineHeight,fontWeight:e.$fontWeight,fontSize:e.$fontSize},t)}
`,[JX,Hm]=$l("Accordion"),eZ=$.forwardRef(({children:t,size:e="S",...n},r)=>p.jsx(tZ,{ref:r,$size:e,collapsible:!0,...n,type:"single",children:p.jsx(JX,{size:e,children:t})})),tZ=k.styled(BI)`
  background-color: ${t=>t.theme.colors.neutral0};

  ${t=>t.$size==="S"?k.css`
        border-radius: ${e=>e.theme.borderRadius};
        border: solid 1px ${e=>e.theme.colors.neutral200};
      `:k.css``}
`,nZ=$.forwardRef((t,e)=>{const{size:n}=Hm("Item");return p.jsx(rZ,{$size:n,"data-size":n,ref:e,...t})}),rZ=k.styled(NI)`
  overflow: hidden;
  margin: 1px 0;

  &:first-child {
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
    margin-top: 0;
  }

  &:last-child {
    border-bottom-left-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
    margin-bottom: 0;
  }

  &[data-size='S'] {
    & + & {
      border-top: solid 1px ${t=>t.theme.colors.neutral200};
    }
  }

  &[data-state='open'] {
    box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
  }

  &:not([data-disabled]):hover {
    box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
  }

  /* This applies our desired focus effect correctly. */
  &:focus-within {
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: box-shadow ${t=>t.theme.motion.timings[120]}
      ${t=>t.theme.motion.easings.easeOutQuad};
  }
`,iZ=$.forwardRef(({caretPosition:t="left",description:e,icon:n,iconProps:r,children:i,...o},s)=>{const{size:a}=Hm("Trigger");return p.jsxs(r$,{$caretPosition:t,$size:a,ref:s,...o,children:[t==="left"?p.jsx(sh,{$size:a,children:p.jsx(Oi,{width:a==="S"?"1.2rem":"1.6rem",height:a==="S"?"1.2rem":"1.6rem"})}):null,p.jsxs(ue,{tag:"span",gap:2,overflow:"hidden",children:[n&&a==="S"?p.jsx(n$,{children:p.jsx(n,{...r})}):null,p.jsxs(ue,{alignItems:"flex-start",direction:"column",tag:"span",ref:s,overflow:"hidden",children:[p.jsx(ke,{fontWeight:a==="S"?"bold":void 0,ellipsis:!0,variant:a==="M"?"delta":void 0,textAlign:"left",width:"100%",children:i}),e&&a==="M"?p.jsx(ke,{textAlign:"left",children:e}):null]})]}),t==="right"?p.jsx(sh,{$size:a,children:p.jsx(Oi,{width:a==="S"?"1.2rem":"1.6rem",height:a==="S"?"1.2rem":"1.6rem"})}):null]})}),n$=k.styled(be)`
  color: ${t=>t.theme.colors.neutral500};
  display: flex;

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.color};
  }
`,sh=k.styled(ue).attrs(t=>({...t,tag:"span"}))`
  background-color: ${t=>t.theme.colors.neutral200};
  width: ${t=>t.$size==="S"?"2.4rem":"3.2rem"};
  height: ${t=>t.$size==="S"?"2.4rem":"3.2rem"};
  flex: ${t=>t.$size==="S"?"0 0 2.4rem":"0 0 3.2rem"};
  border-radius: 50%;
  justify-content: center;

  @media (prefers-reduced-motion: no-preference) {
    transition:
      transform ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.authenticMotion},
      ${t=>t.theme.transitions.backgroundColor};
  }
`,r$=k.styled(FI)`
  display: flex;
  align-items: center;
  justify-content: ${t=>t.$caretPosition==="left"?"flex-start":"space-between"};
  width: 100%;
  gap: ${t=>t.theme.spaces[4]};
  padding-inline: ${t=>t.$size==="S"?t.theme.spaces[4]:t.theme.spaces[6]};
  padding-block: ${t=>t.$size==="S"?t.theme.spaces[3]:t.theme.spaces[6]};
  cursor: pointer;
  color: ${t=>t.theme.colors.neutral800};
  overflow: hidden;

  &[data-disabled] {
    cursor: default;
    color: ${t=>t.theme.colors.neutral600};
  }

  &[data-state='open'] > ${sh} {
    transform: rotate(180deg);
  }

  /* we remove the default focus because the entire item should have the focus style and the default would be hidden. */
  &:focus-visible {
    outline: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.color};
  }
`,oZ=$.forwardRef((t,e)=>{const{size:n}=Hm("Trigger");return p.jsx(i$,{$size:n,...t,ref:e})}),i$=k.styled(ue).attrs(t=>({...t,tag:"span"}))`
  padding-inline: ${t=>t.$size==="S"?t.theme.spaces[2]:t.theme.spaces[6]};
  padding-block: ${t=>t.$size==="S"?t.theme.spaces[2]:t.theme.spaces[6]};

  // Remove default IconButton styles so there are no backgrounds or borders.
  & > button {
    border: none;
    background: none;
    color: ${t=>t.theme.colors.neutral600};

    @media (prefers-reduced-motion: no-preference) {
      transition: ${t=>t.theme.transitions.color};
    }
  }
`,sZ=$.forwardRef(({variant:t="primary",...e},n)=>p.jsx(aZ,{$variant:t,ref:n,...e})),aZ=k.styled(jI)`
  display: flex;
  align-items: center;
  background-color: ${t=>t.$variant==="primary"?t.theme.colors.neutral0:t.theme.colors.neutral100};

  &[data-disabled] {
    background-color: ${t=>t.theme.colors.neutral150};
  }

  &:not([data-disabled]) {
    &:hover,
    &[data-state='open'] {
      background-color: ${t=>t.theme.colors.primary100};

      & > ${r$} {
        color: ${t=>t.theme.colors.primary600};

        & ${n$} {
          color: ${t=>t.theme.colors.primary600};
        }

        & ${sh} {
          background-color: ${t=>t.theme.colors.primary200};
        }
      }

      & > ${i$} > button {
        color: ${t=>t.theme.colors.primary600};
      }
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.backgroundColor};
  }
`,lZ=$.forwardRef((t,e)=>p.jsx(hZ,{ref:e,...t})),cZ=k.keyframes`
  from {
    height: 0;
  }
  to {
    height: var(--radix-accordion-content-height);
  }
`,uZ=k.keyframes`
  from {
    height: var(--radix-accordion-content-height);
  }
  to {
    height: 0;
  }
`,hZ=k.styled(VI)`
  overflow: hidden;

  @media (prefers-reduced-motion: no-preference) {
    &[data-state='open'] {
      animation: ${cZ} ${t=>t.theme.motion.timings[320]}
        ${t=>t.theme.motion.easings.authenticMotion};
    }

    &[data-state='closed'] {
      animation: ${uZ} ${t=>t.theme.motion.timings[320]}
        ${t=>t.theme.motion.easings.authenticMotion};
    }
  }
`,fZ=Object.freeze(Object.defineProperty({__proto__:null,Actions:oZ,Content:lZ,Header:sZ,Item:nZ,Root:eZ,Trigger:iZ},Symbol.toStringTag,{value:"Module"})),Zh=k.css`
  position: relative;
  outline: none;

  &:after {
    transition-property: all;
    transition-duration: 0.2s;
    border-radius: 8px;
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: -4px;
    right: -4px;
    border: 2px solid transparent;
  }

  &:focus-visible {
    outline: none;

    &:after {
      border-radius: 8px;
      content: '';
      position: absolute;
      top: -5px;
      bottom: -5px;
      left: -5px;
      right: -5px;
      border: 2px solid ${t=>t.theme.colors.primary600};
    }
  }
`,Io=({tag:t,...e})=>{const n=t||"span";return p.jsx(dZ,{...e,as:n})},dZ=k.styled.span`
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
`,Ns=({children:t,label:e})=>{const n=$.Children.only(t);return p.jsxs(p.Fragment,{children:[$.cloneElement(n,{"aria-hidden":"true",focusable:"false"}),p.jsx(Io,{children:e})]})};Ns.displayName="AccessibleIcon";const o$=t=>{switch(t){case"danger":return"danger100";case"success":return"success100";case"warning":return"warning100";default:return"primary100"}},gZ=t=>o$(t).replace("100","200"),G1=({theme:t,$variant:e})=>e==="danger"?t.colors.danger700:e==="success"?t.colors.success700:e==="warning"?t.colors.warning700:t.colors.primary700,mZ=k.styled(be)`
  ${Zh};
`,pZ=k.styled(ue)`
  svg {
    height: 100%;
    width: 100%;

    path {
      fill: ${G1};
    }
  }
`,vZ=({variant:t,...e})=>t==="success"?p.jsx(T_,{...e}):t==="danger"||t==="warning"?p.jsx(E3,{...e}):p.jsx(oB,{...e}),bZ=k.styled(be)`
  & a > span {
    color: ${G1};
  }

  svg path {
    fill: ${G1};
  }
`,wZ=({title:t,children:e,variant:n="default",onClose:r,closeLabel:i,titleAs:o="p",action:s,...a})=>p.jsxs(ue,{alignItems:"flex-start",background:o$(n),borderColor:gZ(n),shadow:"filterShadow",gap:3,hasRadius:!0,padding:5,paddingRight:6,...a,children:[p.jsx(pZ,{height:"2rem",shrink:0,$variant:n,width:"2rem",children:p.jsx(vZ,{"aria-hidden":!0,variant:n})}),p.jsxs(ue,{alignItems:"start",gap:s?2:1,wrap:"wrap",role:n==="danger"?"alert":"status",width:"100%",children:[t&&p.jsx(ke,{fontWeight:"bold",textColor:"neutral800",tag:o,children:t}),p.jsx(ke,{tag:"p",textColor:"neutral800",children:e}),s&&p.jsx(bZ,{$variant:n,children:s})]}),p.jsx(mZ,{tag:"button",background:"transparent",borderColor:void 0,height:"1.6rem",width:"1.6rem",marginTop:1,onClick:r,color:"neutral700",children:p.jsx(Ns,{label:i,children:p.jsx(Vi,{})})})]});function yr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=s$({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=yt(n),c=$.useCallback(h=>{if(o){const d=typeof h=="function"?h(t):h;d!==t&&a(d)}else i(h)},[o,t,i,a]);return[s,c]}function s$({defaultProp:t,onChange:e}){const n=$.useState(t),[r]=n,i=$.useRef(r),o=yt(e);return $.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Y1={easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",easeInOutFast:"cubic-bezier(1,0,0,1)",authenticMotion:"cubic-bezier(.4,0,.2,1)"},X1={320:"320ms",200:"200ms",120:"120ms"},xZ={color:`color ${X1[120]} ${Y1.easeOutQuad}`,backgroundColor:`background-color ${X1[120]} ${Y1.easeOutQuad}`},pt={overlayFadeIn:k.keyframes`
    from {
      opacity: 0;
    }
    to {
      opacity: 0.2;
    }
  `,modalPopIn:k.keyframes`
    from {
      transform:translate(-50%, -50%)  scale(0.8);
      opacity: 0;
    }
    to {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  `,modalPopOut:k.keyframes`
    from {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
    to {
      transform:translate(-50%, -50%)  scale(0.8);
      opacity: 0;
    }
  `,popIn:k.keyframes`
    from {
      transform: scale(0.8);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  `,popOut:k.keyframes`
    from {
      transform: scale(1);
      opacity: 1;
    }
    to {
      transform: scale(0.8);
      opacity: 0;
    }
  `,slideDownIn:k.keyframes`
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  `,slideDownOut:k.keyframes`
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-10px);
    }
  `,slideUpIn:k.keyframes`
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  `,slideUpOut:k.keyframes`
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(10px);
    }
  `,fadeIn:k.keyframes`
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  `,fadeOut:k.keyframes`
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  `},il=32,Cw=2,yZ=$.forwardRef(({onLoadingStatusChange:t,delayMs:e=600,src:n,alt:r,fallback:i,preview:o=!1,...s},a)=>{const[c,h]=yr({onChange:t}),[f,d]=$.useState(!1),m=o&&c==="loaded",v=x=>{m&&d(x)};return p.jsxs(Mx,{onOpenChange:v,children:[p.jsx(Ex,{asChild:!0,children:p.jsxs(Z1,{ref:a,...s,children:[m?p.jsx(CZ,{width:"100%",height:"100%",position:"absolute",background:"neutral0",zIndex:"overlay",style:{opacity:f?.4:0}}):null,p.jsx($Z,{src:n,alt:r,onLoadingStatusChange:h}),p.jsx(xj,{delayMs:e,children:p.jsx(ke,{fontWeight:"bold",textTransform:"uppercase",children:i})})]})}),m?p.jsx(Ox,{children:p.jsx(SZ,{side:"top",sideOffset:4,children:p.jsx(AZ,{src:n,alt:r})})}):null]})}),a$=k.css`
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  overflow: hidden;
  user-select: none;
  overflow: hidden;
  border-radius: 50%;
`,l$=k.css`
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
`,Z1=k.styled(bj)`
  position: relative;
  z-index: 0;
  ${a$}
  width: ${il/10}rem;
  height: ${il/10}rem;
  /* TODO: we should get the user email & hash it to turn it into a hex-value so different emails can consistently get a different background */
  background-color: ${t=>t.theme.colors.primary600};
  color: ${t=>t.theme.colors.neutral0};
`,CZ=k.styled(be)`
  @media (prefers-reduced-motion: no-preference) {
    transition: opacity ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,$Z=k.styled(wj)`
  ${l$}
`,SZ=k.styled(Dx)`
  ${a$}
  width: ${il*Cw/10}rem;
  height: ${il*Cw/10}rem;

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.fadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,AZ=k.styled.img`
  ${l$}
`,RZ=$.forwardRef((t,e)=>p.jsx(kZ,{...t,ref:e,tag:"div"})),kZ=k.styled(ue)`
  & > ${Z1} + ${Z1} {
    margin-left: -${il/10/2}rem;
  }
`,TZ=Object.freeze(Object.defineProperty({__proto__:null,Group:RZ,Item:yZ},Symbol.toStringTag,{value:"Module"})),Pm=({active:t=!1,size:e="M",textColor:n="neutral600",backgroundColor:r="neutral150",children:i,minWidth:o=5,...s})=>{const a=e==="S"?1:2;return p.jsx(MZ,{inline:!0,alignItems:"center",justifyContent:"center",minWidth:o,paddingLeft:a,paddingRight:a,background:t?"primary200":r,$size:e,...s,children:p.jsx(ke,{variant:"sigma",textColor:t?"primary600":n,lineHeight:"1rem",children:i})})},MZ=k.styled(ue)`
  border-radius: ${({theme:t,$size:e})=>e==="S"?"2px":t.borderRadius};
  ${({$size:t,theme:e})=>t==="S"?k.css`
        padding-block: 0.3rem;
        padding-inline ${e.spaces[1]}
      `:k.css`
      padding-block: 0.7rem;
      padding-inline ${e.spaces[2]}
    `};
`,Sl=nn(({href:t,disabled:e=!1,isExternal:n=!1,...r},i)=>p.jsx(EZ,{tag:"a",ref:i,target:n?"_blank":void 0,rel:n?"noreferrer noopener":void 0,href:t,tabIndex:e?-1:void 0,"aria-disabled":e,pointerEvents:e?"none":void 0,cursor:e?void 0:"pointer",...r})),EZ=k.styled(be)`
  text-decoration: none;

  &:visited {
    color: inherit;
  }
`,c$=()=>p.jsx(be,{"aria-hidden":!0,paddingLeft:1,paddingRight:1,children:p.jsx(ke,{variant:"pi",textColor:"neutral500",children:"/"})});c$.displayName="Divider";const OZ=k.styled(ue)`
  // CrumbLinks do have padding-x, because they need to have a
  // interaction effect, which mis-aligns the breadcrumbs on the left.
  // This normalizes the behavior by moving the first item to left by
  // the same amount it has inner padding
  & > *:first-child {
    margin-left: ${({theme:t})=>`calc(-1*${t.spaces[2]})`};
  }
`,DZ=$.forwardRef(({label:t,children:e,...n},r)=>{const i=$.Children.toArray(e);return p.jsx(be,{"aria-label":t,tag:"nav",...n,ref:r,children:p.jsx(OZ,{tag:"ol",children:$.Children.map(i,(o,s)=>{const a=i.length>1&&s+1<i.length;return p.jsxs(ue,{inline:!0,tag:"li",children:[o,a&&p.jsx(c$,{})]})})})})});DZ.displayName="Breadcrumbs";const IZ=$.forwardRef(({children:t,isCurrent:e=!1,...n},r)=>p.jsx(be,{paddingLeft:2,paddingRight:2,paddingTop:1,paddingBottom:1,ref:r,children:p.jsx(ke,{variant:"pi",textColor:"neutral800",fontWeight:e?"bold":"regular","aria-current":e,...n,children:t})}));IZ.displayName="Crumb";const _Z=k.styled(Sl)`
  border-radius: ${({theme:t})=>t.borderRadius};
  color: ${({theme:t})=>t.colors.neutral600};
  font-size: ${({theme:t})=>t.fontSizes[1]};
  line-height: ${({theme:t})=>t.lineHeights[4]};
  padding: ${({theme:t})=>`${t.spaces[1]} ${t.spaces[2]}`};
  text-decoration: none;

  :hover,
  :focus {
    background-color: ${({theme:t})=>t.colors.neutral200};
    color: ${({theme:t})=>t.colors.neutral700};
  }
`,LZ=$.forwardRef(({children:t,...e},n)=>p.jsx(_Z,{ref:n,...e,children:t}));LZ.displayName="CrumbLink";const js=t=>t.replaceAll(":","");function BZ(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function u$(...t){return e=>t.forEach(n=>BZ(n,e))}function gn(...t){return $.useCallback(u$(...t),t)}const NZ=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),So=NZ()?b.useEffect:b.useLayoutEffect,jZ=$.useId||(()=>{});let FZ=0;const Tn=t=>{const[e,n]=$.useState(jZ());return So(()=>{t||n(r=>r??String(FZ++))},[t]),t?.toString()??(e||"")},Al=(t,e,{selectorToWatch:n,skipWhen:r=!1})=>{const i=Rg(e);$.useEffect(()=>{if(r||!t.current)return;const o={root:t.current,rootMargin:"0px"},s=h=>{h.forEach(f=>{f.isIntersecting&&t.current&&t.current.scrollHeight>t.current.clientHeight&&i(f)})},a=new IntersectionObserver(s,o),c=t.current.querySelector(n);return c&&a.observe(c),()=>{a.disconnect()}},[r,i,n,t])},Wm="success-light",zm="danger-light",Qh="default",Rl="tertiary",kl="secondary",h$="danger",f$="success",Jh="ghost",Um=[Wm,zm],VZ=[Qh,Rl,kl,h$,f$,Jh,...Um],HZ=["XS","S","M","L"],Kn=t=>t===Wm||t===zm?`${t.substring(0,t.lastIndexOf("-"))}`:t===Rl?"neutral":t===Qh||t===kl||VZ.every(e=>e!==t)?"primary":`${t}`,d$=({theme:t})=>k.css`
    border: 1px solid ${t.colors.neutral200};
    background: ${t.colors.neutral150};
    color: ${t.colors.neutral600};
    cursor: default;
  `,g$=({theme:t,$variant:e})=>[...Um,kl].includes(e)?k.css`
      background-color: ${t.colors.neutral0};
    `:e===Rl?k.css`
      background-color: ${t.colors.neutral100};
    `:e===Jh?k.css`
      background-color: ${t.colors.neutral100};
    `:e===Qh?k.css`
      border: 1px solid ${t.colors.buttonPrimary500};
      background: ${t.colors.buttonPrimary500};
    `:k.css`
    border: 1px solid ${t.colors[`${Kn(e)}500`]};
    background: ${t.colors[`${Kn(e)}500`]};
  `,m$=({theme:t,$variant:e})=>[...Um,kl].includes(e)?k.css`
      background-color: ${t.colors.neutral0};
      border: 1px solid ${t.colors[`${Kn(e)}600`]};
      color: ${t.colors[`${Kn(e)}600`]};
    `:e===Rl||e===Jh?k.css`
      background-color: ${t.colors.neutral150};
    `:k.css`
    border: 1px solid ${t.colors[`${Kn(e)}600`]};
    background: ${t.colors[`${Kn(e)}600`]};
  `,p$=({theme:t,$variant:e})=>{switch(e){case zm:case Wm:case kl:return k.css`
        border: 1px solid ${t.colors[`${Kn(e)}200`]};
        background: ${t.colors[`${Kn(e)}100`]};
        color: ${t.colors[`${Kn(e)}700`]};
      `;case Rl:return k.css`
        border: 1px solid ${t.colors.neutral200};
        background: ${t.colors.neutral0};
        color: ${t.colors.neutral800};
      `;case Jh:return k.css`
        border: 1px solid transparent;
        background: transparent;
        color: ${t.colors.neutral800};

        svg {
          fill: ${t.colors.neutral500};
        }
      `;case f$:case h$:return k.css`
        border: 1px solid ${t.colors[`${Kn(e)}600`]};
        background: ${t.colors[`${Kn(e)}600`]};
        color: ${t.colors.neutral0};
      `;default:return k.css`
        border: 1px solid ${t.colors.buttonPrimary600};
        background: ${t.colors.buttonPrimary600};
        color: ${t.colors.buttonNeutral0};
      `}},ah=nn(({variant:t=Qh,startIcon:e,endIcon:n,disabled:r=!1,children:i,onClick:o,size:s=HZ[1],loading:a=!1,fullWidth:c=!1,...h},f)=>{const d=r||a,m=v=>{!d&&o&&o(v)};return p.jsxs(zZ,{ref:f,"aria-disabled":d,disabled:d,$size:s,$variant:t,tag:"button",onClick:m,hasRadius:!0,gap:2,inline:!0,alignItems:"center",justifyContent:"center",width:c?"100%":void 0,paddingLeft:4,paddingRight:4,cursor:"pointer",...h,children:[(e||a)&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:a?p.jsx(WZ,{}):e}),p.jsx(ke,{variant:s==="S"?"pi":void 0,fontWeight:"bold",children:i}),n&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:n})]})}),PZ=k.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,WZ=k.styled(T3)`
  animation: ${PZ} 2s infinite linear;
  will-change: transform;
`,zZ=k.styled(ue)`
  height: ${({theme:t,$size:e})=>t.sizes.button[e]};
  text-decoration: none;
  ${p$}

  &:hover {
    ${g$}
  }

  &:active {
    ${m$}
  }

  &[aria-disabled='true'] {
    ${d$}
  }

  @media (prefers-reduced-motion: no-preference) {
    transition:
      ${t=>t.theme.transitions.backgroundColor},
      ${t=>t.theme.transitions.color},
      border-color ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.easeOutQuad};
  }
`,qm=$.forwardRef(({children:t,description:e,label:n,defaultOpen:r,open:i,onOpenChange:o,delayDuration:s=500,disableHoverableContent:a,...c},h)=>!n&&!e?t:p.jsxs(Mx,{defaultOpen:r,open:i,onOpenChange:o,delayDuration:s,disableHoverableContent:a,children:[p.jsx(Ex,{asChild:!0,children:t}),p.jsx(Ox,{children:p.jsx(UZ,{ref:h,sideOffset:8,...c,children:p.jsx(ke,{variant:"pi",fontWeight:"bold",children:n||e})})})]})),UZ=k.styled(Dx)`
  background-color: ${t=>t.theme.colors.neutral900};
  color: ${t=>t.theme.colors.neutral0};
  padding-inline: ${t=>t.theme.spaces[2]};
  padding-block: ${t=>t.theme.spaces[2]};
  border-radius: ${t=>t.theme.borderRadius};
  z-index: ${t=>t.theme.zIndices.tooltip};
  will-change: opacity;
  transform-origin: var(--radix-tooltip-content-transform-origin);

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.fadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,ni=nn(({label:t,background:e,children:n,disabled:r=!1,onClick:i,size:o="S",variant:s="tertiary",withTooltip:a=!0,...c},h)=>{const f=m=>{!r&&i&&i(m)},d=p.jsx(Ta,{"aria-disabled":r,background:r?"neutral150":e,tag:"button",display:"inline-flex",justifyContent:"center",hasRadius:!0,cursor:"pointer",...c,ref:h,$size:o,onClick:f,$variant:s,children:p.jsx(Ns,{label:t,children:n})});return a?p.jsx(qm,{label:t,children:d}):d}),Ta=k.styled(ue)`
  text-decoration: none;

  ${t=>{switch(t.$size){case"XS":return k.css`
          padding-block: 0.2rem;
          padding-inline: 0.2rem;
        `;case"S":return k.css`
          padding-block: 0.7rem;
          padding-inline: 0.7rem;
        `;case"M":return k.css`
          padding-block: 0.9rem;
          padding-inline: 0.9rem;
        `;case"L":return k.css`
          padding-block: 1.1rem;
          padding-inline: 1.1rem;
        `}}}
  ${p$}
  ${t=>t.$variant==="tertiary"?k.css`
          color: ${t.theme.colors.neutral500};
        `:""}

  &:hover {
    ${g$}
    ${t=>t.$variant==="tertiary"?k.css`
            color: ${t.theme.colors.neutral600};
          `:""}
  }

  &:active {
    ${m$}
  }

  &[aria-disabled='true'] {
    ${d$}
  }

  @media (prefers-reduced-motion: no-preference) {
    transition:
      ${t=>t.theme.transitions.backgroundColor},
      ${t=>t.theme.transitions.color},
      border-color ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.easeOutQuad};
  }
`,qZ=k.styled(ue)`
  & ${Ta}:first-child {
    border-radius: ${({theme:t})=>`${t.borderRadius} 0 0 ${t.borderRadius}`};
  }

  & ${Ta}:last-child {
    border-radius: ${({theme:t})=>`0 ${t.borderRadius} ${t.borderRadius} 0`};
  }

  & ${Ta} {
    border-radius: 0;

    & + ${Ta} {
      border-left: none;
    }
  }
`,v$=nn(({children:t,href:e,disabled:n=!1,startIcon:r,endIcon:i,isExternal:o=!1,...s},a)=>p.jsxs(KZ,{ref:a,href:e,disabled:n,isExternal:o,...s,children:[r,p.jsx(ke,{textColor:n?"neutral600":"primary600",children:t}),i,e&&!i&&o&&p.jsx(CL,{})]})),KZ=k.styled(Sl)`
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: ${({theme:t})=>t.spaces[2]};
  pointer-events: ${({disabled:t})=>t?"none":void 0};

  svg {
    font-size: 1rem;

    path {
      fill: ${({disabled:t,theme:e})=>t?e.colors.neutral600:e.colors.primary600};
    }
  }

  &:hover {
    & > span {
      color: ${({theme:t})=>t.colors.primary500};
    }

    svg path {
      fill: ${({theme:t})=>t.colors.primary500};
    }
  }

  &:active {
    color: ${({theme:t})=>t.colors.primary700};
  }

  ${Zh};
`,GZ=t=>{switch(t){case"danger":return"danger100";default:return"primary100"}},$w=(t,e)=>{switch(t){case"danger":return e?"danger500":"danger700";default:return e?"neutral500":"neutral800"}},Sw=(t,e)=>{switch(t){case"danger":return e?"danger500":"danger700";default:return e?"neutral300":"neutral500"}},YZ=qF,XZ=$.forwardRef(({label:t,endIcon:e=p.jsx(Oi,{width:"1.2rem",height:"1.2rem","aria-hidden":!0}),tag:n=ah,icon:r,...i},o)=>{const s={...i,ref:o,type:"button"};return p.jsx(KF,{asChild:!0,disabled:s.disabled,children:n===ni?p.jsx(ni,{label:t,variant:"tertiary",...s,children:r}):p.jsx(ah,{endIcon:e,variant:"ghost",...s})})}),ZZ=$.forwardRef(({children:t,intersectionId:e,onCloseAutoFocus:n,popoverPlacement:r="bottom-start",...i},o)=>{const[s,a]=r.split("-");return p.jsx(Q3,{children:p.jsx(QZ,{align:a,side:s,loop:!0,onCloseAutoFocus:n,asChild:!0,children:p.jsxs(b$,{ref:o,direction:"column",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,marginTop:1,marginBottom:1,alignItems:"flex-start",position:"relative",overflow:"auto",...i,children:[t,p.jsx(be,{id:e,width:"100%",height:"1px"})]})})})}),b$=k.styled(ue)`
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  z-index: ${t=>t.theme.zIndices.popover};

  &::-webkit-scrollbar {
    display: none;
  }
`,QZ=k.styled(GF)`
  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,JZ=({onSelect:t,disabled:e=!1,isLink:n,startIcon:r,endIcon:i,isExternal:o,variant:s="default",...a})=>p.jsx(XF,{asChild:!0,onSelect:t,disabled:e,children:n||o?p.jsx(eQ,{color:$w(s,e),startIcon:r,endIcon:i,...a,isExternal:o??!1,$variant:s,children:a.children}):p.jsxs(x$,{cursor:"pointer",color:$w(s,e),background:"transparent",borderStyle:"none",gap:2,$variant:s,...a,children:[r&&p.jsx(ue,{tag:"span",color:Sw(s,e),"aria-hidden":!0,children:r}),p.jsx(ke,{grow:1,children:a.children}),i&&p.jsx(ue,{tag:"span",color:Sw(s,e),"aria-hidden":!0,children:i})]})}),w$=({theme:t,$variant:e})=>k.css`
  text-align: left;
  width: 100%;
  border-radius: ${t.borderRadius};
  padding: ${t.spaces[2]} ${t.spaces[4]};

  &[aria-disabled='true'] {
    cursor: not-allowed;
  }

  &[data-highlighted] {
    background-color: ${t.colors[GZ(e)]};
  }

  &:focus-visible {
    outline: none;

    &:after {
      content: none;
    }
  }
`,x$=k.styled(ue)`
  ${({theme:t,$variant:e})=>w$({theme:t,$variant:e})}
`,eQ=k.styled(v$)`
  /* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
  color: ${({theme:t,color:e})=>wu(t.colors,e,void 0)};
  text-decoration: none;

  &:hover {
    color: unset;
  }

  /* TODO: do we need this? */
  svg > path,
  &:focus-visible svg > path {
    fill: currentColor;
  }

  ${({theme:t,$variant:e})=>w$({theme:t,$variant:e})}
`,tQ=k.styled(be)`
  /* Negative horizontal margin to compensate Menu.Content's padding */
  margin: ${({theme:t})=>t.spaces[1]} -${({theme:t})=>t.spaces[1]};
  width: calc(100% + ${({theme:t})=>t.spaces[2]});
  /* Hide separator if there's nothing above in the menu */
  &:first-child {
    display: none;
  }
`;$.forwardRef((t,e)=>p.jsx(ZF,{...t,asChild:!0,children:p.jsx(tQ,{height:"1px",shrink:0,background:"neutral150",ref:e})}));$.forwardRef((t,e)=>p.jsx(YF,{asChild:!0,children:p.jsx(nQ,{ref:e,variant:"sigma",textColor:"neutral600",...t})}));const nQ=k.styled(ke)`
  padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
`;$.forwardRef(({disabled:t=!1,...e},n)=>p.jsx(QF,{asChild:!0,disabled:t,children:p.jsxs(rQ,{ref:n,color:"neutral800",tag:"button",type:"button",background:"transparent",borderStyle:"none",gap:5,...e,children:[p.jsx(ke,{children:e.children}),p.jsx(Xg,{fill:"neutral500",height:"1.2rem",width:"1.2rem"})]})}));const rQ=k.styled(x$)`
  &[data-state='open'] {
    background-color: ${({theme:t})=>t.colors.primary100};
  }
`;$.forwardRef((t,e)=>p.jsx(Q3,{children:p.jsx(JF,{sideOffset:8,asChild:!0,children:p.jsx(b$,{ref:e,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",overflow:"auto",...t})})}));const iQ=YZ,oQ=XZ,sQ=ZZ,aQ=JZ,y$=$.forwardRef(({children:t,onOpen:e,onClose:n,popoverPlacement:r,onReachEnd:i,...o},s)=>{const a=$.useRef(null),c=gn(s,a),h=$.useRef(null),[f,d]=$.useState(!1),m=C=>{i&&i(C)},v=C=>{C&&typeof e=="function"?e():!C&&typeof n=="function"&&n(),d(C)},x=Tn(),w=`intersection-${js(x)}`;return Al(h,m,{selectorToWatch:`#${w}`,skipWhen:!f}),p.jsxs(iQ,{onOpenChange:v,children:[p.jsx(oQ,{ref:c,...o,children:o.label}),p.jsx(sQ,{ref:h,intersectionId:w,popoverPlacement:r,children:t})]})}),lQ=aQ,cQ=k.styled(y$)`
  padding: ${({theme:t})=>`${t.spaces[1]} ${t.spaces[2]}`};
  height: unset;

  :hover,
  :focus {
    background-color: ${({theme:t})=>t.colors.neutral200};
  }
`,uQ=$.forwardRef(({children:t,...e},n)=>p.jsx(cQ,{ref:n,endIcon:null,size:"S",...e,children:t}));uQ.displayName="CrumbSimpleMenu";const C$=$.createContext({id:""}),hQ=()=>$.useContext(C$);$.forwardRef(({id:t,...e},n)=>{const r=Tn(t),i=$.useMemo(()=>({id:r}),[r]);return p.jsx(C$.Provider,{value:i,children:p.jsx(be,{ref:n,id:t,tabIndex:0,hasRadius:!0,background:"neutral0",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",shadow:"tableShadow",tag:"article","aria-labelledby":`${r}-title`,...e})})});const fQ=$.forwardRef(({position:t,...e},n)=>p.jsx(dQ,{ref:n,$position:t,...e,direction:"row",gap:2})),dQ=k.styled(ue)`
  position: absolute;
  top: ${({theme:t})=>t.spaces[3]};
  right: ${({$position:t,theme:e})=>{if(t==="end")return e.spaces[3]}};
  left: ${({$position:t,theme:e})=>{if(t==="start")return e.spaces[3]}};
`;k.styled.img`
  // inline flows is based on typography and displays an extra white space below the image
  // switch to block is required in order to make the img stick the bottom of the container
  // addition infos: https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image
  margin: 0;
  padding: 0;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
`;k.styled.div`
  display: flex;
  justify-content: center;
  height: ${({$size:t})=>t==="S"?"8.8rem":"16.4rem"};
  width: 100%;
  background: repeating-conic-gradient(${({theme:t})=>t.colors.neutral100} 0% 25%, transparent 0% 50%) 50% / 20px
    20px;
  border-top-left-radius: ${({theme:t})=>t.borderRadius};
  border-top-right-radius: ${({theme:t})=>t.borderRadius};
`;k.styled.div`
  margin-left: auto;
  flex-shrink: 0;
`;k.styled(Pm)`
  margin-left: ${({theme:t})=>t.spaces[1]};
`;const gQ=({fill:t,...e})=>{const{colors:n}=k.useTheme();return p.jsx(be,{tag:"svg",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:t?n[t]:void 0,...e,children:p.jsx("path",{d:"M29.0613 10.0613L13.0613 26.0613C12.9219 26.2011 12.7563 26.3121 12.574 26.3878C12.3917 26.4635 12.1962 26.5024 11.9988 26.5024C11.8013 26.5024 11.6059 26.4635 11.4235 26.3878C11.2412 26.3121 11.0756 26.2011 10.9363 26.0613L3.93626 19.0613C3.79673 18.9217 3.68605 18.7561 3.61053 18.5738C3.53502 18.3915 3.49615 18.1961 3.49615 17.9988C3.49615 17.8014 3.53502 17.606 3.61053 17.4237C3.68605 17.2414 3.79673 17.0758 3.93626 16.9363C4.07579 16.7967 4.24143 16.686 4.42374 16.6105C4.60604 16.535 4.80143 16.4962 4.99876 16.4962C5.19608 16.4962 5.39147 16.535 5.57378 16.6105C5.75608 16.686 5.92173 16.7967 6.06126 16.9363L12 22.875L26.9388 7.93876C27.2205 7.65697 27.6027 7.49866 28.0013 7.49866C28.3998 7.49866 28.782 7.65697 29.0638 7.93876C29.3455 8.22055 29.5039 8.60274 29.5039 9.00126C29.5039 9.39977 29.3455 9.78197 29.0638 10.0638L29.0613 10.0613Z"})})},Aw=$.forwardRef(({defaultChecked:t,checked:e,onCheckedChange:n,...r},i)=>{const o=$.useRef(null),[s,a]=yr({defaultProp:t,prop:e,onChange:n}),c=gn(o,i);return p.jsx(mQ,{ref:c,checked:s,onCheckedChange:a,...r,children:p.jsxs(pQ,{forceMount:!0,children:[s===!0?p.jsx(gQ,{width:"1.6rem",fill:"neutral0"}):null,s==="indeterminate"?p.jsx(OB,{fill:"neutral0"}):null]})})}),mQ=k.styled(aV)`
  background: ${t=>t.theme.colors.neutral0};
  width: 2rem;
  height: 2rem;
  border-radius: ${t=>t.theme.borderRadius};
  border: 1px solid ${t=>t.theme.colors.neutral300};
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  // this ensures the checkbox is always a square even in flex-containers.
  flex: 0 0 2rem;

  &[data-state='checked']:not([data-disabled]),
  &[data-state='indeterminate']:not([data-disabled]) {
    border: 1px solid ${t=>t.theme.colors.primary600};
    background-color: ${t=>t.theme.colors.primary600};
  }

  &[data-disabled] {
    background-color: ${t=>t.theme.colors.neutral200};
  }

  /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    min-width: 44px;
    min-height: 44px;
  }
`,pQ=k.styled(lV)`
  display: inline-flex;
  pointer-events: auto !important;
  width: 100%;
  height: 100%;
  cursor: pointer;
  justify-content: center;
  align-items: center;

  &[data-disabled] {
    cursor: not-allowed;
  }
`,ef=$.forwardRef(({children:t,...e},n)=>{const r=Tn(e.id);return t?p.jsxs(ue,{gap:2,children:[p.jsx(Aw,{id:r,...e}),p.jsx(ke,{tag:"label",textColor:"neutral800",htmlFor:r,children:t})]}):p.jsx(Aw,{ref:n,...e})});$.forwardRef((t,e)=>{const{id:n}=hQ();return p.jsx(fQ,{position:"start",children:p.jsx(ef,{"aria-labelledby":`${n}-title`,...t,ref:e})})});k.styled(be)`
  word-break: break-all;
`;k.styled(ue)`
  border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
`;const At={DOWN:"ArrowDown",UP:"ArrowUp",RIGHT:"ArrowRight",LEFT:"ArrowLeft",ESCAPE:"Escape",ENTER:"Enter",TAB:"Tab",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"},vQ=k.styled(be)`
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'startAction slides endAction';
`,bQ=k.styled(ue)`
  grid-area: slides;
`,Rw=k.styled(be)`
  grid-area: ${({$area:t})=>t};

  &:focus svg path,
  &:hover svg path {
    fill: ${({theme:t})=>t.colors.neutral900};
  }
`,wQ=$.forwardRef(({actions:t,children:e,label:n,nextLabel:r,onNext:i,onPrevious:o,previousLabel:s,secondaryLabel:a,selectedSlide:c,...h},f)=>{const d=$.useRef(null),m=$.useRef(null),v=$.Children.map(e,(w,C)=>$.cloneElement(w,{selected:C===c})),x=w=>{switch(w.key){case At.RIGHT:{w.preventDefault(),m?.current&&m.current.focus(),i&&i();break}case At.LEFT:{w.preventDefault(),d?.current&&d.current.focus(),o&&o();break}}};return p.jsx(be,{ref:f,...h,onKeyDown:x,children:p.jsxs(be,{padding:2,borderColor:"neutral200",hasRadius:!0,background:"neutral100",children:[p.jsxs(vQ,{tag:"section","aria-roledescription":"carousel","aria-label":n,display:"grid",position:"relative",children:[v&&v.length>1&&p.jsxs(p.Fragment,{children:[p.jsx(Rw,{tag:"button",onClick:o,$area:"startAction",ref:d,type:"button",children:p.jsx(Ns,{label:s,children:p.jsx(k3,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})}),p.jsx(Rw,{tag:"button",onClick:i,$area:"endAction",ref:m,type:"button",children:p.jsx(Ns,{label:r,children:p.jsx(Xg,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})})]}),p.jsx(bQ,{"aria-live":"polite",paddingLeft:2,paddingRight:2,width:"100%",overflow:"hidden",children:v}),t]}),a&&p.jsx(be,{paddingTop:2,paddingLeft:4,paddingRight:4,children:p.jsx(qm,{label:a,children:p.jsx(ue,{justifyContent:"center",children:p.jsx(ke,{variant:"pi",textColor:"neutral600",ellipsis:!0,children:a})})})})]})})}),xQ={accordions:{S:"4.8rem",M:"8.8rem"},button:{S:"3.2rem",M:"3.6rem",L:"4rem"}},$$={sizes:xQ,zIndices:{navigation:100,overlay:300,modal:310,dialog:320,popover:500,notification:700,tooltip:1e3},spaces:["0px","4px","8px","12px","16px","20px","24px","32px","40px","48px","56px","64px"],borderRadius:"4px",breakpoints:{initial:"@media(min-width: 0px)",small:"@media(min-width: 520px)",medium:"@media(min-width: 768px)",large:"@media(min-width: 1080px)"},fontSizes:["1.1rem","1.2rem","1.4rem","1.6rem","1.8rem","3.2rem"],lineHeights:[1.14,1.22,1.25,1.33,1.43,1.45,1.5],fontWeights:{regular:400,semiBold:500,bold:600},transitions:xZ,motion:{easings:Y1,timings:X1}},yQ={color:{alternative100:"#f6ecfc",alternative200:"#e0c1f4",alternative500:"#ac73e6",alternative600:"#9736e8",alternative700:"#8312d1",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#fcecea",danger200:"#f5c0b8",danger500:"#ee5e52",danger600:"#d02b20",danger700:"#b72b1a",neutral0:"#ffffff",neutral100:"#f6f6f9",neutral1000:"#181826",neutral150:"#eaeaef",neutral200:"#dcdce4",neutral300:"#c0c0cf",neutral400:"#a5a5ba",neutral500:"#8e8ea9",neutral600:"#666687",neutral700:"#4a4a6a",neutral800:"#32324d",neutral900:"#212134",primary100:"#f0f0ff",primary200:"#d9d8ff",primary500:"#7b79ff",primary600:"#4945ff",primary700:"#271fe0",secondary100:"#eaf5ff",secondary200:"#b8e1ff",secondary500:"#66b7f1",secondary600:"#0c75af",secondary700:"#006096",success100:"#eafbe7",success200:"#c6f0c2",success500:"#5cb176",success600:"#328048",success700:"#2f6846",warning100:"#fdf4dc",warning200:"#fae7b9",warning500:"#f29d41",warning600:"#d9822f",warning700:"#be5d01"}},CQ={shadow:{filterShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"0px 2px 15px rgba(33, 33, 52, 0.1)",tableShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)"}},S$={colors:yQ.color,shadows:CQ.shadow,...$$},$Q={color:{alternative100:"#181826",alternative200:"#4a4a6a",alternative500:"#ac73e6",alternative600:"#ac73e6",alternative700:"#e0c1f4",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#181826",danger200:"#4a4a6a",danger500:"#ee5e52",danger600:"#ee5e52",danger700:"#ee5e52",neutral0:"#212134",neutral100:"#181826",neutral1000:"#ffffff",neutral150:"#32324d",neutral200:"#4a4a6a",neutral300:"#666687",neutral400:"#a5a5ba",neutral500:"#c0c0cf",neutral600:"#a5a5ba",neutral700:"#eaeaef",neutral800:"#ffffff",neutral900:"#ffffff",primary100:"#181826",primary200:"#4a4a6a",primary500:"#4945ff",primary600:"#7b79ff",primary700:"#7b79ff",secondary100:"#181826",secondary200:"#4a4a6a",secondary500:"#66b7f1",secondary600:"#66b7f1",secondary700:"#b8e1ff",success100:"#181826",success200:"#4a4a6a",success500:"#5cb176",success600:"#5cb176",success700:"#c6f0c2",warning100:"#181826",warning200:"#4a4a6a",warning500:"#f29d41",warning600:"#f29d41",warning700:"#fae7b9"}},SQ={shadow:{filterShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",tableShadow:"1px 1px 10px rgba(3, 3, 5, 0.2)"}},AQ={colors:$Q.color,shadows:SQ.shadow,...$$},Pi=(t="&")=>({theme:e,$hasError:n=!1})=>k.css`
    outline: none;
    box-shadow: none;
    transition-property: border-color, box-shadow, fill;
    transition-duration: 0.2s;

    ${t}:focus-within {
      border: 1px solid ${n?e.colors.danger600:e.colors.primary600};
      box-shadow: ${n?e.colors.danger600:e.colors.primary600} 0px 0px 0px 2px;
    }
  `,[RQ,mn]=$l("Field",{}),Ao=$.forwardRef(({children:t,name:e,error:n=!1,hint:r,id:i,required:o=!1,...s},a)=>{const c=Tn(i),[h,f]=$.useState();return p.jsx(RQ,{name:e,id:c,error:n,hint:r,required:o,labelNode:h,setLabelNode:f,children:p.jsx(ue,{direction:"column",alignItems:"stretch",gap:1,ref:a,...s,children:t})})}),Km=$.forwardRef(({children:t,action:e,...n},r)=>{const{id:i,required:o,setLabelNode:s}=mn("Label"),a=gn(r,s);return t?p.jsxs(kQ,{ref:a,variant:"pi",textColor:"neutral800",fontWeight:"bold",...n,id:`${i}-label`,htmlFor:i,tag:"label",ellipsis:!0,children:[t,o&&p.jsx(ke,{"aria-hidden":!0,lineHeight:"1em",textColor:"danger600",children:"*"}),e&&p.jsx(TQ,{marginLeft:1,children:e})]}):null}),kQ=k.styled(ke)`
  display: flex;
`,TQ=k.styled(ue)`
  line-height: 0;
  color: ${({theme:t})=>t.colors.neutral500};
`,tf=$.forwardRef(({endAction:t,startAction:e,disabled:n=!1,onChange:r,hasError:i,required:o,className:s,size:a="M",...c},h)=>{const{id:f,error:d,hint:m,name:v,required:x}=mn("Input");let w;d?w=`${f}-error`:m&&(w=`${f}-hint`);const C=!!d,S=$.useRef(null),R=$.useRef(null),T=gn(R,h),E=O=>{!n&&r&&r(O)};return $.useLayoutEffect(()=>{if(S.current&&R.current){const O=S.current.offsetWidth,L=R.current;if(L){const I=O+8+16;L.style.paddingRight=`${I}px`}}},[t]),p.jsxs(OQ,{gap:2,justifyContent:"space-between",$hasError:C||i,$disabled:n,$size:a,$hasLeftAction:!!e,$hasRightAction:!!t,className:s,children:[e,p.jsx(MQ,{id:f,name:v,ref:T,$size:a,"aria-describedby":w,"aria-invalid":C||i,"aria-disabled":n,disabled:n,"data-disabled":n?"":void 0,onChange:E,"aria-required":x||o,$hasLeftAction:!!e,$hasRightAction:!!t,...c}),t&&p.jsx(EQ,{ref:S,children:t})]})}),MQ=k.styled.input`
  border: none;
  border-radius: ${({theme:t})=>t.borderRadius};
  cursor: ${t=>t["aria-disabled"]?"not-allowed":void 0};

  color: ${({theme:t})=>t.colors.neutral800};
  font-weight: 400;
  font-size: ${t=>t.theme.fontSizes[2]};
  line-height: 2.2rem;
  display: block;
  width: 100%;
  background: inherit;

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    opacity: 1;
  }

  &[aria-disabled='true'] {
    color: inherit;
  }

  //focus managed by InputWrapper
  &:focus {
    outline: none;
    box-shadow: none;
  }

  ${t=>{switch(t.$size){case"S":return k.css`
          padding-inline-start: ${t.$hasLeftAction?0:t.theme.spaces[4]};
          padding-inline-end: ${t.$hasRightAction?0:t.theme.spaces[4]};
          padding-block: ${t.theme.spaces[1]};
        `;default:return k.css`
          padding-inline-start: ${t.$hasLeftAction?0:t.theme.spaces[4]};
          padding-inline-end: ${t.$hasRightAction?0:t.theme.spaces[4]};
          padding-block: ${t.theme.spaces[2]};
        `}}}
`,EQ=k.styled(ue)`
  position: absolute;
  right: ${({theme:t})=>t.spaces[4]};
  top: 50%;
  transform: translateY(-50%);
`,OQ=k.styled(ue)`
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  border-radius: ${({theme:t})=>t.borderRadius};
  background: ${({theme:t})=>t.colors.neutral0};
  padding-inline-start: ${({$hasLeftAction:t,theme:e})=>t?e.spaces[4]:0};
  position: relative;

  ${Pi()}
  ${({theme:t,$disabled:e})=>e?k.css`
          color: ${t.colors.neutral600};
          background: ${t.colors.neutral150};
        `:void 0};
`,A$=()=>{const{id:t,hint:e,error:n}=mn("Hint");return!e||n?null:p.jsx(ke,{variant:"pi",tag:"p",id:`${t}-hint`,textColor:"neutral600",children:e})},R$=()=>{const{id:t,error:e}=mn("Error");return!e||typeof e!="string"?null:p.jsx(ke,{variant:"pi",tag:"p",id:`${t}-error`,textColor:"danger600","data-strapi-field-error":!0,children:e})},DQ=$.forwardRef(({label:t,children:e,...n},r)=>p.jsx(IQ,{justifyContent:"unset",background:"transparent",borderStyle:"none",...n,type:"button",tag:"button",ref:r,children:p.jsx(Ns,{label:t,children:e})})),IQ=k.styled(ue)`
  font-size: 1.6rem;
  padding: 0;
`,_Q=Object.freeze(Object.defineProperty({__proto__:null,Action:DQ,Error:R$,Hint:A$,Input:tf,Label:Km,Root:Ao,useField:mn},Symbol.toStringTag,{value:"Module"}));$.forwardRef(({actions:t,children:e,error:n,hint:r,label:i,labelAction:o,nextLabel:s,onNext:a,onPrevious:c,previousLabel:h,required:f,secondaryLabel:d,selectedSlide:m,id:v,...x},w)=>{const C=Tn(v);return p.jsx(Ao,{hint:r,error:n,id:C,required:f,children:p.jsxs(ue,{direction:"column",alignItems:"stretch",gap:1,children:[i&&p.jsx(Km,{action:o,children:i}),p.jsx(wQ,{ref:w,actions:t,label:i,nextLabel:s,onNext:a,onPrevious:c,previousLabel:h,secondaryLabel:d,selectedSlide:m,id:C,...x,children:e}),p.jsx(A$,{}),p.jsx(R$,{})]})})});k.styled(be)`
  ${t$}
`;k.styled(ue)`
  display: ${({$selected:t})=>t?"flex":"none"};
`;const nf=$.forwardRef(({children:t,viewportRef:e,...n},r)=>p.jsxs(LQ,{ref:r,...n,children:[p.jsx(BQ,{ref:e,children:t}),p.jsx(kw,{orientation:"vertical",children:p.jsx(Tw,{})}),p.jsx(kw,{orientation:"horizontal",children:p.jsx(Tw,{})})]})),LQ=k.styled(SV)`
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
`,BQ=k.styled(AV)`
  min-width: 100%;
`,kw=k.styled(RV)`
  display: flex;
  /* ensures no selection */
  user-select: none;
  /* disable browser handling of all panning and zooming gestures on touch devices */
  touch-action: none;

  &[data-orientation='vertical'] {
    width: 0.4rem;
    margin: 0.4rem;
  }

  &[data-orientation='horizontal'] {
    flex-direction: column;
    height: 0.4rem;
    margin: 0.4rem;
  }
`,Tw=k.styled(kV)`
  position: relative;
  flex: 1;
  background-color: ${t=>t.theme.colors.neutral150};
  border-radius: 0.4rem;

  /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    min-width: 44px;
    min-height: 44px;
  }
`,NQ="data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e",k$=$.forwardRef(({children:t,small:e=!1,...n},r)=>p.jsxs("div",{role:"alert","aria-live":"assertive",ref:r,...n,children:[p.jsx(Io,{children:t}),p.jsx(FQ,{src:NQ,"aria-hidden":!0,$small:e})]})),jQ=k.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,FQ=k.styled.img`
  animation: ${jQ} 1s infinite linear;
  will-change: transform;
  ${({$small:t,theme:e})=>t&&`width: ${e.spaces[6]}; height: ${e.spaces[6]};`}
`,VQ=$.forwardRef(({allowCustomValue:t,autocomplete:e,children:n,className:r,clearLabel:i="Clear",creatable:o=!1,creatableDisabled:s=!1,creatableStartIcon:a,createMessage:c=we=>`Create "${we}"`,defaultFilterValue:h,defaultTextValue:f,defaultOpen:d=!1,open:m,onOpenChange:v,disabled:x=!1,hasError:w,id:C,filterValue:S,hasMoreItems:R=!1,isPrintableCharacter:T,loading:E=!1,loadingMessage:O="Loading content...",name:L,noOptionsMessage:I=()=>"No results found",onChange:V,onClear:F,onCreateOption:H,onFilterValueChange:K,onInputChange:W,onTextValueChange:J,onLoadMore:G,placeholder:re="Select or enter a value",required:se=!1,size:te="M",startIcon:ne,textValue:Y,value:ce,...me},Ie)=>{const[we,qe]=yr({prop:m,defaultProp:d,onChange:v}),[Te,Ve]=yr({prop:Y,defaultProp:t&&!f?ce:f,onChange:J}),[pe,De]=yr({prop:S,defaultProp:h,onChange:K}),Re=$.useRef(null),Le=$.useRef(null),Ae=gn(Le,Ie),He=$.useRef(null),wt=Bt=>{F&&!x&&(Ve(""),De(""),F(Bt),Le.current.focus())},Ze=Bt=>{qe(Bt)},Pe=Bt=>{Ve(Bt)},Yt=Bt=>{De(Bt)},ft=Bt=>{W&&W(Bt)},_o=Bt=>{V&&V(Bt)},Qs=Bt=>{G&&R&&!E&&G(Bt)},or=()=>{H&&Te&&o!=="visible"?H(Te):H&&o==="visible"&&(H(),qe(!1))},Mt=Tn(),li=`intersection-${js(Mt)}`;Al(Re,Qs,{selectorToWatch:`#${li}`,skipWhen:!we});const{error:ci,...Lo}=mn("Combobox"),Wi=!!ci||w,Js=Lo.id??C,zi=Lo.name??L,ui=Lo.required||se;let Ui;return ci?Ui=`${Js}-error`:Lo.hint&&(Ui=`${Js}-hint`),p.jsxs(Yn.Root,{autocomplete:e||(o===!0?"list":"both"),onOpenChange:Ze,open:we,onTextValueChange:Pe,textValue:Te,allowCustomValue:!!o||t,disabled:x,required:ui,value:ce,onValueChange:_o,filterValue:pe,onFilterValueChange:Yt,isPrintableCharacter:T,visible:o==="visible",children:[p.jsxs(HQ,{$hasError:Wi,$size:te,className:r,children:[p.jsxs(ue,{flex:"1",tag:"span",gap:3,children:[ne?p.jsx(ue,{flex:"0 0 1.6rem",tag:"span","aria-hidden":!0,children:ne}):null,p.jsx(PQ,{placeholder:re,id:Js,"aria-invalid":!!ci,onChange:ft,ref:Ae,name:zi,"aria-describedby":Ui,...me})]}),p.jsxs(ue,{tag:"span",gap:3,children:[Te&&F?p.jsx(ni,{size:"XS",variant:"ghost",onClick:wt,"aria-disabled":x,"aria-label":i,label:i,ref:He,children:p.jsx(Vi,{})}):null,p.jsx(WQ,{children:p.jsx(Oi,{fill:"neutral500"})})]})]}),p.jsx(Yn.Portal,{children:p.jsx(zQ,{sideOffset:4,children:p.jsxs(Yn.Viewport,{ref:Re,children:[p.jsxs(qQ,{children:[n,o!==!0&&!E?p.jsx(Yn.NoValueFound,{asChild:!0,children:p.jsx(Q1,{$hasHover:!1,children:p.jsx(ke,{children:I(Te??"")})})}):null,E?p.jsx(ue,{justifyContent:"center",alignItems:"center",paddingTop:2,paddingBottom:2,children:p.jsx(k$,{small:!0,children:O})}):null,p.jsx(be,{id:li,width:"100%",height:"1px"})]}),o?p.jsx(UQ,{onPointerUp:or,onClick:or,disabled:s,asChild:!0,children:p.jsx(Q1,{children:p.jsxs(ue,{gap:2,children:[a&&p.jsx(be,{tag:"span","aria-hidden":!0,display:"inline-flex",children:a}),p.jsx(ke,{children:c(Te??"")})]})})}):null]})})})]})}),HQ=k.styled(Yn.Trigger)`
  position: relative;
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  border-radius: ${({theme:t})=>t.borderRadius};
  background: ${({theme:t})=>t.colors.neutral0};
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: ${({theme:t})=>t.spaces[4]};

  ${t=>{switch(t.$size){case"S":return k.css`
          padding-inline-start: ${({theme:e})=>e.spaces[4]};
          padding-inline-end: ${({theme:e})=>e.spaces[3]};
          padding-block: ${({theme:e})=>e.spaces[1]};
        `;default:return k.css`
          padding-inline-start: ${({theme:e})=>e.spaces[4]};
          padding-inline-end: ${({theme:e})=>e.spaces[3]};
          padding-block: ${({theme:e})=>e.spaces[2]};
        `}}}

  &[data-disabled] {
    color: ${({theme:t})=>t.colors.neutral600};
    background: ${({theme:t})=>t.colors.neutral150};
    cursor: not-allowed;
  }

  /* Required to ensure the below inputFocusStyles are adhered too */
  &:focus-visible {
    outline: none;
  }

  ${({theme:t,$hasError:e})=>Pi()({theme:t,$hasError:e})};
`,PQ=k.styled(Yn.TextInput)`
  width: 100%;
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: ${({theme:t})=>t.colors.neutral800};
  padding: 0;
  border: none;
  background-color: transparent;

  &:focus-visible {
    outline: none;
  }

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    opacity: 1;
  }

  &[aria-disabled='true'] {
    cursor: inherit;
  }
`,WQ=k.styled(Yn.Icon)`
  border: none;
  background: transparent;
  padding: 0;
  color: ${({theme:t})=>t.colors.neutral600};
  display: flex;

  &[aria-disabled='true'] {
    cursor: inherit;
  }
`,zQ=k.styled(Yn.Content)`
  background: ${({theme:t})=>t.colors.neutral0};
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
  border-radius: ${({theme:t})=>t.borderRadius};
  width: var(--radix-combobox-trigger-width);
  /* This is from the design-system figma file. */
  max-height: 15rem;
  z-index: ${({theme:t})=>t.zIndices.popover};

  &:focus-visible {
    outline: ${({theme:t})=>`2px solid ${t.colors.primary600}`};
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    /* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */
    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,UQ=k.styled(Yn.CreateItem)`
  && {
    border-top: 1px solid ${({theme:t})=>t.colors.neutral150};
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    background: ${({theme:t})=>t.colors.neutral0};
    cursor: pointer;
    padding: ${({theme:t})=>t.spaces[1]};
    position: sticky;
    bottom: 0;
    left: 0;
  }
  &&:hover,
  &&[data-highlighted] {
    background: ${({theme:t})=>t.colors.neutral0};
  }
  &&[data-disabled] {
    color: ${({theme:t})=>t.colors.neutral600};
    cursor: not-allowed;
  }
  &&[data-disabled] svg {
    fill: ${({theme:t})=>t.colors.neutral300};
  }
  && > div {
    padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
  }
  && > div:hover,
  &&[data-highlighted] > div {
    background-color: ${({theme:t})=>t.colors.primary100};
    border-radius: ${({theme:t})=>t.borderRadius};
  }
  &&[data-disabled] > div {
    background-color: inherit;
  }
`,qQ=k.styled(nf)`
  padding: ${({theme:t})=>t.spaces[1]};
`,KQ=$.forwardRef(({children:t,value:e,disabled:n,textValue:r,...i},o)=>p.jsx(Yn.ComboboxItem,{asChild:!0,value:e,disabled:n,textValue:r,children:p.jsx(Q1,{ref:o,...i,children:p.jsx(Yn.ItemText,{asChild:!0,children:p.jsx(ke,{children:t})})})})),Q1=k.styled.div`
  width: 100%;
  border: none;
  text-align: left;
  outline-offset: -3px;
  padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
  background-color: ${({theme:t})=>t.colors.neutral0};
  border-radius: ${({theme:t})=>t.borderRadius};
  user-select: none;

  &[data-state='checked'] {
    background-color: ${({theme:t})=>t.colors.primary100};
    color: ${({theme:t})=>t.colors.primary600};
    font-weight: bold;
  }

  &:hover,
  &[data-highlighted] {
    outline: none;
    background-color: ${({theme:t,$hasHover:e=!0})=>e?t.colors.primary100:t.colors.neutral0};
  }

  &[data-highlighted] {
    color: ${({theme:t})=>t.colors.primary600};
    font-weight: bold;
  }
`,T$=(t,e)=>`${t}${Math.floor(e*255).toString(16).padStart(2,"0")}`,GQ=xH,YQ=$.forwardRef((t,e)=>p.jsx(yH,{...t,asChild:!0,ref:e})),XQ=$.forwardRef((t,e)=>p.jsx(CH,{children:p.jsx(ZQ,{children:p.jsx(QQ,{ref:e,...t})})})),ZQ=k.styled($H)`
  background: ${t=>T$(t.theme.colors.neutral800,.2)};
  position: fixed;
  inset: 0;
  z-index: ${t=>t.theme.zIndices.overlay};
  will-change: opacity;

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.overlayFadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,QQ=k.styled(SH)`
  max-width: 42rem;
  height: min-content;
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  flex-direction: column;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  border-radius: ${t=>t.theme.borderRadius};
  background-color: ${t=>t.theme.colors.neutral0};
  box-shadow: ${t=>t.theme.shadows.popupShadow};
  z-index: ${t=>t.theme.zIndices.modal};

  @media (prefers-reduced-motion: no-preference) {
    &[data-state='open'] {
      animation-duration: ${t=>t.theme.motion.timings[200]};
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
      animation-name: ${pt.modalPopIn};
    }

    &[data-state='closed'] {
      animation-duration: ${t=>t.theme.motion.timings[120]};
      animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
      animation-name: ${pt.modalPopOut};
    }
  }
`,JQ=$.forwardRef(({children:t,...e},n)=>p.jsx(kH,{asChild:!0,children:p.jsx(eJ,{tag:"h2",variant:"beta",ref:n,padding:6,fontWeight:"bold",...e,children:t})})),eJ=k.styled(ke)`
  display: flex;
  justify-content: center;
  border-bottom: solid 1px ${t=>t.theme.colors.neutral150};
`,tJ=$.forwardRef(({children:t,icon:e,...n},r)=>p.jsx(ue,{ref:r,gap:2,direction:"column",paddingTop:8,paddingBottom:8,paddingLeft:6,paddingRight:6,...n,children:typeof t=="string"?p.jsxs(p.Fragment,{children:[e?$.cloneElement(e,{width:24,height:24}):null,p.jsx(M$,{children:t})]}):t})),M$=$.forwardRef((t,e)=>p.jsx(TH,{asChild:!0,children:p.jsx(ke,{ref:e,variant:"omega",...t,tag:"p"})})),nJ=$.forwardRef((t,e)=>p.jsx(rJ,{ref:e,gap:2,padding:4,justifyContent:"space-between",...t,tag:"footer"})),rJ=k.styled(ue)`
  border-top: solid 1px ${t=>t.theme.colors.neutral150};
  flex: 1;
`,iJ=$.forwardRef((t,e)=>p.jsx(RH,{...t,asChild:!0,ref:e})),oJ=$.forwardRef((t,e)=>p.jsx(AH,{...t,asChild:!0,ref:e})),sJ=Object.freeze(Object.defineProperty({__proto__:null,Action:oJ,Body:tJ,Cancel:iJ,Content:XQ,Description:M$,Footer:nJ,Header:JQ,Root:GQ,Trigger:YQ},Symbol.toStringTag,{value:"Module"}));function Xr(t,e){const n=$.useRef(null);return e&&n.current&&aJ(e,n.current)&&(e=n.current),n.current=e??null,$.useMemo(()=>new cM(t,e),[t,e])}function aJ(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}const w0={Log:"live-region-log",Status:"live-region-status",Alert:"live-region-alert"},lJ=()=>p.jsxs(Io,{children:[p.jsx("p",{role:"log","aria-live":"polite",id:w0.Log,"aria-relevant":"all"}),p.jsx("p",{role:"status","aria-live":"polite",id:w0.Status,"aria-relevant":"all"}),p.jsx("p",{role:"alert","aria-live":"assertive",id:w0.Alert,"aria-relevant":"all"})]}),cJ=k.createGlobalStyle`
${k.css`
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }

  html {
    /* Sets 1rem === 10px */
    font-size: 62.5%;
  }

  body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
      'Helvetica Neue', sans-serif;
    color: ${({theme:t})=>t.colors.neutral800};
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  img,
  picture,
  video,
  canvas {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    padding: 0;
    font: inherit;
  }

  button {
    border: unset;
    background: unset;
    padding: unset;
    margin: unset;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
    font: unset;
  }

  #root {
    isolation: isolate;
  }

  ol,
  ul {
    list-style: none;
    padding: unset;
    margin: unset;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  *:focus-visible {
    outline: 2px solid ${({theme:t})=>t.colors.primary600};
    outline-offset: 2px;
  }

  *:has(> :disabled:not(button)) {
    cursor: not-allowed !important;
  }

  [aria-disabled='true']:not(button) {
    cursor: not-allowed !important;
  }

  /* Focusing the button with a mouse, touch, or stylus will show a subtle drop shadow. */
  *:focus:not(:focus-visible) {
    outline: none;
  }

  .lock-body-scroll {
    height: 100vh;
    overflow-y: hidden;
  }
`}
`,Mw="en-EN",E$=()=>typeof navigator>"u"?Mw:navigator.language?navigator.language:Mw,[uJ,rf]=$l("StrapiDesignSystem",{locale:E$()}),hJ=({children:t,locale:e=E$(),theme:n=S$,tooltipConfig:r})=>(So(()=>{const i=document.createElement("style");i.type="text/css",i.appendChild(document.createTextNode(`
        * {
          -webkit-transition: none !important;
          -moz-transition: none !important;
          -o-transition: none !important;
          -ms-transition: none !important;
          transition: none !important;
          animation: none !important;
        }
    `)),document.head.appendChild(i),window.getComputedStyle(i).opacity,document.head.removeChild(i)},[n]),p.jsx(uJ,{locale:e,children:p.jsxs(k.ThemeProvider,{theme:n,children:[p.jsx(vO,{...r,children:t}),p.jsx(lJ,{}),p.jsx(cJ,{})]})})),fJ=AM,Gm=$.forwardRef(({container:t=globalThis?.document?.body,...e},n)=>t?ol.createPortal(p.jsx(be,{ref:n,...e}),t):null);Gm.displayName="Portal";const dJ=$.forwardRef(({onClear:t,clearLabel:e="Clear",startIcon:n,disabled:r,hasError:i,children:o,id:s,size:a="M",withTags:c,...h},f)=>{const d=$.useRef(null),m=w=>{t&&!r&&(t(w),d.current.focus())},{labelNode:v}=mn("SelectTrigger"),x=gn(d,f);return p.jsx(nr.Trigger,{asChild:!0,children:p.jsxs(gJ,{"aria-disabled":r,$hasError:i,ref:x,alignItems:"center",justifyContent:"space-between",position:"relative",overflow:"hidden",hasRadius:!0,background:r?"neutral150":"neutral0",gap:4,cursor:"default","aria-labelledby":v?`${s}-label`:void 0,$size:a,$withTags:c,...h,children:[p.jsxs(ue,{flex:"1",tag:"span",gap:3,children:[n&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:n}),o]}),p.jsxs(ue,{tag:"span",gap:3,children:[t?p.jsx(ni,{size:"XS",variant:"ghost",onClick:m,"aria-disabled":r,"aria-label":e,label:e,children:p.jsx(Vi,{})}):null,p.jsx(mJ,{children:p.jsx(Oi,{})})]})]})})}),gJ=k.styled(ue)`
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  ${t=>{switch(t.$size){case"S":return k.css`
          padding-block: ${t.theme.spaces[1]};
          padding-inline-start: ${t.$withTags?t.theme.spaces[1]:t.theme.spaces[4]};
          padding-inline-end: ${t.theme.spaces[3]};
        `;default:return k.css`
          padding-block: ${t.$withTags?"0.3rem":t.theme.spaces[2]};
          padding-inline-start: ${t.$withTags?t.theme.spaces[1]:t.theme.spaces[4]};
          padding-inline-end: ${t.theme.spaces[3]};
        `}}}
  cursor: pointer;

  &[aria-disabled='true'] {
    color: ${t=>t.theme.colors.neutral500};
  }

  /* Required to ensure the below inputFocusStyles are adhered too */
  &:focus-visible {
    outline: none;
  }

  ${({theme:t,$hasError:e})=>Pi()({theme:t,$hasError:e})};
`,mJ=k.styled(nr.Icon)`
  display: flex;
  & > svg {
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,pJ=$.forwardRef(({children:t,placeholder:e,...n},r)=>p.jsx(vJ,{ref:r,ellipsis:!0,...n,children:p.jsx(bJ,{placeholder:e,children:t})})),vJ=k.styled(ke)`
  flex: 1;
  font-size: 1.4rem;
  line-height: 2.2rem;
  min-height: 2.2rem;
`,bJ=k.styled(nr.Value)`
  display: flex;
  gap: ${({theme:t})=>t.spaces[1]};
  flex-wrap: wrap;
`,wJ=$.forwardRef((t,e)=>p.jsx(xJ,{ref:e,...t,children:p.jsx(nf,{children:t.children})})),xJ=k.styled(nr.Content)`
  background: ${({theme:t})=>t.colors.neutral0};
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
  border-radius: ${({theme:t})=>t.borderRadius};
  min-width: var(--radix-select-trigger-width);
  max-height: 15.6rem;
  z-index: ${({theme:t})=>t.zIndices.popover};

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    /* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */
    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,yJ=k.styled(nr.Viewport)`
  padding: ${({theme:t})=>t.spaces[1]};
`,CJ=$.forwardRef((t,e)=>p.jsx(SJ,{ref:e,...t})),$J=k.css`
  width: 100%;
  border: none;
  text-align: left;
  outline-offset: -3px;
  border-radius: ${t=>t.theme.borderRadius};
  padding: ${t=>`${t.theme.spaces[2]} ${t.theme.spaces[4]}`};
  padding-left: ${({theme:t})=>t.spaces[4]};
  background-color: ${({theme:t})=>t.colors.neutral0};
  display: flex;
  align-items: center;
  gap: ${({theme:t})=>t.spaces[2]};
  white-space: nowrap;
  user-select: none;
  color: ${({theme:t})=>t.colors.neutral800};

  &:focus-visible {
    outline: none;
    background-color: ${({theme:t})=>t.colors.primary100};
    cursor: pointer;
  }
`,SJ=k.styled(nr.Item)`
  ${$J}

  &:hover {
    background-color: ${({theme:t})=>t.colors.primary100};
    cursor: pointer;
  }
`,O$=nr.Root,D$=dJ,I$=pJ,_$=nr.Portal,L$=wJ,B$=yJ,Ym=CJ,N$=nr.ItemIndicator,j$=nr.ItemText,AJ=nr.Group,J1=$.forwardRef(({children:t,clearLabel:e="Clear",customizeContent:n,disabled:r,hasError:i,id:o,name:s,onChange:a,onClear:c,onCloseAutoFocus:h,onReachEnd:f,placeholder:d,required:m,size:v,startIcon:x,value:w,...C},S)=>{const[R,T]=$.useState(),[E,O]=$.useState(!1),L=me=>{O(me)},I=me=>{c&&c(me),a||T("")},V=me=>{a?a(typeof w=="number"?Number(me):me):T(me)},F=$.useRef(null),H=Tn(),K=`intersection-${js(H)}`;Al(F,me=>{f&&f(me)},{selectorToWatch:`#${K}`,skipWhen:!E});const{error:J,required:G,...re}=mn("SingleSelect"),se=!!J||i,te=re.id??o,ne=re.name??s;let Y;J?Y=`${te}-error`:re.hint&&(Y=`${te}-hint`);const ce=(typeof w<"u"&&w!==null?w.toString():R)??"";return p.jsxs(O$,{onOpenChange:L,disabled:r,required:G??m,onValueChange:V,value:ce,...C,children:[p.jsx(D$,{ref:S,id:te,name:ne,startIcon:x,hasError:se,disabled:r,clearLabel:e,onClear:ce&&c?I:void 0,"aria-label":C["aria-label"],"aria-describedby":Y??C["aria-describedby"],size:v,children:p.jsx(I$,{placeholder:d,textColor:ce?"neutral800":"neutral600",children:ce&&n?n(ce):void 0})}),p.jsx(_$,{children:p.jsx(L$,{position:"popper",sideOffset:4,onCloseAutoFocus:h,children:p.jsxs(B$,{ref:F,children:[t,p.jsx(be,{id:K,width:"100%",height:"1px"})]})})})]})}),eg=$.forwardRef(({value:t,startIcon:e,children:n,...r},i)=>p.jsxs(Ym,{ref:i,value:t.toString(),...r,children:[e&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:e}),p.jsx(ke,{lineHeight:"20px",width:"100%",children:p.jsx(j$,{children:n})})]})),RJ=200,Ew=15,[kJ,Zs]=$l("DatePicker"),TJ=$.forwardRef(({calendarLabel:t,className:e,initialDate:n,locale:r,maxDate:i,minDate:o,monthSelectLabel:s="Month",onChange:a,value:c,yearSelectLabel:h="Year",hasError:f,id:d,name:m,disabled:v=!1,required:x=!1,onClear:w,clearLabel:C="Clear",size:S="M",...R},T)=>{const E=$s(),O=rf("DatePicker"),L=r??O.locale,I=Xr(L,{day:"2-digit",month:"2-digit",year:"numeric"}),[V,F]=$.useState(!1),[H,K]=$.useState(null),[W,J]=$.useState(null),[G,re]=$.useState(null),[se,te]=$.useState(),[ne,Y]=yr({defaultProp:n?no(n):void 0,prop:c?no(c):void 0,onChange(Pe){a&&a(Pe?.toDate(E))}}),[ce,me]=$.useMemo(()=>{const Pe=n?no(n):ig("UTC"),Yt=o?no(o):Pe.set({day:1,month:1,year:Pe.year-RJ});let ft=i?no(i):Pe.set({day:31,month:12,year:Pe.year+Ew});return ft.compare(Yt)<0&&(ft=Yt.set({day:31,month:12,year:Yt.year+Ew})),[Yt,ft]},[o,i,n]),[Ie,we]=$.useState(MJ({currentValue:ne,minDate:ce,maxDate:me})),qe=Tn(),Te=$.useRef(null),Ve=Pe=>{w&&!v&&(te(""),Y(void 0),w(Pe),W?.focus())},pe=$.useCallback(Pe=>{Pe&&ne&&we(ne),F(Pe)},[ne]);So(()=>{if(c){const Pe=no(c);te(I.format(Pe.toDate(E))),we(Pe)}else te("")},[c,I,E]),So(()=>{if(n&&se===void 0){const Pe=no(n);te(I.format(Pe.toDate(E)))}},[n,se,I,E]);const{error:De,...Re}=mn("Combobox"),Le=!!De||f,Ae=Re.id??d,He=Re.name??m,wt=Re.required||x;let Ze;return De?Ze=`${Ae}-error`:Re.hint&&(Ze=`${Ae}-hint`),p.jsxs(kJ,{calendarDate:Ie,content:G,contentId:qe,disabled:v,locale:L,minDate:ce,maxDate:me,open:V,onCalendarDateChange:we,onContentChange:re,onOpenChange:pe,onTextInputChange:J,onTextValueChange:te,onTriggerChange:K,onValueChange:Y,onClear:w,required:wt,textInput:W,textValue:se,timeZone:E,trigger:H,value:ne,children:[p.jsxs(OJ,{className:e,hasError:Le,size:S,children:[p.jsx(d_,{fill:"neutral500","aria-hidden":!0}),p.jsx(_J,{ref:T,"aria-describedby":Ze,id:Ae,name:He,...R}),se&&w?p.jsx(ni,{size:"XS",variant:"ghost",onClick:Ve,"aria-disabled":v,"aria-label":C,label:C,ref:Te,children:p.jsx(Vi,{})}):null]}),p.jsx(Gm,{children:p.jsx(jJ,{label:t,children:p.jsx(WJ,{monthSelectLabel:s,yearSelectLabel:h})})})]})}),Ow=t=>!!t.match(/^[^a-zA-Z]*$/),MJ=({currentValue:t,minDate:e,maxDate:n})=>{const r=ig("UTC");return t||($0(e,r)===e&&S0(n,r)===n?r:$0(e,r)===r?e:S0(n,r)===r?n:r)},EJ="DatePickerTrigger",OJ=$.forwardRef(({hasError:t,size:e,...n},r)=>{const i=Zs(EJ),o=gn(r,a=>i.onTriggerChange(a)),s=()=>{i.disabled||i.onOpenChange(!0)};return p.jsx(zs,{asChild:!0,trapped:i.open,onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{document.getSelection()?.empty(),a.preventDefault()},children:p.jsx(DJ,{ref:o,$hasError:t,$size:e,$hasOnClear:!!i.onClear,...n,hasRadius:!0,gap:3,overflow:"hidden",background:i.disabled?"neutral150":"neutral0",onClick:uo(n.onClick,()=>{i.textInput?.focus()}),onPointerDown:uo(n.onPointerDown,a=>{const c=a.target;c.hasPointerCapture(a.pointerId)&&c.releasePointerCapture(a.pointerId),(c.closest("button")??c.closest("div"))===a.currentTarget&&a.button===0&&a.ctrlKey===!1&&(s(),i.textInput?.focus())})})})}),DJ=k.styled(ue)`
  min-width: ${({$hasOnClear:t})=>t?"160px":"130px"};
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  ${t=>{switch(t.$size){case"S":return k.css`
          padding-block: ${t.theme.spaces[1]};
          padding-inline: ${t.theme.spaces[3]};
        `;default:return k.css`
          padding-block: ${t.theme.spaces[2]};
          padding-inline: ${t.theme.spaces[3]};
        `}}}

  & > svg {
    flex: 1 0 auto;
  }

  &[data-disabled] {
    color: ${({theme:t})=>t.colors.neutral600};
    background: ${({theme:t})=>t.colors.neutral150};
    cursor: not-allowed;
  }

  /* Required to ensure the below inputFocusStyles are adhered too */
  &:focus-visible {
    outline: none;
  }

  ${({theme:t,$hasError:e})=>Pi()({theme:t,$hasError:e})};
`,IJ="DatePickerTextInput",_J=$.forwardRef(({placeholder:t,...e},n)=>{const r=Zs(IJ),{onTextValueChange:i,textValue:o,onTextInputChange:s,onOpenChange:a,disabled:c,locale:h}=r,f=gn(n,S=>s(S)),d=()=>{c||a(!0)},m=Xr(h,{year:"numeric",month:"2-digit",day:"2-digit"}),[v,x,w]=$.useMemo(()=>{const S=m.formatToParts(new Date),R=S.filter(O=>O.type==="year"||O.type==="month"||O.type==="day"),T=R.map(O=>{switch(O.type){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return""}}),E=S.find(O=>O.type==="literal")?.value??"";return[T,E,R]},[m]),C=v.map(S=>`\\d{${S.length}}`).join(`\\${x}`);return p.jsx(BJ,{role:"combobox",type:"text",inputMode:"numeric",ref:f,"aria-autocomplete":"none","aria-controls":r.contentId,"aria-disabled":r.disabled,"aria-expanded":r.open,"aria-required":r.required,"aria-haspopup":"dialog","data-state":r.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,pattern:C,placeholder:t??v.join(x),...e,value:o??"",onBlur:uo(e.onBlur,()=>{if(!r.textValue){r.onValueChange(void 0);return}r.onTextValueChange(m.format(r.calendarDate.toDate(r.timeZone))),r.onValueChange(r.calendarDate)}),onChange:uo(e.onChange,S=>{if(Ow(S.target.value)){const R=S.target.value.split(x),[T,E,O]=w.map((J,G)=>{const re=R[G];return{...J,value:re}}).sort((J,G)=>J.type==="year"?1:G.type==="year"?-1:J.type==="month"?1:G.type==="month"?-1:0).map(J=>J.value),L=r.calendarDate.year;let I=r.calendarDate.year;if(O){const J=O.length===1?`0${O}`:O;I=O.length<3?Number(`${L}`.slice(0,4-J.length)+J):Number(J)}O&&O.length<3&&I>r.maxDate.year&&(I-=100);const V=r.calendarDate.set({year:I}),F=V.calendar.getMonthsInYear(V),H=V.set({month:E&&Number(E)<=F?Number(E):void 0}),K=H.calendar.getDaysInMonth(H),W=H.set({day:T&&Number(T)<=K?Number(T):void 0});r.onCalendarDateChange(LJ(W,r.minDate,r.maxDate)),r.onTextValueChange(S.target.value)}}),onKeyDown:uo(e.onKeyDown,S=>{if(!r.open&&(Ow(S.key)||["ArrowDown","Backspace"].includes(S.key)))d();else if(["Tab"].includes(S.key)&&r.open)S.preventDefault();else if(["Escape"].includes(S.key))r.open?r.onOpenChange(!1):(r.onValueChange(void 0),r.onTextValueChange("")),S.preventDefault();else if(r.open&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(S.key))switch(S.preventDefault(),S.key){case"ArrowDown":{const R=r.calendarDate.add({weeks:1});if(r.maxDate&&R.compare(r.maxDate)>0)return;r.onCalendarDateChange(R);return}case"ArrowRight":{const R=r.calendarDate.add({days:1});if(r.maxDate&&R.compare(r.maxDate)>0)return;r.onCalendarDateChange(R);return}case"ArrowUp":{const R=r.calendarDate.subtract({weeks:1});if(r.minDate&&R.compare(r.minDate)<0)return;r.onCalendarDateChange(R);return}case"ArrowLeft":{const R=r.calendarDate.subtract({days:1});if(r.minDate&&R.compare(r.minDate)<0)return;r.onCalendarDateChange(R)}}else r.open&&["Enter"].includes(S.key)&&(S.preventDefault(),i(m.format(r.calendarDate.toDate(r.timeZone))),r.onValueChange(r.calendarDate),r.onOpenChange(!1))})})});function LJ(t,e,n){return e&&(t=S0(t,e)),n&&(t=$0(t,n)),t}const BJ=k.styled.input`
  width: 100%;
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: ${({theme:t})=>t.colors.neutral800};
  border: none;
  background-color: transparent;

  &:focus-visible {
    outline: none;
  }

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    opacity: 1;
  }

  &[aria-disabled='true'] {
    cursor: inherit;
  }
`,NJ="DatePickerContent",jJ=$.forwardRef((t,e)=>{const[n,r]=$.useState(),i=Zs(NJ);if(So(()=>{r(new DocumentFragment)},[]),!i.open){const o=n;return o?ol.createPortal(p.jsx("div",{children:t.children}),o):null}return p.jsx(VJ,{...t,ref:e})}),FJ="DatePickerContent",VJ=$.forwardRef((t,e)=>{const{label:n="Choose date",...r}=t,{onOpenChange:i,...o}=Zs(FJ),{x:s,y:a,refs:c,strategy:h,placement:f}=MH({strategy:"fixed",placement:"bottom-start",middleware:[EH({mainAxis:4}),OH(),DH()],elements:{reference:o.trigger},whileElementsMounted:mx});$.useEffect(()=>{const m=()=>{i(!1)};return window.addEventListener("blur",m),window.addEventListener("resize",m),()=>{window.removeEventListener("blur",m),window.removeEventListener("resize",m)}},[i]);const d=gn(e,m=>o.onContentChange(m),c.setFloating);return Ws(),p.jsx(yh,{allowPinchZoom:!0,children:p.jsx(fJ,{asChild:!0,onFocusOutside:m=>{m.preventDefault()},onDismiss:()=>{i(!1)},children:p.jsx(HJ,{ref:d,"data-state":o.open?"open":"closed","data-side":f.includes("top")?"top":"bottom",onContextMenu:m=>m.preventDefault(),id:o.contentId,role:"dialog","aria-modal":"true","aria-label":n,style:{left:s,top:a,position:h},hasRadius:!0,background:"neutral0",padding:1,...r})})})}),HJ=k.styled(be)`
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  z-index: ${({theme:t})=>t.zIndices.popover};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,PJ="DatePickerCalendar",WJ=$.forwardRef(({monthSelectLabel:t,yearSelectLabel:e,...n},r)=>{const{locale:i,timeZone:o,minDate:s,maxDate:a,calendarDate:c,onCalendarDateChange:h}=Zs(PJ),f=FT(c),d=$.useMemo(()=>{const T=s.year,E=a.year;return[...Array(E-T+1).keys()].map(O=>(T+O).toString())},[s,a]),m=Xr(i,{month:"long"}),v=$.useMemo(()=>[...Array(c.calendar.getMonthsInYear(c)).keys()].map(T=>m.format(c.set({month:T+1}).toDate(o))),[c,m,o]),x=Xr(i,{weekday:"short"}),w=$.useMemo(()=>{const T=Pw(ig(o),i);return[...new Array(7).keys()].map(E=>{const L=T.add({days:E}).toDate(o);return x.format(L)})},[o,i,x]),C=T=>{if(typeof T=="number")return;const E=c.set({month:v.indexOf(T)+1});h(E)},S=T=>{if(typeof T=="number")return;const E=c.set({year:parseInt(T,10)});h(E)},R=zJ(f,i);return p.jsxs(ue,{ref:r,direction:"column",alignItems:"stretch",padding:4,...n,children:[p.jsxs(UJ,{justifyContent:"flex-start",paddingBottom:4,paddingLeft:2,paddingRight:2,gap:2,children:[p.jsx(Ao,{children:p.jsx(J1,{"aria-label":t,value:v[c.month-1],onChange:C,children:v.map(T=>p.jsx(eg,{value:T,children:T},T))})}),p.jsx(Ao,{children:p.jsx(J1,{value:c.year.toString(),"aria-label":e,onChange:S,children:d.map(T=>p.jsx(eg,{value:T,children:T},T))})})]}),p.jsxs("table",{role:"grid",children:[p.jsx("thead",{"aria-hidden":!0,children:p.jsx("tr",{"aria-rowindex":0,children:w.map((T,E)=>p.jsx(qJ,{"aria-colindex":E,children:T},T))})}),p.jsx("tbody",{children:[...new Array(6).keys()].map(T=>p.jsx("tr",{"aria-rowindex":T+2,children:R(T).map((E,O)=>E?p.jsx(YJ,{"aria-colindex":O+1,date:E,startDate:f,disabled:s.compare(E)>0||E.compare(a)>0},E.toString()):p.jsx(F$,{"aria-colindex":O+1},O+1))},T))})]})]})}),zJ=(t,e)=>n=>{let r=t.add({weeks:n});const i=[];r=Pw(r,e);const o=Vw(r,e);for(let s=0;s<o;s++)i.push(null);for(;i.length<7;){i.push(r);const s=r.add({days:1});if(Fw(r,s))break;r=s}for(;i.length<7;)i.push(null);return i},UJ=k.styled(ue)`
  div[role='combobox'] {
    border: 1px solid transparent;
    background: transparent;
    font-weight: ${t=>t.theme.fontWeights.bold};

    svg {
      fill: ${({theme:t})=>t.colors.neutral500};
    }

    &:hover {
      background-color: ${({theme:t})=>t.colors.neutral100};
    }
  }
`,qJ=$.forwardRef(({children:t,...e},n)=>p.jsx(KJ,{tag:"th",role:"gridcell",ref:n,...e,height:"2.4rem",width:"3.2rem",children:p.jsx(ke,{variant:"pi",fontWeight:"bold",color:"neutral800",children:t.slice(0,2)})})),KJ=k.styled(be)`
  border-radius: ${({theme:t})=>t.borderRadius};
  text-transform: capitalize;
`,GJ="DatePickerCalendarCell",YJ=$.forwardRef(({date:t,startDate:e,disabled:n,...r},i)=>{const{timeZone:o,locale:s,calendarDate:a,onValueChange:c,onOpenChange:h,onTextValueChange:f,onCalendarDateChange:d}=Zs(GJ),m=Fw(a,t),v=Xr(s,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),x=$.useMemo(()=>v.format(t.toDate(o)),[v,t,o]),w=Xr(s,{day:"numeric",calendar:t.calendar.identifier}),C=$.useMemo(()=>w.formatToParts(t.toDate(o)).find(O=>O.type==="day").value,[w,t,o]),S=Xr(s,{day:"2-digit",month:"2-digit",year:"numeric"}),R=VT(e),T=t.compare(e)<0||t.compare(R)>0;let E="neutral900";return m?E="primary600":T&&(E="neutral600"),p.jsx(F$,{tag:"td",role:"gridcell",ref:i,"aria-selected":m,...r,hasRadius:!0,"aria-label":x,tabIndex:m?0:-1,background:m?"primary100":"neutral0",cursor:"pointer",onPointerDown:uo(r.onPointerDown,O=>{O.preventDefault(),d(t),c(t),f(S.format(t.toDate(o))),h(!1)}),"aria-disabled":n,children:p.jsx(ke,{variant:"pi",textColor:E,children:C})})}),F$=k.styled(be)`
  text-align: center;
  padding: 0.7rem;
  // Trick to prevent the outline from overflowing because of the general outline-offset
  outline-offset: -2px !important;
  &[aria-disabled='true'] {
    pointer-events: none;
    opacity: 0.5;
  }

  &[aria-disabled='false'] {
    &:hover {
      background: ${({theme:t})=>t.colors.primary100};
      color: ${({theme:t})=>t.colors.primary600};
    }
  }
`,no=t=>{const e=t.toISOString(),n=Jw(e,"UTC");return qw(n)},x0=t=>!!t.match(/^[^a-zA-Z]*$/);function XJ(t=""){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const ZJ=IT.default(VQ)`
  min-width: ${({onClear:t})=>t?"160px":"130px"};
`,QJ=$.forwardRef(({step:t=15,value:e,defaultValue:n,onChange:r,...i},o)=>{const s=rf("TimePicker"),[a,c]=$.useState(""),[h,f]=yr({prop:e,defaultProp:n,onChange:r}),d=Xr(s.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),m=$.useMemo(()=>{const E=d.formatToParts(new Date),{value:O}=E.find(L=>L.type==="literal");return O},[d]),v=$.useMemo(()=>{const E=60/t;return[...Array(24).keys()].flatMap(O=>[...Array(E).keys()].map(L=>d.format(new Date(0,0,0,O,L*t))))},[t,d]),x=E=>{(!E||x0(E))&&c(E)},w=E=>{const[O,L]=E.split(m);if(!O&&!L)return;const I=Number(O??"0"),V=Number(L??"0");if(!(I>23||V>59))return d.format(new Date(0,0,0,I,V))},C=E=>{const O=w(E.target.value);O?(c(O),f(O)):c(h)},S=E=>{if(typeof E<"u"){const O=w(E);f(O)}else f(E)};$.useEffect(()=>{const E=typeof e>"u"?"":e;x0(E)&&c(E)},[e,c]);const T=`\\d{2}${XJ(m)}\\d{2}`;return p.jsx(ZJ,{...i,ref:o,value:h,onChange:S,isPrintableCharacter:x0,allowCustomValue:!0,placeholder:`--${m}--`,autocomplete:"none",startIcon:p.jsx(P_,{fill:"neutral500"}),inputMode:"numeric",pattern:T,textValue:a,onTextValueChange:x,onBlur:C,children:v.map(E=>p.jsx(KQ,{value:E,children:E},E))})});$.forwardRef(({clearLabel:t="clear",dateLabel:e="Choose date",timeLabel:n="Choose time",disabled:r=!1,hasError:i,onChange:o,onClear:s,required:a=!1,step:c,value:h,initialDate:f,size:d,...m},v)=>{const x=$.useRef(null),[w,C]=yr({defaultProp:f?Ca(f,!1):void 0,prop:h?Ca(h,!1):h??void 0,onChange(J){o&&o(J?.toDate($s()))}}),S=rf("DateTimePicker"),R=Xr(S.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),T=w?R.format(w.toDate($s())):"",E=J=>{let G=J?Ca(J):void 0;if(!(G&&w&&G.compare(w)===0)){if(T&&G){const[re,se]=T.split(":");G=G.set({hour:parseInt(re,10),minute:parseInt(se,10)})}C(G)}},O=J=>{if(!J)return;const[G,re]=J.split(":"),se=w?w.set({hour:parseInt(G,10),minute:parseInt(re,10)}):Ca(new Date).set({hour:parseInt(G,10),minute:parseInt(re,10)});C(se)},L=J=>{C(void 0),s&&s(J)},I=()=>{const J=w?w.set({hour:0,minute:0}):Ca(new Date);C(J)},V=gn(x,v),{error:F,id:H,labelNode:K}=mn("DateTimePicker"),W=!!F||i;return p.jsxs(ue,{"aria-labelledby":K?`${H}-label`:void 0,role:"group",flex:"1",gap:1,wrap:"wrap",children:[p.jsx(Ao,{flex:"1",children:p.jsx(TJ,{...m,size:d,value:w?.toDate("UTC"),onChange:E,required:a,onClear:s?L:void 0,clearLabel:`${t} date`,disabled:r,ref:V,"aria-label":e})}),p.jsx(Ao,{flex:"1",children:p.jsx(QJ,{size:d,hasError:W,value:T,onChange:O,onClear:s&&T!==void 0&&T!=="00:00"?I:void 0,clearLabel:`${t} time`,required:a,disabled:r,step:c,"aria-label":n})})]})});const Ca=(t,e=!0)=>{const n=t.toISOString();let r=tM(n);return e&&(r=r.set({hour:0,minute:0})),mo(r)},V$=$.forwardRef((t,e)=>p.jsx(JJ,{ref:e,background:"neutral150",...t,"data-orientation":"horizontal",role:"separator",tag:"div"})),JJ=k.styled(be)`
  height: 1px;
  border: none;
  /* If contained in a Flex parent we want to prevent the Divider to shink */
  flex-shrink: 0;
`,eee=k.styled(be)`
  svg {
    height: 8.8rem;
  }
`;$.forwardRef(({icon:t,content:e,action:n,hasRadius:r=!0,shadow:i="tableShadow"},o)=>p.jsxs(ue,{ref:o,alignItems:"center",direction:"column",padding:11,background:"neutral0",hasRadius:r,shadow:i,children:[t?p.jsx(eee,{paddingBottom:6,"aria-hidden":!0,children:t}):null,p.jsx(be,{paddingBottom:4,children:p.jsx(ke,{variant:"delta",tag:"p",textAlign:"center",textColor:"neutral600",children:e})}),n]}));const H$=Ee.define(),P$=Ee.define(),tee=xe.mark({attributes:{style:"background-color: yellow; color: black"}}),nee=Lt.define({create(){return xe.none},update(t,e){return t=t.map(e.changes),e.effects.forEach(n=>{n.is(H$)?t=t.update({add:n.value,sort:!0}):n.is(P$)&&(t=t.update({filter:n.value}))}),t},provide:t=>le.decorations.from(t)});$.forwardRef(({hasError:t,required:e,id:n,value:r="",disabled:i=!1,onChange:o=()=>null,...s},a)=>{const c=$.useRef(),h=$.useRef(),f=$.useRef(),{error:d,...m}=mn("JsonInput"),v=!!d||t,x=m.id??n,w=m.required||e;let C;d?C=`${x}-error`:m.hint&&(C=`${x}-hint`);const S=F=>{const H=h.current?.doc;if(H){const{text:K,to:W}=H.line(F),J=W-K.trimStart().length;W>J&&f.current?.dispatch({effects:H$.of([tee.range(J,W)])})}},R=()=>{const F=h.current?.doc;if(F){const H=F.length||0;f.current?.dispatch({effects:P$.of((K,W)=>W<=0||K>=H)})}},T=({state:F,view:H})=>{f.current=H,h.current=F,R();const W=QU()(H);W.length&&S(F.doc.lineAt(W[0].from).number)},E=(F,H)=>{T(H),o(F)},O=(F,H)=>{f.current=F,h.current=H,T({view:F,state:H})},{setContainer:L,view:I}=AC({value:r,onCreateEditor:O,container:c.current,editable:!i,extensions:[tq(),nee],onChange:E,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),V=gn(c,L);return $.useImperativeHandle(a,()=>({...I?.dom,focus(){I&&I.focus()},scrollIntoView(F){I&&I.dom.scrollIntoView(F)}}),[I]),p.jsx(ree,{ref:V,$disabled:i,$hasError:v,alignItems:"stretch",fontSize:2,hasRadius:!0,"aria-required":w,id:x,"aria-describedby":C,...s})});const ree=k.styled(ue)`
  line-height: ${({theme:t})=>t.lineHeights[2]};

  .cm-editor {
    /** 
     * Hard coded since the color is the same between themes,
     * theme.colors.neutral800 changes between themes 
     */
    background-color: #32324d;
    width: 100%;
    outline: none;
    cursor: ${({$disabled:t})=>t?"not-allowed":"text"};
  }

  .cm-scroller {
    border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
    /* inputFocusStyle will receive hasError prop */
    ${Pi()}
  }

  .cm-editor,
  .cm-scroller {
    border-radius: ${({theme:t})=>t.borderRadius};
  }

  .cm-gutters,
  .cm-activeLineGutter {
    /** 
     * Hard coded since the color is the same between themes,
     * theme.colors.neutral700 changes between themes 
     */
    background-color: #4a4a6a;
  }
`;nn(({disabled:t,...e},n)=>p.jsx(ah,{ref:n,tag:Sl,tabIndex:t?-1:void 0,disabled:t,...e}));k.styled(be)`
  // To prevent global outline on focus visible to force an outline when Main is focused
  &:focus-visible {
    outline: none;
  }
`;k.styled(be)`
  text-decoration: none;

  &:focus {
    left: ${({theme:t})=>t.spaces[3]};
    top: ${({theme:t})=>t.spaces[3]};
  }
`;const iee=yy,oee=$.forwardRef((t,e)=>p.jsx(Cy,{...t,asChild:!0,ref:e})),see=$.forwardRef((t,e)=>p.jsx($y,{children:p.jsx(aee,{children:p.jsx(lee,{ref:e,...t})})})),aee=k.styled(Sy)`
  background: ${t=>T$(t.theme.colors.neutral800,.2)};
  position: fixed;
  inset: 0;
  z-index: ${t=>t.theme.zIndices.overlay};
  will-change: opacity;

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.overlayFadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,lee=k.styled(Ay)`
  max-width: 83rem;
  max-height: 90vh;
  height: auto;
  width: 60%;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  flex-direction: column;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  border-radius: ${t=>t.theme.borderRadius};
  background-color: ${t=>t.theme.colors.neutral0};
  box-shadow: ${t=>t.theme.shadows.popupShadow};
  z-index: ${t=>t.theme.zIndices.modal};

  > form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  @media (prefers-reduced-motion: no-preference) {
    &[data-state='open'] {
      animation-duration: ${t=>t.theme.motion.timings[200]};
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
      animation-name: ${pt.modalPopIn};
    }

    &[data-state='closed'] {
      animation-duration: ${t=>t.theme.motion.timings[120]};
      animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
      animation-name: ${pt.modalPopOut};
    }
  }
`,W$=$.forwardRef((t,e)=>p.jsx(sm,{...t,asChild:!0,ref:e})),cee=$.forwardRef(({children:t,closeLabel:e="Close modal",...n},r)=>p.jsxs(uee,{ref:r,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...n,tag:"header",children:[t,p.jsx(W$,{children:p.jsx(ni,{withTooltip:!1,label:e,children:p.jsx(Vi,{})})})]})),uee=k.styled(ue)`
  border-bottom: solid 1px ${t=>t.theme.colors.neutral150};
`,hee=$.forwardRef((t,e)=>p.jsx(Ry,{asChild:!0,children:p.jsx(ke,{tag:"h2",variant:"omega",fontWeight:"bold",ref:e,...t})})),fee=$.forwardRef(({children:t,...e},n)=>p.jsx(dee,{ref:n,...e,children:t})),dee=k.styled(nf)`
  padding-inline: ${t=>t.theme.spaces[7]};

  & > div {
    padding-block: ${t=>t.theme.spaces[8]};
    /* Add negative margin and padding to avoid cropping the box shadow when the inputs are focused */
    margin: 0 -2px 0 -2px;
    padding-left: 2px;
    padding-right: 2px;

    & > div {
      // the scroll area component applies a display: table to the child, which we don't want.
      display: block !important;
    }
  }
`,gee=$.forwardRef((t,e)=>p.jsx(mee,{ref:e,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...t,tag:"footer"})),mee=k.styled(ue)`
  border-top: solid 1px ${t=>t.theme.colors.neutral150};
  flex: 1;
`,pee=Object.freeze(Object.defineProperty({__proto__:null,Body:fee,Close:W$,Content:see,Footer:gee,Header:cee,Root:iee,Title:hee,Trigger:oee},Symbol.toStringTag,{value:"Module"})),vee="";$.forwardRef(({startAction:t,locale:e,onValueChange:n,value:r,step:i=1,disabled:o=!1,...s},a)=>{const c=rf("NumberInput"),h=e||c.locale,f=$.useRef(new TC(h,{style:"decimal"})),d=$.useRef(new kC(h,{maximumFractionDigits:20})),[m,v]=bee({prop(L){const I=String(r);return isNaN(Number(I))||I!==L&&L!==""?L:d.current.format(Number(r))},defaultProp:vee,onChange(L){const I=f.current.parse(L??"");n(isNaN(I)?void 0:I)}}),x=L=>{v(String(L))},w=({target:{value:L}})=>{f.current.isValidPartialNumber(L)&&x(L)},S=(L=>{const I=L.toString();return I.includes(".")?I.split(".")[1].length:0})(i),R=()=>{if(!m){x(i);return}const L=f.current.parse(m),I=isNaN(L)?i:L+i,V=parseFloat(I.toFixed(S));x(d.current.format(V))},T=()=>{if(!m){x(-i);return}const L=f.current.parse(m),I=isNaN(L)?-i:L-i,V=parseFloat(I.toFixed(S));x(d.current.format(V))},E=L=>{if(!o)switch(L.key){case At.DOWN:{L.preventDefault(),T();break}case At.UP:{L.preventDefault(),R();break}}},O=()=>{if(m){const L=f.current.parse(m),I=isNaN(L)?"":d.current.format(L);x(I)}};return p.jsx(tf,{ref:a,startAction:t,disabled:o,type:"text",inputMode:"decimal",onChange:w,onKeyDown:E,onBlur:O,value:m,endAction:p.jsxs(ue,{direction:"column",children:[p.jsx(Dw,{disabled:o,"aria-hidden":!0,$reverse:!0,onClick:R,tabIndex:-1,type:"button","data-testid":"ArrowUp",children:p.jsx(Oi,{fill:"neutral500"})}),p.jsx(Dw,{disabled:o,"aria-hidden":!0,onClick:T,tabIndex:-1,type:"button","data-testid":"ArrowDown",children:p.jsx(Oi,{fill:"neutral500"})})]}),...s})});const Dw=k.styled.button`
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(${({$reverse:t})=>t?"-2px":"2px"});
  cursor: ${({disabled:t})=>t?"not-allowed":void 0};
  height: 1.1rem;

  svg {
    width: 1.2rem;
    transform: ${({$reverse:t})=>t?"rotateX(180deg)":void 0};
  }
`;function bee({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=s$({defaultProp:e,onChange:n}),o=t!==void 0,s=t instanceof Function?t(r):t,a=o?s:r,c=Rg(n),h=$.useCallback(f=>{if(o){const m=typeof f=="function"?f(s):f;m!==s&&(c(m),i(f))}else i(f)},[o,s,i,c]);return[a,h]}const wee=$.createContext({activePage:1,pageCount:1}),Xm=()=>$.useContext(wee);nn(({children:t,...e},n)=>{const{activePage:r}=Xm(),i=r===1;return p.jsxs(U$,{ref:n,"aria-disabled":i,tabIndex:i?-1:void 0,...e,children:[p.jsx(Io,{children:t}),p.jsx(k3,{"aria-hidden":!0})]})});nn(({children:t,...e},n)=>{const{activePage:r,pageCount:i}=Xm(),o=r===i;return p.jsxs(U$,{ref:n,"aria-disabled":o,tabIndex:o?-1:void 0,...e,children:[p.jsx(Io,{children:t}),p.jsx(Xg,{"aria-hidden":!0})]})});const z$=k.styled(Sl)`
  padding: ${({theme:t})=>t.spaces[3]};
  border-radius: ${({theme:t})=>t.borderRadius};
  box-shadow: ${({$active:t,theme:e})=>t?e.shadows.filterShadow:void 0};
  text-decoration: none;
  display: flex;

  ${Zh}
`,U$=k.styled(z$)`
  font-size: 1.1rem;

  svg path {
    fill: ${t=>t["aria-disabled"]?t.theme.colors.neutral300:t.theme.colors.neutral600};
  }

  &:focus,
  &:hover {
    svg path {
      fill: ${t=>t["aria-disabled"]?t.theme.colors.neutral300:t.theme.colors.neutral700};
    }
  }

  ${t=>t["aria-disabled"]?`
  pointer-events: none;
    `:void 0}
`;nn(({number:t,children:e,...n},r)=>{const{activePage:i}=Xm(),o=i===t;return p.jsxs(xee,{ref:r,...n,"aria-current":o,$active:o,children:[p.jsx(Io,{children:e}),p.jsx(ke,{"aria-hidden":!0,fontWeight:o?"bold":void 0,lineHeight:"revert",variant:"pi",children:t})]})});const xee=k.styled(z$)`
  color: ${({theme:t,$active:e})=>e?t.colors.primary700:t.colors.neutral800};
  background: ${({theme:t,$active:e})=>e?t.colors.neutral0:void 0};

  &:hover {
    box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  }
`,yee=BY,Cee=NY,$ee=$.forwardRef((t,e)=>p.jsx(jY,{...t,asChild:!0,ref:e})),See=$.forwardRef((t,e)=>p.jsx(FY,{children:p.jsx(Aee,{sideOffset:4,side:"bottom",align:"start",...t,ref:e})})),Aee=k.styled(VY)`
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  z-index: ${({theme:t})=>t.zIndices.popover};
  background-color: ${t=>t.theme.colors.neutral0};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
  border-radius: ${({theme:t})=>t.borderRadius};

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }

    &[data-state='closed'] {
      animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};

      &[data-side='top'] {
        animation-name: ${pt.slideUpOut};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownOut};
      }
    }
  }
`,Ree=$.forwardRef(({children:t,intersectionId:e,onReachEnd:n,...r},i)=>{const o=$.useRef(null),s=gn(o,i),a=Tn();return Al(o,n??(()=>{}),{selectorToWatch:`#${js(a)}`,skipWhen:!e||!n}),p.jsxs(kee,{ref:s,...r,children:[t,e&&n&&p.jsx(be,{id:js(a),width:"100%",height:"1px"})]})}),kee=k.styled(nf)`
  height: 20rem;
`,Tee=Object.freeze(Object.defineProperty({__proto__:null,Anchor:Cee,Content:See,Root:yee,ScrollArea:Ree,Trigger:$ee},Symbol.toStringTag,{value:"Module"}));$.forwardRef(({size:t="M",value:e,...n},r)=>p.jsx(Mee,{ref:r,$size:t,...n,children:p.jsx(Eee,{style:{transform:`translate3D(-${100-(e??0)}%, 0, 0)`}})}));const Mee=k.styled(YY)`
  position: relative;
  overflow: hidden;
  width: ${t=>t.$size==="S"?"7.8rem":"10.2rem"};
  height: ${t=>t.$size==="S"?"0.4rem":"0.8rem"};
  background-color: ${t=>t.theme.colors.neutral600};
  border-radius: ${t=>t.theme.borderRadius};

  /* Fix overflow clipping in Safari */
  /* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
  transform: translateZ(0);
`,Eee=k.styled(XY)`
  background-color: ${({theme:t})=>t.colors.neutral0};
  border-radius: ${({theme:t})=>t.borderRadius};
  width: 100%;
  height: 100%;

  @media (prefers-reduced-motion: no-preference) {
    transition: transform ${t=>t.theme.motion.timings[320]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`;$.forwardRef((t,e)=>p.jsx(Oee,{ref:e,...t}));const Oee=k.styled(fX)`
  display: flex;
  flex-direction: column;
  gap: ${t=>t.theme.spaces[3]};
`;$.forwardRef(({children:t,id:e,...n},r)=>{const i=Tn(e);return p.jsxs(ue,{gap:2,children:[p.jsx(Dee,{id:i,ref:r,...n,children:p.jsx(Iee,{})}),p.jsx(ke,{tag:"label",htmlFor:i,children:t})]})});const Dee=k.styled(dX)`
  background: ${t=>t.theme.colors.neutral0};
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: 50%;
  border: 1px solid ${t=>t.theme.colors.neutral300};
  position: relative;
  cursor: pointer;
  z-index: 0;

  @media (prefers-reduced-motion: no-preference) {
    transition: border-color ${t=>t.theme.motion.timings[120]}
      ${t=>t.theme.motion.easings.easeOutQuad};
  }

  &[data-state='checked'] {
    border: 1px solid ${t=>t.theme.colors.primary600};
  }

  &[data-disabled] {
    cursor: not-allowed;
    background-color: ${t=>t.theme.colors.neutral200};
  }

  /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    min-width: 44px;
    min-height: 44px;
  }
`,Iee=k.styled(gX)`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;

  &[data-state='checked'] {
    @media (prefers-reduced-motion: no-preference) {
      animation: ${pt.popIn} ${t=>t.theme.motion.timings[200]};
    }
  }

  &::after {
    content: '';
    display: block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: ${t=>t.theme.colors.primary600};
  }
`,_ee=t=>{const e=t.querySelector('[tabindex="0"]');e&&e.focus()},q$=$.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),Lee=()=>$.useContext(q$),Bee=$.forwardRef(({colCount:t,rowCount:e,jumpStep:n=3,initialCol:r=0,initialRow:i=0,...o},s)=>{const a=$.useRef(null),c=$.useRef(!1),h=gn(a,s),[f,d]=$.useState(i),[m,v]=$.useState(r),x=$.useCallback(({colIndex:S,rowIndex:R})=>{v(S),d(R)},[]);$.useEffect(()=>{c.current&&_ee(a.current),c.current||(c.current=!0)},[m,f]);const w=S=>{switch(S.key){case At.RIGHT:{S.preventDefault(),v(R=>R<t-1?R+1:R);break}case At.LEFT:{S.preventDefault(),v(R=>R>0?R-1:R);break}case At.UP:{S.preventDefault(),d(R=>R>0?R-1:R);break}case At.DOWN:{S.preventDefault(),d(R=>R<e-1?R+1:R);break}case At.HOME:{S.preventDefault(),S.ctrlKey&&d(0),v(0);break}case At.END:{S.preventDefault(),S.ctrlKey&&d(e-1),v(t-1);break}case At.PAGE_DOWN:{S.preventDefault(),d(R=>R+n<e?R+n:e-1);break}case At.PAGE_UP:{S.preventDefault(),d(R=>R-n>0?R-n:0);break}}},C=$.useMemo(()=>({rowIndex:f,colIndex:m,setTableValues:x}),[m,f,x]);return p.jsx(q$.Provider,{value:C,children:p.jsx("table",{role:"grid",ref:h,"aria-rowcount":e,"aria-colcount":t,onKeyDown:w,...o})})}),oo=(t,e)=>[...t.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(i=>i.hasAttribute("disabled")?!1:e?!0:i.getAttribute("tabindex")!=="-1"),y0=t=>t.filter(e=>e.tagName==="INPUT"?e.type!=="checkbox"&&e.type!=="radio":!1),K$=$.forwardRef(({coords:t={col:0,row:0},tag:e="td",...n},r)=>{const i=$.useRef(null),o=gn(r,i),{rowIndex:s,colIndex:a,setTableValues:c}=Lee(),[h,f]=$.useState(!1),d=x=>{const w=oo(i.current,!0);if(w.length===0||w.length===1&&y0(w).length===0)return;if(w.length>1&&!w.find(S=>S.tagName!=="BUTTON")){x.preventDefault();const S=w.findIndex(R=>R===document.activeElement);if(x.key===At.RIGHT){const R=w[S+1];R&&(x.stopPropagation(),R.focus())}else if(x.key===At.LEFT){const R=w[S-1];R&&(x.stopPropagation(),R.focus())}return}const C=x.key===At.ENTER;if(C&&!h)f(!0);else if((x.key===At.ESCAPE||C)&&h){if(C&&document.activeElement?.tagName==="A")return;f(!1),i.current.focus()}else h&&x.stopPropagation()},m=s===t.row-1&&a===t.col-1;So(()=>{const x=oo(i.current,!0);x.length===0||x.length===1&&y0(x).length!==0||x.length>1&&x.find(w=>w.tagName!=="BUTTON")?(i.current.setAttribute("tabIndex",!h&&m?"0":"-1"),x.forEach((w,C)=>{w.setAttribute("tabIndex",h?"0":"-1"),h&&C===0&&w.focus()})):x.forEach(w=>{w.setAttribute("tabIndex",m?"0":"-1")})},[h,m]);const v=$.useCallback(()=>{const x=oo(i.current,!0);x.length>=1&&(y0(x).length!==0||!x.find(w=>w.tagName!=="BUTTON"))&&f(!0),c({rowIndex:t.row-1,colIndex:t.col-1})},[t,c]);return So(()=>{const x=i.current;return oo(x,!0).forEach(C=>{C.addEventListener("focus",v)}),()=>{oo(x,!0).forEach(S=>{S.removeEventListener("focus",v)})}},[v]),p.jsx(be,{role:"gridcell",tag:e,ref:o,onKeyDown:d,...n})}),Nee=t=>p.jsx(K$,{...t,tag:"th"}),jee=({children:t,...e})=>{const n=$.Children.toArray(t).map(r=>$.isValidElement(r)?$.cloneElement(r,{"aria-rowindex":1}):r);return p.jsx("thead",{...e,children:n})},Fee=({children:t,...e})=>{const n=$.Children.toArray(t).map((r,i)=>$.isValidElement(r)?$.cloneElement(r,{"aria-rowindex":i+2}):r);return p.jsx("tbody",{...e,children:n})},Vee=({children:t,...e})=>{const n=$.Children.toArray(t).map((r,i)=>$.isValidElement(r)?$.cloneElement(r,{"aria-colindex":i+1,coords:{col:i+1,row:e["aria-rowindex"]}}):r);return p.jsx(be,{tag:"tr",...e,children:n})},Hee=k.styled(Vi)`
  font-size: 0.5rem;
  path {
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,G$=k.styled(M3)`
  font-size: 1rem;
  path {
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,Pee=k.styled.div`
  border-radius: ${({theme:t})=>t.borderRadius};
  border: 1px solid ${({theme:t})=>t.colors.neutral150}

  &:focus-within {
    ${G$} {
      fill: ${({theme:t})=>t.colors.primary600};
    }
  }
`,Wee=k.styled(tf)`
  border: 1px solid ${({theme:t})=>t.colors.neutral150}
  height: 16px;
  padding: 0 0 0 8px;
  color: ${({theme:t})=>t.colors.neutral800};
  
  &:hover {
    button {
      cursor: pointer;
    }
  }

  ${Pi()}
`,zee=$.forwardRef(({name:t,children:e,value:n="",onClear:r,clearLabel:i="Clear",...o},s)=>{const a=$.useRef(null),c=n.length>0,h=d=>{r(d),a.current.focus()},f=u$(s,a);return p.jsx(Pee,{children:p.jsxs(Ao,{name:t,children:[p.jsx(Io,{children:p.jsx(Km,{children:e})}),p.jsx(Wee,{size:"S",ref:f,value:n,startAction:p.jsx(G$,{"aria-hidden":!0}),endAction:c?p.jsx(ni,{onClick:h,onMouseDown:d=>{d.preventDefault()},label:i,size:"XS",variant:"ghost",type:"button",children:p.jsx(Hee,{})}):void 0,...o})]})})}),Uee=t=>p.jsx("form",{...t,role:"search"}),qee=k.styled(be)`
  display: inline-flex;
  border: none;

  & > svg {
    height: 1.2rem;
    width: 1.2rem;
  }

  & > svg path {
    fill: ${({theme:t,...e})=>e["aria-disabled"]?t.colors.neutral600:t.colors.primary600};
  }

  &:hover {
    cursor: ${({$iconAction:t})=>t?"pointer":"initial"};
  }
`,Kee=({children:t,icon:e,label:n,disabled:r=!1,onClick:i,...o})=>{const s=a=>{r||!i||i(a)};return p.jsxs(ue,{inline:!0,background:r?"neutral200":"primary100",color:r?"neutral700":"primary600",paddingLeft:3,paddingRight:1,borderColor:r?"neutral300":"primary200",hasRadius:!0,height:"3.2rem",...o,children:[p.jsx(Gee,{$disabled:r,variant:"pi",fontWeight:"bold",children:t}),p.jsx(qee,{tag:"button",disabled:r,"aria-disabled":r,"aria-label":n,padding:2,onClick:s,$iconAction:!!i,children:e})]})},Gee=k.styled(ke)`
  color: inherit;
  border-right: 1px solid ${({theme:t,$disabled:e})=>e?t.colors.neutral300:t.colors.primary200};
  padding-right: ${({theme:t})=>t.spaces[2]};
`,Yee=$.forwardRef(({children:t,clearLabel:e="Clear",customizeContent:n,disabled:r,hasError:i,id:o,name:s,onChange:a,onClear:c,onCloseAutoFocus:h,onReachEnd:f,placeholder:d,required:m,size:v,startIcon:x,value:w,withTags:C,...S},R)=>{const T=$.useRef(null),[E,O]=$.useState(),[L,I]=$.useState(!1),V=we=>{a?a(we):O(we)},F=we=>()=>{const qe=Array.isArray(w)?w.filter(Te=>Te!==we):(E??[]).filter(Te=>Te!==we);a?a(qe):O(qe)},H=we=>{I(we)},K=Tn(),W=`intersection-${js(K)}`;Al(T,we=>{f&&f(we)},{selectorToWatch:`#${W}`,skipWhen:!L});const G=typeof w<"u"&&w!==null?w:E,re=we=>we&&typeof we=="object"&&we.value?p.jsx(Kee,{tabIndex:-1,disabled:r,icon:p.jsx(Vi,{width:`${14/16}rem`,height:`${14/16}rem`}),onClick:F(we.value),children:we.textValue},we.value):null,{error:se,...te}=mn("MultiSelect"),ne=!!se||i,Y=te.id??o,ce=te.name??s,me=te.required??m;let Ie;return se?Ie=`${Y}-error`:te.hint&&(Ie=`${Y}-hint`),p.jsxs(O$,{onOpenChange:H,disabled:r,required:me,onValueChange:V,value:G,...S,multi:!0,children:[p.jsx(D$,{ref:R,id:Y,name:ce,"aria-label":S["aria-label"],"aria-describedby":Ie??S["aria-describedby"],startIcon:x,hasError:ne,disabled:r,clearLabel:e,onClear:G?.length?c:void 0,withTags:!!(C&&(G?.length??!1)),size:v,children:p.jsx(I$,{placeholder:d,textColor:G?.length?"neutral800":"neutral600",children:G?.length?C?re:n?n(G):void 0:void 0})}),p.jsx(_$,{children:p.jsx(L$,{position:"popper",sideOffset:4,onCloseAutoFocus:h,children:p.jsxs(B$,{ref:T,children:[t,p.jsx(be,{id:W,width:"100%",height:"1px"})]})})})]})}),Y$=$.forwardRef(({value:t,children:e,startIcon:n,...r},i)=>p.jsxs(Ym,{ref:i,value:t.toString(),...r,children:[n&&p.jsx(be,{tag:"span","aria-hidden":!0,children:n}),p.jsx(N$,{children:({isSelected:o,isIntermediate:s})=>p.jsx(ef,{checked:s?"indeterminate":o})}),p.jsx(ke,{children:p.jsx(j$,{children:e})})]}));$.forwardRef(({children:t,label:e,startIcon:n,values:r=[],...i},o)=>p.jsxs(AJ,{ref:o,children:[p.jsxs(Ym,{value:r,...i,children:[n&&p.jsx(be,{tag:"span","aria-hidden":!0,children:n}),p.jsx(N$,{children:({isSelected:s,isIntermediate:a})=>p.jsx(ef,{checked:a?"indeterminate":s})}),p.jsx(ke,{children:e})]}),t]}));k.styled(Y$)`
  padding-left: ${({theme:t})=>t.spaces[7]};
`;const Xee="23.2rem",Zee=$.forwardRef(({...t},e)=>p.jsx(Qee,{ref:e,...t,tag:"nav"})),Qee=k.styled(be)`
  width: ${Xee};
  background: ${({theme:t})=>t.colors.neutral100};
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid ${({theme:t})=>t.colors.neutral200};
  z-index: 1;
`,Iw=k.styled(V$)`
  width: 2.4rem;
  background-color: ${({theme:t})=>t.colors.neutral200};
`,Jee=({tag:t="h2",label:e,searchLabel:n="",searchable:r=!1,onChange:i=()=>{},value:o="",onClear:s=()=>{},onSubmit:a=()=>{},id:c,placeholder:h})=>{const[f,d]=$.useState(!1),m=Hx(f),v=Tn(c),x=$.useRef(void 0),w=$.useRef(void 0);$.useEffect(()=>{f&&x.current&&x.current.focus(),m&&!f&&w.current&&w.current.focus()},[f,m]);const C=()=>{d(E=>!E)},S=E=>{s(E),x.current.focus()},R=E=>{E.relatedTarget?.id!==v&&d(!1)},T=E=>{E.key===At.ESCAPE&&d(!1)};return f?p.jsxs(be,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[p.jsx(Uee,{children:p.jsx(zee,{name:"searchbar",value:o,onChange:i,placeholder:h,onKeyDown:T,ref:x,onBlur:R,onClear:S,onSubmit:a,clearLabel:"Clear",children:n})}),p.jsx(be,{paddingLeft:2,paddingTop:4,children:p.jsx(Iw,{})})]}):p.jsxs(ue,{direction:"column",alignItems:"flex-start",paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[p.jsxs(ue,{justifyContent:"space-between",alignItems:"flex-start",width:"100%",gap:2,children:[p.jsx(ke,{variant:"beta",tag:t,children:e}),r&&p.jsx(ni,{ref:w,onClick:C,label:n,children:p.jsx(M3,{})})]}),p.jsx(be,{paddingTop:4,children:p.jsx(Iw,{})})]})},ete=nn(({active:t,children:e,icon:n=null,withBullet:r=!1,isSubSectionChild:i=!1,...o},s)=>p.jsxs(tte,{background:"neutral100",paddingLeft:i?9:7,paddingBottom:2,paddingTop:2,ref:s,...o,children:[p.jsxs(ue,{children:[n?p.jsx(nte,{children:n}):p.jsx(tg,{$active:t}),p.jsx(ke,{paddingLeft:2,children:e})]}),r&&p.jsx(ue,{paddingRight:4,children:p.jsx(tg,{$active:!0})})]})),tg=k.styled.span`
  width: 0.4rem;
  height: 0.4rem;
  background-color: ${({theme:t,$active:e})=>e?t.colors.primary600:t.colors.neutral600};
  border-radius: 50%;
`,tte=k.styled(Sl)`
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: ${({theme:t})=>t.colors.neutral800};
  svg > * {
    fill: ${({theme:t})=>t.colors.neutral600};
  }

  &.active {
    ${({theme:t})=>k.css`
        background-color: ${t.colors.primary100};
        border-right: 2px solid ${t.colors.primary600};
        color: ${t.colors.primary700};
        font-weight: 500;
      `}

    ${tg} {
      background-color: ${({theme:t})=>t.colors.primary600};
    }
  }

  &:focus-visible {
    outline-offset: -2px;
  }
`,nte=k.styled.div`
  svg {
    height: 1.6rem;
    width: 1.6rem;
  }
`;k.styled.button`
  border: none;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
`;const rte=({collapsable:t=!1,label:e,onClick:n=()=>{},ariaExpanded:r,ariaControls:i})=>t?p.jsxs(ue,{tag:"button",onClick:n,"aria-expanded":r,"aria-controls":i,textAlign:"left",alignItems:"center",children:[p.jsx(be,{paddingRight:1,children:p.jsx(ke,{variant:"sigma",textColor:"neutral600",children:e})}),t&&p.jsx(Oi,{width:"1.2rem","aria-hidden":!0,fill:"neutral500",style:{transform:r?"rotateX(0deg)":"rotateX(180deg)"}})]}):p.jsx(ue,{children:p.jsx(be,{paddingRight:1,children:p.jsx(ke,{variant:"sigma",textColor:"neutral600",children:e})})}),ite=k.styled(be)`
  & > svg {
    height: 0.4rem;
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,ote=({collapsable:t=!1,label:e,badgeLabel:n,children:r,id:i})=>{const[o,s]=$.useState(!0),a=Tn(i),c=()=>{s(h=>!h)};return p.jsxs(ue,{direction:"column",alignItems:"stretch",gap:1,children:[p.jsx(ite,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:p.jsxs(be,{position:"relative",paddingRight:n?6:0,children:[p.jsx(rte,{onClick:c,ariaExpanded:o,ariaControls:a,collapsable:t,label:e}),n&&p.jsx(Pm,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:n})]})}),(!t||o)&&p.jsx("ol",{id:a,children:$.Children.map(r,(h,f)=>p.jsx("li",{children:h},f))})]})},ste=({children:t,spacing:e=2,horizontal:n=!1,...r})=>p.jsx(be,{paddingTop:2,paddingBottom:4,children:p.jsx(ue,{tag:"ol",gap:e,direction:n?"row":"column",alignItems:n?"center":"stretch",...r,children:$.Children.map(t,(i,o)=>p.jsx("li",{children:i},o))})}),ate=$.forwardRef(({visibleLabels:t,onLabel:e="On",offLabel:n="Off",onCheckedChange:r,checked:i,defaultChecked:o,disabled:s,...a},c)=>{const[h,f]=yr({prop:i,defaultProp:o}),d=m=>{f(m)};return p.jsxs(ue,{gap:3,children:[p.jsx(lte,{ref:c,onCheckedChange:uo(r,d),checked:h,disabled:s,...a,children:p.jsx(cte,{})}),t?p.jsx(ute,{"aria-hidden":!0,"data-disabled":s,"data-state":h?"checked":"unchecked",children:h?e:n}):null]})}),lte=k.styled(CX)`
  width: 4rem;
  height: 2.4rem;
  border-radius: 1.2rem;
  background-color: ${({theme:t})=>t.colors.danger500};

  &[data-state='checked'] {
    background-color: ${({theme:t})=>t.colors.success500};
  }

  &[data-disabled] {
    background-color: ${({theme:t})=>t.colors.neutral300};
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.backgroundColor};
  }
`,cte=k.styled($X)`
  display: block;
  height: 1.6rem;
  width: 1.6rem;
  border-radius: 50%;
  background-color: ${({theme:t})=>t.colors.neutral0};
  transform: translateX(4px);

  &[data-state='checked'] {
    transform: translateX(20px);
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: transform ${t=>t.theme.motion.timings[120]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,ute=k.styled(ke)`
  color: ${t=>t.theme.colors.danger600};

  &[data-state='checked'] {
    color: ${t=>t.theme.colors.success600};
  }

  &[data-disabled='true'] {
    color: ${({theme:t})=>t.colors.neutral500};
  }
`,[hte,Zm]=$l("Tabs");$.forwardRef(({disabled:t=!1,variant:e="regular",hasError:n,...r},i)=>p.jsx(hte,{disabled:t,hasError:n,variant:e,children:p.jsx(fte,{ref:i,...r})}));const fte=k.styled(IX)`
  width: 100%;
  position: relative;
`;$.forwardRef((t,e)=>{const{variant:n}=Zm("List");return p.jsx(dte,{ref:e,...t,$variant:n})});const dte=k.styled(_X)`
  display: flex;
  align-items: ${t=>t.$variant==="regular"?"flex-end":"unset"};
  position: relative;
  z-index: 0;
`;$.forwardRef(({children:t,disabled:e,...n},r)=>{const{disabled:i,variant:o,hasError:s}=Zm("Trigger"),a=i===!0||i===n.value||e,c=s===n.value;return p.jsxs(gte,{ref:r,...n,$hasError:c,$variant:o,disabled:a,children:[p.jsx(Z$,{fontWeight:"bold",variant:o==="simple"?"sigma":void 0,children:t}),o==="simple"?p.jsx(X$,{}):null]})});const X$=k.styled.span`
  display: block;
  width: 100%;
  background-color: currentColor;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  height: 0.2rem;
`,Z$=k.styled(ke)``,gte=k.styled(LX)`
  position: relative;
  color: ${t=>t.$hasError?t.theme.colors.danger600:t.theme.colors.neutral600};
  cursor: pointer;
  z-index: 0;

  ${t=>t.$variant==="simple"?k.css`
        padding-block: ${e=>e.theme.spaces[4]};
        padding-inline: ${e=>e.theme.spaces[4]};

        & > ${Z$} {
          line-height: 1.2rem;
        }

        &[data-state='active'] {
          color: ${t.$hasError?t.theme.colors.danger600:t.theme.colors.primary700};

          & > ${X$} {
            opacity: 1;
          }
        }
      `:k.css`
        padding-block: ${e=>e.theme.spaces[3]};
        padding-inline: ${e=>e.theme.spaces[3]};
        flex: 1;
        background-color: ${e=>e.theme.colors.neutral100};
        border-bottom: solid 1px ${e=>e.theme.colors.neutral150};

        &:not([data-state='active']) + &:not([data-state='active']) {
          border-left: solid 1px ${e=>e.theme.colors.neutral150};
        }

        &[data-state='active'] {
          padding-block: ${e=>e.theme.spaces[4]};
          padding-inline: ${e=>e.theme.spaces[4]};
          color: ${t.$hasError?t.theme.colors.danger600:t.theme.colors.primary700};
          border-top-right-radius: ${e=>e.theme.borderRadius};
          border-top-left-radius: ${e=>e.theme.borderRadius};
          background-color: ${e=>e.theme.colors.neutral0};
          border-bottom: solid 1px ${e=>e.theme.colors.neutral0};
          box-shadow: ${t.theme.shadows.tableShadow};
          z-index: 1;
        }
      `}

  &[data-disabled] {
    cursor: not-allowed;
    color: ${t=>t.theme.colors.neutral400};
  }
`;$.forwardRef((t,e)=>{const{variant:n}=Zm("Content");return p.jsx(mte,{$variant:n,ref:e,...t})});const mte=k.styled(BX)`
  ${t=>t.$variant==="simple"?k.css``:k.css`
        position: relative;
        z-index: 1;
        background-color: ${e=>e.theme.colors.neutral0};
      `}
`,pte=k.styled(be)`
  overflow: hidden;
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
`,vte=k.styled(Bee)`
  width: 100%;
  white-space: nowrap;
`,bte=k.styled(be)`
  &:before {
    // TODO: make sure to add a token for this weird stuff
    background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.2;
    position: absolute;
    height: 100%;
    content: ${({$overflowing:t})=>t==="both"||t==="left"?"''":void 0};
    box-shadow: ${({theme:t})=>t.shadows.tableShadow};
    width: ${({theme:t})=>t.spaces[2]};
    left: 0;
  }

  &:after {
    // TODO: make sure to add a token for this weird stuff
    background: linear-gradient(270deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.2;
    position: absolute;
    height: 100%;
    content: ${({$overflowing:t})=>t==="both"||t==="right"?"''":void 0};
    box-shadow: ${({theme:t})=>t.shadows.tableShadow};
    width: ${({theme:t})=>t.spaces[2]};
    right: 0;
    top: 0;
  }
`,wte=k.styled(be)`
  overflow-x: auto;
`,xte=$.forwardRef(({footer:t,...e},n)=>{const r=$.useRef(null),[i,o]=$.useState(),s=a=>{const c=a.target.scrollWidth-a.target.clientWidth;if(a.target.scrollLeft===0){o("right");return}if(a.target.scrollLeft===c){o("left");return}a.target.scrollLeft>0&&o("both")};return $.useEffect(()=>{r.current.scrollWidth>r.current.clientWidth&&o("right")},[]),p.jsxs(pte,{shadow:"tableShadow",hasRadius:!0,background:"neutral0",children:[p.jsx(bte,{$overflowing:i,position:"relative",children:p.jsx(wte,{ref:r,onScroll:s,paddingLeft:6,paddingRight:6,children:p.jsx(vte,{ref:n,...e})})}),t]})}),yte=k.styled(Fee)`
  & tr:last-of-type {
    border-bottom: none;
  }
`,Cte=({children:t,...e})=>p.jsx(yte,{...e,children:t}),$te=k.styled(jee)`
  border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
`,Ste=({children:t,...e})=>p.jsx($te,{...e,children:t}),Ate=k.styled(Vee)`
  border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};

  & td,
  & th {
    padding: ${({theme:t})=>t.spaces[4]};
  }

  & td:first-of-type,
  & th:first-of-type {
    padding: 0 ${({theme:t})=>t.spaces[1]};
  }

  // Resetting padding values and fixing a height
  th {
    padding-top: 0;
    padding-bottom: 0;
    height: 5.6rem;
  }
`,Rte=t=>p.jsx(Ate,{...t}),Q$=k.styled(K$)`
  vertical-align: middle;
  text-align: left;
  outline-offset: -4px;

  /**
  * Hack to make sure the checkbox looks aligned
  */
  input {
    vertical-align: sub;
  }
`,kte=$.forwardRef(({children:t,action:e,...n},r)=>p.jsx(Q$,{color:"neutral600",as:Nee,ref:r,...n,children:p.jsxs(ue,{children:[t,e]})})),Tte=$.forwardRef(({children:t,...e},n)=>p.jsx(Q$,{color:"neutral800",ref:n,...e,children:t}));k.styled(be)`
  height: 2.4rem;
  width: 2.4rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    height: 1rem;
    width: 1rem;
  }

  svg path {
    fill: ${({theme:t})=>t.colors.primary600};
  }
`;k.styled(be)`
  border-radius: 0 0 ${({theme:t})=>t.borderRadius} ${({theme:t})=>t.borderRadius};
  display: block;
  width: 100%;
  border: none;
`;nn(({children:t,startIcon:e,endIcon:n,disabled:r=!1,loading:i=!1,...o},s)=>{const a=r||i;return p.jsxs(Ote,{ref:s,disabled:a,"aria-disabled":a,tag:"button",type:"button",gap:2,...o,children:[i?p.jsx(Ete,{"aria-hidden":!0,children:p.jsx(T3,{})}):e,p.jsx(ke,{variant:"pi",children:t}),n]})});const Mte=k.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,Ete=k.styled.span`
  display: flex;
  animation: ${Mte} 2s infinite linear;
  will-change: transform;
`,Ote=k.styled(ue)`
  border: none;
  background-color: transparent;
  color: ${t=>t.theme.colors.primary600};
  cursor: pointer;

  &[aria-disabled='true'] {
    pointer-events: none;
    color: ${t=>t.theme.colors.neutral600};
  }

  ${Zh}
`,Dte=$.forwardRef((t,e)=>p.jsx(tf,{ref:e,...t}));Dte.displayName="TextInput";$.forwardRef(({disabled:t,hasError:e,id:n,name:r,required:i,...o},s)=>{const{error:a,...c}=mn("Textarea"),h=!!a||e,f=c.id??n,d=c.name??r,m=c.required||i;let v;return a?v=`${f}-error`:c.hint&&(v=`${f}-hint`),p.jsx(Ite,{borderColor:h?"danger600":"neutral200",$hasError:h,hasRadius:!0,children:p.jsx(_te,{"aria-invalid":h,"aria-required":m,tag:"textarea",background:t?"neutral150":"neutral0",color:t?"neutral600":"neutral800",disabled:t,fontSize:2,hasRadius:!0,ref:s,lineHeight:4,padding:4,width:"100%",height:"100%",id:f,name:d,"aria-describedby":v,...o})})});const Ite=k.styled(be)`
  height: 10.5rem;
  ${Pi()}
`,_te=k.styled(be)`
  border: none;
  resize: none;

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    font-size: ${({theme:t})=>t.fontSizes[2]};
    opacity: 1;
  }

  &:focus-within {
    outline: none;
  }

  &:disabled {
    cursor: not-allowed;
  }
`,Lte=$.forwardRef(({offLabel:t,onLabel:e,disabled:n,hasError:r,required:i,id:o,name:s,checked:a,onChange:c,...h},f)=>{const[d=!1,m]=yr({prop:a}),v=d!==null&&!d,{error:x,...w}=mn("Toggle"),C=!!x||r,S=w.id??o,R=w.name??s,T=w.required||i;let E;return x?E=`${S}-error`:w.hint&&(E=`${S}-hint`),p.jsxs(Bte,{position:"relative",hasRadius:!0,padding:1,background:n?"neutral150":"neutral100",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral200",wrap:"wrap",cursor:n?"not-allowed":"pointer",$hasError:C,children:[p.jsx(_w,{hasRadius:!0,flex:"1 1 50%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&v?"neutral200":v?"neutral0":"transparent",borderColor:n&&v?"neutral300":v?"neutral200":n?"neutral150":"neutral100",children:p.jsx(ke,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":v?"danger700":"neutral600",children:t})}),p.jsx(_w,{hasRadius:!0,flex:"1 1 50%",paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&d?"neutral200":d?"neutral0":"transparent",borderColor:n&&d?"neutral300":d?"neutral200":n?"neutral150":"neutral100",children:p.jsx(ke,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":d?"primary600":"neutral600",children:e})}),p.jsx(Nte,{...h,id:S,name:R,ref:f,onChange:O=>{m(O.currentTarget.checked),c?.(O)},type:"checkbox","aria-required":T,disabled:n,"aria-disabled":n,checked:!!d,"aria-describedby":E})]})}),Bte=k.styled(ue)`
  ${Pi()}
`,_w=k.styled(ue)`
  padding-block: 0.6rem;
`,Nte=k.styled.input`
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  z-index: 0;
  width: 100%;
`,jte=nn((t,e)=>{const{gap:n=0,gridCols:r=12,...i}=t;return p.jsx(Fte,{ref:e,$gap:n,$gridCols:r,...i})}),Fte=k.styled(be)`
  display: grid;
  grid-template-columns: repeat(${({$gridCols:t})=>t}, 1fr);
  ${({theme:t,$gap:e})=>Xh({gap:e},t)}
`,Vte=nn(({col:t,s:e,xs:n,m:r,...i},o)=>p.jsx(Hte,{ref:o,$col:t,$s:e,$xs:n,$m:r,...i})),Hte=k.styled(ue)`
  grid-column: span ${({$xs:t})=>t??12};
  max-width: 100%;

  ${({theme:t})=>t.breakpoints.small} {
    grid-column: span ${({$s:t,$xs:e})=>t??e??12};
  }

  ${({theme:t})=>t.breakpoints.medium} {
    grid-column: span ${({$m:t,$s:e,$xs:n})=>t??e??n??12};
  }

  ${({theme:t})=>t.breakpoints.large} {
    grid-column: span ${({$col:t,$m:e,$s:n,$xs:r})=>t??e??n??r??12};
  }
`,Pte=Object.freeze(Object.defineProperty({__proto__:null,Item:Vte,Root:jte},Symbol.toStringTag,{value:"Module"})),Wte=({onEscape:t,restoreFocus:e=!0,skipAutoFocus:n=!1,...r})=>{const i=$.useRef(null);$.useEffect(()=>{let s=null;return e&&(s=document.activeElement),()=>{s&&s.focus()}},[e]),$.useEffect(()=>{if(!i.current||n)return;const s=oo(i.current);s.length>0?s[0].focus():console.warn("[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.")},[n]);const o=s=>{if(s.key===At.ESCAPE&&t){t();return}if(s.key!==At.TAB)return;const a=oo(i.current);if(a.length>0){const c=a[0],h=a[a.length-1];s.shiftKey?c===document.activeElement&&(s.preventDefault(),h.focus()):h===document.activeElement&&(s.preventDefault(),c.focus())}};return p.jsx("div",{ref:i,onKeyDown:o,...r})};k.styled(ue)`
    &>* {
        width: 100%;
    }
`;const zte="strapi-plugin-comments",Ute={displayName:"Comments"},qte=576,Kte=({width:t=24,height:e=24})=>p.jsx("svg",{viewBox:`0 0 ${t} ${e}`,xmlns:"http://www.w3.org/2000/svg",height:`${e}px`,children:p.jsx("g",{style:{transform:`scale(${t/qte})`},fill:"currentColor",children:p.jsx("path",{d:"M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z"})})}),Gte=p.jsx(Kte,{}),Yte=()=>Gte,zt={render:t=>`plugin::comments.${t}`,comments:{read:"comments-read",moderate:"comments-moderate"},reports:{read:"reports-read",review:"reports-review"},settings:{read:"settings-read",change:"settings-change"}},ng={access:[{action:zt.render(zt.comments.read),subject:null},{action:zt.render(zt.reports.read),subject:null},{action:zt.render(zt.settings.read),subject:null}],moderate:[{action:zt.render(zt.comments.moderate),subject:null}],reports:[{action:zt.render(zt.reports.read),subject:null}],reportsReview:[{action:zt.render(zt.reports.review),subject:null}],settings:[{action:zt.render(zt.settings.read),subject:null}],settingsChange:[{action:zt.render(zt.settings.change),subject:null}]},Hr=zte.replace(/^strapi-plugin-/i,""),Lw={en:()=>Promise.resolve().then(()=>require("./en-Ca05D1aN.js")),fr:()=>Promise.resolve().then(()=>require("./fr-DvC8Kjh_.js")),"pt-BR":()=>Promise.resolve().then(()=>require("./pt-BR-ByULlOKU.js")),tr:()=>Promise.resolve().then(()=>require("./tr-Cv3hH0Rh.js")),ru:()=>Promise.resolve().then(()=>require("./ru-DOajpZMF.js")),"zh-Hans":()=>Promise.resolve().then(()=>require("./zh-Hans-P1iGqMnb.js")),pl:()=>Promise.resolve().then(()=>require("./pl-DthJf26N.js"))},{displayName:Bw}=Ute,Xte={register(t){t.addMenuLink({to:`/plugins/${Hr}`,badgeContent:1,icon:Yte,intlLabel:{id:`${Hr}.plugin.name`,defaultMessage:Bw},Component:()=>Promise.resolve().then(()=>require("./index-DKmA1egQ.js")),permissions:ng.access}),t.createSettingSection({id:Hr,intlLabel:{id:`${Hr}.plugin.section`,defaultMessage:`${Bw} plugin`}},[{intlLabel:{id:`${Hr}.plugin.section.item`,defaultMessage:"Configuration"},id:"comments",to:`/settings/${Hr}`,Component:()=>Promise.resolve().then(()=>require("./index-CCnYc2Ti.js")),permissions:ng.settings}])},registerTrads:async function({locales:t=[]}){return Promise.all(t.map(async e=>e in Lw?Lw[e]().then(({default:r})=>({data:kv(C0(r),Hr),locale:e})):{data:kv(C0({}),Hr),locale:e}))}};exports.Accordion=fZ;exports.Alert=wZ;exports.Avatar=TZ;exports.Badge=Pm;exports.Box=be;exports.Button=ah;exports.CheckboxImpl=ef;exports.DesignSystemProvider=hJ;exports.Dialog=sJ;exports.Divider=V$;exports.Field=_Q;exports.Flex=ue;exports.FocusTrap=Wte;exports.ForwardRef$15=wN;exports.ForwardRef$1P=PB;exports.ForwardRef$1V=NB;exports.ForwardRef$1h=hN;exports.ForwardRef$1j=lN;exports.ForwardRef$1v=eN;exports.ForwardRef$2B=lB;exports.ForwardRef$2r=mB;exports.ForwardRef$3=E3;exports.ForwardRef$3D=AL;exports.ForwardRef$3H=wL;exports.ForwardRef$45=Vi;exports.ForwardRef$4F=A_;exports.ForwardRef$4Z=u_;exports.ForwardRef$4b=eL;exports.ForwardRef$4j=G_;exports.ForwardRef$4t=F_;exports.ForwardRef$4z=D_;exports.ForwardRef$53=o_;exports.ForwardRef$5b=JI;exports.ForwardRef$5n=UI;exports.ForwardRef$T=MN;exports.ForwardRef$f=tj;exports.ForwardRef$j=ZN;exports.ForwardRef$v=WN;exports.Grid=Pte;exports.IconButton=ni;exports.IconButtonGroup=qZ;exports.Link=v$;exports.Loader=k$;exports.MenuItem=lQ;exports.Modal=pee;exports.MultiSelect=Yee;exports.MultiSelectOption=Y$;exports.Popover=Tee;exports.Portal$1=Gm;exports.SimpleMenu=y$;exports.SingleSelect=J1;exports.SingleSelectOption=eg;exports.SubNav=Zee;exports.SubNavHeader=Jee;exports.SubNavLink=ete;exports.SubNavSection=ote;exports.SubNavSections=ste;exports.SwitchImpl=ate;exports.Table=xte;exports.Tbody=Cte;exports.Td=Tte;exports.Th=kte;exports.Thead=Ste;exports.Toggle=Lte;exports.TooltipImpl=qm;exports.Tr=Rte;exports.Typography=ke;exports.__rest=Us;exports.commonjsGlobal=cs;exports.darkTheme=AQ;exports.getAugmentedNamespace=jX;exports.getDefaultExportFromCjs=NX;exports.index=Xte;exports.lightTheme=S$;exports.lodashExports=FX;exports.pluginId=Hr;exports.pluginPermissions=ng;