0&&He(e).unusedInput.push(c),t=t.slice(t.indexOf(i)+i.length),p+=i.length),Gs[u]?(i?He(e).empty=!1:He(e).unusedTokens.push(u),rD(u,i,e)):e._strict&&!i&&He(e).unusedTokens.push(u);He(e).charsLeftOver=h-p,t.length>0&&He(e).unusedInput.push(t),e._a[Pt]<=12&&He(e).bigHour===!0&&e._a[Pt]>0&&(He(e).bigHour=void 0),He(e).parsedDateParts=e._a.slice(0),He(e).meridiem=e._meridiem,e._a[Pt]=pM(e._locale,e._a[Pt],e._meridiem),m=He(e).era,m!==null&&(e._a[cn]=e._locale.erasConvertYear(m,e._a[cn])),_p(e),bp(e)}function pM(e,t,r){var i;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(i=e.isPM(r),i&&t<12&&(t+=12),!i&&t===12&&(t=0)),t)}function gM(e){var t,r,i,o,u,c,h=!1,p=e._f.length;if(p===0){He(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;othis?this:e:qc()});function xw(e,t){var r,i;if(t.length===1&&vr(t[0])&&(t=t[0]),!t.length)return pt();for(r=t[0],i=1;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function LM(){if(!An(this._isDSTShifted))return this._isDSTShifted;var e={},t;return op(e,this),e=ww(e),e._a?(t=e._isUTC?Br(e._a):pt(e._a),this._isDSTShifted=this.isValid()&&CM(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function YM(){return this.isValid()?!this._isUTC:!1}function HM(){return this.isValid()?this._isUTC:!1}function Tw(){return this.isValid()?this._isUTC&&this._offset===0:!1}var VM=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,BM=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xr(e,t){var r=e,i=null,o,u,c;return gc(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ba(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(i=VM.exec(e))?(o=i[1]==="-"?-1:1,r={y:0,d:qe(i[jr])*o,h:qe(i[Pt])*o,m:qe(i[gr])*o,s:qe(i[ga])*o,ms:qe(Am(i[Mi]*1e3))*o}):(i=BM.exec(e))?(o=i[1]==="-"?-1:1,r={y:Ci(i[2],o),M:Ci(i[3],o),w:Ci(i[4],o),d:Ci(i[5],o),h:Ci(i[6],o),m:Ci(i[7],o),s:Ci(i[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(c=$M(pt(r.from),pt(r.to)),r={},r.ms=c.milliseconds,r.M=c.months),u=new tf(r),gc(e)&&et(e,"_locale")&&(u._locale=e._locale),gc(e)&&et(e,"_isValid")&&(u._isValid=e._isValid),u}xr.fn=tf.prototype;xr.invalid=AM;function Ci(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function $b(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function $M(e,t){var r;return e.isValid()&&t.isValid()?(t=xp(t,e),e.isBefore(t)?r=$b(e,t):(r=$b(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ow(e,t){return function(r,i){var o,u;return i!==null&&!isNaN(+i)&&(tw(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=r,r=i,i=u),o=xr(r,i),Aw(this,o,e),this}}function Aw(e,t,r,i){var o=t._milliseconds,u=Am(t._days),c=Am(t._months);e.isValid()&&(i=i??!0,c&&fw(e,hl(e,"Month")+c*r),u&&lw(e,"Date",hl(e,"Date")+u*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&ge.updateOffset(e,u||c))}var FM=Ow(1,"add"),ZM=Ow(-1,"subtract");function Cw(e){return typeof e=="string"||e instanceof String}function PM(e){return br(e)||El(e)||Cw(e)||ba(e)||qM(e)||GM(e)||e===null||e===void 0}function GM(e){var t=zi(e)&&!ip(e),r=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,u,c=i.length;for(o=0;or.valueOf():r.valueOf()9999?pc(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$r(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pc(r,"Z")):pc(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function oR(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,i,o,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",u=t+'[")]',this.format(r+i+o+u)}function lR(e){e||(e=this.isUtc()?ge.defaultFormatUtc:ge.defaultFormat);var t=pc(this,e);return this.localeData().postformat(t)}function uR(e,t){return this.isValid()&&(br(e)&&e.isValid()||pt(e).isValid())?xr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function cR(e){return this.from(pt(),e)}function fR(e,t){return this.isValid()&&(br(e)&&e.isValid()||pt(e).isValid())?xr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function dR(e){return this.to(pt(),e)}function Dw(e){var t;return e===void 0?this._locale._abbr:(t=xa(e),t!=null&&(this._locale=t),this)}var Mw=ar("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Rw(){return this._locale}var Oc=1e3,qs=60*Oc,Ac=60*qs,Nw=(365*400+97)*24*Ac;function Is(e,t){return(e%t+t)%t}function kw(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Nw:new Date(e,t,r).valueOf()}function zw(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Nw:Date.UTC(e,t,r)}function hR(e){var t,r;if(e=ir(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?zw:kw,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Is(t+(this._isUTC?0:this.utcOffset()*qs),Ac);break;case"minute":t=this._d.valueOf(),t-=Is(t,qs);break;case"second":t=this._d.valueOf(),t-=Is(t,Oc);break}return this._d.setTime(t),ge.updateOffset(this,!0),this}function mR(e){var t,r;if(e=ir(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?zw:kw,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ac-Is(t+(this._isUTC?0:this.utcOffset()*qs),Ac)-1;break;case"minute":t=this._d.valueOf(),t+=qs-Is(t,qs)-1;break;case"second":t=this._d.valueOf(),t+=Oc-Is(t,Oc)-1;break}return this._d.setTime(t),ge.updateOffset(this,!0),this}function pR(){return this._d.valueOf()-(this._offset||0)*6e4}function gR(){return Math.floor(this.valueOf()/1e3)}function yR(){return new Date(this.valueOf())}function vR(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function bR(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function _R(){return this.isValid()?this.toISOString():null}function wR(){return sp(this)}function SR(){return ti({},He(this))}function xR(){return He(this).overflow}function ER(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}De("N",0,0,"eraAbbr");De("NN",0,0,"eraAbbr");De("NNN",0,0,"eraAbbr");De("NNNN",0,0,"eraName");De("NNNNN",0,0,"eraNarrow");De("y",["y",1],"yo","eraYear");De("y",["yy",2],0,"eraYear");De("y",["yyy",3],0,"eraYear");De("y",["yyyy",4],0,"eraYear");be("N",Ep);be("NN",Ep);be("NNN",Ep);be("NNNN",jR);be("NNNNN",UR);ct(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,i){var o=r._locale.erasParse(e,i,r._strict);o?He(r).era=o:He(r).invalidEra=e});be("y",eo);be("yy",eo);be("yyy",eo);be("yyyy",eo);be("yo",LR);ct(["y","yy","yyy","yyyy"],cn);ct(["yo"],function(e,t,r,i){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[cn]=r._locale.eraYearOrdinalParse(e,o):t[cn]=parseInt(e,10)});function TR(e,t){var r,i,o,u=this._eras||xa("en")._eras;for(r=0,i=u.length;r=0)return u[i]}function AR(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ge(e.since).year():ge(e.since).year()+(t-e.offset)*r}function CR(){var e,t,r,i=this.localeData().eras();for(e=0,t=i.length;eu&&(t=u),ZR.call(this,e,t,r,i,o))}function ZR(e,t,r,i,o){var u=mw(e,t,r,i,o),c=ml(u.year,0,u.dayOfYear);return this.year(c.getUTCFullYear()),this.month(c.getUTCMonth()),this.date(c.getUTCDate()),this}De("Q",0,"Qo","quarter");be("Q",rw);ct("Q",function(e,t){t[pa]=(qe(e)-1)*3});function PR(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}De("D",["DD",2],"Do","date");be("D",gt,to);be("DD",gt,Pn);be("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ct(["D","DD"],jr);ct("Do",function(e,t){t[jr]=qe(e.match(gt)[0])});var Uw=no("Date",!0);De("DDD",["DDDD",3],"DDDo","dayOfYear");be("DDD",Xc);be("DDDD",aw);ct(["DDD","DDDD"],function(e,t,r){r._dayOfYear=qe(e)});function GR(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}De("m",["mm",2],0,"minute");be("m",gt,hp);be("mm",gt,Pn);ct(["m","mm"],gr);var qR=no("Minutes",!1);De("s",["ss",2],0,"second");be("s",gt,hp);be("ss",gt,Pn);ct(["s","ss"],ga);var IR=no("Seconds",!1);De("S",0,0,function(){return~~(this.millisecond()/100)});De(0,["SS",2],0,function(){return~~(this.millisecond()/10)});De(0,["SSS",3],0,"millisecond");De(0,["SSSS",4],0,function(){return this.millisecond()*10});De(0,["SSSSS",5],0,function(){return this.millisecond()*100});De(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});De(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});De(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});De(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});be("S",Xc,rw);be("SS",Xc,Pn);be("SSS",Xc,aw);var ni,Lw;for(ni="SSSS";ni.length<=9;ni+="S")be(ni,eo);function XR(e,t){t[Mi]=qe(("0."+e)*1e3)}for(ni="S";ni.length<=9;ni+="S")ct(ni,XR);Lw=no("Milliseconds",!1);De("z",0,0,"zoneAbbr");De("zz",0,0,"zoneName");function WR(){return this._isUTC?"UTC":""}function KR(){return this._isUTC?"Coordinated Universal Time":""}var oe=Tl.prototype;oe.add=FM;oe.calendar=WM;oe.clone=KM;oe.diff=aR;oe.endOf=mR;oe.format=lR;oe.from=uR;oe.fromNow=cR;oe.to=fR;oe.toNow=dR;oe.get=oD;oe.invalidAt=xR;oe.isAfter=QM;oe.isBefore=JM;oe.isBetween=eR;oe.isSame=tR;oe.isSameOrAfter=nR;oe.isSameOrBefore=rR;oe.isValid=wR;oe.lang=Mw;oe.locale=Dw;oe.localeData=Rw;oe.max=wM;oe.min=_M;oe.parsingFlags=SR;oe.set=lD;oe.startOf=hR;oe.subtract=ZM;oe.toArray=vR;oe.toObject=bR;oe.toDate=yR;oe.toISOString=sR;oe.inspect=oR;typeof Symbol<"u"&&Symbol.for!=null&&(oe[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});oe.toJSON=_R;oe.toString=iR;oe.unix=gR;oe.valueOf=pR;oe.creationData=ER;oe.eraName=CR;oe.eraNarrow=DR;oe.eraAbbr=MR;oe.eraYear=RR;oe.year=ow;oe.isLeapYear=sD;oe.weekYear=YR;oe.isoWeekYear=HR;oe.quarter=oe.quarters=PR;oe.month=dw;oe.daysInMonth=yD;oe.week=oe.weeks=TD;oe.isoWeek=oe.isoWeeks=OD;oe.weeksInYear=$R;oe.weeksInWeekYear=FR;oe.isoWeeksInYear=VR;oe.isoWeeksInISOWeekYear=BR;oe.date=Uw;oe.day=oe.days=HD;oe.weekday=VD;oe.isoWeekday=BD;oe.dayOfYear=GR;oe.hour=oe.hours=ID;oe.minute=oe.minutes=qR;oe.second=oe.seconds=IR;oe.millisecond=oe.milliseconds=Lw;oe.utcOffset=MM;oe.utc=NM;oe.local=kM;oe.parseZone=zM;oe.hasAlignedHourOffset=jM;oe.isDST=UM;oe.isLocal=YM;oe.isUtcOffset=HM;oe.isUtc=Tw;oe.isUTC=Tw;oe.zoneAbbr=WR;oe.zoneName=KR;oe.dates=ar("dates accessor is deprecated. Use date instead.",Uw);oe.months=ar("months accessor is deprecated. Use month instead",dw);oe.years=ar("years accessor is deprecated. Use year instead",ow);oe.zone=ar("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",RM);oe.isDSTShifted=ar("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",LM);function QR(e){return pt(e*1e3)}function JR(){return pt.apply(null,arguments).parseZone()}function Yw(e){return e}var tt=lp.prototype;tt.calendar=YC;tt.longDateFormat=$C;tt.invalidDate=ZC;tt.ordinal=qC;tt.preparse=Yw;tt.postformat=Yw;tt.relativeTime=XC;tt.pastFuture=WC;tt.set=UC;tt.eras=TR;tt.erasParse=OR;tt.erasConvertYear=AR;tt.erasAbbrRegex=kR;tt.erasNameRegex=NR;tt.erasNarrowRegex=zR;tt.months=hD;tt.monthsShort=mD;tt.monthsParse=gD;tt.monthsRegex=bD;tt.monthsShortRegex=vD;tt.week=wD;tt.firstDayOfYear=ED;tt.firstDayOfWeek=xD;tt.weekdays=zD;tt.weekdaysMin=UD;tt.weekdaysShort=jD;tt.weekdaysParse=YD;tt.weekdaysRegex=$D;tt.weekdaysShortRegex=FD;tt.weekdaysMinRegex=ZD;tt.isPM=GD;tt.meridiem=XD;function Cc(e,t,r,i){var o=xa(),u=Br().set(i,t);return o[r](u,e)}function Hw(e,t,r){if(ba(e)&&(t=e,e=void 0),e=e||"",t!=null)return Cc(e,t,r,"month");var i,o=[];for(i=0;i<12;i++)o[i]=Cc(e,i,r,"month");return o}function Op(e,t,r,i){typeof e=="boolean"?(ba(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ba(t)&&(r=t,t=void 0),t=t||"");var o=xa(),u=e?o._week.dow:0,c,h=[];if(r!=null)return Cc(t,(r+u)%7,i,"day");for(c=0;c<7;c++)h[c]=Cc(t,(c+u)%7,i,"day");return h}function eN(e,t){return Hw(e,t,"months")}function tN(e,t){return Hw(e,t,"monthsShort")}function nN(e,t,r){return Op(e,t,r,"weekdays")}function rN(e,t,r){return Op(e,t,r,"weekdaysShort")}function aN(e,t,r){return Op(e,t,r,"weekdaysMin")}ri("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=qe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ge.lang=ar("moment.lang is deprecated. Use moment.locale instead.",ri);ge.langData=ar("moment.langData is deprecated. Use moment.localeData instead.",xa);var ca=Math.abs;function iN(){var e=this._data;return this._milliseconds=ca(this._milliseconds),this._days=ca(this._days),this._months=ca(this._months),e.milliseconds=ca(e.milliseconds),e.seconds=ca(e.seconds),e.minutes=ca(e.minutes),e.hours=ca(e.hours),e.months=ca(e.months),e.years=ca(e.years),this}function Vw(e,t,r,i){var o=xr(t,r);return e._milliseconds+=i*o._milliseconds,e._days+=i*o._days,e._months+=i*o._months,e._bubble()}function sN(e,t){return Vw(this,e,t,1)}function oN(e,t){return Vw(this,e,t,-1)}function Fb(e){return e<0?Math.floor(e):Math.ceil(e)}function lN(){var e=this._milliseconds,t=this._days,r=this._months,i=this._data,o,u,c,h,p;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Fb(Dm(r)+t)*864e5,t=0,r=0),i.milliseconds=e%1e3,o=nr(e/1e3),i.seconds=o%60,u=nr(o/60),i.minutes=u%60,c=nr(u/60),i.hours=c%24,t+=nr(c/24),p=nr(Bw(t)),r+=p,t-=Fb(Dm(p)),h=nr(r/12),r%=12,i.days=t,i.months=r,i.years=h,this}function Bw(e){return e*4800/146097}function Dm(e){return e*146097/4800}function uN(e){if(!this.isValid())return NaN;var t,r,i=this._milliseconds;if(e=ir(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,r=this._months+Bw(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Dm(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+e)}}function Ea(e){return function(){return this.as(e)}}var $w=Ea("ms"),cN=Ea("s"),fN=Ea("m"),dN=Ea("h"),hN=Ea("d"),mN=Ea("w"),pN=Ea("M"),gN=Ea("Q"),yN=Ea("y"),vN=$w;function bN(){return xr(this)}function _N(e){return e=ir(e),this.isValid()?this[e+"s"]():NaN}function $i(e){return function(){return this.isValid()?this._data[e]:NaN}}var wN=$i("milliseconds"),SN=$i("seconds"),xN=$i("minutes"),EN=$i("hours"),TN=$i("days"),ON=$i("months"),AN=$i("years");function CN(){return nr(this.days()/7)}var ha=Math.round,Fs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function DN(e,t,r,i,o){return o.relativeTime(t||1,!!r,e,i)}function MN(e,t,r,i){var o=xr(e).abs(),u=ha(o.as("s")),c=ha(o.as("m")),h=ha(o.as("h")),p=ha(o.as("d")),m=ha(o.as("M")),y=ha(o.as("w")),g=ha(o.as("y")),b=u<=r.ss&&["s",u]||u0,b[4]=i,DN.apply(null,b)}function RN(e){return e===void 0?ha:typeof e=="function"?(ha=e,!0):!1}function NN(e,t){return Fs[e]===void 0?!1:t===void 0?Fs[e]:(Fs[e]=t,e==="s"&&(Fs.ss=t-1),!0)}function kN(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,i=Fs,o,u;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(i=Object.assign({},Fs,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),o=this.localeData(),u=MN(this,!r,i,o),r&&(u=o.pastFuture(+this,u)),o.postformat(u)}var nm=Math.abs;function Ys(e){return(e>0)-(e<0)||+e}function rf(){if(!this.isValid())return this.localeData().invalidDate();var e=nm(this._milliseconds)/1e3,t=nm(this._days),r=nm(this._months),i,o,u,c,h=this.asSeconds(),p,m,y,g;return h?(i=nr(e/60),o=nr(i/60),e%=60,i%=60,u=nr(r/12),r%=12,c=e?e.toFixed(3).replace(/\.?0+$/,""):"",p=h<0?"-":"",m=Ys(this._months)!==Ys(h)?"-":"",y=Ys(this._days)!==Ys(h)?"-":"",g=Ys(this._milliseconds)!==Ys(h)?"-":"",p+"P"+(u?m+u+"Y":"")+(r?m+r+"M":"")+(t?y+t+"D":"")+(o||i||e?"T":"")+(o?g+o+"H":"")+(i?g+i+"M":"")+(e?g+c+"S":"")):"P0D"}var Ke=tf.prototype;Ke.isValid=OM;Ke.abs=iN;Ke.add=sN;Ke.subtract=oN;Ke.as=uN;Ke.asMilliseconds=$w;Ke.asSeconds=cN;Ke.asMinutes=fN;Ke.asHours=dN;Ke.asDays=hN;Ke.asWeeks=mN;Ke.asMonths=pN;Ke.asQuarters=gN;Ke.asYears=yN;Ke.valueOf=vN;Ke._bubble=lN;Ke.clone=bN;Ke.get=_N;Ke.milliseconds=wN;Ke.seconds=SN;Ke.minutes=xN;Ke.hours=EN;Ke.days=TN;Ke.weeks=CN;Ke.months=ON;Ke.years=AN;Ke.humanize=kN;Ke.toISOString=rf;Ke.toString=rf;Ke.toJSON=rf;Ke.locale=Dw;Ke.localeData=Rw;Ke.toIsoString=ar("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",rf);Ke.lang=Mw;De("X",0,0,"unix");De("x",0,0,"valueOf");be("x",Kc);be("X",eD);ct("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});ct("x",function(e,t,r){r._d=new Date(qe(e))});ge.version="2.30.1";zC(pt);ge.fn=oe;ge.min=SM;ge.max=xM;ge.now=EM;ge.utc=Br;ge.unix=QR;ge.months=eN;ge.isDate=El;ge.locale=ri;ge.invalid=qc;ge.duration=xr;ge.isMoment=br;ge.weekdays=nN;ge.parseZone=JR;ge.localeData=xa;ge.isDuration=gc;ge.monthsShort=tN;ge.weekdaysMin=aN;ge.defineLocale=vp;ge.updateLocale=JD;ge.locales=eM;ge.weekdaysShort=rN;ge.normalizeUnits=ir;ge.relativeTimeRounding=RN;ge.relativeTimeThreshold=NN;ge.calendarFormat=XM;ge.prototype=oe;ge.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const zN=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i({classGroupId:e,validator:t}),Fw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Dc="-",Zb=[],UN="arbitrary..",LN=e=>{const t=HN(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return YN(c);const h=c.split(Dc),p=h[0]===""&&h.length>1?1:0;return Zw(h,p,t)},getConflictingClassGroupIds:(c,h)=>{if(h){const p=i[c],m=r[c];return p?m?zN(m,p):p:m||Zb}return r[c]||Zb}}},Zw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],u=r.nextPart.get(o);if(u){const m=Zw(e,t+1,u);if(m)return m}const c=r.validators;if(c===null)return;const h=t===0?e.join(Dc):e.slice(t).join(Dc),p=c.length;for(let m=0;me.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?UN+i:void 0})(),HN=e=>{const{theme:t,classGroups:r}=e;return VN(r,t)},VN=(e,t)=>{const r=Fw();for(const i in e){const o=e[i];Ap(o,r,i,t)}return r},Ap=(e,t,r,i)=>{const o=e.length;for(let u=0;u{if(typeof e=="string"){$N(e,t,r);return}if(typeof e=="function"){FN(e,t,r,i);return}ZN(e,t,r,i)},$N=(e,t,r)=>{const i=e===""?t:Pw(t,e);i.classGroupId=r},FN=(e,t,r,i)=>{if(PN(e)){Ap(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(jN(r,e))},ZN=(e,t,r,i)=>{const o=Object.entries(e),u=o.length;for(let c=0;c{let r=e;const i=t.split(Dc),o=i.length;for(let u=0;u"isThemeGetter"in e&&e.isThemeGetter===!0,GN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const o=(u,c)=>{r[u]=c,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(u){let c=r[u];if(c!==void 0)return c;if((c=i[u])!==void 0)return o(u,c),c},set(u,c){u in r?r[u]=c:o(u,c)}}},Mm="!",Pb=":",qN=[],Gb=(e,t,r,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:o}),IN=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=o=>{const u=[];let c=0,h=0,p=0,m;const y=o.length;for(let E=0;Ep?m-p:void 0;return Gb(u,T,b,x)};if(t){const o=t+Pb,u=i;i=c=>c.startsWith(o)?u(c.slice(o.length)):Gb(qN,!1,c,void 0,!0)}if(r){const o=i;i=u=>r({className:u,parseClassName:o})}return i},XN=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let o=[];for(let u=0;u0&&(o.sort(),i.push(...o),o=[]),i.push(c)):o.push(c)}return o.length>0&&(o.sort(),i.push(...o)),i}},WN=e=>({cache:GN(e.cacheSize),parseClassName:IN(e),sortModifiers:XN(e),...LN(e)}),KN=/\s+/,QN=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:u}=t,c=[],h=e.trim().split(KN);let p="";for(let m=h.length-1;m>=0;m-=1){const y=h[m],{isExternal:g,modifiers:b,hasImportantModifier:T,baseClassName:x,maybePostfixModifierPosition:E}=r(y);if(g){p=y+(p.length>0?" "+p:p);continue}let O=!!E,D=i(O?x.substring(0,E):x);if(!D){if(!O){p=y+(p.length>0?" "+p:p);continue}if(D=i(x),!D){p=y+(p.length>0?" "+p:p);continue}O=!1}const U=b.length===0?"":b.length===1?b[0]:u(b).join(":"),j=T?U+Mm:U,k=j+D;if(c.indexOf(k)>-1)continue;c.push(k);const Y=o(D,O);for(let J=0;J0?" "+p:p)}return p},JN=(...e)=>{let t=0,r,i,o="";for(;t{if(typeof e=="string")return e;let t,r="";for(let i=0;i{let r,i,o,u;const c=p=>{const m=t.reduce((y,g)=>g(y),e());return r=WN(m),i=r.cache.get,o=r.cache.set,u=h,h(p)},h=p=>{const m=i(p);if(m)return m;const y=QN(p,r);return o(p,y),y};return u=c,(...p)=>u(JN(...p))},tk=[],Ft=e=>{const t=r=>r[e]||tk;return t.isThemeGetter=!0,t},qw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Iw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nk=/^\d+\/\d+$/,rk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ak=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ik=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ok=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hs=e=>nk.test(e),$e=e=>!!e&&!Number.isNaN(Number(e)),Ja=e=>!!e&&Number.isInteger(Number(e)),rm=e=>e.endsWith("%")&&$e(e.slice(0,-1)),fa=e=>rk.test(e),lk=()=>!0,uk=e=>ak.test(e)&&!ik.test(e),Xw=()=>!1,ck=e=>sk.test(e),fk=e=>ok.test(e),dk=e=>!xe(e)&&!Ee(e),hk=e=>ro(e,Qw,Xw),xe=e=>qw.test(e),Di=e=>ro(e,Jw,uk),am=e=>ro(e,vk,$e),qb=e=>ro(e,Ww,Xw),mk=e=>ro(e,Kw,fk),nc=e=>ro(e,eS,ck),Ee=e=>Iw.test(e),il=e=>ao(e,Jw),pk=e=>ao(e,bk),Ib=e=>ao(e,Ww),gk=e=>ao(e,Qw),yk=e=>ao(e,Kw),rc=e=>ao(e,eS,!0),ro=(e,t,r)=>{const i=qw.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},ao=(e,t,r=!1)=>{const i=Iw.exec(e);return i?i[1]?t(i[1]):r:!1},Ww=e=>e==="position"||e==="percentage",Kw=e=>e==="image"||e==="url",Qw=e=>e==="length"||e==="size"||e==="bg-size",Jw=e=>e==="length",vk=e=>e==="number",bk=e=>e==="family-name",eS=e=>e==="shadow",_k=()=>{const e=Ft("color"),t=Ft("font"),r=Ft("text"),i=Ft("font-weight"),o=Ft("tracking"),u=Ft("leading"),c=Ft("breakpoint"),h=Ft("container"),p=Ft("spacing"),m=Ft("radius"),y=Ft("shadow"),g=Ft("inset-shadow"),b=Ft("text-shadow"),T=Ft("drop-shadow"),x=Ft("blur"),E=Ft("perspective"),O=Ft("aspect"),D=Ft("ease"),U=Ft("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...k(),Ee,xe],J=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],Q=()=>[Ee,xe,p],he=()=>[Hs,"full","auto",...Q()],_e=()=>[Ja,"none","subgrid",Ee,xe],we=()=>["auto",{span:["full",Ja,Ee,xe]},Ja,Ee,xe],ie=()=>[Ja,"auto",Ee,xe],ue=()=>["auto","min","max","fr",Ee,xe],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ye=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...Q()],I=()=>[Hs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],L=()=>[e,Ee,xe],re=()=>[...k(),Ib,qb,{position:[Ee,xe]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",gk,hk,{size:[Ee,xe]}],q=()=>[rm,il,Di],X=()=>["","none","full",m,Ee,xe],ne=()=>["",$e,il,Di],ce=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[$e,rm,Ib,qb],Me=()=>["","none",x,Ee,xe],Be=()=>["none",$e,Ee,xe],Ct=()=>["none",$e,Ee,xe],Qt=()=>[$e,Ee,xe],kt=()=>[Hs,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[lk],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[dk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",$e],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Hs,xe,Ee,O]}],container:["container"],columns:[{columns:[$e,xe,Ee,h]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:he()}],"inset-x":[{"inset-x":he()}],"inset-y":[{"inset-y":he()}],start:[{start:he()}],end:[{end:he()}],top:[{top:he()}],right:[{right:he()}],bottom:[{bottom:he()}],left:[{left:he()}],visibility:["visible","invisible","collapse"],z:[{z:[Ja,"auto",Ee,xe]}],basis:[{basis:[Hs,"full","auto",h,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,Hs,"auto","initial","none",xe]}],grow:[{grow:["",$e,Ee,xe]}],shrink:[{shrink:["",$e,Ee,xe]}],order:[{order:[Ja,"first","last","none",Ee,xe]}],"grid-cols":[{"grid-cols":_e()}],"col-start-end":[{col:we()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":_e()}],"row-start-end":[{row:we()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:Q()}],"gap-x":[{"gap-x":Q()}],"gap-y":[{"gap-y":Q()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...ye(),"normal"]}],"justify-self":[{"justify-self":["auto",...ye()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...ye(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ye(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...ye(),"baseline"]}],"place-self":[{"place-self":["auto",...ye()]}],p:[{p:Q()}],px:[{px:Q()}],py:[{py:Q()}],ps:[{ps:Q()}],pe:[{pe:Q()}],pt:[{pt:Q()}],pr:[{pr:Q()}],pb:[{pb:Q()}],pl:[{pl:Q()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":Q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Q()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[h,"screen",...I()]}],"min-w":[{"min-w":[h,"screen","none",...I()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[c]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",r,il,Di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Ee,am]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rm,xe]}],"font-family":[{font:[pk,xe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ee,xe]}],"line-clamp":[{"line-clamp":[$e,"none",Ee,am]}],leading:[{leading:[u,...Q()]}],"list-image":[{"list-image":["none",Ee,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ee,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",Ee,Di]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[$e,"auto",Ee,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ja,Ee,xe],radial:["",Ee,xe],conic:[Ja,Ee,xe]},yk,mk]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,Ee,xe]}],"outline-w":[{outline:["",$e,il,Di]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",y,rc,nc]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",g,rc,nc]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[$e,Di]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",b,rc,nc]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[$e,Ee,xe]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Ee,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ee,xe]}],filter:[{filter:["","none",Ee,xe]}],blur:[{blur:Me()}],brightness:[{brightness:[$e,Ee,xe]}],contrast:[{contrast:[$e,Ee,xe]}],"drop-shadow":[{"drop-shadow":["","none",T,rc,nc]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",$e,Ee,xe]}],"hue-rotate":[{"hue-rotate":[$e,Ee,xe]}],invert:[{invert:["",$e,Ee,xe]}],saturate:[{saturate:[$e,Ee,xe]}],sepia:[{sepia:["",$e,Ee,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ee,xe]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[$e,Ee,xe]}],"backdrop-contrast":[{"backdrop-contrast":[$e,Ee,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,Ee,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,Ee,xe]}],"backdrop-invert":[{"backdrop-invert":["",$e,Ee,xe]}],"backdrop-opacity":[{"backdrop-opacity":[$e,Ee,xe]}],"backdrop-saturate":[{"backdrop-saturate":[$e,Ee,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,Ee,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Q()}],"border-spacing-x":[{"border-spacing-x":Q()}],"border-spacing-y":[{"border-spacing-y":Q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ee,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",Ee,xe]}],ease:[{ease:["linear","initial",D,Ee,xe]}],delay:[{delay:[$e,Ee,xe]}],animate:[{animate:["none",U,Ee,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ee,xe]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:Qt()}],"skew-x":[{"skew-x":Qt()}],"skew-y":[{"skew-y":Qt()}],transform:[{transform:[Ee,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:kt()}],"translate-x":[{"translate-x":kt()}],"translate-y":[{"translate-y":kt()}],"translate-z":[{"translate-z":kt()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee,xe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[$e,il,Di,am]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},wk=ek(_k);function rt(...e){return wk(K_(e))}const tS=e=>ge(e).format("DD/MM/YYYY HH:mm:ss");function Rm(e,t){if(!e.current||!t.current)return;const r=t.current,i=e.current,o=r.getContext("2d");return new Promise((u,c)=>{try{r.width=i.videoWidth,r.height=i.videoHeight,o.drawImage(i,0,0,r.width,r.height),r.toBlob(h=>{if(!h){c("Không thể tạo blob từ canvas");return}u(h)},"image/jpeg",.95)}catch(h){c(h)}})}function Cp(e){const t=Ve.c(4);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==r?(i=w.jsx(BA,{"data-slot":"dialog",...r}),t[2]=r,t[3]=i):i=t[3],i}function nS(e){const t=Ve.c(4);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==r?(i=w.jsx($A,{"data-slot":"dialog-trigger",...r}),t[2]=r,t[3]=i):i=t[3],i}function Sk(e){const t=Ve.c(4);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==r?(i=w.jsx(FA,{"data-slot":"dialog-portal",...r}),t[2]=r,t[3]=i):i=t[3],i}function xk(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(ZA,{"data-slot":"dialog-overlay",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function Dp(e){const t=Ve.c(15);let r,i,o,u;t[0]!==e?({className:i,children:r,showCloseButton:u,...o}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=u):(r=t[1],i=t[2],o=t[3],u=t[4]);const c=u===void 0?!0:u;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=w.jsx(xk,{}),t[5]=h):h=t[5];let p;t[6]!==i?(p=rt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",i),t[6]=i,t[7]=p):p=t[7];let m;t[8]!==c?(m=c&&w.jsxs(IA,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[w.jsx(kC,{}),w.jsx("span",{className:"sr-only",children:"Close"})]}),t[8]=c,t[9]=m):m=t[9];let y;return t[10]!==r||t[11]!==o||t[12]!==p||t[13]!==m?(y=w.jsxs(Sk,{"data-slot":"dialog-portal",children:[h,w.jsxs(PA,{"data-slot":"dialog-content",className:p,...o,children:[r,m]})]}),t[10]=r,t[11]=o,t[12]=p,t[13]=m,t[14]=y):y=t[14],y}function Mp(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("flex flex-col gap-2 text-center sm:text-left",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx("div",{"data-slot":"dialog-header",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function Ek(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx("div",{"data-slot":"dialog-footer",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function Rp(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("text-lg leading-none font-semibold",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(GA,{"data-slot":"dialog-title",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function Np(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("text-muted-foreground text-sm",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(qA,{"data-slot":"dialog-description",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}var Tk=Symbol.for("react.lazy"),Mc=Xm[" use ".trim().toString()];function Ok(e){return typeof e=="object"&&e!==null&&"then"in e}function rS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Tk&&"_payload"in e&&Ok(e._payload)}function kp(e){const t=Ak(e),r=_.forwardRef((i,o)=>{let{children:u,...c}=i;rS(u)&&typeof Mc=="function"&&(u=Mc(u._payload));const h=_.Children.toArray(u),p=h.find(Dk);if(p){const m=p.props.children,y=h.map(g=>g===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:g);return w.jsx(t,{...c,ref:o,children:_.isValidElement(m)?_.cloneElement(m,void 0,y):null})}return w.jsx(t,{...c,ref:o,children:u})});return r.displayName=`${e}.Slot`,r}var zp=kp("Slot");function Ak(e){const t=_.forwardRef((r,i)=>{let{children:o,...u}=r;if(rS(o)&&typeof Mc=="function"&&(o=Mc(o._payload)),_.isValidElement(o)){const c=Rk(o),h=Mk(u,o.props);return o.type!==_.Fragment&&(h.ref=i?oi(i,c):c),_.cloneElement(o,h)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ck=Symbol("radix.slottable");function Dk(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ck}function Mk(e,t){const r={...t};for(const i in t){const o=e[i],u=t[i];/^on[A-Z]/.test(i)?o&&u?r[i]=(...h)=>{const p=u(...h);return o(...h),p}:o&&(r[i]=o):i==="style"?r[i]={...o,...u}:i==="className"&&(r[i]=[o,u].filter(Boolean).join(" "))}return{...e,...r}}function Rk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Xb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wb=K_,aS=(e,t)=>r=>{var i;if(t?.variants==null)return Wb(e,r?.class,r?.className);const{variants:o,defaultVariants:u}=t,c=Object.keys(o).map(m=>{const y=r?.[m],g=u?.[m];if(y===null)return null;const b=Xb(y)||Xb(g);return o[m][b]}),h=r&&Object.entries(r).reduce((m,y)=>{let[g,b]=y;return b===void 0||(m[g]=b),m},{}),p=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((m,y)=>{let{class:g,className:b,...T}=y;return Object.entries(T).every(x=>{let[E,O]=x;return Array.isArray(O)?O.includes({...u,...h}[E]):{...u,...h}[E]===O})?[...m,g,b]:m},[]);return Wb(e,c,p,r?.class,r?.className)},Nk=aS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function hn(e){const t=Ve.c(14);let r,i,o,u,c;t[0]!==e?({className:r,variant:c,size:o,asChild:u,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=u,t[5]=c):(r=t[1],i=t[2],o=t[3],u=t[4],c=t[5]);const p=(u===void 0?!1:u)?zp:"button";let m;t[6]!==r||t[7]!==o||t[8]!==c?(m=rt(Nk({variant:c,size:o,className:r})),t[6]=r,t[7]=o,t[8]=c,t[9]=m):m=t[9];let y;return t[10]!==p||t[11]!==i||t[12]!==m?(y=w.jsx(p,{"data-slot":"button",className:m,...i}),t[10]=p,t[11]=i,t[12]=m,t[13]=y):y=t[13],y}const iS=_.createContext(void 0);function kk(e){const t=Ve.c(40),{children:r}=e,[i,o]=_.useState(!1);let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={message:"",variant:"default"},t[0]=u):u=t[0];const[c,h]=_.useState(u),[p,m]=_.useState(null);let y;t[1]===Symbol.for("react.memo_cache_sentinel")?(y=ye=>(h({title:ye.title||"Xác nhận",confirmText:ye.confirmText||"Xác nhận",cancelText:ye.cancelText||"Hủy",variant:ye.variant||"default",...ye}),o(!0),new Promise(M=>{m(()=>M)})),t[1]=y):y=t[1];const g=y;let b;t[2]!==p?(b=()=>{o(!1),p?.(!0),m(null)},t[2]=p,t[3]=b):b=t[3];const T=b;let x;t[4]!==p?(x=()=>{o(!1),p?.(!1),m(null)},t[4]=p,t[5]=x):x=t[5];const E=x;let O;t[6]!==c.variant?(O=()=>{switch(c.variant){case"destructive":case"warning":return w.jsx(I_,{className:"h-6 w-6 text-destructive"});case"success":return w.jsx(aC,{className:"h-6 w-6 text-green-600"});default:return w.jsx(q_,{className:"h-6 w-6 text-blue-600"})}},t[6]=c.variant,t[7]=O):O=t[7];const D=O;let U;t[8]===Symbol.for("react.memo_cache_sentinel")?(U={confirm:g},t[8]=U):U=t[8];let j;t[9]!==D?(j=D(),t[9]=D,t[10]=j):j=t[10];let k;t[11]!==c.title?(k=w.jsx(Rp,{className:"text-lg",children:c.title}),t[11]=c.title,t[12]=k):k=t[12];let Y;t[13]!==j||t[14]!==k?(Y=w.jsxs("div",{className:"flex items-center gap-3",children:[j,k]}),t[13]=j,t[14]=k,t[15]=Y):Y=t[15];let J;t[16]!==c.message?(J=w.jsx(Np,{className:"pt-2 text-base",children:c.message}),t[16]=c.message,t[17]=J):J=t[17];let F;t[18]!==J||t[19]!==Y?(F=w.jsxs(Mp,{children:[Y,J]}),t[18]=J,t[19]=Y,t[20]=F):F=t[20];let Q;t[21]!==E||t[22]!==c.cancelText?(Q=w.jsx(hn,{variant:"outline",onClick:E,children:c.cancelText}),t[21]=E,t[22]=c.cancelText,t[23]=Q):Q=t[23];const he=c.variant==="destructive"?"destructive":"default";let _e;t[24]!==T||t[25]!==c.confirmText||t[26]!==he?(_e=w.jsx(hn,{variant:he,onClick:T,children:c.confirmText}),t[24]=T,t[25]=c.confirmText,t[26]=he,t[27]=_e):_e=t[27];let we;t[28]!==Q||t[29]!==_e?(we=w.jsx(Ek,{className:"gap-2 sm:gap-0 flex ",children:w.jsxs("div",{className:"flex items-center gap-2",children:[Q,_e]})}),t[28]=Q,t[29]=_e,t[30]=we):we=t[30];let ie;t[31]!==F||t[32]!==we?(ie=w.jsxs(Dp,{children:[F,we]}),t[31]=F,t[32]=we,t[33]=ie):ie=t[33];let ue;t[34]!==i||t[35]!==ie?(ue=w.jsx(Cp,{open:i,onOpenChange:o,children:ie}),t[34]=i,t[35]=ie,t[36]=ue):ue=t[36];let fe;return t[37]!==r||t[38]!==ue?(fe=w.jsxs(iS.Provider,{value:U,children:[r,ue]}),t[37]=r,t[38]=ue,t[39]=fe):fe=t[39],fe}function zk(){const e=_.useContext(iS);if(!e)throw new Error("useConfirm must be used within ConfirmModalProvider");return e.confirm}function sS(e,t){return function(){return e.apply(t,arguments)}}const{toString:jk}=Object.prototype,{getPrototypeOf:jp}=Object,{iterator:af,toStringTag:oS}=Symbol,sf=(e=>t=>{const r=jk.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Er=e=>(e=e.toLowerCase(),t=>sf(t)===e),of=e=>t=>typeof t===e,{isArray:io}=Array,Ks=of("undefined");function Cl(e){return e!==null&&!Ks(e)&&e.constructor!==null&&!Ks(e.constructor)&&Mn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const lS=Er("ArrayBuffer");function Uk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&lS(e.buffer),t}const Lk=of("string"),Mn=of("function"),uS=of("number"),Dl=e=>e!==null&&typeof e=="object",Yk=e=>e===!0||e===!1,vc=e=>{if(sf(e)!=="object")return!1;const t=jp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(oS in e)&&!(af in e)},Hk=e=>{if(!Dl(e)||Cl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Vk=Er("Date"),Bk=Er("File"),$k=Er("Blob"),Fk=Er("FileList"),Zk=e=>Dl(e)&&Mn(e.pipe),Pk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Mn(e.append)&&((t=sf(e))==="formdata"||t==="object"&&Mn(e.toString)&&e.toString()==="[object FormData]"))},Gk=Er("URLSearchParams"),[qk,Ik,Xk,Wk]=["ReadableStream","Request","Response","Headers"].map(Er),Kk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ml(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,o;if(typeof e!="object"&&(e=[e]),io(e))for(i=0,o=e.length;i0;)if(o=r[i],t===o.toLowerCase())return o;return null}const Ri=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,fS=e=>!Ks(e)&&e!==Ri;function Nm(){const{caseless:e,skipUndefined:t}=fS(this)&&this||{},r={},i=(o,u)=>{const c=e&&cS(r,u)||u;vc(r[c])&&vc(o)?r[c]=Nm(r[c],o):vc(o)?r[c]=Nm({},o):io(o)?r[c]=o.slice():(!t||!Ks(o))&&(r[c]=o)};for(let o=0,u=arguments.length;o(Ml(t,(o,u)=>{r&&Mn(o)?e[u]=sS(o,r):e[u]=o},{allOwnKeys:i}),e),Jk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),e4=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},t4=(e,t,r,i)=>{let o,u,c;const h={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),u=o.length;u-- >0;)c=o[u],(!i||i(c,e,t))&&!h[c]&&(t[c]=e[c],h[c]=!0);e=r!==!1&&jp(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},n4=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},r4=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!uS(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},a4=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&jp(Uint8Array)),i4=(e,t)=>{const i=(e&&e[af]).call(e);let o;for(;(o=i.next())&&!o.done;){const u=o.value;t.call(e,u[0],u[1])}},s4=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},o4=Er("HTMLFormElement"),l4=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,o){return i.toUpperCase()+o}),Kb=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),u4=Er("RegExp"),dS=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};Ml(r,(o,u)=>{let c;(c=t(o,u,e))!==!1&&(i[u]=c||o)}),Object.defineProperties(e,i)},c4=e=>{dS(e,(t,r)=>{if(Mn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(Mn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},f4=(e,t)=>{const r={},i=o=>{o.forEach(u=>{r[u]=!0})};return io(e)?i(e):i(String(e).split(t)),r},d4=()=>{},h4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function m4(e){return!!(e&&Mn(e.append)&&e[oS]==="FormData"&&e[af])}const p4=e=>{const t=new Array(10),r=(i,o)=>{if(Dl(i)){if(t.indexOf(i)>=0)return;if(Cl(i))return i;if(!("toJSON"in i)){t[o]=i;const u=io(i)?[]:{};return Ml(i,(c,h)=>{const p=r(c,o+1);!Ks(p)&&(u[h]=p)}),t[o]=void 0,u}}return i};return r(e,0)},g4=Er("AsyncFunction"),y4=e=>e&&(Dl(e)||Mn(e))&&Mn(e.then)&&Mn(e.catch),hS=((e,t)=>e?setImmediate:t?((r,i)=>(Ri.addEventListener("message",({source:o,data:u})=>{o===Ri&&u===r&&i.length&&i.shift()()},!1),o=>{i.push(o),Ri.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Mn(Ri.postMessage)),v4=typeof queueMicrotask<"u"?queueMicrotask.bind(Ri):typeof process<"u"&&process.nextTick||hS,b4=e=>e!=null&&Mn(e[af]),Z={isArray:io,isArrayBuffer:lS,isBuffer:Cl,isFormData:Pk,isArrayBufferView:Uk,isString:Lk,isNumber:uS,isBoolean:Yk,isObject:Dl,isPlainObject:vc,isEmptyObject:Hk,isReadableStream:qk,isRequest:Ik,isResponse:Xk,isHeaders:Wk,isUndefined:Ks,isDate:Vk,isFile:Bk,isBlob:$k,isRegExp:u4,isFunction:Mn,isStream:Zk,isURLSearchParams:Gk,isTypedArray:a4,isFileList:Fk,forEach:Ml,merge:Nm,extend:Qk,trim:Kk,stripBOM:Jk,inherits:e4,toFlatObject:t4,kindOf:sf,kindOfTest:Er,endsWith:n4,toArray:r4,forEachEntry:i4,matchAll:s4,isHTMLForm:o4,hasOwnProperty:Kb,hasOwnProp:Kb,reduceDescriptors:dS,freezeMethods:c4,toObjectSet:f4,toCamelCase:l4,noop:d4,toFiniteNumber:h4,findKey:cS,global:Ri,isContextDefined:fS,isSpecCompliantForm:m4,toJSONObject:p4,isAsyncFn:g4,isThenable:y4,setImmediate:hS,asap:v4,isIterable:b4};function Ue(e,t,r,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status?o.status:null)}Z.inherits(Ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const mS=Ue.prototype,pS={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pS[e]={value:e}});Object.defineProperties(Ue,pS);Object.defineProperty(mS,"isAxiosError",{value:!0});Ue.from=(e,t,r,i,o,u)=>{const c=Object.create(mS);Z.toFlatObject(e,c,function(y){return y!==Error.prototype},m=>m!=="isAxiosError");const h=e&&e.message?e.message:"Error",p=t==null&&e?e.code:t;return Ue.call(c,h,p,r,i,o),e&&c.cause==null&&Object.defineProperty(c,"cause",{value:e,configurable:!0}),c.name=e&&e.name||"Error",u&&Object.assign(c,u),c};const _4=null;function km(e){return Z.isPlainObject(e)||Z.isArray(e)}function gS(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function Qb(e,t,r){return e?e.concat(t).map(function(o,u){return o=gS(o),!r&&u?"["+o+"]":o}).join(r?".":""):t}function w4(e){return Z.isArray(e)&&!e.some(km)}const S4=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function lf(e,t,r){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!Z.isUndefined(O[E])});const i=r.metaTokens,o=r.visitor||y,u=r.dots,c=r.indexes,p=(r.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(o))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(Z.isDate(x))return x.toISOString();if(Z.isBoolean(x))return x.toString();if(!p&&Z.isBlob(x))throw new Ue("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(x)||Z.isTypedArray(x)?p&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function y(x,E,O){let D=x;if(x&&!O&&typeof x=="object"){if(Z.endsWith(E,"{}"))E=i?E:E.slice(0,-2),x=JSON.stringify(x);else if(Z.isArray(x)&&w4(x)||(Z.isFileList(x)||Z.endsWith(E,"[]"))&&(D=Z.toArray(x)))return E=gS(E),D.forEach(function(j,k){!(Z.isUndefined(j)||j===null)&&t.append(c===!0?Qb([E],k,u):c===null?E:E+"[]",m(j))}),!1}return km(x)?!0:(t.append(Qb(O,E,u),m(x)),!1)}const g=[],b=Object.assign(S4,{defaultVisitor:y,convertValue:m,isVisitable:km});function T(x,E){if(!Z.isUndefined(x)){if(g.indexOf(x)!==-1)throw Error("Circular reference detected in "+E.join("."));g.push(x),Z.forEach(x,function(D,U){(!(Z.isUndefined(D)||D===null)&&o.call(t,D,Z.isString(U)?U.trim():U,E,b))===!0&&T(D,E?E.concat(U):[U])}),g.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return T(e),t}function Jb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Up(e,t){this._pairs=[],e&&lf(e,this,t)}const yS=Up.prototype;yS.append=function(t,r){this._pairs.push([t,r])};yS.toString=function(t){const r=t?function(i){return t.call(this,i,Jb)}:Jb;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function x4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vS(e,t,r){if(!t)return e;const i=r&&r.encode||x4;Z.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let u;if(o?u=o(t,r):u=Z.isURLSearchParams(t)?t.toString():new Up(t,r).toString(i),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class e1{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(i){i!==null&&t(i)})}}const bS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},E4=typeof URLSearchParams<"u"?URLSearchParams:Up,T4=typeof FormData<"u"?FormData:null,O4=typeof Blob<"u"?Blob:null,A4={isBrowser:!0,classes:{URLSearchParams:E4,FormData:T4,Blob:O4},protocols:["http","https","file","blob","url","data"]},Lp=typeof window<"u"&&typeof document<"u",zm=typeof navigator=="object"&&navigator||void 0,C4=Lp&&(!zm||["ReactNative","NativeScript","NS"].indexOf(zm.product)<0),D4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",M4=Lp&&window.location.href||"http://localhost",R4=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lp,hasStandardBrowserEnv:C4,hasStandardBrowserWebWorkerEnv:D4,navigator:zm,origin:M4},Symbol.toStringTag,{value:"Module"})),un={...R4,...A4};function N4(e,t){return lf(e,new un.classes.URLSearchParams,{visitor:function(r,i,o,u){return un.isNode&&Z.isBuffer(r)?(this.append(i,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}function k4(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function z4(e){const t={},r=Object.keys(e);let i;const o=r.length;let u;for(i=0;i=r.length;return c=!c&&Z.isArray(o)?o.length:c,p?(Z.hasOwnProp(o,c)?o[c]=[o[c],i]:o[c]=i,!h):((!o[c]||!Z.isObject(o[c]))&&(o[c]=[]),t(r,i,o[c],u)&&Z.isArray(o[c])&&(o[c]=z4(o[c])),!h)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const r={};return Z.forEachEntry(e,(i,o)=>{t(k4(i),o,r,0)}),r}return null}function j4(e,t,r){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const Rl={transitional:bS,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const i=r.getContentType()||"",o=i.indexOf("application/json")>-1,u=Z.isObject(t);if(u&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return o?JSON.stringify(_S(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){if(i.indexOf("application/x-www-form-urlencoded")>-1)return N4(t,this.formSerializer).toString();if((h=Z.isFileList(t))||i.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return lf(h?{"files[]":t}:t,p&&new p,this.formSerializer)}}return u||o?(r.setContentType("application/json",!1),j4(t)):t}],transformResponse:[function(t){const r=this.transitional||Rl.transitional,i=r&&r.forcedJSONParsing,o=this.responseType==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(i&&!this.responseType||o)){const c=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(h){if(c)throw h.name==="SyntaxError"?Ue.from(h,Ue.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:un.classes.FormData,Blob:un.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{Rl.headers[e]={}});const U4=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),L4=e=>{const t={};let r,i,o;return e&&e.split(`
-`).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),i=c.substring(o+1).trim(),!(!r||t[r]&&U4[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},t1=Symbol("internals");function sl(e){return e&&String(e).trim().toLowerCase()}function bc(e){return e===!1||e==null?e:Z.isArray(e)?e.map(bc):String(e)}function Y4(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const H4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function im(e,t,r,i,o){if(Z.isFunction(i))return i.call(this,t,r);if(o&&(t=r),!!Z.isString(t)){if(Z.isString(i))return t.indexOf(i)!==-1;if(Z.isRegExp(i))return i.test(t)}}function V4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function B4(e,t){const r=Z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(o,u,c){return this[i].call(this,t,o,u,c)},configurable:!0})})}let Rn=class{constructor(t){t&&this.set(t)}set(t,r,i){const o=this;function u(h,p,m){const y=sl(p);if(!y)throw new Error("header name must be a non-empty string");const g=Z.findKey(o,y);(!g||o[g]===void 0||m===!0||m===void 0&&o[g]!==!1)&&(o[g||p]=bc(h))}const c=(h,p)=>Z.forEach(h,(m,y)=>u(m,y,p));if(Z.isPlainObject(t)||t instanceof this.constructor)c(t,r);else if(Z.isString(t)&&(t=t.trim())&&!H4(t))c(L4(t),r);else if(Z.isObject(t)&&Z.isIterable(t)){let h={},p,m;for(const y of t){if(!Z.isArray(y))throw TypeError("Object iterator must return a key-value pair");h[m=y[0]]=(p=h[m])?Z.isArray(p)?[...p,y[1]]:[p,y[1]]:y[1]}c(h,r)}else t!=null&&u(r,t,i);return this}get(t,r){if(t=sl(t),t){const i=Z.findKey(this,t);if(i){const o=this[i];if(!r)return o;if(r===!0)return Y4(o);if(Z.isFunction(r))return r.call(this,o,i);if(Z.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=sl(t),t){const i=Z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||im(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let o=!1;function u(c){if(c=sl(c),c){const h=Z.findKey(i,c);h&&(!r||im(i,i[h],h,r))&&(delete i[h],o=!0)}}return Z.isArray(t)?t.forEach(u):u(t),o}clear(t){const r=Object.keys(this);let i=r.length,o=!1;for(;i--;){const u=r[i];(!t||im(this,this[u],u,t,!0))&&(delete this[u],o=!0)}return o}normalize(t){const r=this,i={};return Z.forEach(this,(o,u)=>{const c=Z.findKey(i,u);if(c){r[c]=bc(o),delete r[u];return}const h=t?V4(u):String(u).trim();h!==u&&delete r[u],r[h]=bc(o),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Z.forEach(this,(i,o)=>{i!=null&&i!==!1&&(r[o]=t&&Z.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
-`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(o=>i.set(o)),i}static accessor(t){const i=(this[t1]=this[t1]={accessors:{}}).accessors,o=this.prototype;function u(c){const h=sl(c);i[h]||(B4(o,c),i[h]=!0)}return Z.isArray(t)?t.forEach(u):u(t),this}};Rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Rn.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});Z.freezeMethods(Rn);function sm(e,t){const r=this||Rl,i=t||r,o=Rn.from(i.headers);let u=i.data;return Z.forEach(e,function(h){u=h.call(r,u,o.normalize(),t?t.status:void 0)}),o.normalize(),u}function wS(e){return!!(e&&e.__CANCEL__)}function so(e,t,r){Ue.call(this,e??"canceled",Ue.ERR_CANCELED,t,r),this.name="CanceledError"}Z.inherits(so,Ue,{__CANCEL__:!0});function SS(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Ue("Request failed with status code "+r.status,[Ue.ERR_BAD_REQUEST,Ue.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $4(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function F4(e,t){e=e||10;const r=new Array(e),i=new Array(e);let o=0,u=0,c;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),y=i[u];c||(c=m),r[o]=p,i[o]=m;let g=u,b=0;for(;g!==o;)b+=r[g++],g=g%e;if(o=(o+1)%e,o===u&&(u=(u+1)%e),m-c{r=y,o=null,u&&(clearTimeout(u),u=null),e(...m)};return[(...m)=>{const y=Date.now(),g=y-r;g>=i?c(m,y):(o=m,u||(u=setTimeout(()=>{u=null,c(o)},i-g)))},()=>o&&c(o)]}const Rc=(e,t,r=3)=>{let i=0;const o=F4(50,250);return Z4(u=>{const c=u.loaded,h=u.lengthComputable?u.total:void 0,p=c-i,m=o(p),y=c<=h;i=c;const g={loaded:c,total:h,progress:h?c/h:void 0,bytes:p,rate:m||void 0,estimated:m&&h&&y?(h-c)/m:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};e(g)},r)},n1=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},r1=e=>(...t)=>Z.asap(()=>e(...t)),P4=un.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,un.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(un.origin),un.navigator&&/(msie|trident)/i.test(un.navigator.userAgent)):()=>!0,G4=un.hasStandardBrowserEnv?{write(e,t,r,i,o,u,c){if(typeof document>"u")return;const h=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(r)&&h.push(`expires=${new Date(r).toUTCString()}`),Z.isString(i)&&h.push(`path=${i}`),Z.isString(o)&&h.push(`domain=${o}`),u===!0&&h.push("secure"),Z.isString(c)&&h.push(`SameSite=${c}`),document.cookie=h.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function q4(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function I4(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xS(e,t,r){let i=!q4(t);return e&&(i||r==!1)?I4(e,t):t}const a1=e=>e instanceof Rn?{...e}:e;function Li(e,t){t=t||{};const r={};function i(m,y,g,b){return Z.isPlainObject(m)&&Z.isPlainObject(y)?Z.merge.call({caseless:b},m,y):Z.isPlainObject(y)?Z.merge({},y):Z.isArray(y)?y.slice():y}function o(m,y,g,b){if(Z.isUndefined(y)){if(!Z.isUndefined(m))return i(void 0,m,g,b)}else return i(m,y,g,b)}function u(m,y){if(!Z.isUndefined(y))return i(void 0,y)}function c(m,y){if(Z.isUndefined(y)){if(!Z.isUndefined(m))return i(void 0,m)}else return i(void 0,y)}function h(m,y,g){if(g in t)return i(m,y);if(g in e)return i(void 0,m)}const p={url:u,method:u,data:u,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:h,headers:(m,y,g)=>o(a1(m),a1(y),g,!0)};return Z.forEach(Object.keys({...e,...t}),function(y){const g=p[y]||o,b=g(e[y],t[y],y);Z.isUndefined(b)&&g!==h||(r[y]=b)}),r}const ES=e=>{const t=Li({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:u,headers:c,auth:h}=t;if(t.headers=c=Rn.from(c),t.url=vS(xS(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),h&&c.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):""))),Z.isFormData(r)){if(un.hasStandardBrowserEnv||un.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(Z.isFunction(r.getHeaders)){const p=r.getHeaders(),m=["content-type","content-length"];Object.entries(p).forEach(([y,g])=>{m.includes(y.toLowerCase())&&c.set(y,g)})}}if(un.hasStandardBrowserEnv&&(i&&Z.isFunction(i)&&(i=i(t)),i||i!==!1&&P4(t.url))){const p=o&&u&&G4.read(u);p&&c.set(o,p)}return t},X4=typeof XMLHttpRequest<"u",W4=X4&&function(e){return new Promise(function(r,i){const o=ES(e);let u=o.data;const c=Rn.from(o.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=o,y,g,b,T,x;function E(){T&&T(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(y),o.signal&&o.signal.removeEventListener("abort",y)}let O=new XMLHttpRequest;O.open(o.method.toUpperCase(),o.url,!0),O.timeout=o.timeout;function D(){if(!O)return;const j=Rn.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),Y={data:!h||h==="text"||h==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:j,config:e,request:O};SS(function(F){r(F),E()},function(F){i(F),E()},Y),O=null}"onloadend"in O?O.onloadend=D:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(D)},O.onabort=function(){O&&(i(new Ue("Request aborted",Ue.ECONNABORTED,e,O)),O=null)},O.onerror=function(k){const Y=k&&k.message?k.message:"Network Error",J=new Ue(Y,Ue.ERR_NETWORK,e,O);J.event=k||null,i(J),O=null},O.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Y=o.transitional||bS;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),i(new Ue(k,Y.clarifyTimeoutError?Ue.ETIMEDOUT:Ue.ECONNABORTED,e,O)),O=null},u===void 0&&c.setContentType(null),"setRequestHeader"in O&&Z.forEach(c.toJSON(),function(k,Y){O.setRequestHeader(Y,k)}),Z.isUndefined(o.withCredentials)||(O.withCredentials=!!o.withCredentials),h&&h!=="json"&&(O.responseType=o.responseType),m&&([b,x]=Rc(m,!0),O.addEventListener("progress",b)),p&&O.upload&&([g,T]=Rc(p),O.upload.addEventListener("progress",g),O.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(y=j=>{O&&(i(!j||j.type?new so(null,e,O):j),O.abort(),O=null)},o.cancelToken&&o.cancelToken.subscribe(y),o.signal&&(o.signal.aborted?y():o.signal.addEventListener("abort",y)));const U=$4(o.url);if(U&&un.protocols.indexOf(U)===-1){i(new Ue("Unsupported protocol "+U+":",Ue.ERR_BAD_REQUEST,e));return}O.send(u||null)})},K4=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,o;const u=function(m){if(!o){o=!0,h();const y=m instanceof Error?m:this.reason;i.abort(y instanceof Ue?y:new so(y instanceof Error?y.message:y))}};let c=t&&setTimeout(()=>{c=null,u(new Ue(`timeout ${t} of ms exceeded`,Ue.ETIMEDOUT))},t);const h=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(u):m.removeEventListener("abort",u)}),e=null)};e.forEach(m=>m.addEventListener("abort",u));const{signal:p}=i;return p.unsubscribe=()=>Z.asap(h),p}},Q4=function*(e,t){let r=e.byteLength;if(r{const o=J4(e,t);let u=0,c,h=p=>{c||(c=!0,i&&i(p))};return new ReadableStream({async pull(p){try{const{done:m,value:y}=await o.next();if(m){h(),p.close();return}let g=y.byteLength;if(r){let b=u+=g;r(b)}p.enqueue(new Uint8Array(y))}catch(m){throw h(m),m}},cancel(p){return h(p),o.return()}},{highWaterMark:2})},s1=64*1024,{isFunction:ac}=Z,tz=(({Request:e,Response:t})=>({Request:e,Response:t}))(Z.global),{ReadableStream:o1,TextEncoder:l1}=Z.global,u1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nz=e=>{e=Z.merge.call({skipUndefined:!0},tz,e);const{fetch:t,Request:r,Response:i}=e,o=t?ac(t):typeof fetch=="function",u=ac(r),c=ac(i);if(!o)return!1;const h=o&&ac(o1),p=o&&(typeof l1=="function"?(x=>E=>x.encode(E))(new l1):async x=>new Uint8Array(await new r(x).arrayBuffer())),m=u&&h&&u1(()=>{let x=!1;const E=new r(un.origin,{body:new o1,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!E}),y=c&&h&&u1(()=>Z.isReadableStream(new i("").body)),g={stream:y&&(x=>x.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!g[x]&&(g[x]=(E,O)=>{let D=E&&E[x];if(D)return D.call(E);throw new Ue(`Response type '${x}' is not supported`,Ue.ERR_NOT_SUPPORT,O)})});const b=async x=>{if(x==null)return 0;if(Z.isBlob(x))return x.size;if(Z.isSpecCompliantForm(x))return(await new r(un.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(x)||Z.isArrayBuffer(x))return x.byteLength;if(Z.isURLSearchParams(x)&&(x=x+""),Z.isString(x))return(await p(x)).byteLength},T=async(x,E)=>{const O=Z.toFiniteNumber(x.getContentLength());return O??b(E)};return async x=>{let{url:E,method:O,data:D,signal:U,cancelToken:j,timeout:k,onDownloadProgress:Y,onUploadProgress:J,responseType:F,headers:Q,withCredentials:he="same-origin",fetchOptions:_e}=ES(x),we=t||fetch;F=F?(F+"").toLowerCase():"text";let ie=K4([U,j&&j.toAbortSignal()],k),ue=null;const fe=ie&&ie.unsubscribe&&(()=>{ie.unsubscribe()});let ye;try{if(J&&m&&O!=="get"&&O!=="head"&&(ye=await T(Q,D))!==0){let A=new r(E,{method:"POST",body:D,duplex:"half"}),q;if(Z.isFormData(D)&&(q=A.headers.get("content-type"))&&Q.setContentType(q),A.body){const[X,ne]=n1(ye,Rc(r1(J)));D=i1(A.body,s1,X,ne)}}Z.isString(he)||(he=he?"include":"omit");const M=u&&"credentials"in r.prototype,I={..._e,signal:ie,method:O.toUpperCase(),headers:Q.normalize().toJSON(),body:D,duplex:"half",credentials:M?he:void 0};ue=u&&new r(E,I);let L=await(u?we(ue,_e):we(E,I));const re=y&&(F==="stream"||F==="response");if(y&&(Y||re&&fe)){const A={};["status","statusText","headers"].forEach(ce=>{A[ce]=L[ce]});const q=Z.toFiniteNumber(L.headers.get("content-length")),[X,ne]=Y&&n1(q,Rc(r1(Y),!0))||[];L=new i(i1(L.body,s1,X,()=>{ne&&ne(),fe&&fe()}),A)}F=F||"text";let ve=await g[Z.findKey(g,F)||"text"](L,x);return!re&&fe&&fe(),await new Promise((A,q)=>{SS(A,q,{data:ve,headers:Rn.from(L.headers),status:L.status,statusText:L.statusText,config:x,request:ue})})}catch(M){throw fe&&fe(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new Ue("Network Error",Ue.ERR_NETWORK,x,ue),{cause:M.cause||M}):Ue.from(M,M&&M.code,x,ue)}}},rz=new Map,TS=e=>{let t=e&&e.env||{};const{fetch:r,Request:i,Response:o}=t,u=[i,o,r];let c=u.length,h=c,p,m,y=rz;for(;h--;)p=u[h],m=y.get(p),m===void 0&&y.set(p,m=h?new Map:nz(t)),y=m;return m};TS();const Yp={http:_4,xhr:W4,fetch:{get:TS}};Z.forEach(Yp,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const c1=e=>`- ${e}`,az=e=>Z.isFunction(e)||e===null||e===!1;function iz(e,t){e=Z.isArray(e)?e:[e];const{length:r}=e;let i,o;const u={};for(let c=0;c`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=r?c.length>1?`since :
-`+c.map(c1).join(`
-`):" "+c1(c[0]):"as no adapter specified";throw new Ue("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return o}const OS={getAdapter:iz,adapters:Yp};function om(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new so(null,e)}function f1(e){return om(e),e.headers=Rn.from(e.headers),e.data=sm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),OS.getAdapter(e.adapter||Rl.adapter,e)(e).then(function(i){return om(e),i.data=sm.call(e,e.transformResponse,i),i.headers=Rn.from(i.headers),i},function(i){return wS(i)||(om(e),i&&i.response&&(i.response.data=sm.call(e,e.transformResponse,i.response),i.response.headers=Rn.from(i.response.headers))),Promise.reject(i)})}const AS="1.13.2",uf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{uf[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const d1={};uf.transitional=function(t,r,i){function o(u,c){return"[Axios v"+AS+"] Transitional option '"+u+"'"+c+(i?". "+i:"")}return(u,c,h)=>{if(t===!1)throw new Ue(o(c," has been removed"+(r?" in "+r:"")),Ue.ERR_DEPRECATED);return r&&!d1[c]&&(d1[c]=!0,console.warn(o(c," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(u,c,h):!0}};uf.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function sz(e,t,r){if(typeof e!="object")throw new Ue("options must be an object",Ue.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const u=i[o],c=t[u];if(c){const h=e[u],p=h===void 0||c(h,u,e);if(p!==!0)throw new Ue("option "+u+" must be "+p,Ue.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ue("Unknown option "+u,Ue.ERR_BAD_OPTION)}}const _c={assertOptions:sz,validators:uf},Nr=_c.validators;let ji=class{constructor(t){this.defaults=t||{},this.interceptors={request:new e1,response:new e1}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const u=o.stack?o.stack.replace(/^.+\n/,""):"";try{i.stack?u&&!String(i.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(i.stack+=`
-`+u):i.stack=u}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Li(this.defaults,r);const{transitional:i,paramsSerializer:o,headers:u}=r;i!==void 0&&_c.assertOptions(i,{silentJSONParsing:Nr.transitional(Nr.boolean),forcedJSONParsing:Nr.transitional(Nr.boolean),clarifyTimeoutError:Nr.transitional(Nr.boolean)},!1),o!=null&&(Z.isFunction(o)?r.paramsSerializer={serialize:o}:_c.assertOptions(o,{encode:Nr.function,serialize:Nr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),_c.assertOptions(r,{baseUrl:Nr.spelling("baseURL"),withXsrfToken:Nr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=u&&Z.merge(u.common,u[r.method]);u&&Z.forEach(["delete","get","head","post","put","patch","common"],x=>{delete u[x]}),r.headers=Rn.concat(c,u);const h=[];let p=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(p=p&&E.synchronous,h.unshift(E.fulfilled,E.rejected))});const m=[];this.interceptors.response.forEach(function(E){m.push(E.fulfilled,E.rejected)});let y,g=0,b;if(!p){const x=[f1.bind(this),void 0];for(x.unshift(...h),x.push(...m),b=x.length,y=Promise.resolve(r);g{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](o);i._listeners=null}),this.promise.then=o=>{let u;const c=new Promise(h=>{i.subscribe(h),u=h}).then(o);return c.cancel=function(){i.unsubscribe(u)},c},t(function(u,c,h){i.reason||(i.reason=new so(u,c,h),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new CS(function(o){t=o}),cancel:t}}};function lz(e){return function(r){return e.apply(null,r)}}function uz(e){return Z.isObject(e)&&e.isAxiosError===!0}const jm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jm).forEach(([e,t])=>{jm[t]=e});function DS(e){const t=new ji(e),r=sS(ji.prototype.request,t);return Z.extend(r,ji.prototype,t,{allOwnKeys:!0}),Z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return DS(Li(e,o))},r}const At=DS(Rl);At.Axios=ji;At.CanceledError=so;At.CancelToken=oz;At.isCancel=wS;At.VERSION=AS;At.toFormData=lf;At.AxiosError=Ue;At.Cancel=At.CanceledError;At.all=function(t){return Promise.all(t)};At.spread=lz;At.isAxiosError=uz;At.mergeConfig=Li;At.AxiosHeaders=Rn;At.formToJSON=e=>_S(Z.isHTMLForm(e)?new FormData(e):e);At.getAdapter=OS.getAdapter;At.HttpStatusCode=jm;At.default=At;const{Axios:NY,AxiosError:kY,CanceledError:zY,isCancel:jY,CancelToken:UY,VERSION:LY,all:YY,Cancel:HY,isAxiosError:VY,spread:BY,toFormData:$Y,AxiosHeaders:FY,HttpStatusCode:ZY,formToJSON:PY,getAdapter:GY,mergeConfig:qY}=At,ol=At.create({baseURL:"/camera"});class cz{async logs(){return await ol({method:"GET",url:"logs"})}async users(){return await ol({method:"GET",url:"users"})}async register({file:t,user:r}){const i=new FormData;i.append("file",t,"frame.jpg");for(const[o,u]of Object.entries(r))i.append(o,u);return await ol({headers:{"Content-Type":"multipart/form-data"},method:"POST",url:"/register",data:i})}async registerSimple({user:t}){const r=new FormData;for(const[i,o]of Object.entries(t))r.append(i,o);return await ol({headers:{"Content-Type":"multipart/form-data"},method:"POST",url:"/register-simple",data:r})}async checkin({file:t}){const r=new FormData;return r.append("file",t,"frame.jpg"),await ol({headers:{"Content-Type":"multipart/form-data"},method:"POST",url:"/checkin",data:r})}}const Qs=new cz;class fz{async timekeepings(){return await At({headers:{Authorization:"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL21zLnByb2xvZ3kubmV0L2FwaS92MS9hZG1pbi9sb2dpbiIsImlhdCI6MTc1Njg2MDQ1OSwiZXhwIjoxNzg4Mzk2NDU5LCJuYmYiOjE3NTY4NjA0NTksImp0aSI6IkRrb0NLbHBKV1pkNnZCN0QiLCJzdWIiOiIxNSIsInBydiI6ImQyZmYyOTMzOWE4YTNlODJjMzU4MmE1YThlNzM5ZGYxNzg5YmIxMmYifQ.DoHqHeAGGxpvzlNQ9dAZjZf2Yl573XCgNBT8ZiSx5N4"},baseURL:"https://ms.prology.net/api/v1/admin",method:"GET",url:"timekeeping",params:{month:new Date().getMonth(),year:new Date().getFullYear()}})}}const dz=new fz;function MS(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx("div",{"data-slot":"card",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}const h1=e=>{let t;const r=new Set,i=(m,y)=>{const g=typeof m=="function"?m(t):m;if(!Object.is(g,t)){const b=t;t=y??(typeof g!="object"||g===null)?g:Object.assign({},t,g),r.forEach(T=>T(t,b))}},o=()=>t,h={setState:i,getState:o,getInitialState:()=>p,subscribe:m=>(r.add(m),()=>r.delete(m))},p=t=e(i,o,h);return h},hz=(e=>e?h1(e):h1),mz=e=>e;function pz(e,t=mz){const r=W.useSyncExternalStore(e.subscribe,W.useCallback(()=>t(e.getState()),[e,t]),W.useCallback(()=>t(e.getInitialState()),[e,t]));return W.useDebugValue(r),r}const m1=e=>{const t=hz(e),r=i=>pz(t,i);return Object.assign(r,t),r},RS=(e=>e?m1(e):m1),ai=RS(e=>({isAutoChecking:!1,isCountDown:!1,captureRegisterImage:null,canvasRef:null,videoRef:null,refreshLog:!1,setIsAutoChecking:t=>e({isAutoChecking:t}),setRefreshLog:t=>e({refreshLog:t}),setIsCountDown:t=>e({isCountDown:t}),setCaptureRegisterImage:t=>e({captureRegisterImage:t}),setVideoRef:t=>e({videoRef:t}),setCanvasRef:t=>e({canvasRef:t})}));function gz(e){const t=Ve.c(17),{onCountdowned:r}=e,[i,o]=_.useState(3),[u,c]=_.useState(!0),h=_.useRef(!1);let p,m;t[0]!==i||t[1]!==r||t[2]!==u?(p=()=>{if(!u)return;if(i===0){h.current||(h.current=!0,r?.());return}const O=setTimeout(()=>{o(yz)},1e3);return()=>clearTimeout(O)},m=[i,u,r],t[0]=i,t[1]=r,t[2]=u,t[3]=p,t[4]=m):(p=t[3],m=t[4]),_.useEffect(p,m);let y;t[5]===Symbol.for("react.memo_cache_sentinel")?(y=w.jsxs("div",{className:"text-center space-y-3",children:[w.jsx("p",{className:"text-lg font-medium",children:"Chuẩn bị sẵn sàng"}),w.jsx("p",{className:"text-base",children:"Vui lòng nhìn thẳng vào camera"})]}),t[5]=y):y=t[5];let g;t[6]!==i?(g=w.jsx("div",{className:"relative",children:w.jsx("div",{className:"w-40 h-40 bg-white rounded-full flex items-center justify-center shadow-2xl",children:w.jsx("span",{className:"text-8xl font-bold",children:i})})}),t[6]=i,t[7]=g):g=t[7];const b=i>0?`Còn ${i} giây...`:"Đã hoàn thành!";let T;t[8]!==b?(T=w.jsx("div",{className:"text-center",children:w.jsx("p",{className:"text-sm",children:b})}),t[8]=b,t[9]=T):T=t[9];let x;t[10]!==i||t[11]!==u?(x=u&&i>0&&w.jsx(hn,{variant:"outline",onClick:()=>c(!1),className:"mt-4 px-8 py-2",children:"Hủy"}),t[10]=i,t[11]=u,t[12]=x):x=t[12];let E;return t[13]!==g||t[14]!==T||t[15]!==x?(E=w.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-transparent",children:w.jsxs("div",{className:"flex flex-col items-center gap-8",children:[y,g,T,x]})}),t[13]=g,t[14]=T,t[15]=x,t[16]=E):E=t[16],E}function yz(e){return e-1}function p1(e){const t=vz(e),r=_.forwardRef((i,o)=>{const{children:u,...c}=i,h=_.Children.toArray(u),p=h.find(_z);if(p){const m=p.props.children,y=h.map(g=>g===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:g);return w.jsx(t,{...c,ref:o,children:_.isValidElement(m)?_.cloneElement(m,void 0,y):null})}return w.jsx(t,{...c,ref:o,children:u})});return r.displayName=`${e}.Slot`,r}function vz(e){const t=_.forwardRef((r,i)=>{const{children:o,...u}=r;if(_.isValidElement(o)){const c=Sz(o),h=wz(u,o.props);return o.type!==_.Fragment&&(h.ref=i?oi(i,c):c),_.cloneElement(o,h)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bz=Symbol("radix.slottable");function _z(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bz}function wz(e,t){const r={...t};for(const i in t){const o=e[i],u=t[i];/^on[A-Z]/.test(i)?o&&u?r[i]=(...h)=>{const p=u(...h);return o(...h),p}:o&&(r[i]=o):i==="style"?r[i]={...o,...u}:i==="className"&&(r[i]=[o,u].filter(Boolean).join(" "))}return{...e,...r}}function Sz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function NS(e){const t=e+"CollectionProvider",[r,i]=Bi(t),[o,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=E=>{const{scope:O,children:D}=E,U=W.useRef(null),j=W.useRef(new Map).current;return w.jsx(o,{scope:O,itemMap:j,collectionRef:U,children:D})};c.displayName=t;const h=e+"CollectionSlot",p=p1(h),m=W.forwardRef((E,O)=>{const{scope:D,children:U}=E,j=u(h,D),k=an(O,j.collectionRef);return w.jsx(p,{ref:k,children:U})});m.displayName=h;const y=e+"CollectionItemSlot",g="data-radix-collection-item",b=p1(y),T=W.forwardRef((E,O)=>{const{scope:D,children:U,...j}=E,k=W.useRef(null),Y=an(O,k),J=u(y,D);return W.useEffect(()=>(J.itemMap.set(k,{ref:k,...j}),()=>void J.itemMap.delete(k))),w.jsx(b,{[g]:"",ref:Y,children:U})});T.displayName=y;function x(E){const O=u(e+"CollectionConsumer",E);return W.useCallback(()=>{const U=O.collectionRef.current;if(!U)return[];const j=Array.from(U.querySelectorAll(`[${g}]`));return Array.from(O.itemMap.values()).sort((J,F)=>j.indexOf(J.ref.current)-j.indexOf(F.ref.current))},[O.collectionRef,O.itemMap])}return[{Provider:c,Slot:m,ItemSlot:T},x,i]}var xz=_.createContext(void 0);function Hp(e){const t=_.useContext(xz);return e||t||"ltr"}var lm="rovingFocusGroup.onEntryFocus",Ez={bubbles:!1,cancelable:!0},Nl="RovingFocusGroup",[Um,kS,Tz]=NS(Nl),[Oz,cf]=Bi(Nl,[Tz]),[Az,Cz]=Oz(Nl),zS=_.forwardRef((e,t)=>w.jsx(Um.Provider,{scope:e.__scopeRovingFocusGroup,children:w.jsx(Um.Slot,{scope:e.__scopeRovingFocusGroup,children:w.jsx(Dz,{...e,ref:t})})}));zS.displayName=Nl;var Dz=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:o=!1,dir:u,currentTabStopId:c,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...g}=e,b=_.useRef(null),T=an(t,b),x=Hp(u),[E,O]=Zc({prop:c,defaultProp:h??null,onChange:p,caller:Nl}),[D,U]=_.useState(!1),j=Yr(m),k=kS(r),Y=_.useRef(!1),[J,F]=_.useState(0);return _.useEffect(()=>{const Q=b.current;if(Q)return Q.addEventListener(lm,j),()=>Q.removeEventListener(lm,j)},[j]),w.jsx(Az,{scope:r,orientation:i,dir:x,loop:o,currentTabStopId:E,onItemFocus:_.useCallback(Q=>O(Q),[O]),onItemShiftTab:_.useCallback(()=>U(!0),[]),onFocusableItemAdd:_.useCallback(()=>F(Q=>Q+1),[]),onFocusableItemRemove:_.useCallback(()=>F(Q=>Q-1),[]),children:w.jsx(_t.div,{tabIndex:D||J===0?-1:0,"data-orientation":i,...g,ref:T,style:{outline:"none",...e.style},onMouseDown:Le(e.onMouseDown,()=>{Y.current=!0}),onFocus:Le(e.onFocus,Q=>{const he=!Y.current;if(Q.target===Q.currentTarget&&he&&!D){const _e=new CustomEvent(lm,Ez);if(Q.currentTarget.dispatchEvent(_e),!_e.defaultPrevented){const we=k().filter(M=>M.focusable),ie=we.find(M=>M.active),ue=we.find(M=>M.id===E),ye=[ie,ue,...we].filter(Boolean).map(M=>M.ref.current);LS(ye,y)}}Y.current=!1}),onBlur:Le(e.onBlur,()=>U(!1))})})}),jS="RovingFocusGroupItem",US=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:o=!1,tabStopId:u,children:c,...h}=e,p=ki(),m=u||p,y=Cz(jS,r),g=y.currentTabStopId===m,b=kS(r),{onFocusableItemAdd:T,onFocusableItemRemove:x,currentTabStopId:E}=y;return _.useEffect(()=>{if(i)return T(),()=>x()},[i,T,x]),w.jsx(Um.ItemSlot,{scope:r,id:m,focusable:i,active:o,children:w.jsx(_t.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...h,ref:t,onMouseDown:Le(e.onMouseDown,O=>{i?y.onItemFocus(m):O.preventDefault()}),onFocus:Le(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:Le(e.onKeyDown,O=>{if(O.key==="Tab"&&O.shiftKey){y.onItemShiftTab();return}if(O.target!==O.currentTarget)return;const D=Nz(O,y.orientation,y.dir);if(D!==void 0){if(O.metaKey||O.ctrlKey||O.altKey||O.shiftKey)return;O.preventDefault();let j=b().filter(k=>k.focusable).map(k=>k.ref.current);if(D==="last")j.reverse();else if(D==="prev"||D==="next"){D==="prev"&&j.reverse();const k=j.indexOf(O.currentTarget);j=y.loop?kz(j,k+1):j.slice(k+1)}setTimeout(()=>LS(j))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:E!=null}):c})})});US.displayName=jS;var Mz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Rz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Nz(e,t,r){const i=Rz(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Mz[i]}function LS(e,t=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}function kz(e,t){return e.map((r,i)=>e[(t+i)%e.length])}var YS=zS,HS=US,ff="Tabs",[zz]=Bi(ff,[cf]),VS=cf(),[jz,Vp]=zz(ff),BS=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:i,onValueChange:o,defaultValue:u,orientation:c="horizontal",dir:h,activationMode:p="automatic",...m}=e,y=Hp(h),[g,b]=Zc({prop:i,onChange:o,defaultProp:u??"",caller:ff});return w.jsx(jz,{scope:r,baseId:ki(),value:g,onValueChange:b,orientation:c,dir:y,activationMode:p,children:w.jsx(_t.div,{dir:y,"data-orientation":c,...m,ref:t})})});BS.displayName=ff;var $S="TabsList",FS=_.forwardRef((e,t)=>{const{__scopeTabs:r,loop:i=!0,...o}=e,u=Vp($S,r),c=VS(r);return w.jsx(YS,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:i,children:w.jsx(_t.div,{role:"tablist","aria-orientation":u.orientation,...o,ref:t})})});FS.displayName=$S;var ZS="TabsTrigger",PS=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:i,disabled:o=!1,...u}=e,c=Vp(ZS,r),h=VS(r),p=IS(c.baseId,i),m=XS(c.baseId,i),y=i===c.value;return w.jsx(HS,{asChild:!0,...h,focusable:!o,active:y,children:w.jsx(_t.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":m,"data-state":y?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:p,...u,ref:t,onMouseDown:Le(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?c.onValueChange(i):g.preventDefault()}),onKeyDown:Le(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&c.onValueChange(i)}),onFocus:Le(e.onFocus,()=>{const g=c.activationMode!=="manual";!y&&!o&&g&&c.onValueChange(i)})})})});PS.displayName=ZS;var GS="TabsContent",qS=_.forwardRef((e,t)=>{const{__scopeTabs:r,value:i,forceMount:o,children:u,...c}=e,h=Vp(GS,r),p=IS(h.baseId,i),m=XS(h.baseId,i),y=i===h.value,g=_.useRef(y);return _.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),w.jsx(Sa,{present:o||y,children:({present:b})=>w.jsx(_t.div,{"data-state":y?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:b&&u})})});qS.displayName=GS;function IS(e,t){return`${e}-trigger-${t}`}function XS(e,t){return`${e}-content-${t}`}var Uz=BS,Lz=FS,Yz=PS,Hz=qS;function WS(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("flex flex-col gap-2",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Uz,{"data-slot":"tabs",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function KS(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Lz,{"data-slot":"tabs-list",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function QS(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Yz,{"data-slot":"tabs-trigger",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function JS(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("flex-1 outline-none",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Hz,{"data-slot":"tabs-content",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function Vz(e,t=[]){let r=[];function i(u,c){const h=_.createContext(c);h.displayName=u+"Context";const p=r.length;r=[...r,c];const m=g=>{const{scope:b,children:T,...x}=g,E=b?.[e]?.[p]||h,O=_.useMemo(()=>x,Object.values(x));return w.jsx(E.Provider,{value:O,children:T})};m.displayName=u+"Provider";function y(g,b){const T=b?.[e]?.[p]||h,x=_.useContext(T);if(x)return x;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${u}\``)}return[m,y]}const o=()=>{const u=r.map(c=>_.createContext(c));return function(h){const p=h?.[e]||u;return _.useMemo(()=>({[`__scope${e}`]:{...h,[e]:p}}),[h,p])}};return o.scopeName=e,[i,Bz(o,...t)]}function Bz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const c=i.reduce((h,{useScope:p,scopeName:m})=>{const g=p(u)[`__scope${m}`];return{...h,...g}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var $z=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bp=$z.reduce((e,t)=>{const r=kp(`Primitive.${t}`),i=_.forwardRef((o,u)=>{const{asChild:c,...h}=o,p=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),um={exports:{}},cm={};var g1;function Fz(){if(g1)return cm;g1=1;var e=xl();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function h(g,b){var T=b(),x=i({inst:{value:T,getSnapshot:b}}),E=x[0].inst,O=x[1];return u(function(){E.value=T,E.getSnapshot=b,p(E)&&O({inst:E})},[g,T,b]),o(function(){return p(E)&&O({inst:E}),g(function(){p(E)&&O({inst:E})})},[g]),c(T),T}function p(g){var b=g.getSnapshot;g=g.value;try{var T=b();return!r(g,T)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return cm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,cm}var y1;function Zz(){return y1||(y1=1,um.exports=Fz()),um.exports}var Pz=Zz();function Gz(){return Pz.useSyncExternalStore(qz,()=>!0,()=>!1)}function qz(){return()=>{}}var $p="Avatar",[Iz]=Vz($p),[Xz,ex]=Iz($p),tx=_.forwardRef((e,t)=>{const{__scopeAvatar:r,...i}=e,[o,u]=_.useState("idle");return w.jsx(Xz,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:u,children:w.jsx(Bp.span,{...i,ref:t})})});tx.displayName=$p;var nx="AvatarImage",rx=_.forwardRef((e,t)=>{const{__scopeAvatar:r,src:i,onLoadingStatusChange:o=()=>{},...u}=e,c=ex(nx,r),h=Wz(i,u),p=Yr(m=>{o(m),c.onImageLoadingStatusChange(m)});return yr(()=>{h!=="idle"&&p(h)},[h,p]),h==="loaded"?w.jsx(Bp.img,{...u,ref:t,src:i}):null});rx.displayName=nx;var ax="AvatarFallback",ix=_.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:i,...o}=e,u=ex(ax,r),[c,h]=_.useState(i===void 0);return _.useEffect(()=>{if(i!==void 0){const p=window.setTimeout(()=>h(!0),i);return()=>window.clearTimeout(p)}},[i]),c&&u.imageLoadingStatus!=="loaded"?w.jsx(Bp.span,{...o,ref:t}):null});ix.displayName=ax;function v1(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Wz(e,{referrerPolicy:t,crossOrigin:r}){const i=Gz(),o=_.useRef(null),u=i?(o.current||(o.current=new window.Image),o.current):null,[c,h]=_.useState(()=>v1(u,e));return yr(()=>{h(v1(u,e))},[u,e]),yr(()=>{const p=g=>()=>{h(g)};if(!u)return;const m=p("loaded"),y=p("error");return u.addEventListener("load",m),u.addEventListener("error",y),t&&(u.referrerPolicy=t),typeof r=="string"&&(u.crossOrigin=r),()=>{u.removeEventListener("load",m),u.removeEventListener("error",y)}},[u,r,t]),c}var Kz=tx,Qz=rx,Jz=ix;function e3(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("relative flex size-8 shrink-0 overflow-hidden rounded-full",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Kz,{"data-slot":"avatar",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function t3(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("aspect-square size-full",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Qz,{"data-slot":"avatar-image",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}function n3(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("bg-muted flex size-full items-center justify-center rounded-full",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(Jz,{"data-slot":"avatar-fallback",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}const r3=["top","right","bottom","left"],ii=Math.min,$n=Math.max,Nc=Math.round,ic=Math.floor,Lr=e=>({x:e,y:e}),a3={left:"right",right:"left",bottom:"top",top:"bottom"},i3={start:"end",end:"start"};function Lm(e,t,r){return $n(e,ii(t,r))}function _a(e,t){return typeof e=="function"?e(t):e}function wa(e){return e.split("-")[0]}function oo(e){return e.split("-")[1]}function Fp(e){return e==="x"?"y":"x"}function Zp(e){return e==="y"?"height":"width"}const s3=new Set(["top","bottom"]);function Ur(e){return s3.has(wa(e))?"y":"x"}function Pp(e){return Fp(Ur(e))}function o3(e,t,r){r===void 0&&(r=!1);const i=oo(e),o=Pp(e),u=Zp(o);let c=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(c=kc(c)),[c,kc(c)]}function l3(e){const t=kc(e);return[Ym(e),t,Ym(t)]}function Ym(e){return e.replace(/start|end/g,t=>i3[t])}const b1=["left","right"],_1=["right","left"],u3=["top","bottom"],c3=["bottom","top"];function f3(e,t,r){switch(e){case"top":case"bottom":return r?t?_1:b1:t?b1:_1;case"left":case"right":return t?u3:c3;default:return[]}}function d3(e,t,r,i){const o=oo(e);let u=f3(wa(e),r==="start",i);return o&&(u=u.map(c=>c+"-"+o),t&&(u=u.concat(u.map(Ym)))),u}function kc(e){return e.replace(/left|right|bottom|top/g,t=>a3[t])}function h3(e){return{top:0,right:0,bottom:0,left:0,...e}}function sx(e){return typeof e!="number"?h3(e):{top:e,right:e,bottom:e,left:e}}function zc(e){const{x:t,y:r,width:i,height:o}=e;return{width:i,height:o,top:r,left:t,right:t+i,bottom:r+o,x:t,y:r}}function w1(e,t,r){let{reference:i,floating:o}=e;const u=Ur(t),c=Pp(t),h=Zp(c),p=wa(t),m=u==="y",y=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,b=i[h]/2-o[h]/2;let T;switch(p){case"top":T={x:y,y:i.y-o.height};break;case"bottom":T={x:y,y:i.y+i.height};break;case"right":T={x:i.x+i.width,y:g};break;case"left":T={x:i.x-o.width,y:g};break;default:T={x:i.x,y:i.y}}switch(oo(t)){case"start":T[c]-=b*(r&&m?-1:1);break;case"end":T[c]+=b*(r&&m?-1:1);break}return T}const m3=async(e,t,r)=>{const{placement:i="bottom",strategy:o="absolute",middleware:u=[],platform:c}=r,h=u.filter(Boolean),p=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:g}=w1(m,i,p),b=i,T={},x=0;for(let E=0;E({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:o,rects:u,platform:c,elements:h,middlewareData:p}=t,{element:m,padding:y=0}=_a(e,t)||{};if(m==null)return{};const g=sx(y),b={x:r,y:i},T=Pp(o),x=Zp(T),E=await c.getDimensions(m),O=T==="y",D=O?"top":"left",U=O?"bottom":"right",j=O?"clientHeight":"clientWidth",k=u.reference[x]+u.reference[T]-b[T]-u.floating[x],Y=b[T]-u.reference[T],J=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let F=J?J[j]:0;(!F||!await(c.isElement==null?void 0:c.isElement(J)))&&(F=h.floating[j]||u.floating[x]);const Q=k/2-Y/2,he=F/2-E[x]/2-1,_e=ii(g[D],he),we=ii(g[U],he),ie=_e,ue=F-E[x]-we,fe=F/2-E[x]/2+Q,ye=Lm(ie,fe,ue),M=!p.arrow&&oo(o)!=null&&fe!==ye&&u.reference[x]/2-(fefe<=0)){var we,ie;const fe=(((we=u.flip)==null?void 0:we.index)||0)+1,ye=F[fe];if(ye&&(!(g==="alignment"?U!==Ur(ye):!1)||_e.every(L=>Ur(L.placement)===U?L.overflows[0]>0:!0)))return{data:{index:fe,overflows:_e},reset:{placement:ye}};let M=(ie=_e.filter(I=>I.overflows[0]<=0).sort((I,L)=>I.overflows[1]-L.overflows[1])[0])==null?void 0:ie.placement;if(!M)switch(T){case"bestFit":{var ue;const I=(ue=_e.filter(L=>{if(J){const re=Ur(L.placement);return re===U||re==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(re=>re>0).reduce((re,ve)=>re+ve,0)]).sort((L,re)=>L[1]-re[1])[0])==null?void 0:ue[0];I&&(M=I);break}case"initialPlacement":M=h;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function S1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function x1(e){return r3.some(t=>e[t]>=0)}const y3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:i="referenceHidden",...o}=_a(e,t);switch(i){case"referenceHidden":{const u=await yl(t,{...o,elementContext:"reference"}),c=S1(u,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:x1(c)}}}case"escaped":{const u=await yl(t,{...o,altBoundary:!0}),c=S1(u,r.floating);return{data:{escapedOffsets:c,escaped:x1(c)}}}default:return{}}}}},ox=new Set(["left","top"]);async function v3(e,t){const{placement:r,platform:i,elements:o}=e,u=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=wa(r),h=oo(r),p=Ur(r)==="y",m=ox.has(c)?-1:1,y=u&&p?-1:1,g=_a(t,e);let{mainAxis:b,crossAxis:T,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return h&&typeof x=="number"&&(T=h==="end"?x*-1:x),p?{x:T*y,y:b*m}:{x:b*m,y:T*y}}const b3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:o,y:u,placement:c,middlewareData:h}=t,p=await v3(t,e);return c===((r=h.offset)==null?void 0:r.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:o+p.x,y:u+p.y,data:{...p,placement:c}}}}},_3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:o}=t,{mainAxis:u=!0,crossAxis:c=!1,limiter:h={fn:O=>{let{x:D,y:U}=O;return{x:D,y:U}}},...p}=_a(e,t),m={x:r,y:i},y=await yl(t,p),g=Ur(wa(o)),b=Fp(g);let T=m[b],x=m[g];if(u){const O=b==="y"?"top":"left",D=b==="y"?"bottom":"right",U=T+y[O],j=T-y[D];T=Lm(U,T,j)}if(c){const O=g==="y"?"top":"left",D=g==="y"?"bottom":"right",U=x+y[O],j=x-y[D];x=Lm(U,x,j)}const E=h.fn({...t,[b]:T,[g]:x});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[b]:u,[g]:c}}}}}},w3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:o,rects:u,middlewareData:c}=t,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=_a(e,t),y={x:r,y:i},g=Ur(o),b=Fp(g);let T=y[b],x=y[g];const E=_a(h,t),O=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(p){const j=b==="y"?"height":"width",k=u.reference[b]-u.floating[j]+O.mainAxis,Y=u.reference[b]+u.reference[j]-O.mainAxis;TY&&(T=Y)}if(m){var D,U;const j=b==="y"?"width":"height",k=ox.has(wa(o)),Y=u.reference[g]-u.floating[j]+(k&&((D=c.offset)==null?void 0:D[g])||0)+(k?0:O.crossAxis),J=u.reference[g]+u.reference[j]+(k?0:((U=c.offset)==null?void 0:U[g])||0)-(k?O.crossAxis:0);xJ&&(x=J)}return{[b]:T,[g]:x}}}},S3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:o,rects:u,platform:c,elements:h}=t,{apply:p=()=>{},...m}=_a(e,t),y=await yl(t,m),g=wa(o),b=oo(o),T=Ur(o)==="y",{width:x,height:E}=u.floating;let O,D;g==="top"||g==="bottom"?(O=g,D=b===(await(c.isRTL==null?void 0:c.isRTL(h.floating))?"start":"end")?"left":"right"):(D=g,O=b==="end"?"top":"bottom");const U=E-y.top-y.bottom,j=x-y.left-y.right,k=ii(E-y[O],U),Y=ii(x-y[D],j),J=!t.middlewareData.shift;let F=k,Q=Y;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(Q=j),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(F=U),J&&!b){const _e=$n(y.left,0),we=$n(y.right,0),ie=$n(y.top,0),ue=$n(y.bottom,0);T?Q=x-2*(_e!==0||we!==0?_e+we:$n(y.left,y.right)):F=E-2*(ie!==0||ue!==0?ie+ue:$n(y.top,y.bottom))}await p({...t,availableWidth:Q,availableHeight:F});const he=await c.getDimensions(h.floating);return x!==he.width||E!==he.height?{reset:{rects:!0}}:{}}}};function df(){return typeof window<"u"}function lo(e){return lx(e)?(e.nodeName||"").toLowerCase():"#document"}function Zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fr(e){var t;return(t=(lx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lx(e){return df()?e instanceof Node||e instanceof Zn(e).Node:!1}function _r(e){return df()?e instanceof Element||e instanceof Zn(e).Element:!1}function Vr(e){return df()?e instanceof HTMLElement||e instanceof Zn(e).HTMLElement:!1}function E1(e){return!df()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zn(e).ShadowRoot}const x3=new Set(["inline","contents"]);function kl(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!x3.has(o)}const E3=new Set(["table","td","th"]);function T3(e){return E3.has(lo(e))}const O3=[":popover-open",":modal"];function hf(e){return O3.some(t=>{try{return e.matches(t)}catch{return!1}})}const A3=["transform","translate","scale","rotate","perspective"],C3=["transform","translate","scale","rotate","perspective","filter"],D3=["paint","layout","strict","content"];function Gp(e){const t=qp(),r=_r(e)?wr(e):e;return A3.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||C3.some(i=>(r.willChange||"").includes(i))||D3.some(i=>(r.contain||"").includes(i))}function M3(e){let t=si(e);for(;Vr(t)&&!Js(t);){if(Gp(t))return t;if(hf(t))return null;t=si(t)}return null}function qp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const R3=new Set(["html","body","#document"]);function Js(e){return R3.has(lo(e))}function wr(e){return Zn(e).getComputedStyle(e)}function mf(e){return _r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function si(e){if(lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||E1(e)&&e.host||Fr(e);return E1(t)?t.host:t}function ux(e){const t=si(e);return Js(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&kl(t)?t:ux(t)}function vl(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ux(e),u=o===((i=e.ownerDocument)==null?void 0:i.body),c=Zn(o);if(u){const h=Hm(c);return t.concat(c,c.visualViewport||[],kl(o)?o:[],h&&r?vl(h):[])}return t.concat(o,vl(o,[],r))}function Hm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cx(e){const t=wr(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=Vr(e),u=o?e.offsetWidth:r,c=o?e.offsetHeight:i,h=Nc(r)!==u||Nc(i)!==c;return h&&(r=u,i=c),{width:r,height:i,$:h}}function Ip(e){return _r(e)?e:e.contextElement}function Xs(e){const t=Ip(e);if(!Vr(t))return Lr(1);const r=t.getBoundingClientRect(),{width:i,height:o,$:u}=cx(t);let c=(u?Nc(r.width):r.width)/i,h=(u?Nc(r.height):r.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!h||!Number.isFinite(h))&&(h=1),{x:c,y:h}}const N3=Lr(0);function fx(e){const t=Zn(e);return!qp()||!t.visualViewport?N3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function k3(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Zn(e)?!1:t}function Yi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),u=Ip(e);let c=Lr(1);t&&(i?_r(i)&&(c=Xs(i)):c=Xs(e));const h=k3(u,r,i)?fx(u):Lr(0);let p=(o.left+h.x)/c.x,m=(o.top+h.y)/c.y,y=o.width/c.x,g=o.height/c.y;if(u){const b=Zn(u),T=i&&_r(i)?Zn(i):i;let x=b,E=Hm(x);for(;E&&i&&T!==x;){const O=Xs(E),D=E.getBoundingClientRect(),U=wr(E),j=D.left+(E.clientLeft+parseFloat(U.paddingLeft))*O.x,k=D.top+(E.clientTop+parseFloat(U.paddingTop))*O.y;p*=O.x,m*=O.y,y*=O.x,g*=O.y,p+=j,m+=k,x=Zn(E),E=Hm(x)}}return zc({width:y,height:g,x:p,y:m})}function pf(e,t){const r=mf(e).scrollLeft;return t?t.left+r:Yi(Fr(e)).left+r}function dx(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-pf(e,r),o=r.top+t.scrollTop;return{x:i,y:o}}function z3(e){let{elements:t,rect:r,offsetParent:i,strategy:o}=e;const u=o==="fixed",c=Fr(i),h=t?hf(t.floating):!1;if(i===c||h&&u)return r;let p={scrollLeft:0,scrollTop:0},m=Lr(1);const y=Lr(0),g=Vr(i);if((g||!g&&!u)&&((lo(i)!=="body"||kl(c))&&(p=mf(i)),Vr(i))){const T=Yi(i);m=Xs(i),y.x=T.x+i.clientLeft,y.y=T.y+i.clientTop}const b=c&&!g&&!u?dx(c,p):Lr(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-p.scrollLeft*m.x+y.x+b.x,y:r.y*m.y-p.scrollTop*m.y+y.y+b.y}}function j3(e){return Array.from(e.getClientRects())}function U3(e){const t=Fr(e),r=mf(e),i=e.ownerDocument.body,o=$n(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),u=$n(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+pf(e);const h=-r.scrollTop;return wr(i).direction==="rtl"&&(c+=$n(t.clientWidth,i.clientWidth)-o),{width:o,height:u,x:c,y:h}}const T1=25;function L3(e,t){const r=Zn(e),i=Fr(e),o=r.visualViewport;let u=i.clientWidth,c=i.clientHeight,h=0,p=0;if(o){u=o.width,c=o.height;const y=qp();(!y||y&&t==="fixed")&&(h=o.offsetLeft,p=o.offsetTop)}const m=pf(i);if(m<=0){const y=i.ownerDocument,g=y.body,b=getComputedStyle(g),T=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(i.clientWidth-g.clientWidth-T);x<=T1&&(u-=x)}else m<=T1&&(u+=m);return{width:u,height:c,x:h,y:p}}const Y3=new Set(["absolute","fixed"]);function H3(e,t){const r=Yi(e,!0,t==="fixed"),i=r.top+e.clientTop,o=r.left+e.clientLeft,u=Vr(e)?Xs(e):Lr(1),c=e.clientWidth*u.x,h=e.clientHeight*u.y,p=o*u.x,m=i*u.y;return{width:c,height:h,x:p,y:m}}function O1(e,t,r){let i;if(t==="viewport")i=L3(e,r);else if(t==="document")i=U3(Fr(e));else if(_r(t))i=H3(t,r);else{const o=fx(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zc(i)}function hx(e,t){const r=si(e);return r===t||!_r(r)||Js(r)?!1:wr(r).position==="fixed"||hx(r,t)}function V3(e,t){const r=t.get(e);if(r)return r;let i=vl(e,[],!1).filter(h=>_r(h)&&lo(h)!=="body"),o=null;const u=wr(e).position==="fixed";let c=u?si(e):e;for(;_r(c)&&!Js(c);){const h=wr(c),p=Gp(c);!p&&h.position==="fixed"&&(o=null),(u?!p&&!o:!p&&h.position==="static"&&!!o&&Y3.has(o.position)||kl(c)&&!p&&hx(e,c))?i=i.filter(y=>y!==c):o=h,c=si(c)}return t.set(e,i),i}function B3(e){let{element:t,boundary:r,rootBoundary:i,strategy:o}=e;const c=[...r==="clippingAncestors"?hf(t)?[]:V3(t,this._c):[].concat(r),i],h=c[0],p=c.reduce((m,y)=>{const g=O1(t,y,o);return m.top=$n(g.top,m.top),m.right=ii(g.right,m.right),m.bottom=ii(g.bottom,m.bottom),m.left=$n(g.left,m.left),m},O1(t,h,o));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function $3(e){const{width:t,height:r}=cx(e);return{width:t,height:r}}function F3(e,t,r){const i=Vr(t),o=Fr(t),u=r==="fixed",c=Yi(e,!0,u,t);let h={scrollLeft:0,scrollTop:0};const p=Lr(0);function m(){p.x=pf(o)}if(i||!i&&!u)if((lo(t)!=="body"||kl(o))&&(h=mf(t)),i){const T=Yi(t,!0,u,t);p.x=T.x+t.clientLeft,p.y=T.y+t.clientTop}else o&&m();u&&!i&&o&&m();const y=o&&!i&&!u?dx(o,h):Lr(0),g=c.left+h.scrollLeft-p.x-y.x,b=c.top+h.scrollTop-p.y-y.y;return{x:g,y:b,width:c.width,height:c.height}}function fm(e){return wr(e).position==="static"}function A1(e,t){if(!Vr(e)||wr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Fr(e)===r&&(r=r.ownerDocument.body),r}function mx(e,t){const r=Zn(e);if(hf(e))return r;if(!Vr(e)){let o=si(e);for(;o&&!Js(o);){if(_r(o)&&!fm(o))return o;o=si(o)}return r}let i=A1(e,t);for(;i&&T3(i)&&fm(i);)i=A1(i,t);return i&&Js(i)&&fm(i)&&!Gp(i)?r:i||M3(e)||r}const Z3=async function(e){const t=this.getOffsetParent||mx,r=this.getDimensions,i=await r(e.floating);return{reference:F3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function P3(e){return wr(e).direction==="rtl"}const G3={convertOffsetParentRelativeRectToViewportRelativeRect:z3,getDocumentElement:Fr,getClippingRect:B3,getOffsetParent:mx,getElementRects:Z3,getClientRects:j3,getDimensions:$3,getScale:Xs,isElement:_r,isRTL:P3};function px(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q3(e,t){let r=null,i;const o=Fr(e);function u(){var h;clearTimeout(i),(h=r)==null||h.disconnect(),r=null}function c(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),u();const m=e.getBoundingClientRect(),{left:y,top:g,width:b,height:T}=m;if(h||t(),!b||!T)return;const x=ic(g),E=ic(o.clientWidth-(y+b)),O=ic(o.clientHeight-(g+T)),D=ic(y),j={rootMargin:-x+"px "+-E+"px "+-O+"px "+-D+"px",threshold:$n(0,ii(1,p))||1};let k=!0;function Y(J){const F=J[0].intersectionRatio;if(F!==p){if(!k)return c();F?c(!1,F):i=setTimeout(()=>{c(!1,1e-7)},1e3)}F===1&&!px(m,e.getBoundingClientRect())&&c(),k=!1}try{r=new IntersectionObserver(Y,{...j,root:o.ownerDocument})}catch{r=new IntersectionObserver(Y,j)}r.observe(e)}return c(!0),u}function I3(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,m=Ip(e),y=o||u?[...m?vl(m):[],...vl(t)]:[];y.forEach(D=>{o&&D.addEventListener("scroll",r,{passive:!0}),u&&D.addEventListener("resize",r)});const g=m&&h?q3(m,r):null;let b=-1,T=null;c&&(T=new ResizeObserver(D=>{let[U]=D;U&&U.target===m&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var j;(j=T)==null||j.observe(t)})),r()}),m&&!p&&T.observe(m),T.observe(t));let x,E=p?Yi(e):null;p&&O();function O(){const D=Yi(e);E&&!px(E,D)&&r(),E=D,x=requestAnimationFrame(O)}return r(),()=>{var D;y.forEach(U=>{o&&U.removeEventListener("scroll",r),u&&U.removeEventListener("resize",r)}),g?.(),(D=T)==null||D.disconnect(),T=null,p&&cancelAnimationFrame(x)}}const X3=b3,W3=_3,K3=g3,Q3=S3,J3=y3,C1=p3,ej=w3,tj=(e,t,r)=>{const i=new Map,o={platform:G3,...r},u={...o.platform,_c:i};return m3(e,t,{...o,platform:u})};var nj=typeof document<"u",rj=function(){},wc=nj?_.useLayoutEffect:rj;function jc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(i=r;i--!==0;)if(!jc(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){const u=o[i];if(!(u==="_owner"&&e.$$typeof)&&!jc(e[u],t[u]))return!1}return!0}return e!==e&&t!==t}function gx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D1(e,t){const r=gx(e);return Math.round(t*r)/r}function dm(e){const t=_.useRef(e);return wc(()=>{t.current=e}),t}function aj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:u,floating:c}={},transform:h=!0,whileElementsMounted:p,open:m}=e,[y,g]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[b,T]=_.useState(i);jc(b,i)||T(i);const[x,E]=_.useState(null),[O,D]=_.useState(null),U=_.useCallback(L=>{L!==J.current&&(J.current=L,E(L))},[]),j=_.useCallback(L=>{L!==F.current&&(F.current=L,D(L))},[]),k=u||x,Y=c||O,J=_.useRef(null),F=_.useRef(null),Q=_.useRef(y),he=p!=null,_e=dm(p),we=dm(o),ie=dm(m),ue=_.useCallback(()=>{if(!J.current||!F.current)return;const L={placement:t,strategy:r,middleware:b};we.current&&(L.platform=we.current),tj(J.current,F.current,L).then(re=>{const ve={...re,isPositioned:ie.current!==!1};fe.current&&!jc(Q.current,ve)&&(Q.current=ve,Wm.flushSync(()=>{g(ve)}))})},[b,t,r,we,ie]);wc(()=>{m===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,g(L=>({...L,isPositioned:!1})))},[m]);const fe=_.useRef(!1);wc(()=>(fe.current=!0,()=>{fe.current=!1}),[]),wc(()=>{if(k&&(J.current=k),Y&&(F.current=Y),k&&Y){if(_e.current)return _e.current(k,Y,ue);ue()}},[k,Y,ue,_e,he]);const ye=_.useMemo(()=>({reference:J,floating:F,setReference:U,setFloating:j}),[U,j]),M=_.useMemo(()=>({reference:k,floating:Y}),[k,Y]),I=_.useMemo(()=>{const L={position:r,left:0,top:0};if(!M.floating)return L;const re=D1(M.floating,y.x),ve=D1(M.floating,y.y);return h?{...L,transform:"translate("+re+"px, "+ve+"px)",...gx(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:re,top:ve}},[r,h,M.floating,y.x,y.y]);return _.useMemo(()=>({...y,update:ue,refs:ye,elements:M,floatingStyles:I}),[y,ue,ye,M,I])}const ij=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:o}=typeof e=="function"?e(r):e;return i&&t(i)?i.current!=null?C1({element:i.current,padding:o}).fn(r):{}:i?C1({element:i,padding:o}).fn(r):{}}}},sj=(e,t)=>({...X3(e),options:[e,t]}),oj=(e,t)=>({...W3(e),options:[e,t]}),lj=(e,t)=>({...ej(e),options:[e,t]}),uj=(e,t)=>({...K3(e),options:[e,t]}),cj=(e,t)=>({...Q3(e),options:[e,t]}),fj=(e,t)=>({...J3(e),options:[e,t]}),dj=(e,t)=>({...ij(e),options:[e,t]});var hj="Arrow",yx=_.forwardRef((e,t)=>{const{children:r,width:i=10,height:o=5,...u}=e;return w.jsx(_t.svg,{...u,ref:t,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});yx.displayName=hj;var mj=yx;function pj(e){const[t,r]=_.useState(void 0);return yr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const u=o[0];let c,h;if("borderBoxSize"in u){const p=u.borderBoxSize,m=Array.isArray(p)?p[0]:p;c=m.inlineSize,h=m.blockSize}else c=e.offsetWidth,h=e.offsetHeight;r({width:c,height:h})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}var Xp="Popper",[vx,bx]=Bi(Xp),[gj,_x]=vx(Xp),wx=e=>{const{__scopePopper:t,children:r}=e,[i,o]=_.useState(null);return w.jsx(gj,{scope:t,anchor:i,onAnchorChange:o,children:r})};wx.displayName=Xp;var Sx="PopperAnchor",xx=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:i,...o}=e,u=_x(Sx,r),c=_.useRef(null),h=an(t,c),p=_.useRef(null);return _.useEffect(()=>{const m=p.current;p.current=i?.current||c.current,m!==p.current&&u.onAnchorChange(p.current)}),i?null:w.jsx(_t.div,{...o,ref:h})});xx.displayName=Sx;var Wp="PopperContent",[yj,vj]=vx(Wp),Ex=_.forwardRef((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:o=0,align:u="center",alignOffset:c=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:T="optimized",onPlaced:x,...E}=e,O=_x(Wp,r),[D,U]=_.useState(null),j=an(t,de=>U(de)),[k,Y]=_.useState(null),J=pj(k),F=J?.width??0,Q=J?.height??0,he=i+(u!=="center"?"-"+u:""),_e=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},we=Array.isArray(m)?m:[m],ie=we.length>0,ue={padding:_e,boundary:we.filter(_j),altBoundary:ie},{refs:fe,floatingStyles:ye,placement:M,isPositioned:I,middlewareData:L}=aj({strategy:"fixed",placement:he,whileElementsMounted:(...de)=>I3(...de,{animationFrame:T==="always"}),elements:{reference:O.anchor},middleware:[sj({mainAxis:o+Q,alignmentAxis:c}),p&&oj({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?lj():void 0,...ue}),p&&uj({...ue}),cj({...ue,apply:({elements:de,rects:Me,availableWidth:Be,availableHeight:Ct})=>{const{width:Qt,height:kt}=Me.reference,or=de.floating.style;or.setProperty("--radix-popper-available-width",`${Be}px`),or.setProperty("--radix-popper-available-height",`${Ct}px`),or.setProperty("--radix-popper-anchor-width",`${Qt}px`),or.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),k&&dj({element:k,padding:h}),wj({arrowWidth:F,arrowHeight:Q}),b&&fj({strategy:"referenceHidden",...ue})]}),[re,ve]=Ax(M),A=Yr(x);yr(()=>{I&&A?.()},[I,A]);const q=L.arrow?.x,X=L.arrow?.y,ne=L.arrow?.centerOffset!==0,[ce,Te]=_.useState();return yr(()=>{D&&Te(window.getComputedStyle(D).zIndex)},[D]),w.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:I?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(yj,{scope:r,placedSide:re,onArrowChange:Y,arrowX:q,arrowY:X,shouldHideArrow:ne,children:w.jsx(_t.div,{"data-side":re,"data-align":ve,...E,ref:j,style:{...E.style,animation:I?void 0:"none"}})})})});Ex.displayName=Wp;var Tx="PopperArrow",bj={top:"bottom",right:"left",bottom:"top",left:"right"},Ox=_.forwardRef(function(t,r){const{__scopePopper:i,...o}=t,u=vj(Tx,i),c=bj[u.placedSide];return w.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:w.jsx(mj,{...o,ref:r,style:{...o.style,display:"block"}})})});Ox.displayName=Tx;function _j(e){return e!==null}var wj=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:i,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,h=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[m,y]=Ax(r),g={start:"0%",center:"50%",end:"100%"}[y],b=(o.arrow?.x??0)+h/2,T=(o.arrow?.y??0)+p/2;let x="",E="";return m==="bottom"?(x=c?g:`${b}px`,E=`${-p}px`):m==="top"?(x=c?g:`${b}px`,E=`${i.floating.height+p}px`):m==="right"?(x=`${-p}px`,E=c?g:`${T}px`):m==="left"&&(x=`${i.floating.width+p}px`,E=c?g:`${T}px`),{data:{x,y:E}}}});function Ax(e){const[t,r="center"]=e.split("-");return[t,r]}var Sj=wx,xj=xx,Ej=Ex,Tj=Ox;function Oj(e){const t=Aj(e),r=_.forwardRef((i,o)=>{const{children:u,...c}=i,h=_.Children.toArray(u),p=h.find(Dj);if(p){const m=p.props.children,y=h.map(g=>g===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:g);return w.jsx(t,{...c,ref:o,children:_.isValidElement(m)?_.cloneElement(m,void 0,y):null})}return w.jsx(t,{...c,ref:o,children:u})});return r.displayName=`${e}.Slot`,r}function Aj(e){const t=_.forwardRef((r,i)=>{const{children:o,...u}=r;if(_.isValidElement(o)){const c=Rj(o),h=Mj(u,o.props);return o.type!==_.Fragment&&(h.ref=i?oi(i,c):c),_.cloneElement(o,h)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cj=Symbol("radix.slottable");function Dj(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cj}function Mj(e,t){const r={...t};for(const i in t){const o=e[i],u=t[i];/^on[A-Z]/.test(i)?o&&u?r[i]=(...h)=>{const p=u(...h);return o(...h),p}:o&&(r[i]=o):i==="style"?r[i]={...o,...u}:i==="className"&&(r[i]=[o,u].filter(Boolean).join(" "))}return{...e,...r}}function Rj(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Vm=["Enter"," "],Nj=["ArrowDown","PageUp","Home"],Cx=["ArrowUp","PageDown","End"],kj=[...Nj,...Cx],zj={ltr:[...Vm,"ArrowRight"],rtl:[...Vm,"ArrowLeft"]},jj={ltr:["ArrowLeft"],rtl:["ArrowRight"]},zl="Menu",[bl,Uj,Lj]=NS(zl),[Fi,Dx]=Bi(zl,[Lj,bx,cf]),gf=bx(),Mx=cf(),[Yj,Zi]=Fi(zl),[Hj,jl]=Fi(zl),Rx=e=>{const{__scopeMenu:t,open:r=!1,children:i,dir:o,onOpenChange:u,modal:c=!0}=e,h=gf(t),[p,m]=_.useState(null),y=_.useRef(!1),g=Yr(u),b=Hp(o);return _.useEffect(()=>{const T=()=>{y.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>y.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),w.jsx(Sj,{...h,children:w.jsx(Yj,{scope:t,open:r,onOpenChange:g,content:p,onContentChange:m,children:w.jsx(Hj,{scope:t,onClose:_.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:y,dir:b,modal:c,children:i})})})};Rx.displayName=zl;var Vj="MenuAnchor",Kp=_.forwardRef((e,t)=>{const{__scopeMenu:r,...i}=e,o=gf(r);return w.jsx(xj,{...o,...i,ref:t})});Kp.displayName=Vj;var Qp="MenuPortal",[Bj,Nx]=Fi(Qp,{forceMount:void 0}),kx=e=>{const{__scopeMenu:t,forceMount:r,children:i,container:o}=e,u=Zi(Qp,t);return w.jsx(Bj,{scope:t,forceMount:r,children:w.jsx(Sa,{present:r||u.open,children:w.jsx(Jm,{asChild:!0,container:o,children:i})})})};kx.displayName=Qp;var rr="MenuContent",[$j,Jp]=Fi(rr),zx=_.forwardRef((e,t)=>{const r=Nx(rr,e.__scopeMenu),{forceMount:i=r.forceMount,...o}=e,u=Zi(rr,e.__scopeMenu),c=jl(rr,e.__scopeMenu);return w.jsx(bl.Provider,{scope:e.__scopeMenu,children:w.jsx(Sa,{present:i||u.open,children:w.jsx(bl.Slot,{scope:e.__scopeMenu,children:c.modal?w.jsx(Fj,{...o,ref:t}):w.jsx(Zj,{...o,ref:t})})})})}),Fj=_.forwardRef((e,t)=>{const r=Zi(rr,e.__scopeMenu),i=_.useRef(null),o=an(t,i);return _.useEffect(()=>{const u=i.current;if(u)return C_(u)},[]),w.jsx(eg,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Le(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Zj=_.forwardRef((e,t)=>{const r=Zi(rr,e.__scopeMenu);return w.jsx(eg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Pj=Oj("MenuContent.ScrollLock"),eg=_.forwardRef((e,t)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:o,onOpenAutoFocus:u,onCloseAutoFocus:c,disableOutsidePointerEvents:h,onEntryFocus:p,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,onDismiss:T,disableOutsideScroll:x,...E}=e,O=Zi(rr,r),D=jl(rr,r),U=gf(r),j=Mx(r),k=Uj(r),[Y,J]=_.useState(null),F=_.useRef(null),Q=an(t,F,O.onContentChange),he=_.useRef(0),_e=_.useRef(""),we=_.useRef(0),ie=_.useRef(null),ue=_.useRef("right"),fe=_.useRef(0),ye=x?ep:_.Fragment,M=x?{as:Pj,allowPinchZoom:!0}:void 0,I=re=>{const ve=_e.current+re,A=k().filter(de=>!de.disabled),q=document.activeElement,X=A.find(de=>de.ref.current===q)?.textValue,ne=A.map(de=>de.textValue),ce=r6(ne,ve,X),Te=A.find(de=>de.textValue===ce)?.ref.current;(function de(Me){_e.current=Me,window.clearTimeout(he.current),Me!==""&&(he.current=window.setTimeout(()=>de(""),1e3))})(ve),Te&&setTimeout(()=>Te.focus())};_.useEffect(()=>()=>window.clearTimeout(he.current),[]),b_();const L=_.useCallback(re=>ue.current===ie.current?.side&&i6(re,ie.current?.area),[]);return w.jsx($j,{scope:r,searchRef:_e,onItemEnter:_.useCallback(re=>{L(re)&&re.preventDefault()},[L]),onItemLeave:_.useCallback(re=>{L(re)||(F.current?.focus(),J(null))},[L]),onTriggerLeave:_.useCallback(re=>{L(re)&&re.preventDefault()},[L]),pointerGraceTimerRef:we,onPointerGraceIntentChange:_.useCallback(re=>{ie.current=re},[]),children:w.jsx(ye,{...M,children:w.jsx(Qm,{asChild:!0,trapped:o,onMountAutoFocus:Le(u,re=>{re.preventDefault(),F.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:w.jsx(Km,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:g,onInteractOutside:b,onDismiss:T,children:w.jsx(YS,{asChild:!0,...j,dir:D.dir,orientation:"vertical",loop:i,currentTabStopId:Y,onCurrentTabStopIdChange:J,onEntryFocus:Le(p,re=>{D.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(Ej,{role:"menu","aria-orientation":"vertical","data-state":Wx(O.open),"data-radix-menu-content":"",dir:D.dir,...U,...E,ref:Q,style:{outline:"none",...E.style},onKeyDown:Le(E.onKeyDown,re=>{const A=re.target.closest("[data-radix-menu-content]")===re.currentTarget,q=re.ctrlKey||re.altKey||re.metaKey,X=re.key.length===1;A&&(re.key==="Tab"&&re.preventDefault(),!q&&X&&I(re.key));const ne=F.current;if(re.target!==ne||!kj.includes(re.key))return;re.preventDefault();const Te=k().filter(de=>!de.disabled).map(de=>de.ref.current);Cx.includes(re.key)&&Te.reverse(),t6(Te)}),onBlur:Le(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(he.current),_e.current="")}),onPointerMove:Le(e.onPointerMove,_l(re=>{const ve=re.target,A=fe.current!==re.clientX;if(re.currentTarget.contains(ve)&&A){const q=re.clientX>fe.current?"right":"left";ue.current=q,fe.current=re.clientX}}))})})})})})})});zx.displayName=rr;var Gj="MenuGroup",tg=_.forwardRef((e,t)=>{const{__scopeMenu:r,...i}=e;return w.jsx(_t.div,{role:"group",...i,ref:t})});tg.displayName=Gj;var qj="MenuLabel",jx=_.forwardRef((e,t)=>{const{__scopeMenu:r,...i}=e;return w.jsx(_t.div,{...i,ref:t})});jx.displayName=qj;var Uc="MenuItem",M1="menu.itemSelect",yf=_.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:i,...o}=e,u=_.useRef(null),c=jl(Uc,e.__scopeMenu),h=Jp(Uc,e.__scopeMenu),p=an(t,u),m=_.useRef(!1),y=()=>{const g=u.current;if(!r&&g){const b=new CustomEvent(M1,{bubbles:!0,cancelable:!0});g.addEventListener(M1,T=>i?.(T),{once:!0}),p_(g,b),b.defaultPrevented?m.current=!1:c.onClose()}};return w.jsx(Ux,{...o,ref:p,disabled:r,onClick:Le(e.onClick,y),onPointerDown:g=>{e.onPointerDown?.(g),m.current=!0},onPointerUp:Le(e.onPointerUp,g=>{m.current||g.currentTarget?.click()}),onKeyDown:Le(e.onKeyDown,g=>{const b=h.searchRef.current!=="";r||b&&g.key===" "||Vm.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});yf.displayName=Uc;var Ux=_.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:i=!1,textValue:o,...u}=e,c=Jp(Uc,r),h=Mx(r),p=_.useRef(null),m=an(t,p),[y,g]=_.useState(!1),[b,T]=_.useState("");return _.useEffect(()=>{const x=p.current;x&&T((x.textContent??"").trim())},[u.children]),w.jsx(bl.ItemSlot,{scope:r,disabled:i,textValue:o??b,children:w.jsx(HS,{asChild:!0,...h,focusable:!i,children:w.jsx(_t.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:m,onPointerMove:Le(e.onPointerMove,_l(x=>{i?c.onItemLeave(x):(c.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Le(e.onPointerLeave,_l(x=>c.onItemLeave(x))),onFocus:Le(e.onFocus,()=>g(!0)),onBlur:Le(e.onBlur,()=>g(!1))})})})}),Ij="MenuCheckboxItem",Lx=_.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:i,...o}=e;return w.jsx($x,{scope:e.__scopeMenu,checked:r,children:w.jsx(yf,{role:"menuitemcheckbox","aria-checked":Lc(r)?"mixed":r,...o,ref:t,"data-state":rg(r),onSelect:Le(o.onSelect,()=>i?.(Lc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Lx.displayName=Ij;var Yx="MenuRadioGroup",[Xj,Wj]=Fi(Yx,{value:void 0,onValueChange:()=>{}}),Hx=_.forwardRef((e,t)=>{const{value:r,onValueChange:i,...o}=e,u=Yr(i);return w.jsx(Xj,{scope:e.__scopeMenu,value:r,onValueChange:u,children:w.jsx(tg,{...o,ref:t})})});Hx.displayName=Yx;var Vx="MenuRadioItem",Bx=_.forwardRef((e,t)=>{const{value:r,...i}=e,o=Wj(Vx,e.__scopeMenu),u=r===o.value;return w.jsx($x,{scope:e.__scopeMenu,checked:u,children:w.jsx(yf,{role:"menuitemradio","aria-checked":u,...i,ref:t,"data-state":rg(u),onSelect:Le(i.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Bx.displayName=Vx;var ng="MenuItemIndicator",[$x,Kj]=Fi(ng,{checked:!1}),Fx=_.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:i,...o}=e,u=Kj(ng,r);return w.jsx(Sa,{present:i||Lc(u.checked)||u.checked===!0,children:w.jsx(_t.span,{...o,ref:t,"data-state":rg(u.checked)})})});Fx.displayName=ng;var Qj="MenuSeparator",Zx=_.forwardRef((e,t)=>{const{__scopeMenu:r,...i}=e;return w.jsx(_t.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});Zx.displayName=Qj;var Jj="MenuArrow",Px=_.forwardRef((e,t)=>{const{__scopeMenu:r,...i}=e,o=gf(r);return w.jsx(Tj,{...o,...i,ref:t})});Px.displayName=Jj;var e6="MenuSub",[IY,Gx]=Fi(e6),ul="MenuSubTrigger",qx=_.forwardRef((e,t)=>{const r=Zi(ul,e.__scopeMenu),i=jl(ul,e.__scopeMenu),o=Gx(ul,e.__scopeMenu),u=Jp(ul,e.__scopeMenu),c=_.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:p}=u,m={__scopeMenu:e.__scopeMenu},y=_.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return _.useEffect(()=>y,[y]),_.useEffect(()=>{const g=h.current;return()=>{window.clearTimeout(g),p(null)}},[h,p]),w.jsx(Kp,{asChild:!0,...m,children:w.jsx(Ux,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Wx(r.open),...e,ref:oi(t,o.onTriggerChange),onClick:g=>{e.onClick?.(g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Le(e.onPointerMove,_l(g=>{u.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(u.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),y()},100))})),onPointerLeave:Le(e.onPointerLeave,_l(g=>{y();const b=r.content?.getBoundingClientRect();if(b){const T=r.content?.dataset.side,x=T==="right",E=x?-5:5,O=b[x?"left":"right"],D=b[x?"right":"left"];u.onPointerGraceIntentChange({area:[{x:g.clientX+E,y:g.clientY},{x:O,y:b.top},{x:D,y:b.top},{x:D,y:b.bottom},{x:O,y:b.bottom}],side:T}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(g),g.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:Le(e.onKeyDown,g=>{const b=u.searchRef.current!=="";e.disabled||b&&g.key===" "||zj[i.dir].includes(g.key)&&(r.onOpenChange(!0),r.content?.focus(),g.preventDefault())})})})});qx.displayName=ul;var Ix="MenuSubContent",Xx=_.forwardRef((e,t)=>{const r=Nx(rr,e.__scopeMenu),{forceMount:i=r.forceMount,...o}=e,u=Zi(rr,e.__scopeMenu),c=jl(rr,e.__scopeMenu),h=Gx(Ix,e.__scopeMenu),p=_.useRef(null),m=an(t,p);return w.jsx(bl.Provider,{scope:e.__scopeMenu,children:w.jsx(Sa,{present:i||u.open,children:w.jsx(bl.Slot,{scope:e.__scopeMenu,children:w.jsx(eg,{id:h.contentId,"aria-labelledby":h.triggerId,...o,ref:m,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{c.isUsingKeyboardRef.current&&p.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:Le(e.onFocusOutside,y=>{y.target!==h.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:Le(e.onEscapeKeyDown,y=>{c.onClose(),y.preventDefault()}),onKeyDown:Le(e.onKeyDown,y=>{const g=y.currentTarget.contains(y.target),b=jj[c.dir].includes(y.key);g&&b&&(u.onOpenChange(!1),h.trigger?.focus(),y.preventDefault())})})})})})});Xx.displayName=Ix;function Wx(e){return e?"open":"closed"}function Lc(e){return e==="indeterminate"}function rg(e){return Lc(e)?"indeterminate":e?"checked":"unchecked"}function t6(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function n6(e,t){return e.map((r,i)=>e[(t+i)%e.length])}function r6(e,t,r){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,u=r?e.indexOf(r):-1;let c=n6(e,Math.max(u,0));o.length===1&&(c=c.filter(m=>m!==r));const p=c.find(m=>m.toLowerCase().startsWith(o.toLowerCase()));return p!==r?p:void 0}function a6(e,t){const{x:r,y:i}=e;let o=!1;for(let u=0,c=t.length-1;ui!=b>i&&r<(g-m)*(i-y)/(b-y)+m&&(o=!o)}return o}function i6(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return a6(r,t)}function _l(e){return t=>t.pointerType==="mouse"?e(t):void 0}var s6=Rx,o6=Kp,l6=kx,u6=zx,c6=tg,f6=jx,d6=yf,h6=Lx,m6=Hx,p6=Bx,g6=Fx,y6=Zx,v6=Px,b6=qx,_6=Xx,vf="DropdownMenu",[w6]=Bi(vf,[Dx]),mn=Dx(),[S6,Kx]=w6(vf),Qx=e=>{const{__scopeDropdownMenu:t,children:r,dir:i,open:o,defaultOpen:u,onOpenChange:c,modal:h=!0}=e,p=mn(t),m=_.useRef(null),[y,g]=Zc({prop:o,defaultProp:u??!1,onChange:c,caller:vf});return w.jsx(S6,{scope:t,triggerId:ki(),triggerRef:m,contentId:ki(),open:y,onOpenChange:g,onOpenToggle:_.useCallback(()=>g(b=>!b),[g]),modal:h,children:w.jsx(s6,{...p,open:y,onOpenChange:g,dir:i,modal:h,children:r})})};Qx.displayName=vf;var Jx="DropdownMenuTrigger",eE=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...o}=e,u=Kx(Jx,r),c=mn(r);return w.jsx(o6,{asChild:!0,...c,children:w.jsx(_t.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:oi(t,u.triggerRef),onPointerDown:Le(e.onPointerDown,h=>{!i&&h.button===0&&h.ctrlKey===!1&&(u.onOpenToggle(),u.open||h.preventDefault())}),onKeyDown:Le(e.onKeyDown,h=>{i||(["Enter"," "].includes(h.key)&&u.onOpenToggle(),h.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});eE.displayName=Jx;var x6="DropdownMenuPortal",tE=e=>{const{__scopeDropdownMenu:t,...r}=e,i=mn(t);return w.jsx(l6,{...i,...r})};tE.displayName=x6;var nE="DropdownMenuContent",rE=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=Kx(nE,r),u=mn(r),c=_.useRef(!1);return w.jsx(u6,{id:o.contentId,"aria-labelledby":o.triggerId,...u,...i,ref:t,onCloseAutoFocus:Le(e.onCloseAutoFocus,h=>{c.current||o.triggerRef.current?.focus(),c.current=!1,h.preventDefault()}),onInteractOutside:Le(e.onInteractOutside,h=>{const p=h.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0,y=p.button===2||m;(!o.modal||y)&&(c.current=!0)}),style:{...e.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)"}})});rE.displayName=nE;var E6="DropdownMenuGroup",T6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(c6,{...o,...i,ref:t})});T6.displayName=E6;var O6="DropdownMenuLabel",A6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(f6,{...o,...i,ref:t})});A6.displayName=O6;var C6="DropdownMenuItem",aE=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(d6,{...o,...i,ref:t})});aE.displayName=C6;var D6="DropdownMenuCheckboxItem",M6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(h6,{...o,...i,ref:t})});M6.displayName=D6;var R6="DropdownMenuRadioGroup",N6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(m6,{...o,...i,ref:t})});N6.displayName=R6;var k6="DropdownMenuRadioItem",z6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(p6,{...o,...i,ref:t})});z6.displayName=k6;var j6="DropdownMenuItemIndicator",U6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(g6,{...o,...i,ref:t})});U6.displayName=j6;var L6="DropdownMenuSeparator",iE=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(y6,{...o,...i,ref:t})});iE.displayName=L6;var Y6="DropdownMenuArrow",H6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(v6,{...o,...i,ref:t})});H6.displayName=Y6;var V6="DropdownMenuSubTrigger",B6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(b6,{...o,...i,ref:t})});B6.displayName=V6;var $6="DropdownMenuSubContent",F6=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,o=mn(r);return w.jsx(_6,{...o,...i,ref:t,style:{...e.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)"}})});F6.displayName=$6;var Z6=Qx,P6=eE,G6=tE,q6=rE,I6=aE,X6=iE;function W6(e){const t=Ve.c(4);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==r?(i=w.jsx(Z6,{"data-slot":"dropdown-menu",...r}),t[2]=r,t[3]=i):i=t[3],i}function K6(e){const t=Ve.c(4);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==r?(i=w.jsx(P6,{"data-slot":"dropdown-menu-trigger",...r}),t[2]=r,t[3]=i):i=t[3],i}function Q6(e){const t=Ve.c(10);let r,i,o;t[0]!==e?({className:r,sideOffset:o,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o):(r=t[1],i=t[2],o=t[3]);const u=o===void 0?4:o;let c;t[4]!==r?(c=rt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",r),t[4]=r,t[5]=c):c=t[5];let h;return t[6]!==i||t[7]!==u||t[8]!==c?(h=w.jsx(G6,{children:w.jsx(q6,{"data-slot":"dropdown-menu-content",sideOffset:u,className:c,...i})}),t[6]=i,t[7]=u,t[8]=c,t[9]=h):h=t[9],h}function hm(e){const t=Ve.c(12);let r,i,o,u;t[0]!==e?({className:r,inset:i,variant:u,...o}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=u):(r=t[1],i=t[2],o=t[3],u=t[4]);const c=u===void 0?"default":u;let h;t[5]!==r?(h=rt("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),t[5]=r,t[6]=h):h=t[6];let p;return t[7]!==i||t[8]!==o||t[9]!==h||t[10]!==c?(p=w.jsx(I6,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":c,className:h,...o}),t[7]=i,t[8]=o,t[9]=h,t[10]=c,t[11]=p):p=t[11],p}function J6(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("bg-border -mx-1 my-1 h-px",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(X6,{"data-slot":"dropdown-menu-separator",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}const sE=RS(e=>({currentUser:null,setCurrentUser:t=>e(()=>({currentUser:t}))}));function e5(e){const t=Ve.c(22),{value:r}=e;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],t[0]=i):i=t[0];const[o,u]=_.useState(i),{currentUser:c,setCurrentUser:h}=sE();let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=async()=>{try{const{data:Y}=await Qs.users();u(Y)}catch(Y){console.log(Y)}},t[1]=p):p=t[1];const m=p;let y;t[2]!==c||t[3]!==h?(y=Y=>{c&&Y.id===c.id?h(null):h(Y)},t[2]=c,t[3]=h,t[4]=y):y=t[4];const g=y,b=a5,T=r5,x=n5;let E,O;t[5]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{m()},O=[],t[5]=E,t[6]=O):(E=t[5],O=t[6]),_.useEffect(E,O);let D;if(t[7]!==c?.id||t[8]!==g||t[9]!==o){let Y;t[11]!==c?.id||t[12]!==g?(Y=J=>w.jsx(MS,{className:rt("p-4 cursor-pointer transition-all duration-200 hover:shadow-md hover:scale-[1.01] select-none",c?.id===J.id&&"bg-blue-50 dark:bg-blue-950 border-blue-500 shadow-md"),onClick:()=>g(J),children:w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsxs(e3,{className:"size-12",children:[w.jsx(t3,{src:`https://ms.prology.net/image/storage/${J?.avatar}`||""}),w.jsxs(n3,{children:[" ",J.name.charAt(0)]})]}),w.jsxs("div",{className:"flex-1",children:[w.jsx("h4",{className:"font-semibold text-gray-900 dark:text-gray-100",children:J.name}),w.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:J.email})]}),w.jsxs(W6,{children:[w.jsx(K6,{asChild:!0,onClick:t5,children:w.jsxs(hn,{variant:"ghost",size:"icon",className:"h-8 w-8",children:[w.jsx(uC,{className:"h-4 w-4"}),w.jsx("span",{className:"sr-only",children:"Mở menu"})]})}),w.jsxs(Q6,{align:"end",className:"w-48",children:[w.jsxs(hm,{onClick:F=>x(J,F),children:[w.jsx(CC,{className:"mr-2 h-4 w-4"}),w.jsx("span",{children:"Xem chi tiết"})]}),w.jsxs(hm,{onClick:F=>b(J,F),children:[w.jsx(wC,{className:"mr-2 h-4 w-4"}),w.jsx("span",{children:"Chỉnh sửa"})]}),w.jsx(J6,{}),w.jsxs(hm,{onClick:F=>T(J,F),className:"text-red-600 focus:text-red-600 dark:text-red-400 dark:focus:text-red-400",children:[w.jsx(TC,{className:"mr-2 h-4 w-4"}),w.jsx("span",{children:"Xóa"})]})]})]})]})},J.id),t[11]=c?.id,t[12]=g,t[13]=Y):Y=t[13],D=o.map(Y),t[7]=c?.id,t[8]=g,t[9]=o,t[10]=D}else D=t[10];let U;t[14]!==D?(U=w.jsx("div",{className:"flex flex-col gap-2 flex-1 p-4 space-y-2 overflow-y-auto h-[90vh]",children:D}),t[14]=D,t[15]=U):U=t[15];let j;t[16]!==o.length?(j=o.length<=0&&w.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[w.jsx(X_,{className:"size-16 mb-3"}),w.jsx("p",{children:"Chưa có dữ liệu điểm danh"})]}),t[16]=o.length,t[17]=j):j=t[17];let k;return t[18]!==U||t[19]!==j||t[20]!==r?(k=w.jsxs(JS,{value:r,className:"",children:[U,j]}),t[18]=U,t[19]=j,t[20]=r,t[21]=k):k=t[21],k}function t5(e){return e.stopPropagation()}function n5(e,t){t.stopPropagation(),console.log("View details:",e)}function r5(e,t){t.stopPropagation(),console.log("Delete user:",e)}function a5(e,t){t.stopPropagation(),console.log("Edit user:",e)}function i5(e){const t=Ve.c(5),{isSidebarOpen:r}=e,i=r?"translate-x-0":"-translate-x-full";let o;t[0]!==i?(o=rt("fixed left-0 top-0 h-screen w-96 bg-white border-r border-gray-200 shadow-xl transition-transform duration-300 ease-in-out z-10",i),t[0]=i,t[1]=o):o=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=w.jsx("div",{className:"h-full flex flex-col",children:w.jsxs(WS,{defaultValue:"users",className:"flex-1 flex flex-col",children:[w.jsx("div",{className:"border-b p-4",children:w.jsx(KS,{className:"grid w-full grid-cols-1",children:w.jsxs(QS,{value:"users",className:"flex items-center gap-1 text-xs",children:[w.jsx(X_,{className:"size-3.5"}),"User"]})})}),w.jsx(e5,{value:"users"})]})}),t[2]=u):u=t[2];let c;return t[3]!==o?(c=w.jsx("div",{className:o,children:u}),t[3]=o,t[4]=c):c=t[4],c}const s5=aS("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function o5(e){const t=Ve.c(12);let r,i,o,u;t[0]!==e?({className:r,variant:u,asChild:o,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=u):(r=t[1],i=t[2],o=t[3],u=t[4]);const h=(o===void 0?!1:o)?zp:"span";let p;t[5]!==r||t[6]!==u?(p=rt(s5({variant:u}),r),t[5]=r,t[6]=u,t[7]=p):p=t[7];let m;return t[8]!==h||t[9]!==i||t[10]!==p?(m=w.jsx(h,{"data-slot":"badge",className:p,...i}),t[8]=h,t[9]=i,t[10]=p,t[11]=m):m=t[11],m}function l5({value:e}){const[t,r]=_.useState([]),{refreshLog:i,setRefreshLog:o}=ai(),u=async()=>{try{const{data:c}=await Qs.logs();r(c),o(!1)}catch(c){console.log(c)}};return _.useEffect(()=>{u()},[]),_.useEffect(()=>{i&&u()},[i]),w.jsx(JS,{value:e,className:"",children:w.jsx("div",{className:"flex flex-col gap-2 flex-1 p-4 space-y-2 overflow-y-auto h-[90vh]",children:t.length===0?w.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[w.jsx(G_,{className:"size-16 mb-3"}),w.jsx("p",{children:"Chưa có dữ liệu điểm danh"})]}):t.map((c,h)=>w.jsxs("div",{className:rt("p-3 rounded-lg border transition-all duration-200",h===0?"bg-blue-50 border-blue-200":"bg-gray-50 border-gray-200"),children:[w.jsxs("div",{className:"flex items-center justify-between mb-1",children:[w.jsx("span",{className:"font-medium text-gray-900",children:c.name}),w.jsx(o5,{className:"capitalize",variant:c.status==="check out"?"destructive":"secondary",children:c.status})]}),w.jsx("p",{className:"text-sm text-gray-600",children:tS(c.time)})]},h))})})}function u5(e){const t=Ve.c(5),{isSidebarOpen:r}=e,i=r?"translate-x-0":"translate-x-full";let o;t[0]!==i?(o=rt("fixed right-0 top-0 h-screen w-96 bg-white border-l border-gray-200 shadow-xl transition-transform duration-300 ease-in-out",i),t[0]=i,t[1]=o):o=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=w.jsx("div",{className:"h-full flex flex-col",children:w.jsxs(WS,{value:"logs",defaultValue:"features",className:"flex-1 flex flex-col",children:[w.jsx("div",{className:"border-b p-4",children:w.jsx(KS,{className:"grid w-full grid-cols-1",children:w.jsxs(QS,{value:"logs",className:"flex items-center gap-1 text-xs",children:[w.jsx(G_,{className:"size-3.5"}),"Log"]})})}),w.jsx(l5,{value:"logs"})]})}),t[2]=u):u=t[2];let c;return t[3]!==o?(c=w.jsx("div",{className:o,children:u}),t[3]=o,t[4]=c):c=t[4],c}function c5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const f5=e=>{switch(e){case"success":return m5;case"info":return g5;case"warning":return p5;case"error":return y5;default:return null}},d5=Array(12).fill(0),h5=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},d5.map((r,i)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),m5=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),p5=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),g5=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),y5=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),v5=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),b5=()=>{const[e,t]=W.useState(document.hidden);return W.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Bm=1;class _5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:i,...o}=t,u=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Bm++,c=this.toasts.find(p=>p.id===u),h=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),c?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...t,id:u,title:i}),{...p,...t,id:u,dismissible:h,title:i}):p):this.addToast({title:i,...o,dismissible:h,id:u}),u},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let u=i!==void 0,c;const h=o.then(async m=>{if(c=["resolve",m],W.isValidElement(m))u=!1,this.create({id:i,type:"default",message:m});else if(S5(m)&&!m.ok){u=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,x=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...x})}else if(m instanceof Error){u=!1;const g=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,x=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...x})}else if(r.success!==void 0){u=!1;const g=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,x=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:i,type:"success",description:b,...x})}}).catch(async m=>{if(c=["reject",m],r.error!==void 0){u=!1;const y=typeof r.error=="function"?await r.error(m):r.error,g=typeof r.description=="function"?await r.description(m):r.description,T=typeof y=="object"&&!W.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:g,...T})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((m,y)=>h.then(()=>c[0]==="reject"?y(c[1]):m(c[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:p}:Object.assign(i,{unwrap:p})},this.custom=(t,r)=>{const i=r?.id||Bm++;return this.create({jsx:t(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Cn=new _5,w5=(e,t)=>{const r=t?.id||Bm++;return Cn.addToast({title:e,...t,id:r}),r},S5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",x5=w5,E5=()=>Cn.toasts,T5=()=>Cn.getActiveToasts(),ma=Object.assign(x5,{success:Cn.success,info:Cn.info,warning:Cn.warning,error:Cn.error,custom:Cn.custom,message:Cn.message,promise:Cn.promise,dismiss:Cn.dismiss,loading:Cn.loading},{getHistory:E5,getToasts:T5});c5("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sc(e){return e.label!==void 0}const O5=3,A5="24px",C5="16px",R1=4e3,D5=356,M5=14,R5=45,N5=200;function kr(...e){return e.filter(Boolean).join(" ")}function k5(e){const[t,r]=e.split("-"),i=[];return t&&i.push(t),r&&i.push(r),i}const z5=e=>{var t,r,i,o,u,c,h,p,m;const{invert:y,toast:g,unstyled:b,interacting:T,setHeights:x,visibleToasts:E,heights:O,index:D,toasts:U,expanded:j,removeToast:k,defaultRichColors:Y,closeButton:J,style:F,cancelButtonStyle:Q,actionButtonStyle:he,className:_e="",descriptionClassName:we="",duration:ie,position:ue,gap:fe,expandByDefault:ye,classNames:M,icons:I,closeButtonAriaLabel:L="Close toast"}=e,[re,ve]=W.useState(null),[A,q]=W.useState(null),[X,ne]=W.useState(!1),[ce,Te]=W.useState(!1),[de,Me]=W.useState(!1),[Be,Ct]=W.useState(!1),[Qt,kt]=W.useState(!1),[or,pn]=W.useState(0),[Ta,Oa]=W.useState(0),Pr=W.useRef(g.duration||ie||R1),qi=W.useRef(null),sn=W.useRef(null),R=D===0,B=D+1<=E,G=g.type,me=g.dismissible!==!1,se=g.className||"",le=g.descriptionClassName||"",Oe=W.useMemo(()=>O.findIndex(Ne=>Ne.toastId===g.id)||0,[O,g.id]),Xe=W.useMemo(()=>{var Ne;return(Ne=g.closeButton)!=null?Ne:J},[g.closeButton,J]),We=W.useMemo(()=>g.duration||ie||R1,[g.duration,ie]),qt=W.useRef(0),gn=W.useRef(0),Nn=W.useRef(0),Tr=W.useRef(null),[lr,Vt]=ue.split("-"),kn=W.useMemo(()=>O.reduce((Ne,yt,It)=>It>=Oe?Ne:Ne+yt.height,0),[O,Oe]),Bt=b5(),co=g.invert||y,Aa=G==="loading";gn.current=W.useMemo(()=>Oe*fe+kn,[Oe,kn]),W.useEffect(()=>{Pr.current=We},[We]),W.useEffect(()=>{ne(!0)},[]),W.useEffect(()=>{const Ne=sn.current;if(Ne){const yt=Ne.getBoundingClientRect().height;return Oa(yt),x(It=>[{toastId:g.id,height:yt,position:g.position},...It]),()=>x(It=>It.filter(on=>on.toastId!==g.id))}},[x,g.id]),W.useLayoutEffect(()=>{if(!X)return;const Ne=sn.current,yt=Ne.style.height;Ne.style.height="auto";const It=Ne.getBoundingClientRect().height;Ne.style.height=yt,Oa(It),x(on=>on.find(St=>St.toastId===g.id)?on.map(St=>St.toastId===g.id?{...St,height:It}:St):[{toastId:g.id,height:It,position:g.position},...on])},[X,g.title,g.description,x,g.id,g.jsx,g.action,g.cancel]);const Or=W.useCallback(()=>{Te(!0),pn(gn.current),x(Ne=>Ne.filter(yt=>yt.toastId!==g.id)),setTimeout(()=>{k(g)},N5)},[g,k,x,gn]);W.useEffect(()=>{if(g.promise&&G==="loading"||g.duration===1/0||g.type==="loading")return;let Ne;return j||T||Bt?(()=>{if(Nn.current{Pr.current!==1/0&&(qt.current=new Date().getTime(),Ne=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Or()},Pr.current))})(),()=>clearTimeout(Ne)},[j,T,g,G,Bt,Or]),W.useEffect(()=>{g.delete&&(Or(),g.onDismiss==null||g.onDismiss.call(g,g))},[Or,g.delete]);function Ii(){var Ne;if(I?.loading){var yt;return W.createElement("div",{className:kr(M?.loader,g==null||(yt=g.classNames)==null?void 0:yt.loader,"sonner-loader"),"data-visible":G==="loading"},I.loading)}return W.createElement(h5,{className:kr(M?.loader,g==null||(Ne=g.classNames)==null?void 0:Ne.loader),visible:G==="loading"})}const Xi=g.icon||I?.[G]||f5(G);var ui,Ar;return W.createElement("li",{tabIndex:0,ref:sn,className:kr(_e,se,M?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,M?.default,M?.[G],g==null||(r=g.classNames)==null?void 0:r[G]),"data-sonner-toast":"","data-rich-colors":(ui=g.richColors)!=null?ui:Y,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":X,"data-promise":!!g.promise,"data-swiped":Qt,"data-removed":ce,"data-visible":B,"data-y-position":lr,"data-x-position":Vt,"data-index":D,"data-front":R,"data-swiping":de,"data-dismissible":me,"data-type":G,"data-invert":co,"data-swipe-out":Be,"data-swipe-direction":A,"data-expanded":!!(j||ye&&X),"data-testid":g.testId,style:{"--index":D,"--toasts-before":D,"--z-index":U.length-D,"--offset":`${ce?or:gn.current}px`,"--initial-height":ye?"auto":`${Ta}px`,...F,...g.style},onDragEnd:()=>{Me(!1),ve(null),Tr.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Aa||!me||(qi.current=new Date,pn(gn.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Me(!0),Tr.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,yt,It;if(Be||!me)return;Tr.current=null;const on=Number(((Ne=sn.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ca=Number(((yt=sn.current)==null?void 0:yt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),St=new Date().getTime()-((It=qi.current)==null?void 0:It.getTime()),yn=re==="x"?on:Ca,ci=Math.abs(yn)/St;if(Math.abs(yn)>=R5||ci>.11){pn(gn.current),g.onDismiss==null||g.onDismiss.call(g,g),q(re==="x"?on>0?"right":"left":Ca>0?"down":"up"),Or(),Ct(!0);return}else{var vn,bn;(vn=sn.current)==null||vn.style.setProperty("--swipe-amount-x","0px"),(bn=sn.current)==null||bn.style.setProperty("--swipe-amount-y","0px")}kt(!1),Me(!1),ve(null)},onPointerMove:Ne=>{var yt,It,on;if(!Tr.current||!me||((yt=window.getSelection())==null?void 0:yt.toString().length)>0)return;const St=Ne.clientY-Tr.current.y,yn=Ne.clientX-Tr.current.x;var ci;const vn=(ci=e.swipeDirections)!=null?ci:k5(ue);!re&&(Math.abs(yn)>1||Math.abs(St)>1)&&ve(Math.abs(yn)>Math.abs(St)?"x":"y");let bn={x:0,y:0};const Wi=ur=>1/(1.5+Math.abs(ur)/20);if(re==="y"){if(vn.includes("top")||vn.includes("bottom"))if(vn.includes("top")&&St<0||vn.includes("bottom")&&St>0)bn.y=St;else{const ur=St*Wi(St);bn.y=Math.abs(ur)0)bn.x=yn;else{const ur=yn*Wi(yn);bn.x=Math.abs(ur)0||Math.abs(bn.y)>0)&&kt(!0),(It=sn.current)==null||It.style.setProperty("--swipe-amount-x",`${bn.x}px`),(on=sn.current)==null||on.style.setProperty("--swipe-amount-y",`${bn.y}px`)}},Xe&&!g.jsx&&G!=="loading"?W.createElement("button",{"aria-label":L,"data-disabled":Aa,"data-close-button":!0,onClick:Aa||!me?()=>{}:()=>{Or(),g.onDismiss==null||g.onDismiss.call(g,g)},className:kr(M?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(Ar=I?.close)!=null?Ar:v5):null,(G||g.icon||g.promise)&&g.icon!==null&&(I?.[G]!==null||g.icon)?W.createElement("div",{"data-icon":"",className:kr(M?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Ii():null,g.type!=="loading"?Xi:null):null,W.createElement("div",{"data-content":"",className:kr(M?.content,g==null||(u=g.classNames)==null?void 0:u.content)},W.createElement("div",{"data-title":"",className:kr(M?.title,g==null||(c=g.classNames)==null?void 0:c.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?W.createElement("div",{"data-description":"",className:kr(we,le,M?.description,g==null||(h=g.classNames)==null?void 0:h.description)},typeof g.description=="function"?g.description():g.description):null),W.isValidElement(g.cancel)?g.cancel:g.cancel&&sc(g.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||Q,onClick:Ne=>{sc(g.cancel)&&me&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Ne),Or())},className:kr(M?.cancelButton,g==null||(p=g.classNames)==null?void 0:p.cancelButton)},g.cancel.label):null,W.isValidElement(g.action)?g.action:g.action&&sc(g.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||he,onClick:Ne=>{sc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Ne),!Ne.defaultPrevented&&Or())},className:kr(M?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function N1(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function j5(e,t){const r={};return[e,t].forEach((i,o)=>{const u=o===1,c=u?"--mobile-offset":"--offset",h=u?C5:A5;function p(m){["top","right","bottom","left"].forEach(y=>{r[`${c}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?p(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?r[`${c}-${m}`]=h:r[`${c}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):p(h)}),r}const U5=W.forwardRef(function(t,r){const{id:i,invert:o,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:h,closeButton:p,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:T,duration:x,style:E,visibleToasts:O=O5,toastOptions:D,dir:U=N1(),gap:j=M5,icons:k,containerAriaLabel:Y="Notifications"}=t,[J,F]=W.useState([]),Q=W.useMemo(()=>i?J.filter(X=>X.toasterId===i):J.filter(X=>!X.toasterId),[J,i]),he=W.useMemo(()=>Array.from(new Set([u].concat(Q.filter(X=>X.position).map(X=>X.position)))),[Q,u]),[_e,we]=W.useState([]),[ie,ue]=W.useState(!1),[fe,ye]=W.useState(!1),[M,I]=W.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),L=W.useRef(null),re=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=W.useRef(null),A=W.useRef(!1),q=W.useCallback(X=>{F(ne=>{var ce;return(ce=ne.find(Te=>Te.id===X.id))!=null&&ce.delete||Cn.dismiss(X.id),ne.filter(({id:Te})=>Te!==X.id)})},[]);return W.useEffect(()=>Cn.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{F(ne=>ne.map(ce=>ce.id===X.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{m_.flushSync(()=>{F(ne=>{const ce=ne.findIndex(Te=>Te.id===X.id);return ce!==-1?[...ne.slice(0,ce),{...ne[ce],...X},...ne.slice(ce+1)]:[X,...ne]})})})}),[J]),W.useEffect(()=>{if(b!=="system"){I(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?I("dark"):I("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:ne})=>{I(ne?"dark":"light")})}catch{X.addListener(({matches:ce})=>{try{I(ce?"dark":"light")}catch(Te){console.error(Te)}})}},[b]),W.useEffect(()=>{J.length<=1&&ue(!1)},[J]),W.useEffect(()=>{const X=ne=>{var ce;if(c.every(Me=>ne[Me]||ne.code===Me)){var de;ue(!0),(de=L.current)==null||de.focus()}ne.code==="Escape"&&(document.activeElement===L.current||(ce=L.current)!=null&&ce.contains(document.activeElement))&&ue(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[c]),W.useEffect(()=>{if(L.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,A.current=!1)}},[L.current]),W.createElement("section",{ref:r,"aria-label":`${Y} ${re}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},he.map((X,ne)=>{var ce;const[Te,de]=X.split("-");return Q.length?W.createElement("ol",{key:X,dir:U==="auto"?N1():U,tabIndex:-1,ref:L,className:m,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":Te,"data-x-position":de,style:{"--front-toast-height":`${((ce=_e[0])==null?void 0:ce.height)||0}px`,"--width":`${D5}px`,"--gap":`${j}px`,...E,...j5(y,g)},onBlur:Me=>{A.current&&!Me.currentTarget.contains(Me.relatedTarget)&&(A.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Me=>{Me.target instanceof HTMLElement&&Me.target.dataset.dismissible==="false"||A.current||(A.current=!0,ve.current=Me.relatedTarget)},onMouseEnter:()=>ue(!0),onMouseMove:()=>ue(!0),onMouseLeave:()=>{fe||ue(!1)},onDragEnd:()=>ue(!1),onPointerDown:Me=>{Me.target instanceof HTMLElement&&Me.target.dataset.dismissible==="false"||ye(!0)},onPointerUp:()=>ye(!1)},Q.filter(Me=>!Me.position&&ne===0||Me.position===X).map((Me,Be)=>{var Ct,Qt;return W.createElement(z5,{key:Me.id,icons:k,index:Be,toast:Me,defaultRichColors:T,duration:(Ct=D?.duration)!=null?Ct:x,className:D?.className,descriptionClassName:D?.descriptionClassName,invert:o,visibleToasts:O,closeButton:(Qt=D?.closeButton)!=null?Qt:p,interacting:fe,position:X,style:D?.style,unstyled:D?.unstyled,classNames:D?.classNames,cancelButtonStyle:D?.cancelButtonStyle,actionButtonStyle:D?.actionButtonStyle,closeButtonAriaLabel:D?.closeButtonAriaLabel,removeToast:q,toasts:Q.filter(kt=>kt.position==Me.position),heights:_e.filter(kt=>kt.position==Me.position),setHeights:we,expandByDefault:h,gap:j,expanded:ie,swipeDirections:t.swipeDirections})})):null}))});function L5(e){const t=Ve.c(19),{children:r,onClose:i}=e,[o,u]=_.useState(!1),{setIsCountDown:c}=ai();let h;t[0]!==i?(h=()=>{u(!1),i?.()},t[0]=i,t[1]=h):h=t[1];const p=h;let m;t[2]!==p||t[3]!==c?(m=()=>{c(!0),p()},t[2]=p,t[3]=c,t[4]=m):m=t[4];const y=m;let g;t[5]!==r?(g=w.jsx(nS,{children:r}),t[5]=r,t[6]=g):g=t[6];let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b=w.jsxs(Mp,{children:[w.jsx("div",{className:"flex items-center justify-center mb-4",children:w.jsx("div",{className:"rounded-full border p-3",children:w.jsx(ap,{className:"w-6 h-6 "})})}),w.jsx(Rp,{className:"text-center text-lg",children:"Thông báo quan trọng"}),w.jsx(Np,{className:"text-center text-base pt-2",children:"Để có kết quả tốt nhất bạn hay nhìn thẳng vào camera nhé"})]}),t[7]=b):b=t[7];let T;t[8]!==p?(T=w.jsx(hn,{variant:"outline",onClick:p,className:"min-w-32 bg-transparent",children:"Hủy"}),t[8]=p,t[9]=T):T=t[9];let x;t[10]!==y?(x=w.jsx(hn,{onClick:y,className:"min-w-32",children:"Tiếp tục"}),t[10]=y,t[11]=x):x=t[11];let E;t[12]!==T||t[13]!==x?(E=w.jsxs(Dp,{className:"sm:max-w-md",children:[b,w.jsxs("div",{className:"flex justify-center gap-3 pt-4",children:[T,x]})]}),t[12]=T,t[13]=x,t[14]=E):E=t[14];let O;return t[15]!==o||t[16]!==g||t[17]!==E?(O=w.jsxs(Cp,{open:o,onOpenChange:u,children:[g,E]}),t[15]=o,t[16]=g,t[17]=E,t[18]=O):O=t[18],O}var Ul=e=>e.type==="checkbox",Ni=e=>e instanceof Date,Dn=e=>e==null;const oE=e=>typeof e=="object";var Ht=e=>!Dn(e)&&!Array.isArray(e)&&oE(e)&&!Ni(e),lE=e=>Ht(e)&&e.target?Ul(e.target)?e.target.checked:e.target.value:e,Y5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,uE=(e,t)=>e.has(Y5(t)),H5=e=>{const t=e.constructor&&e.constructor.prototype;return Ht(t)&&t.hasOwnProperty("isPrototypeOf")},ag=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Zt(e){let t;const r=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(ag&&(e instanceof Blob||i))&&(r||Ht(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!H5(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Zt(e[o]));else return e;return t}var bf=e=>/^\w*$/.test(e),Ot=e=>e===void 0,ig=e=>Array.isArray(e)?e.filter(Boolean):[],sg=e=>ig(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pe=(e,t,r)=>{if(!t||!Ht(e))return r;const i=(bf(t)?[t]:sg(t)).reduce((o,u)=>Dn(o)?o:o[u],e);return Ot(i)||i===e?Ot(e[t])?r:e[t]:i},Bn=e=>typeof e=="boolean",st=(e,t,r)=>{let i=-1;const o=bf(t)?[t]:sg(t),u=o.length,c=u-1;for(;++iW.useContext(og),V5=e=>{const{children:t,...r}=e;return W.createElement(og.Provider,{value:r},t)};var cE=(e,t,r,i=!0)=>{const o={defaultValues:t._defaultValues};for(const u in e)Object.defineProperty(o,u,{get:()=>{const c=u;return t._proxyFormState[c]!==hr.all&&(t._proxyFormState[c]=!i||hr.all),r&&(r[c]=!0),e[c]}});return o};const lg=typeof window<"u"?W.useLayoutEffect:W.useEffect;function fE(e){const t=_f(),{control:r=t.control,disabled:i,name:o,exact:u}=e||{},[c,h]=W.useState(r._formState),p=W.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return lg(()=>r._subscribe({name:o,formState:p.current,exact:u,callback:m=>{!i&&h({...r._formState,...m})}}),[o,i,u]),W.useEffect(()=>{p.current.isValid&&r._setValid(!0)},[r]),W.useMemo(()=>cE(c,r,p.current,!1),[c,r])}var Fn=e=>typeof e=="string",$m=(e,t,r,i,o)=>Fn(e)?(i&&t.watch.add(e),pe(r,e,o)):Array.isArray(e)?e.map(u=>(i&&t.watch.add(u),pe(r,u))):(i&&(t.watchAll=!0),r),Fm=e=>Dn(e)||!oE(e);function mr(e,t,r=new WeakSet){if(Fm(e)||Fm(t))return Object.is(e,t);if(Ni(e)&&Ni(t))return e.getTime()===t.getTime();const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const u of i){const c=e[u];if(!o.includes(u))return!1;if(u!=="ref"){const h=t[u];if(Ni(c)&&Ni(h)||Ht(c)&&Ht(h)||Array.isArray(c)&&Array.isArray(h)?!mr(c,h,r):!Object.is(c,h))return!1}}return!0}function B5(e){const t=_f(),{control:r=t.control,name:i,defaultValue:o,disabled:u,exact:c,compute:h}=e||{},p=W.useRef(o),m=W.useRef(h),y=W.useRef(void 0),g=W.useRef(r),b=W.useRef(i);m.current=h;const[T,x]=W.useState(()=>{const k=r._getWatch(i,p.current);return m.current?m.current(k):k}),E=W.useCallback(k=>{const Y=$m(i,r._names,k||r._formValues,!1,p.current);return m.current?m.current(Y):Y},[r._formValues,r._names,i]),O=W.useCallback(k=>{if(!u){const Y=$m(i,r._names,k||r._formValues,!1,p.current);if(m.current){const J=m.current(Y);mr(J,y.current)||(x(J),y.current=J)}else x(Y)}},[r._formValues,r._names,u,i]);lg(()=>((g.current!==r||!mr(b.current,i))&&(g.current=r,b.current=i,O()),r._subscribe({name:i,formState:{values:!0},exact:c,callback:k=>{O(k.values)}})),[r,c,i,O]),W.useEffect(()=>r._removeUnmounted());const D=g.current!==r,U=b.current,j=W.useMemo(()=>{if(u)return null;const k=!D&&!mr(U,i);return D||k?E():null},[u,D,i,U,E]);return j!==null?j:T}function $5(e){const t=_f(),{name:r,disabled:i,control:o=t.control,shouldUnregister:u,defaultValue:c,exact:h=!0}=e,p=uE(o._names.array,r),m=W.useMemo(()=>pe(o._formValues,r,pe(o._defaultValues,r,c)),[o,r,c]),y=B5({control:o,name:r,defaultValue:m,exact:h}),g=fE({control:o,name:r,exact:h}),b=W.useRef(e),T=W.useRef(void 0),x=W.useRef(o.register(r,{...e.rules,value:y,...Bn(e.disabled)?{disabled:e.disabled}:{}}));b.current=e;const E=W.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!pe(g.errors,r)},isDirty:{enumerable:!0,get:()=>!!pe(g.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!pe(g.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!pe(g.validatingFields,r)},error:{enumerable:!0,get:()=>pe(g.errors,r)}}),[g,r]),O=W.useCallback(k=>x.current.onChange({target:{value:lE(k),name:r},type:Yc.CHANGE}),[r]),D=W.useCallback(()=>x.current.onBlur({target:{value:pe(o._formValues,r),name:r},type:Yc.BLUR}),[r,o._formValues]),U=W.useCallback(k=>{const Y=pe(o._fields,r);Y&&k&&(Y._f.ref={focus:()=>k.focus&&k.focus(),select:()=>k.select&&k.select(),setCustomValidity:J=>k.setCustomValidity(J),reportValidity:()=>k.reportValidity()})},[o._fields,r]),j=W.useMemo(()=>({name:r,value:y,...Bn(i)||g.disabled?{disabled:g.disabled||i}:{},onChange:O,onBlur:D,ref:U}),[r,i,g.disabled,O,D,U,y]);return W.useEffect(()=>{const k=o._options.shouldUnregister||u,Y=T.current;Y&&Y!==r&&!p&&o.unregister(Y),o.register(r,{...b.current.rules,...Bn(b.current.disabled)?{disabled:b.current.disabled}:{}});const J=(F,Q)=>{const he=pe(o._fields,F);he&&he._f&&(he._f.mount=Q)};if(J(r,!0),k){const F=Zt(pe(o._options.defaultValues,r,b.current.defaultValue));st(o._defaultValues,r,F),Ot(pe(o._formValues,r))&&st(o._formValues,r,F)}return!p&&o.register(r),T.current=r,()=>{(p?k&&!o._state.action:k)?o.unregister(r):J(r,!1)}},[r,o,p,u]),W.useEffect(()=>{o._setDisabledField({disabled:i,name:r})},[i,r,o]),W.useMemo(()=>({field:j,formState:g,fieldState:E}),[j,g,E])}const F5=e=>e.render($5(e));var ug=(e,t,r,i,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:o||!0}}:{},fl=e=>Array.isArray(e)?e:[e],k1=()=>{let e=[];return{get observers(){return e},next:o=>{for(const u of e)u.next&&u.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(u=>u!==o)}}),unsubscribe:()=>{e=[]}}};function dE(e,t){const r={};for(const i in e)if(e.hasOwnProperty(i)){const o=e[i],u=t[i];if(o&&Ht(o)&&u){const c=dE(o,u);Ht(c)&&(r[i]=c)}else e[i]&&(r[i]=u)}return r}var dn=e=>Ht(e)&&!Object.keys(e).length,cg=e=>e.type==="file",pr=e=>typeof e=="function",Hc=e=>{if(!ag)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hE=e=>e.type==="select-multiple",fg=e=>e.type==="radio",Z5=e=>fg(e)||Ul(e),mm=e=>Hc(e)&&e.isConnected;function P5(e,t){const r=t.slice(0,-1).length;let i=0;for(;i{for(const t in e)if(pr(e[t]))return!0;return!1};function mE(e){return Array.isArray(e)||Ht(e)&&!q5(e)}function Zm(e,t={}){for(const r in e){const i=e[r];mE(i)?(t[r]=Array.isArray(i)?[]:{},Zm(i,t[r])):Ot(i)||(t[r]=!0)}return t}function $s(e,t,r){r||(r=Zm(t));for(const i in e){const o=e[i];if(mE(o))Ot(t)||Fm(r[i])?r[i]=Zm(o,Array.isArray(o)?[]:{}):$s(o,Dn(t)?{}:t[i],r[i]);else{const u=t[i];r[i]=!mr(o,u)}}return r}const z1={value:!1,isValid:!1},j1={value:!0,isValid:!0};var pE=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ot(e[0].attributes.value)?Ot(e[0].value)||e[0].value===""?j1:{value:e[0].value,isValid:!0}:j1:z1}return z1},gE=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>Ot(e)?e:t?e===""?NaN:e&&+e:r&&Fn(e)?new Date(e):i?i(e):e;const U1={isValid:!1,value:null};var yE=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,U1):U1;function L1(e){const t=e.ref;return cg(t)?t.files:fg(t)?yE(e.refs).value:hE(t)?[...t.selectedOptions].map(({value:r})=>r):Ul(t)?pE(e.refs).value:gE(Ot(t.value)?e.ref.value:t.value,e)}var I5=(e,t,r,i)=>{const o={};for(const u of e){const c=pe(t,u);c&&st(o,u,c._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:i}},Vc=e=>e instanceof RegExp,ll=e=>Ot(e)?e:Vc(e)?e.source:Ht(e)?Vc(e.value)?e.value.source:e.value:e,Y1=e=>({isOnSubmit:!e||e===hr.onSubmit,isOnBlur:e===hr.onBlur,isOnChange:e===hr.onChange,isOnAll:e===hr.all,isOnTouch:e===hr.onTouched});const H1="AsyncFunction";var X5=e=>!!e&&!!e.validate&&!!(pr(e.validate)&&e.validate.constructor.name===H1||Ht(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===H1)),W5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),V1=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const dl=(e,t,r,i)=>{for(const o of r||Object.keys(e)){const u=pe(e,o);if(u){const{_f:c,...h}=u;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o)&&!i)return!0;if(c.ref&&t(c.ref,c.name)&&!i)return!0;if(dl(h,t))break}else if(Ht(h)&&dl(h,t))break}}};function B1(e,t,r){const i=pe(e,r);if(i||bf(r))return{error:i,name:r};const o=r.split(".");for(;o.length;){const u=o.join("."),c=pe(t,u),h=pe(e,u);if(c&&!Array.isArray(c)&&r!==u)return{name:r};if(h&&h.type)return{name:u,error:h};if(h&&h.root&&h.root.type)return{name:`${u}.root`,error:h.root};o.pop()}return{name:r}}var K5=(e,t,r,i)=>{r(e);const{name:o,...u}=e;return dn(u)||Object.keys(u).length>=Object.keys(t).length||Object.keys(u).find(c=>t[c]===(!i||hr.all))},Q5=(e,t,r)=>!e||!t||e===t||fl(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i))),J5=(e,t,r,i,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?i.isOnBlur:o.isOnBlur)?!e:(r?i.isOnChange:o.isOnChange)?e:!0,eU=(e,t)=>!ig(pe(e,t)).length&&Yt(e,t),tU=(e,t,r)=>{const i=fl(pe(e,r));return st(i,"root",t[r]),st(e,r,i),e};function $1(e,t,r="validate"){if(Fn(e)||Array.isArray(e)&&e.every(Fn)||Bn(e)&&!e)return{type:r,message:Fn(e)?e:"",ref:t}}var Vs=e=>Ht(e)&&!Vc(e)?e:{value:e,message:""},F1=async(e,t,r,i,o,u)=>{const{ref:c,refs:h,required:p,maxLength:m,minLength:y,min:g,max:b,pattern:T,validate:x,name:E,valueAsNumber:O,mount:D}=e._f,U=pe(r,E);if(!D||t.has(E))return{};const j=h?h[0]:c,k=ie=>{o&&j.reportValidity&&(j.setCustomValidity(Bn(ie)?"":ie||""),j.reportValidity())},Y={},J=fg(c),F=Ul(c),Q=J||F,he=(O||cg(c))&&Ot(c.value)&&Ot(U)||Hc(c)&&c.value===""||U===""||Array.isArray(U)&&!U.length,_e=ug.bind(null,E,i,Y),we=(ie,ue,fe,ye=da.maxLength,M=da.minLength)=>{const I=ie?ue:fe;Y[E]={type:ie?ye:M,message:I,ref:c,..._e(ie?ye:M,I)}};if(u?!Array.isArray(U)||!U.length:p&&(!Q&&(he||Dn(U))||Bn(U)&&!U||F&&!pE(h).isValid||J&&!yE(h).isValid)){const{value:ie,message:ue}=Fn(p)?{value:!!p,message:p}:Vs(p);if(ie&&(Y[E]={type:da.required,message:ue,ref:j,..._e(da.required,ue)},!i))return k(ue),Y}if(!he&&(!Dn(g)||!Dn(b))){let ie,ue;const fe=Vs(b),ye=Vs(g);if(!Dn(U)&&!isNaN(U)){const M=c.valueAsNumber||U&&+U;Dn(fe.value)||(ie=M>fe.value),Dn(ye.value)||(ue=Mnew Date(new Date().toDateString()+" "+ve),L=c.type=="time",re=c.type=="week";Fn(fe.value)&&U&&(ie=L?I(U)>I(fe.value):re?U>fe.value:M>new Date(fe.value)),Fn(ye.value)&&U&&(ue=L?I(U)+ie.value,ye=!Dn(ue.value)&&U.length<+ue.value;if((fe||ye)&&(we(fe,ie.message,ue.message),!i))return k(Y[E].message),Y}if(T&&!he&&Fn(U)){const{value:ie,message:ue}=Vs(T);if(Vc(ie)&&!U.match(ie)&&(Y[E]={type:da.pattern,message:ue,ref:c,..._e(da.pattern,ue)},!i))return k(ue),Y}if(x){if(pr(x)){const ie=await x(U,r),ue=$1(ie,j);if(ue&&(Y[E]={...ue,..._e(da.validate,ue.message)},!i))return k(ue.message),Y}else if(Ht(x)){let ie={};for(const ue in x){if(!dn(ie)&&!i)break;const fe=$1(await x[ue](U,r),j,ue);fe&&(ie={...fe,..._e(ue,fe.message)},k(fe.message),i&&(Y[E]=ie))}if(!dn(ie)&&(Y[E]={ref:j,...ie},!i))return Y}}return k(!0),Y};const nU={mode:hr.onSubmit,reValidateMode:hr.onChange,shouldFocusError:!0};function rU(e={}){let t={...nU,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:pr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},o=Ht(t.defaultValues)||Ht(t.values)?Zt(t.defaultValues||t.values)||{}:{},u=t.shouldUnregister?{}:Zt(o),c={action:!1,mount:!1,watch:!1},h={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},p,m=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let g={...y};const b={array:k1(),state:k1()},T=t.criteriaMode===hr.all,x=R=>B=>{clearTimeout(m),m=setTimeout(R,B)},E=async R=>{if(!t.disabled&&(y.isValid||g.isValid||R)){const B=t.resolver?dn((await F()).errors):await he(i,!0);B!==r.isValid&&b.state.next({isValid:B})}},O=(R,B)=>{!t.disabled&&(y.isValidating||y.validatingFields||g.isValidating||g.validatingFields)&&((R||Array.from(h.mount)).forEach(G=>{G&&(B?st(r.validatingFields,G,B):Yt(r.validatingFields,G))}),b.state.next({validatingFields:r.validatingFields,isValidating:!dn(r.validatingFields)}))},D=(R,B=[],G,me,se=!0,le=!0)=>{if(me&&G&&!t.disabled){if(c.action=!0,le&&Array.isArray(pe(i,R))){const Oe=G(pe(i,R),me.argA,me.argB);se&&st(i,R,Oe)}if(le&&Array.isArray(pe(r.errors,R))){const Oe=G(pe(r.errors,R),me.argA,me.argB);se&&st(r.errors,R,Oe),eU(r.errors,R)}if((y.touchedFields||g.touchedFields)&&le&&Array.isArray(pe(r.touchedFields,R))){const Oe=G(pe(r.touchedFields,R),me.argA,me.argB);se&&st(r.touchedFields,R,Oe)}(y.dirtyFields||g.dirtyFields)&&(r.dirtyFields=$s(o,u)),b.state.next({name:R,isDirty:we(R,B),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else st(u,R,B)},U=(R,B)=>{st(r.errors,R,B),b.state.next({errors:r.errors})},j=R=>{r.errors=R,b.state.next({errors:r.errors,isValid:!1})},k=(R,B,G,me)=>{const se=pe(i,R);if(se){const le=pe(u,R,Ot(G)?pe(o,R):G);Ot(le)||me&&me.defaultChecked||B?st(u,R,B?le:L1(se._f)):fe(R,le),c.mount&&!c.action&&E()}},Y=(R,B,G,me,se)=>{let le=!1,Oe=!1;const Xe={name:R};if(!t.disabled){if(!G||me){(y.isDirty||g.isDirty)&&(Oe=r.isDirty,r.isDirty=Xe.isDirty=we(),le=Oe!==Xe.isDirty);const We=mr(pe(o,R),B);Oe=!!pe(r.dirtyFields,R),We?Yt(r.dirtyFields,R):st(r.dirtyFields,R,!0),Xe.dirtyFields=r.dirtyFields,le=le||(y.dirtyFields||g.dirtyFields)&&Oe!==!We}if(G){const We=pe(r.touchedFields,R);We||(st(r.touchedFields,R,G),Xe.touchedFields=r.touchedFields,le=le||(y.touchedFields||g.touchedFields)&&We!==G)}le&&se&&b.state.next(Xe)}return le?Xe:{}},J=(R,B,G,me)=>{const se=pe(r.errors,R),le=(y.isValid||g.isValid)&&Bn(B)&&r.isValid!==B;if(t.delayError&&G?(p=x(()=>U(R,G)),p(t.delayError)):(clearTimeout(m),p=null,G?st(r.errors,R,G):Yt(r.errors,R)),(G?!mr(se,G):se)||!dn(me)||le){const Oe={...me,...le&&Bn(B)?{isValid:B}:{},errors:r.errors,name:R};r={...r,...Oe},b.state.next(Oe)}},F=async R=>{O(R,!0);const B=await t.resolver(u,t.context,I5(R||h.mount,i,t.criteriaMode,t.shouldUseNativeValidation));return O(R),B},Q=async R=>{const{errors:B}=await F(R);if(R)for(const G of R){const me=pe(B,G);me?st(r.errors,G,me):Yt(r.errors,G)}else r.errors=B;return B},he=async(R,B,G={valid:!0})=>{for(const me in R){const se=R[me];if(se){const{_f:le,...Oe}=se;if(le){const Xe=h.array.has(le.name),We=se._f&&X5(se._f);We&&y.validatingFields&&O([le.name],!0);const qt=await F1(se,h.disabled,u,T,t.shouldUseNativeValidation&&!B,Xe);if(We&&y.validatingFields&&O([le.name]),qt[le.name]&&(G.valid=!1,B))break;!B&&(pe(qt,le.name)?Xe?tU(r.errors,qt,le.name):st(r.errors,le.name,qt[le.name]):Yt(r.errors,le.name))}!dn(Oe)&&await he(Oe,B,G)}}return G.valid},_e=()=>{for(const R of h.unMount){const B=pe(i,R);B&&(B._f.refs?B._f.refs.every(G=>!mm(G)):!mm(B._f.ref))&&de(R)}h.unMount=new Set},we=(R,B)=>!t.disabled&&(R&&B&&st(u,R,B),!mr(ve(),o)),ie=(R,B,G)=>$m(R,h,{...c.mount?u:Ot(B)?o:Fn(R)?{[R]:B}:B},G,B),ue=R=>ig(pe(c.mount?u:o,R,t.shouldUnregister?pe(o,R,[]):[])),fe=(R,B,G={})=>{const me=pe(i,R);let se=B;if(me){const le=me._f;le&&(!le.disabled&&st(u,R,gE(B,le)),se=Hc(le.ref)&&Dn(B)?"":B,hE(le.ref)?[...le.ref.options].forEach(Oe=>Oe.selected=se.includes(Oe.value)):le.refs?Ul(le.ref)?le.refs.forEach(Oe=>{(!Oe.defaultChecked||!Oe.disabled)&&(Array.isArray(se)?Oe.checked=!!se.find(Xe=>Xe===Oe.value):Oe.checked=se===Oe.value||!!se)}):le.refs.forEach(Oe=>Oe.checked=Oe.value===se):cg(le.ref)?le.ref.value="":(le.ref.value=se,le.ref.type||b.state.next({name:R,values:Zt(u)})))}(G.shouldDirty||G.shouldTouch)&&Y(R,se,G.shouldTouch,G.shouldDirty,!0),G.shouldValidate&&re(R)},ye=(R,B,G)=>{for(const me in B){if(!B.hasOwnProperty(me))return;const se=B[me],le=R+"."+me,Oe=pe(i,le);(h.array.has(R)||Ht(se)||Oe&&!Oe._f)&&!Ni(se)?ye(le,se,G):fe(le,se,G)}},M=(R,B,G={})=>{const me=pe(i,R),se=h.array.has(R),le=Zt(B);st(u,R,le),se?(b.array.next({name:R,values:Zt(u)}),(y.isDirty||y.dirtyFields||g.isDirty||g.dirtyFields)&&G.shouldDirty&&b.state.next({name:R,dirtyFields:$s(o,u),isDirty:we(R,le)})):me&&!me._f&&!Dn(le)?ye(R,le,G):fe(R,le,G),V1(R,h)&&b.state.next({...r,name:R}),b.state.next({name:c.mount?R:void 0,values:Zt(u)})},I=async R=>{c.mount=!0;const B=R.target;let G=B.name,me=!0;const se=pe(i,G),le=We=>{me=Number.isNaN(We)||Ni(We)&&isNaN(We.getTime())||mr(We,pe(u,G,We))},Oe=Y1(t.mode),Xe=Y1(t.reValidateMode);if(se){let We,qt;const gn=B.type?L1(se._f):lE(R),Nn=R.type===Yc.BLUR||R.type===Yc.FOCUS_OUT,Tr=!W5(se._f)&&!t.resolver&&!pe(r.errors,G)&&!se._f.deps||J5(Nn,pe(r.touchedFields,G),r.isSubmitted,Xe,Oe),lr=V1(G,h,Nn);st(u,G,gn),Nn?(!B||!B.readOnly)&&(se._f.onBlur&&se._f.onBlur(R),p&&p(0)):se._f.onChange&&se._f.onChange(R);const Vt=Y(G,gn,Nn),kn=!dn(Vt)||lr;if(!Nn&&b.state.next({name:G,type:R.type,values:Zt(u)}),Tr)return(y.isValid||g.isValid)&&(t.mode==="onBlur"?Nn&&E():Nn||E()),kn&&b.state.next({name:G,...lr?{}:Vt});if(!Nn&&lr&&b.state.next({...r}),t.resolver){const{errors:Bt}=await F([G]);if(le(gn),me){const co=B1(r.errors,i,G),Aa=B1(Bt,i,co.name||G);We=Aa.error,G=Aa.name,qt=dn(Bt)}}else O([G],!0),We=(await F1(se,h.disabled,u,T,t.shouldUseNativeValidation))[G],O([G]),le(gn),me&&(We?qt=!1:(y.isValid||g.isValid)&&(qt=await he(i,!0)));me&&(se._f.deps&&(!Array.isArray(se._f.deps)||se._f.deps.length>0)&&re(se._f.deps),J(G,qt,We,Vt))}},L=(R,B)=>{if(pe(r.errors,B)&&R.focus)return R.focus(),1},re=async(R,B={})=>{let G,me;const se=fl(R);if(t.resolver){const le=await Q(Ot(R)?R:se);G=dn(le),me=R?!se.some(Oe=>pe(le,Oe)):G}else R?(me=(await Promise.all(se.map(async le=>{const Oe=pe(i,le);return await he(Oe&&Oe._f?{[le]:Oe}:Oe)}))).every(Boolean),!(!me&&!r.isValid)&&E()):me=G=await he(i);return b.state.next({...!Fn(R)||(y.isValid||g.isValid)&&G!==r.isValid?{}:{name:R},...t.resolver||!R?{isValid:G}:{},errors:r.errors}),B.shouldFocus&&!me&&dl(i,L,R?se:h.mount),me},ve=(R,B)=>{let G={...c.mount?u:o};return B&&(G=dE(B.dirtyFields?r.dirtyFields:r.touchedFields,G)),Ot(R)?G:Fn(R)?pe(G,R):R.map(me=>pe(G,me))},A=(R,B)=>({invalid:!!pe((B||r).errors,R),isDirty:!!pe((B||r).dirtyFields,R),error:pe((B||r).errors,R),isValidating:!!pe(r.validatingFields,R),isTouched:!!pe((B||r).touchedFields,R)}),q=R=>{R&&fl(R).forEach(B=>Yt(r.errors,B)),b.state.next({errors:R?r.errors:{}})},X=(R,B,G)=>{const me=(pe(i,R,{_f:{}})._f||{}).ref,se=pe(r.errors,R)||{},{ref:le,message:Oe,type:Xe,...We}=se;st(r.errors,R,{...We,...B,ref:me}),b.state.next({name:R,errors:r.errors,isValid:!1}),G&&G.shouldFocus&&me&&me.focus&&me.focus()},ne=(R,B)=>pr(R)?b.state.subscribe({next:G=>"values"in G&&R(ie(void 0,B),G)}):ie(R,B,!0),ce=R=>b.state.subscribe({next:B=>{Q5(R.name,B.name,R.exact)&&K5(B,R.formState||y,Pr,R.reRenderRoot)&&R.callback({values:{...u},...r,...B,defaultValues:o})}}).unsubscribe,Te=R=>(c.mount=!0,g={...g,...R.formState},ce({...R,formState:g})),de=(R,B={})=>{for(const G of R?fl(R):h.mount)h.mount.delete(G),h.array.delete(G),B.keepValue||(Yt(i,G),Yt(u,G)),!B.keepError&&Yt(r.errors,G),!B.keepDirty&&Yt(r.dirtyFields,G),!B.keepTouched&&Yt(r.touchedFields,G),!B.keepIsValidating&&Yt(r.validatingFields,G),!t.shouldUnregister&&!B.keepDefaultValue&&Yt(o,G);b.state.next({values:Zt(u)}),b.state.next({...r,...B.keepDirty?{isDirty:we()}:{}}),!B.keepIsValid&&E()},Me=({disabled:R,name:B})=>{(Bn(R)&&c.mount||R||h.disabled.has(B))&&(R?h.disabled.add(B):h.disabled.delete(B))},Be=(R,B={})=>{let G=pe(i,R);const me=Bn(B.disabled)||Bn(t.disabled);return st(i,R,{...G||{},_f:{...G&&G._f?G._f:{ref:{name:R}},name:R,mount:!0,...B}}),h.mount.add(R),G?Me({disabled:Bn(B.disabled)?B.disabled:t.disabled,name:R}):k(R,!0,B.value),{...me?{disabled:B.disabled||t.disabled}:{},...t.progressive?{required:!!B.required,min:ll(B.min),max:ll(B.max),minLength:ll(B.minLength),maxLength:ll(B.maxLength),pattern:ll(B.pattern)}:{},name:R,onChange:I,onBlur:I,ref:se=>{if(se){Be(R,B),G=pe(i,R);const le=Ot(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,Oe=Z5(le),Xe=G._f.refs||[];if(Oe?Xe.find(We=>We===le):le===G._f.ref)return;st(i,R,{_f:{...G._f,...Oe?{refs:[...Xe.filter(mm),le,...Array.isArray(pe(o,R))?[{}]:[]],ref:{type:le.type,name:R}}:{ref:le}}}),k(R,!1,void 0,le)}else G=pe(i,R,{}),G._f&&(G._f.mount=!1),(t.shouldUnregister||B.shouldUnregister)&&!(uE(h.array,R)&&c.action)&&h.unMount.add(R)}}},Ct=()=>t.shouldFocusError&&dl(i,L,h.mount),Qt=R=>{Bn(R)&&(b.state.next({disabled:R}),dl(i,(B,G)=>{const me=pe(i,G);me&&(B.disabled=me._f.disabled||R,Array.isArray(me._f.refs)&&me._f.refs.forEach(se=>{se.disabled=me._f.disabled||R}))},0,!1))},kt=(R,B)=>async G=>{let me;G&&(G.preventDefault&&G.preventDefault(),G.persist&&G.persist());let se=Zt(u);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:le,values:Oe}=await F();r.errors=le,se=Zt(Oe)}else await he(i);if(h.disabled.size)for(const le of h.disabled)Yt(se,le);if(Yt(r.errors,"root"),dn(r.errors)){b.state.next({errors:{}});try{await R(se,G)}catch(le){me=le}}else B&&await B({...r.errors},G),Ct(),setTimeout(Ct);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:dn(r.errors)&&!me,submitCount:r.submitCount+1,errors:r.errors}),me)throw me},or=(R,B={})=>{pe(i,R)&&(Ot(B.defaultValue)?M(R,Zt(pe(o,R))):(M(R,B.defaultValue),st(o,R,Zt(B.defaultValue))),B.keepTouched||Yt(r.touchedFields,R),B.keepDirty||(Yt(r.dirtyFields,R),r.isDirty=B.defaultValue?we(R,Zt(pe(o,R))):we()),B.keepError||(Yt(r.errors,R),y.isValid&&E()),b.state.next({...r}))},pn=(R,B={})=>{const G=R?Zt(R):o,me=Zt(G),se=dn(R),le=se?o:me;if(B.keepDefaultValues||(o=G),!B.keepValues){if(B.keepDirtyValues){const Oe=new Set([...h.mount,...Object.keys($s(o,u))]);for(const Xe of Array.from(Oe))pe(r.dirtyFields,Xe)?st(le,Xe,pe(u,Xe)):M(Xe,pe(le,Xe))}else{if(ag&&Ot(R))for(const Oe of h.mount){const Xe=pe(i,Oe);if(Xe&&Xe._f){const We=Array.isArray(Xe._f.refs)?Xe._f.refs[0]:Xe._f.ref;if(Hc(We)){const qt=We.closest("form");if(qt){qt.reset();break}}}}if(B.keepFieldsRef)for(const Oe of h.mount)M(Oe,pe(le,Oe));else i={}}u=t.shouldUnregister?B.keepDefaultValues?Zt(o):{}:Zt(le),b.array.next({values:{...le}}),b.state.next({values:{...le}})}h={mount:B.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!y.isValid||!!B.keepIsValid||!!B.keepDirtyValues||!t.shouldUnregister&&!dn(le),c.watch=!!t.shouldUnregister,c.action=!1,B.keepErrors||(r.errors={}),b.state.next({submitCount:B.keepSubmitCount?r.submitCount:0,isDirty:se?!1:B.keepDirty?r.isDirty:!!(B.keepDefaultValues&&!mr(R,o)),isSubmitted:B.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:se?{}:B.keepDirtyValues?B.keepDefaultValues&&u?$s(o,u):r.dirtyFields:B.keepDefaultValues&&R?$s(o,R):B.keepDirty?r.dirtyFields:{},touchedFields:B.keepTouched?r.touchedFields:{},errors:B.keepErrors?r.errors:{},isSubmitSuccessful:B.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ta=(R,B)=>pn(pr(R)?R(u):R,B),Oa=(R,B={})=>{const G=pe(i,R),me=G&&G._f;if(me){const se=me.refs?me.refs[0]:me.ref;se.focus&&(se.focus(),B.shouldSelect&&pr(se.select)&&se.select())}},Pr=R=>{r={...r,...R}},sn={control:{register:Be,unregister:de,getFieldState:A,handleSubmit:kt,setError:X,_subscribe:ce,_runSchema:F,_focusError:Ct,_getWatch:ie,_getDirty:we,_setValid:E,_setFieldArray:D,_setDisabledField:Me,_setErrors:j,_getFieldArray:ue,_reset:pn,_resetDefaultValues:()=>pr(t.defaultValues)&&t.defaultValues().then(R=>{Ta(R,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:_e,_disableForm:Qt,_subjects:b,_proxyFormState:y,get _fields(){return i},get _formValues(){return u},get _state(){return c},set _state(R){c=R},get _defaultValues(){return o},get _names(){return h},set _names(R){h=R},get _formState(){return r},get _options(){return t},set _options(R){t={...t,...R}}},subscribe:Te,trigger:re,register:Be,handleSubmit:kt,watch:ne,setValue:M,getValues:ve,reset:Ta,resetField:or,clearErrors:q,unregister:de,setError:X,setFocus:Oa,getFieldState:A};return{...sn,formControl:sn}}function aU(e={}){const t=W.useRef(void 0),r=W.useRef(void 0),[i,o]=W.useState({isDirty:!1,isValidating:!1,isLoading:pr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:pr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!pr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...h}=rU(e);t.current={...h,formState:i}}const u=t.current.control;return u._options=e,lg(()=>{const c=u._subscribe({formState:u._proxyFormState,callback:()=>o({...u._formState}),reRenderRoot:!0});return o(h=>({...h,isReady:!0})),u._formState.isReady=!0,c},[u]),W.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),W.useEffect(()=>{e.mode&&(u._options.mode=e.mode),e.reValidateMode&&(u._options.reValidateMode=e.reValidateMode)},[u,e.mode,e.reValidateMode]),W.useEffect(()=>{e.errors&&(u._setErrors(e.errors),u._focusError())},[u,e.errors]),W.useEffect(()=>{e.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[u,e.shouldUnregister]),W.useEffect(()=>{if(u._proxyFormState.isDirty){const c=u._getDirty();c!==i.isDirty&&u._subjects.state.next({isDirty:c})}},[u,i.isDirty]),W.useEffect(()=>{var c;e.values&&!mr(e.values,r.current)?(u._reset(e.values,{keepFieldsRef:!0,...u._options.resetOptions}),!((c=u._options.resetOptions)===null||c===void 0)&&c.keepIsValid||u._setValid(),r.current=e.values,o(h=>({...h}))):u._resetDefaultValues()},[u,e.values]),W.useEffect(()=>{u._state.mount||(u._setValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),t.current.formState=cE(i,u),t.current}const Z1=(e,t,r)=>{if(e&&"reportValidity"in e){const i=pe(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},Pm=(e,t)=>{for(const r in t.fields){const i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?Z1(i.ref,r,e):i&&i.refs&&i.refs.forEach(o=>Z1(o,r,e))}},P1=(e,t)=>{t.shouldUseNativeValidation&&Pm(e,t);const r={};for(const i in e){const o=pe(t.fields,i),u=Object.assign(e[i]||{},{ref:o&&o.ref});if(iU(t.names||Object.keys(e),i)){const c=Object.assign({},pe(r,i));st(c,"root",u),st(r,i,c)}else st(r,i,u)}return r},iU=(e,t)=>{const r=G1(t);return e.some(i=>G1(i).match(`^${r}\\.\\d+`))};function G1(e){return e.replace(/\]|\[/g,"")}function ae(e,t,r){function i(h,p){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:p,constr:c,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),t(h,p);const m=c.prototype,y=Object.keys(m);for(let g=0;gr?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class Ws extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class vE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const bE={};function Hi(e){return bE}function sU(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function Gm(e,t){return typeof t=="bigint"?t.toString():t}function dg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function hg(e){return e==null}function mg(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const q1=Symbol("evaluating");function dt(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==q1)return i===void 0&&(i=q1,i=r()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Pi(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Gi(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function I1(e){return JSON.stringify(e)}function oU(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const _E="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Bc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const lU=dg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function wl(e){if(Bc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Bc(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function wE(e){return wl(e)?{...e}:Array.isArray(e)?[...e]:e}const uU=new Set(["string","number","symbol"]);function wf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function li(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function ke(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function cU(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function fU(e,t){const r=e._zod.def,i=Gi(e._zod.def,{get shape(){const o={};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(o[u]=r.shape[u])}return Pi(this,"shape",o),o},checks:[]});return li(e,i)}function dU(e,t){const r=e._zod.def,i=Gi(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete o[u]}return Pi(this,"shape",o),o},checks:[]});return li(e,i)}function hU(e,t){if(!wl(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const o=Gi(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Pi(this,"shape",u),u},checks:[]});return li(e,o)}function mU(e,t){if(!wl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return Pi(this,"shape",i),i},checks:e._zod.def.checks};return li(e,r)}function pU(e,t){const r=Gi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Pi(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return li(e,r)}function gU(e,t,r){const i=Gi(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(r)for(const c in r){if(!(c in o))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(u[c]=e?new e({type:"optional",innerType:o[c]}):o[c])}else for(const c in o)u[c]=e?new e({type:"optional",innerType:o[c]}):o[c];return Pi(this,"shape",u),u},checks:[]});return li(t,i)}function yU(e,t,r){const i=Gi(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(r)for(const c in r){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(u[c]=new e({type:"nonoptional",innerType:o[c]}))}else for(const c in o)u[c]=new e({type:"nonoptional",innerType:o[c]});return Pi(this,"shape",u),u},checks:[]});return li(t,i)}function Zs(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function oc(e){return typeof e=="string"?e:e?.message}function Vi(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const o=oc(e.inst?._zod.def?.error?.(e))??oc(t?.error?.(e))??oc(r.customError?.(e))??oc(r.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function pg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Sl(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}const xE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gm,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},gg=ae("$ZodError",xE),Sf=ae("$ZodError",xE,{Parent:Error});function vU(e,t=r=>r.message){const r={},i=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}}function bU(e,t=r=>r.message){const r={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)r._errors.push(t(u));else{let c=r,h=0;for(;h(t,r,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new Ws;if(c.issues.length){const h=new(o?.Err??e)(c.issues.map(p=>Vi(p,u,Hi())));throw _E(h,o?.callee),h}return c.value},_U=xf(Sf),Ef=e=>async(t,r,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){const h=new(o?.Err??e)(c.issues.map(p=>Vi(p,u,Hi())));throw _E(h,o?.callee),h}return c.value},wU=Ef(Sf),Tf=e=>(t,r,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},o);if(u instanceof Promise)throw new Ws;return u.issues.length?{success:!1,error:new(e??gg)(u.issues.map(c=>Vi(c,o,Hi())))}:{success:!0,data:u.value}},SU=Tf(Sf),Of=e=>async(t,r,i)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let u=t._zod.run({value:r,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Vi(c,o,Hi())))}:{success:!0,data:u.value}},xU=Of(Sf),EU=e=>(t,r,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return xf(e)(t,r,o)},TU=e=>(t,r,i)=>xf(e)(t,r,i),OU=e=>async(t,r,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ef(e)(t,r,o)},AU=e=>async(t,r,i)=>Ef(e)(t,r,i),CU=e=>(t,r,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Tf(e)(t,r,o)},DU=e=>(t,r,i)=>Tf(e)(t,r,i),MU=e=>async(t,r,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Of(e)(t,r,o)},RU=e=>async(t,r,i)=>Of(e)(t,r,i),NU=/^[cC][^\s-]{8,}$/,kU=/^[0-9a-z]+$/,zU=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,jU=/^[0-9a-vA-V]{20}$/,UU=/^[A-Za-z0-9]{27}$/,LU=/^[a-zA-Z0-9_-]{21}$/,YU=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,HU=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,X1=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,VU=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,BU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $U(){return new RegExp(BU,"u")}const FU=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ZU=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,PU=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,GU=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qU=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,EE=/^[A-Za-z0-9_-]*$/,IU=/^\+(?:[0-9]){6,14}[0-9]$/,TE="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",XU=new RegExp(`^${TE}$`);function OE(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function WU(e){return new RegExp(`^${OE(e)}$`)}function KU(e){const t=OE({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${TE}T(?:${i})$`)}const QU=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},JU=/^[^A-Z]*$/,e8=/^[^a-z]*$/,Zr=ae("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),t8=ae("$ZodCheckMaxLength",(e,t)=>{var r;Zr.init(e,t),(r=e._zod.def).when??(r.when=i=>{const o=i.value;return!hg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const o=i.value;if(o.length<=t.maximum)return;const c=pg(o);i.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),n8=ae("$ZodCheckMinLength",(e,t)=>{var r;Zr.init(e,t),(r=e._zod.def).when??(r.when=i=>{const o=i.value;return!hg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const c=pg(o);i.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),r8=ae("$ZodCheckLengthEquals",(e,t)=>{var r;Zr.init(e,t),(r=e._zod.def).when??(r.when=i=>{const o=i.value;return!hg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const c=pg(o),h=u>t.length;i.issues.push({origin:c,...h?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Af=ae("$ZodCheckStringFormat",(e,t)=>{var r,i;Zr.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),a8=ae("$ZodCheckRegex",(e,t)=>{Af.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),i8=ae("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=JU),Af.init(e,t)}),s8=ae("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=e8),Af.init(e,t)}),o8=ae("$ZodCheckIncludes",(e,t)=>{Zr.init(e,t);const r=wf(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),l8=ae("$ZodCheckStartsWith",(e,t)=>{Zr.init(e,t);const r=new RegExp(`^${wf(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),u8=ae("$ZodCheckEndsWith",(e,t)=>{Zr.init(e,t);const r=new RegExp(`.*${wf(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),c8=ae("$ZodCheckOverwrite",(e,t)=>{Zr.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class f8{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
-`).filter(c=>c),o=Math.min(...i.map(c=>c.length-c.trimStart().length)),u=i.map(c=>c.slice(o)).map(c=>" ".repeat(this.indent*2)+c);for(const c of u)this.content.push(c)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...r,o.join(`
-`))}}const d8={major:4,minor:1,patch:13},Gt=ae("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=d8;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(c,h,p)=>{let m=Zs(c),y;for(const g of h){if(g._zod.def.when){if(!g._zod.def.when(c))continue}else if(m)continue;const b=c.issues.length,T=g._zod.check(c);if(T instanceof Promise&&p?.async===!1)throw new Ws;if(y||T instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await T,c.issues.length!==b&&(m||(m=Zs(c,b)))});else{if(c.issues.length===b)continue;m||(m=Zs(c,b))}}return y?y.then(()=>c):c},u=(c,h,p)=>{if(Zs(c))return c.aborted=!0,c;const m=o(h,i,p);if(m instanceof Promise){if(p.async===!1)throw new Ws;return m.then(y=>e._zod.parse(y,p))}return e._zod.parse(m,p)};e._zod.run=(c,h)=>{if(h.skipChecks)return e._zod.parse(c,h);if(h.direction==="backward"){const m=e._zod.parse({value:c.value,issues:[]},{...h,skipChecks:!0});return m instanceof Promise?m.then(y=>u(y,c,h)):u(m,c,h)}const p=e._zod.parse(c,h);if(p instanceof Promise){if(h.async===!1)throw new Ws;return p.then(m=>o(m,i,h))}return o(p,i,h)}}e["~standard"]={validate:o=>{try{const u=SU(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return xU(e,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}}),yg=ae("$ZodString",(e,t)=>{Gt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??QU(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),wt=ae("$ZodStringFormat",(e,t)=>{Af.init(e,t),yg.init(e,t)}),h8=ae("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=HU),wt.init(e,t)}),m8=ae("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=X1(i))}else t.pattern??(t.pattern=X1());wt.init(e,t)}),p8=ae("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=VU),wt.init(e,t)}),g8=ae("$ZodURL",(e,t)=>{wt.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),y8=ae("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$U()),wt.init(e,t)}),v8=ae("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=LU),wt.init(e,t)}),b8=ae("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=NU),wt.init(e,t)}),_8=ae("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=kU),wt.init(e,t)}),w8=ae("$ZodULID",(e,t)=>{t.pattern??(t.pattern=zU),wt.init(e,t)}),S8=ae("$ZodXID",(e,t)=>{t.pattern??(t.pattern=jU),wt.init(e,t)}),x8=ae("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=UU),wt.init(e,t)}),E8=ae("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=KU(t)),wt.init(e,t)}),T8=ae("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=XU),wt.init(e,t)}),O8=ae("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=WU(t)),wt.init(e,t)}),A8=ae("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=YU),wt.init(e,t)}),C8=ae("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=FU),wt.init(e,t),e._zod.bag.format="ipv4"}),D8=ae("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ZU),wt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),M8=ae("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=PU),wt.init(e,t)}),R8=ae("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=GU),wt.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;if(!u)throw new Error;const c=Number(u);if(`${c}`!==u)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function AE(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const N8=ae("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=qU),wt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{AE(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function k8(e){if(!EE.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return AE(r)}const z8=ae("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=EE),wt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{k8(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),j8=ae("$ZodE164",(e,t)=>{t.pattern??(t.pattern=IU),wt.init(e,t)});function U8(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const L8=ae("$ZodJWT",(e,t)=>{wt.init(e,t),e._zod.check=r=>{U8(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Y8=ae("$ZodUnknown",(e,t)=>{Gt.init(e,t),e._zod.parse=r=>r}),H8=ae("$ZodNever",(e,t)=>{Gt.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function W1(e,t,r){e.issues.length&&t.issues.push(...SE(r,e.issues)),t.value[r]=e.value}const V8=ae("$ZodArray",(e,t)=>{Gt.init(e,t),e._zod.parse=(r,i)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const u=[];for(let c=0;cW1(m,r,c))):W1(p,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function $c(e,t,r,i){e.issues.length&&t.issues.push(...SE(r,e.issues)),e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function CE(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=cU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function DE(e,t,r,i,o,u){const c=[],h=o.keySet,p=o.catchall._zod,m=p.def.type;for(const y in t){if(h.has(y))continue;if(m==="never"){c.push(y);continue}const g=p.run({value:t[y],issues:[]},i);g instanceof Promise?e.push(g.then(b=>$c(b,r,y,t))):$c(g,r,y,t)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}const B8=ae("$ZodObject",(e,t)=>{if(Gt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const h=t.shape;Object.defineProperty(t,"shape",{get:()=>{const p={...h};return Object.defineProperty(t,"shape",{value:p}),p}})}const i=dg(()=>CE(t));dt(e._zod,"propValues",()=>{const h=t.shape,p={};for(const m in h){const y=h[m]._zod;if(y.values){p[m]??(p[m]=new Set);for(const g of y.values)p[m].add(g)}}return p});const o=Bc,u=t.catchall;let c;e._zod.parse=(h,p)=>{c??(c=i.value);const m=h.value;if(!o(m))return h.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),h;h.value={};const y=[],g=c.shape;for(const b of c.keys){const x=g[b]._zod.run({value:m[b],issues:[]},p);x instanceof Promise?y.push(x.then(E=>$c(E,h,b,m))):$c(x,h,b,m)}return u?DE(y,m,h,p,i.value,e):y.length?Promise.all(y).then(()=>h):h}}),$8=ae("$ZodObjectJIT",(e,t)=>{B8.init(e,t);const r=e._zod.parse,i=dg(()=>CE(t)),o=b=>{const T=new f8(["shape","payload","ctx"]),x=i.value,E=j=>{const k=I1(j);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};T.write("const input = payload.value;");const O=Object.create(null);let D=0;for(const j of x.keys)O[j]=`key_${D++}`;T.write("const newResult = {};");for(const j of x.keys){const k=O[j],Y=I1(j);T.write(`const ${k} = ${E(j)};`),T.write(`
- if (${k}.issues.length) {
- payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
- ...iss,
- path: iss.path ? [${Y}, ...iss.path] : [${Y}]
- })));
- }
-
-
- if (${k}.value === undefined) {
- if (${Y} in input) {
- newResult[${Y}] = undefined;
- }
- } else {
- newResult[${Y}] = ${k}.value;
- }
-
- `)}T.write("payload.value = newResult;"),T.write("return payload;");const U=T.compile();return(j,k)=>U(b,j,k)};let u;const c=Bc,h=!bE.jitless,m=h&&lU.value,y=t.catchall;let g;e._zod.parse=(b,T)=>{g??(g=i.value);const x=b.value;return c(x)?h&&m&&T?.async===!1&&T.jitless!==!0?(u||(u=o(t.shape)),b=u(b,T),y?DE([],x,b,T,g,e):b):r(b,T):(b.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),b)}});function K1(e,t,r,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!Zs(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Vi(c,i,Hi())))}),t)}const F8=ae("$ZodUnion",(e,t)=>{Gt.init(e,t),dt(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),dt(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),dt(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),dt(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>mg(u.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(r)return i(o,u);let c=!1;const h=[];for(const p of t.options){const m=p._zod.run({value:o.value,issues:[]},u);if(m instanceof Promise)h.push(m),c=!0;else{if(m.issues.length===0)return m;h.push(m)}}return c?Promise.all(h).then(p=>K1(p,o,e,u)):K1(h,o,e,u)}}),Z8=ae("$ZodIntersection",(e,t)=>{Gt.init(e,t),e._zod.parse=(r,i)=>{const o=r.value,u=t.left._zod.run({value:o,issues:[]},i),c=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||c instanceof Promise?Promise.all([u,c]).then(([p,m])=>Q1(r,p,m)):Q1(r,u,c)}});function qm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(wl(e)&&wl(t)){const r=Object.keys(t),i=Object.keys(e).filter(u=>r.indexOf(u)!==-1),o={...e,...t};for(const u of i){const c=qm(e[u],t[u]);if(!c.valid)return{valid:!1,mergeErrorPath:[u,...c.mergeErrorPath]};o[u]=c.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i{Gt.init(e,t);const r=sU(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(o=>uU.has(typeof o)).map(o=>typeof o=="string"?wf(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const c=o.value;return i.has(c)||o.issues.push({code:"invalid_value",values:r,input:c,inst:e}),o}}),G8=ae("$ZodTransform",(e,t)=>{Gt.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new vE(e.constructor.name);const o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(r.value=c,r));if(o instanceof Promise)throw new Ws;return r.value=o,r}});function J1(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const q8=ae("$ZodOptional",(e,t)=>{Gt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),dt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${mg(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(u=>J1(u,r.value)):J1(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),I8=ae("$ZodNullable",(e,t)=>{Gt.init(e,t),dt(e._zod,"optin",()=>t.innerType._zod.optin),dt(e._zod,"optout",()=>t.innerType._zod.optout),dt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${mg(r.source)}|null)$`):void 0}),dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),X8=ae("$ZodDefault",(e,t)=>{Gt.init(e,t),e._zod.optin="optional",dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(u=>e_(u,t)):e_(o,t)}});function e_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const W8=ae("$ZodPrefault",(e,t)=>{Gt.init(e,t),e._zod.optin="optional",dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),K8=ae("$ZodNonOptional",(e,t)=>{Gt.init(e,t),dt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(u=>t_(u,e)):t_(o,e)}});function t_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Q8=ae("$ZodCatch",(e,t)=>{Gt.init(e,t),dt(e._zod,"optin",()=>t.innerType._zod.optin),dt(e._zod,"optout",()=>t.innerType._zod.optout),dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(u=>(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(c=>Vi(c,i,Hi()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(u=>Vi(u,i,Hi()))},input:r.value}),r.issues=[]),r)}}),J8=ae("$ZodPipe",(e,t)=>{Gt.init(e,t),dt(e._zod,"values",()=>t.in._zod.values),dt(e._zod,"optin",()=>t.in._zod.optin),dt(e._zod,"optout",()=>t.out._zod.optout),dt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(r,i);return u instanceof Promise?u.then(c=>lc(c,t.in,i)):lc(u,t.in,i)}const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(u=>lc(u,t.out,i)):lc(o,t.out,i)}});function lc(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const eL=ae("$ZodReadonly",(e,t)=>{Gt.init(e,t),dt(e._zod,"propValues",()=>t.innerType._zod.propValues),dt(e._zod,"values",()=>t.innerType._zod.values),dt(e._zod,"optin",()=>t.innerType?._zod?.optin),dt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(n_):n_(o)}});function n_(e){return e.value=Object.freeze(e.value),e}const tL=ae("$ZodCustom",(e,t)=>{Zr.init(e,t),Gt.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>r_(u,r,i,e));r_(o,r,i,e)}});function r_(e,t,r,i){if(!e){const o={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(Sl(o))}}var a_;class nL{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function rL(){return new nL}(a_=globalThis).__zod_globalRegistry??(a_.__zod_globalRegistry=rL());const uc=globalThis.__zod_globalRegistry;function aL(e,t){return new e({type:"string",...ke(t)})}function iL(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ke(t)})}function i_(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ke(t)})}function sL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ke(t)})}function oL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ke(t)})}function lL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ke(t)})}function uL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ke(t)})}function cL(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ke(t)})}function fL(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ke(t)})}function dL(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ke(t)})}function hL(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ke(t)})}function mL(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ke(t)})}function pL(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ke(t)})}function gL(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ke(t)})}function yL(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ke(t)})}function vL(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ke(t)})}function bL(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ke(t)})}function _L(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ke(t)})}function wL(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ke(t)})}function SL(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ke(t)})}function xL(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ke(t)})}function EL(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ke(t)})}function TL(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ke(t)})}function OL(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ke(t)})}function AL(e,t){return new e({type:"string",format:"date",check:"string_format",...ke(t)})}function CL(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ke(t)})}function DL(e,t){return new e({type:"string",format:"duration",check:"string_format",...ke(t)})}function ML(e){return new e({type:"unknown"})}function RL(e,t){return new e({type:"never",...ke(t)})}function ME(e,t){return new t8({check:"max_length",...ke(t),maximum:e})}function Fc(e,t){return new n8({check:"min_length",...ke(t),minimum:e})}function RE(e,t){return new r8({check:"length_equals",...ke(t),length:e})}function NL(e,t){return new a8({check:"string_format",format:"regex",...ke(t),pattern:e})}function kL(e){return new i8({check:"string_format",format:"lowercase",...ke(e)})}function zL(e){return new s8({check:"string_format",format:"uppercase",...ke(e)})}function jL(e,t){return new o8({check:"string_format",format:"includes",...ke(t),includes:e})}function UL(e,t){return new l8({check:"string_format",format:"starts_with",...ke(t),prefix:e})}function LL(e,t){return new u8({check:"string_format",format:"ends_with",...ke(t),suffix:e})}function uo(e){return new c8({check:"overwrite",tx:e})}function YL(e){return uo(t=>t.normalize(e))}function HL(){return uo(e=>e.trim())}function VL(){return uo(e=>e.toLowerCase())}function BL(){return uo(e=>e.toUpperCase())}function $L(){return uo(e=>oU(e))}function FL(e,t,r){return new e({type:"array",element:t,...ke(r)})}function ZL(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ke(r)})}function PL(e){const t=GL(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Sl(i,r.value,t._zod.def));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Sl(o))}},e(r.value,r)));return t}function GL(e,t){const r=new Zr({check:"custom",...ke(t)});return r._zod.check=e,r}function s_(e,t){try{var r=e()}catch(i){return t(i)}return r&&r.then?r.then(void 0,t):r}function qL(e,t){for(var r={};e.length;){var i=e[0],o=i.code,u=i.message,c=i.path.join(".");if(!r[c])if("unionErrors"in i){var h=i.unionErrors[0].errors[0];r[c]={message:h.message,type:h.code}}else r[c]={message:u,type:o};if("unionErrors"in i&&i.unionErrors.forEach(function(y){return y.errors.forEach(function(g){return e.push(g)})}),t){var p=r[c].types,m=p&&p[i.code];r[c]=ug(c,t,r,o,m?[].concat(m,i.message):i.message)}e.shift()}return r}function IL(e,t){for(var r={};e.length;){var i=e[0],o=i.code,u=i.message,c=i.path.join(".");if(!r[c])if(i.code==="invalid_union"&&i.errors.length>0){var h=i.errors[0][0];r[c]={message:h.message,type:h.code}}else r[c]={message:u,type:o};if(i.code==="invalid_union"&&i.errors.forEach(function(y){return y.forEach(function(g){return e.push(g)})}),t){var p=r[c].types,m=p&&p[i.code];r[c]=ug(c,t,r,o,m?[].concat(m,i.message):i.message)}e.shift()}return r}function XL(e,t,r){if(r===void 0&&(r={}),(function(i){return"_def"in i&&typeof i._def=="object"&&"typeName"in i._def})(e))return function(i,o,u){try{return Promise.resolve(s_(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(c){return u.shouldUseNativeValidation&&Pm({},u),{errors:{},values:r.raw?Object.assign({},i):c}})},function(c){if((function(h){return Array.isArray(h?.issues)})(c))return{values:{},errors:P1(qL(c.errors,!u.shouldUseNativeValidation&&u.criteriaMode==="all"),u)};throw c}))}catch(c){return Promise.reject(c)}};if((function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,o,u){try{return Promise.resolve(s_(function(){return Promise.resolve((r.mode==="sync"?_U:wU)(e,i,t)).then(function(c){return u.shouldUseNativeValidation&&Pm({},u),{errors:{},values:r.raw?Object.assign({},i):c}})},function(c){if((function(h){return h instanceof gg})(c))return{values:{},errors:P1(IL(c.issues,!u.shouldUseNativeValidation&&u.criteriaMode==="all"),u)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}const WL=ae("ZodISODateTime",(e,t)=>{E8.init(e,t),xt.init(e,t)});function KL(e){return OL(WL,e)}const QL=ae("ZodISODate",(e,t)=>{T8.init(e,t),xt.init(e,t)});function JL(e){return AL(QL,e)}const e9=ae("ZodISOTime",(e,t)=>{O8.init(e,t),xt.init(e,t)});function t9(e){return CL(e9,e)}const n9=ae("ZodISODuration",(e,t)=>{A8.init(e,t),xt.init(e,t)});function r9(e){return DL(n9,e)}const a9=(e,t)=>{gg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>bU(e,r)},flatten:{value:r=>vU(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Gm,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Gm,2)}},isEmpty:{get(){return e.issues.length===0}}})},sr=ae("ZodError",a9,{Parent:Error}),i9=xf(sr),s9=Ef(sr),o9=Tf(sr),l9=Of(sr),u9=EU(sr),c9=TU(sr),f9=OU(sr),d9=AU(sr),h9=CU(sr),m9=DU(sr),p9=MU(sr),g9=RU(sr),Kt=ae("ZodType",(e,t)=>(Gt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Gi(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),e.clone=(r,i)=>li(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>i9(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>o9(e,r,i),e.parseAsync=async(r,i)=>s9(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>l9(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>u9(e,r,i),e.decode=(r,i)=>c9(e,r,i),e.encodeAsync=async(r,i)=>f9(e,r,i),e.decodeAsync=async(r,i)=>d9(e,r,i),e.safeEncode=(r,i)=>h9(e,r,i),e.safeDecode=(r,i)=>m9(e,r,i),e.safeEncodeAsync=async(r,i)=>p9(e,r,i),e.safeDecodeAsync=async(r,i)=>g9(e,r,i),e.refine=(r,i)=>e.check(oY(r,i)),e.superRefine=r=>e.check(lY(r)),e.overwrite=r=>e.check(uo(r)),e.optional=()=>u_(e),e.nullable=()=>c_(e),e.nullish=()=>u_(c_(e)),e.nonoptional=r=>eY(e,r),e.array=()=>H9(e),e.or=r=>F9([e,r]),e.and=r=>P9(e,r),e.transform=r=>f_(e,I9(r)),e.default=r=>K9(e,r),e.prefault=r=>J9(e,r),e.catch=r=>nY(e,r),e.pipe=r=>f_(e,r),e.readonly=()=>iY(e),e.describe=r=>{const i=e.clone();return uc.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return uc.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return uc.get(e);const i=e.clone();return uc.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),NE=ae("_ZodString",(e,t)=>{yg.init(e,t),Kt.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(NL(...i)),e.includes=(...i)=>e.check(jL(...i)),e.startsWith=(...i)=>e.check(UL(...i)),e.endsWith=(...i)=>e.check(LL(...i)),e.min=(...i)=>e.check(Fc(...i)),e.max=(...i)=>e.check(ME(...i)),e.length=(...i)=>e.check(RE(...i)),e.nonempty=(...i)=>e.check(Fc(1,...i)),e.lowercase=i=>e.check(kL(i)),e.uppercase=i=>e.check(zL(i)),e.trim=()=>e.check(HL()),e.normalize=(...i)=>e.check(YL(...i)),e.toLowerCase=()=>e.check(VL()),e.toUpperCase=()=>e.check(BL()),e.slugify=()=>e.check($L())}),y9=ae("ZodString",(e,t)=>{yg.init(e,t),NE.init(e,t),e.email=r=>e.check(iL(v9,r)),e.url=r=>e.check(cL(b9,r)),e.jwt=r=>e.check(TL(z9,r)),e.emoji=r=>e.check(fL(_9,r)),e.guid=r=>e.check(i_(o_,r)),e.uuid=r=>e.check(sL(cc,r)),e.uuidv4=r=>e.check(oL(cc,r)),e.uuidv6=r=>e.check(lL(cc,r)),e.uuidv7=r=>e.check(uL(cc,r)),e.nanoid=r=>e.check(dL(w9,r)),e.guid=r=>e.check(i_(o_,r)),e.cuid=r=>e.check(hL(S9,r)),e.cuid2=r=>e.check(mL(x9,r)),e.ulid=r=>e.check(pL(E9,r)),e.base64=r=>e.check(SL(R9,r)),e.base64url=r=>e.check(xL(N9,r)),e.xid=r=>e.check(gL(T9,r)),e.ksuid=r=>e.check(yL(O9,r)),e.ipv4=r=>e.check(vL(A9,r)),e.ipv6=r=>e.check(bL(C9,r)),e.cidrv4=r=>e.check(_L(D9,r)),e.cidrv6=r=>e.check(wL(M9,r)),e.e164=r=>e.check(EL(k9,r)),e.datetime=r=>e.check(KL(r)),e.date=r=>e.check(JL(r)),e.time=r=>e.check(t9(r)),e.duration=r=>e.check(r9(r))});function pm(e){return aL(y9,e)}const xt=ae("ZodStringFormat",(e,t)=>{wt.init(e,t),NE.init(e,t)}),v9=ae("ZodEmail",(e,t)=>{p8.init(e,t),xt.init(e,t)}),o_=ae("ZodGUID",(e,t)=>{h8.init(e,t),xt.init(e,t)}),cc=ae("ZodUUID",(e,t)=>{m8.init(e,t),xt.init(e,t)}),b9=ae("ZodURL",(e,t)=>{g8.init(e,t),xt.init(e,t)}),_9=ae("ZodEmoji",(e,t)=>{y8.init(e,t),xt.init(e,t)}),w9=ae("ZodNanoID",(e,t)=>{v8.init(e,t),xt.init(e,t)}),S9=ae("ZodCUID",(e,t)=>{b8.init(e,t),xt.init(e,t)}),x9=ae("ZodCUID2",(e,t)=>{_8.init(e,t),xt.init(e,t)}),E9=ae("ZodULID",(e,t)=>{w8.init(e,t),xt.init(e,t)}),T9=ae("ZodXID",(e,t)=>{S8.init(e,t),xt.init(e,t)}),O9=ae("ZodKSUID",(e,t)=>{x8.init(e,t),xt.init(e,t)}),A9=ae("ZodIPv4",(e,t)=>{C8.init(e,t),xt.init(e,t)}),C9=ae("ZodIPv6",(e,t)=>{D8.init(e,t),xt.init(e,t)}),D9=ae("ZodCIDRv4",(e,t)=>{M8.init(e,t),xt.init(e,t)}),M9=ae("ZodCIDRv6",(e,t)=>{R8.init(e,t),xt.init(e,t)}),R9=ae("ZodBase64",(e,t)=>{N8.init(e,t),xt.init(e,t)}),N9=ae("ZodBase64URL",(e,t)=>{z8.init(e,t),xt.init(e,t)}),k9=ae("ZodE164",(e,t)=>{j8.init(e,t),xt.init(e,t)}),z9=ae("ZodJWT",(e,t)=>{L8.init(e,t),xt.init(e,t)}),j9=ae("ZodUnknown",(e,t)=>{Y8.init(e,t),Kt.init(e,t)});function l_(){return ML(j9)}const U9=ae("ZodNever",(e,t)=>{H8.init(e,t),Kt.init(e,t)});function L9(e){return RL(U9,e)}const Y9=ae("ZodArray",(e,t)=>{V8.init(e,t),Kt.init(e,t),e.element=t.element,e.min=(r,i)=>e.check(Fc(r,i)),e.nonempty=r=>e.check(Fc(1,r)),e.max=(r,i)=>e.check(ME(r,i)),e.length=(r,i)=>e.check(RE(r,i)),e.unwrap=()=>e.element});function H9(e,t){return FL(Y9,e,t)}const V9=ae("ZodObject",(e,t)=>{$8.init(e,t),Kt.init(e,t),dt(e,"shape",()=>t.shape),e.keyof=()=>G9(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:l_()}),e.loose=()=>e.clone({...e._zod.def,catchall:l_()}),e.strict=()=>e.clone({...e._zod.def,catchall:L9()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>hU(e,r),e.safeExtend=r=>mU(e,r),e.merge=r=>pU(e,r),e.pick=r=>fU(e,r),e.omit=r=>dU(e,r),e.partial=(...r)=>gU(kE,e,r[0]),e.required=(...r)=>yU(zE,e,r[0])});function B9(e,t){const r={type:"object",shape:e??{},...ke(t)};return new V9(r)}const $9=ae("ZodUnion",(e,t)=>{F8.init(e,t),Kt.init(e,t),e.options=t.options});function F9(e,t){return new $9({type:"union",options:e,...ke(t)})}const Z9=ae("ZodIntersection",(e,t)=>{Z8.init(e,t),Kt.init(e,t)});function P9(e,t){return new Z9({type:"intersection",left:e,right:t})}const Im=ae("ZodEnum",(e,t)=>{P8.init(e,t),Kt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const c of i)if(r.has(c))u[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new Im({...t,checks:[],...ke(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const c of i)if(r.has(c))delete u[c];else throw new Error(`Key ${c} not found in enum`);return new Im({...t,checks:[],...ke(o),entries:u})}});function G9(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Im({type:"enum",entries:r,...ke(t)})}const q9=ae("ZodTransform",(e,t)=>{G8.init(e,t),Kt.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new vE(e.constructor.name);r.addIssue=u=>{if(typeof u=="string")r.issues.push(Sl(u,r.value,t));else{const c=u;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=e),r.issues.push(Sl(c))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(u=>(r.value=u,r)):(r.value=o,r)}});function I9(e){return new q9({type:"transform",transform:e})}const kE=ae("ZodOptional",(e,t)=>{q8.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function u_(e){return new kE({type:"optional",innerType:e})}const X9=ae("ZodNullable",(e,t)=>{I8.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function c_(e){return new X9({type:"nullable",innerType:e})}const W9=ae("ZodDefault",(e,t)=>{X8.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function K9(e,t){return new W9({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():wE(t)}})}const Q9=ae("ZodPrefault",(e,t)=>{W8.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function J9(e,t){return new Q9({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():wE(t)}})}const zE=ae("ZodNonOptional",(e,t)=>{K8.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function eY(e,t){return new zE({type:"nonoptional",innerType:e,...ke(t)})}const tY=ae("ZodCatch",(e,t)=>{Q8.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nY(e,t){return new tY({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rY=ae("ZodPipe",(e,t)=>{J8.init(e,t),Kt.init(e,t),e.in=t.in,e.out=t.out});function f_(e,t){return new rY({type:"pipe",in:e,out:t})}const aY=ae("ZodReadonly",(e,t)=>{eL.init(e,t),Kt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function iY(e){return new aY({type:"readonly",innerType:e})}const sY=ae("ZodCustom",(e,t)=>{tL.init(e,t),Kt.init(e,t)});function oY(e,t={}){return ZL(sY,e,t)}function lY(e){return PL(e)}var uY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cY=uY.reduce((e,t)=>{const r=kp(`Primitive.${t}`),i=_.forwardRef((o,u)=>{const{asChild:c,...h}=o,p=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(p,{...h,ref:u})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),fY="Label",jE=_.forwardRef((e,t)=>w.jsx(cY.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));jE.displayName=fY;var dY=jE;function hY(e){const t=Ve.c(8);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);let o;t[3]!==r?(o=rt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",r),t[3]=r,t[4]=o):o=t[4];let u;return t[5]!==i||t[6]!==o?(u=w.jsx(dY,{"data-slot":"label",className:o,...i}),t[5]=i,t[6]=o,t[7]=u):u=t[7],u}const mY=V5,UE=_.createContext({}),gm=e=>{const t=Ve.c(9);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r.name?(i={name:r.name},t[2]=r.name,t[3]=i):i=t[3];let o;t[4]!==r?(o=w.jsx(F5,{...r}),t[4]=r,t[5]=o):o=t[5];let u;return t[6]!==i||t[7]!==o?(u=w.jsx(UE.Provider,{value:i,children:o}),t[6]=i,t[7]=o,t[8]=u):u=t[8],u},vg=()=>{const e=Ve.c(13),t=_.useContext(UE),r=_.useContext(LE),{getFieldState:i}=_f();let o;e[0]!==t.name?(o={name:t.name},e[0]=t.name,e[1]=o):o=e[1];const u=fE(o);let c;e[2]!==t.name||e[3]!==u||e[4]!==i?(c=i(t.name,u),e[2]=t.name,e[3]=u,e[4]=i,e[5]=c):c=e[5];const h=c;if(!t)throw new Error("useFormField should be used within ");const{id:p}=r,m=`${p}-form-item`,y=`${p}-form-item-description`,g=`${p}-form-item-message`;let b;return e[6]!==t.name||e[7]!==h||e[8]!==p||e[9]!==m||e[10]!==y||e[11]!==g?(b={id:p,name:t.name,formItemId:m,formDescriptionId:y,formMessageId:g,...h},e[6]=t.name,e[7]=h,e[8]=p,e[9]=m,e[10]=y,e[11]=g,e[12]=b):b=e[12],b},LE=_.createContext({});function ym(e){const t=Ve.c(13);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);const o=_.useId();let u;t[3]!==o?(u={id:o},t[3]=o,t[4]=u):u=t[4];let c;t[5]!==r?(c=rt("grid gap-2",r),t[5]=r,t[6]=c):c=t[6];let h;t[7]!==i||t[8]!==c?(h=w.jsx("div",{"data-slot":"form-item",className:c,...i}),t[7]=i,t[8]=c,t[9]=h):h=t[9];let p;return t[10]!==u||t[11]!==h?(p=w.jsx(LE.Provider,{value:u,children:h}),t[10]=u,t[11]=h,t[12]=p):p=t[12],p}function fc(e){const t=Ve.c(10);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);const{error:o,formItemId:u}=vg(),c=!!o;let h;t[3]!==r?(h=rt("data-[error=true]:text-destructive",r),t[3]=r,t[4]=h):h=t[4];let p;return t[5]!==u||t[6]!==i||t[7]!==c||t[8]!==h?(p=w.jsx(hY,{"data-slot":"form-label","data-error":c,className:h,htmlFor:u,...i}),t[5]=u,t[6]=i,t[7]=c,t[8]=h,t[9]=p):p=t[9],p}function vm(e){const t=Ve.c(7);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];const{error:i,formItemId:o,formDescriptionId:u,formMessageId:c}=vg(),h=i?`${u} ${c}`:`${u}`,p=!!i;let m;return t[2]!==o||t[3]!==r||t[4]!==h||t[5]!==p?(m=w.jsx(zp,{"data-slot":"form-control",id:o,"aria-describedby":h,"aria-invalid":p,...r}),t[2]=o,t[3]=r,t[4]=h,t[5]=p,t[6]=m):m=t[6],m}function bm(e){const t=Ve.c(10);let r,i;t[0]!==e?({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i):(r=t[1],i=t[2]);const{error:o,formMessageId:u}=vg(),c=o?String(o?.message??""):i.children;if(!c)return null;let h;t[3]!==r?(h=rt("text-destructive text-sm",r),t[3]=r,t[4]=h):h=t[4];let p;return t[5]!==c||t[6]!==u||t[7]!==i||t[8]!==h?(p=w.jsx("p",{"data-slot":"form-message",id:u,className:h,...i,children:c}),t[5]=c,t[6]=u,t[7]=i,t[8]=h,t[9]=p):p=t[9],p}function _m(e){const t=Ve.c(10);let r,i,o;t[0]!==e?({className:r,type:o,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o):(r=t[1],i=t[2],o=t[3]);let u;t[4]!==r?(u=rt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",r),t[4]=r,t[5]=u):u=t[5];let c;return t[6]!==i||t[7]!==u||t[8]!==o?(c=w.jsx("input",{type:o,"data-slot":"input",className:u,...i}),t[6]=i,t[7]=u,t[8]=o,t[9]=c):c=t[9],c}const pY=B9({name:pm().min(1,"Tên là bắt buộc"),email:pm().email("Email không hợp lệ"),avatar:pm().optional()});function gY({user:e,onSave:t,children:r,trackingOpen:i}){const o=zk(),u=!!e,[c,h]=_.useState(!1),[p,m]=_.useState(!1),{captureRegisterImage:y,setCaptureRegisterImage:g}=ai(),b=aU({resolver:XL(pY),defaultValues:{name:"",email:"",avatar:""}});_.useEffect(()=>{e?b.reset({name:e.name,email:e.email,avatar:e.avatar??""}):b.reset({name:"",email:"",avatar:""})},[e,c,b]);const T=async()=>{await o({title:"Thông báo",message:"Bạn muốn hủy đăng ký. Mọi dữ liệu bạn nhập sẽ bị mất",confirmText:"Discard",cancelText:"Hủy",variant:"warning"})&&(h(!1),g(null))},x=async E=>{try{m(!0);const O={id:e?.id||Date.now().toString(),...E,avatar:E.avatar||null},{data:D}=await Qs.register({user:O,file:y});console.log({data:D}),t?.(O),h(!1),g(null),ma.success(D?.message||"Đăng ký thành công !")}catch(O){console.log({error:O}),ma.error(O?.message||"Internal Server Error")}finally{m(!1)}};return _.useEffect(()=>{i!==void 0&&h(i)},[i]),_.useEffect(()=>{if(y)return()=>{URL.revokeObjectURL(y)}},[y]),w.jsxs(Cp,{open:c,onOpenChange:E=>{if(!E){T();return}h(!0)},children:[w.jsx(nS,{children:r}),w.jsxs(Dp,{className:"sm:max-w-[425px]",children:[w.jsxs(Mp,{children:[w.jsx(Rp,{children:u?"Cập nhật thông tin":"Tạo người dùng mới"}),w.jsx(Np,{children:u?"Cập nhật thông tin người dùng của bạn":"Nhập thông tin để tạo người dùng mới"})]}),w.jsx(mY,{...b,children:w.jsxs("form",{onSubmit:b.handleSubmit(x),className:"space-y-4",children:[w.jsx(gm,{control:b.control,name:"name",render:({field:E})=>w.jsxs(ym,{children:[w.jsxs(fc,{children:["Tên ",w.jsx("span",{className:"text-red-600",children:"*"})]}),w.jsx(vm,{children:w.jsx(_m,{placeholder:"Nhập tên người dùng",...E})}),w.jsx(bm,{})]})}),w.jsx(gm,{control:b.control,name:"email",render:({field:E})=>w.jsxs(ym,{children:[w.jsxs(fc,{children:["Email ",w.jsx("span",{className:"text-red-600",children:"*"})]}),w.jsx(vm,{children:w.jsx(_m,{type:"email",placeholder:"Nhập email",...E})}),w.jsx(bm,{})]})}),w.jsx(gm,{control:b.control,name:"avatar",render:({field:E})=>w.jsxs(ym,{children:[w.jsx(fc,{children:"Avatar URL"}),w.jsx(vm,{children:w.jsx(_m,{placeholder:"https://example.com/avatar.jpg",...E})}),w.jsx(bm,{})]})}),w.jsx(fc,{children:"Ảnh từ camera"}),w.jsx("a",{target:"_blank",href:URL.createObjectURL(y),children:w.jsxs(hn,{size:"sm",variant:"outline",className:"w-full bg-transparent",type:"button",children:[w.jsx(ap,{className:"w-4 h-4 mr-2"}),"Xem ảnh"]})}),w.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[w.jsx(hn,{type:"button",variant:"outline",onClick:T,children:"Hủy"}),w.jsxs(hn,{type:"submit",children:[!p&&u?"Cập nhật":"Tạo mới",p&&w.jsx(mc,{className:"animate-spin"})]})]})]})})]})]})}function yY(){const e=Ve.c(9),{isAutoChecking:t,captureRegisterImage:r,isCountDown:i}=ai();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=w.jsx(MC,{className:"mr-2 size-4"}),e[0]=o):o=e[0];let u;e[1]!==t?(u=w.jsx(L5,{children:w.jsxs(hn,{onClick:vY,disabled:t,className:"w-full bg-green-600 hover:bg-green-700 text-white font-semibold",children:[o,"Tạo User Checking"]})}),e[1]=t,e[2]=u):u=e[2];let c;e[3]!==r||e[4]!==i?(c=r&&!i&&w.jsx(gY,{trackingOpen:!0}),e[3]=r,e[4]=i,e[5]=c):c=e[5];let h;return e[6]!==u||e[7]!==c?(h=w.jsxs(w.Fragment,{children:[u,c]}),e[6]=u,e[7]=c,e[8]=h):h=e[8],h}function vY(){}function bY({type:e,str:t}){const r=t||(e==="check in"?"Check-in successful":e==="check out"?"Check-out successful":"");if(!r)return;const i=new SpeechSynthesisUtterance(r);i.lang="en-US",i.rate=1,i.pitch=1,i.volume=1,speechSynthesis.speak(i)}function _Y(){const e=_.useRef(null),{canvasRef:t,videoRef:r}=ai(),{currentUser:i,setCurrentUser:o}=sE(),{isAutoChecking:u,setIsAutoChecking:c,setRefreshLog:h}=ai(),p=_.useRef(null),[m,y]=_.useState(!1),[g,b]=_.useState(!1),T=()=>{u?(p.current&&(clearInterval(p.current),p.current=null),c(!1)):(p.current=setInterval(()=>{E()},3e3),c(!0))},x=async()=>{if(!i){ma.warning("Vui lòng chọn user để tạo checkpoint");return}try{b(!0);const O=await Rm(r,t),{data:D}=await Qs.register({user:i,file:O});if(!D){ma.error(D?.message||"Error In Checkpoint: "+JSON.stringify(D));return}ma.success(D?.message||"Tạo checkpoint thành công")}catch(O){const D=O;ma.error(D.response?.data?.message||"Error In Checkpoint: "+JSON.stringify(D))}finally{b(!1)}},E=_.useCallback(async()=>{try{y(!0);const O=await Rm(r,t),{data:D}=await Qs.checkin({file:O});if(!D||!D?.data){ma.error(D?.message||"Error In Checking: "+JSON.stringify(D));return}D?.checking&&(o(D?.data||null),e.current=setTimeout(()=>{o(null),e.current=null},2e3));const U=D?.message||`Checking thành công lúc: ${tS(new Date().toLocaleString())}`;if(ma.success(U),!D?.status)return;bY({type:D?.status}),h(!0)}catch(O){const D=O,U=D.response?.data?.message||"Error In Checking: "+JSON.stringify(D);if(U.includes("No face detected"))return;ma.error(U)}finally{y(!1)}},[t,o,r]);return _.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),_.useEffect(()=>{const O=D=>{if(D.code==="Space"){if(D.preventDefault(),m)return;E()}};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[E,m]),w.jsxs("div",{className:"absolute bottom-10 px-4 right-0 left-0 grid grid-cols-3 gap-4",children:[w.jsxs(hn,{onClick:E,disabled:u,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold",children:[!m&&w.jsxs(w.Fragment,{children:[w.jsx(ap,{className:"mr-2 size-4"}),"Điểm Danh Ngay"]}),m&&w.jsx(mc,{className:"size-4 animate-spin"})]}),w.jsxs(hn,{onClick:T,variant:u?"destructive":"outline",className:rt("w-full font-semibold",u&&"animate-pulse"),children:[!m&&u?w.jsxs(w.Fragment,{children:[w.jsx(xC,{className:"mr-2 size-4"}),"Dừng Tự Động"]}):w.jsxs(w.Fragment,{children:[w.jsx(bC,{className:"mr-2 size-4"}),"Tự Động Điểm Danh"]}),m&&w.jsx(mc,{className:"size-4 animate-spin"})]}),i&&w.jsxs(hn,{disabled:u,onClick:x,className:rt("w-full font-semibold"),children:[!g&&w.jsxs(w.Fragment,{children:[w.jsx(fC,{}),"Tạo Check Point"]}),g&&w.jsx(mc,{className:"size-4 animate-spin"})]}),!i&&w.jsx(yY,{})]})}function wY(){const[e,t]=_.useState(!0),[r,i]=_.useState(!1),{setCanvasRef:o,setVideoRef:u}=ai(),{isCountDown:c,setCaptureRegisterImage:h,setIsCountDown:p}=ai(),m=_.useRef(null),y=_.useRef(null),g=async()=>{try{const{data:b}=await dz.timekeepings(),x=(b?.data||[]).map(E=>({name:E?.user?.name,email:E?.user?.email,avatar:E?.user?.avatar}));await Promise.all(x.map(E=>Qs.registerSimple({user:E}))),console.log("Sync hoàn tất!")}catch(b){console.log("Sync error:",b)}};return _.useEffect(()=>((async()=>{try{const T=await navigator.mediaDevices.getUserMedia({video:{width:1280,height:720,facingMode:"user"}});m.current&&(m.current.srcObject=T)}catch(T){console.error("Không thể truy cập camera:",T)}})(),()=>{m.current?.srcObject&&(m.current?.srcObject).getTracks().forEach(x=>x.stop())}),[]),_.useEffect(()=>{g()},[]),_.useEffect(()=>{o(y),u(m)},[m,y]),w.jsx("div",{className:"min-h-screen bg-white",children:w.jsxs("div",{className:"flex h-screen",children:[w.jsx(i5,{isSidebarOpen:r}),w.jsx("div",{className:rt("flex-1 transition-all duration-300 ease-in-out",r&&"ml-96",e&&"mr-96"),children:w.jsx("div",{className:"h-full flex flex-col p-6",children:w.jsxs(MS,{className:"flex-1 overflow-hidden bg-black relative group",children:[w.jsx("video",{ref:m,autoPlay:!0,playsInline:!0,className:"w-full h-full object-cover"}),w.jsx("div",{className:"absolute inset-0 border-4 border-blue-500/30 pointer-events-none"}),c&&w.jsx(gz,{onCountdowned:async()=>{const b=await Rm(m,y);h(b),p(!1)}}),w.jsx(hn,{onClick:()=>i(!r),variant:"outline",size:"icon",className:"absolute top-1/2 -translate-y-1/2 left-4 bg-white/90 hover:bg-white shadow-lg",children:r?w.jsx(Ub,{className:"size-4"}):w.jsx(Lb,{className:"size-4"})}),w.jsx(hn,{onClick:()=>t(!e),variant:"outline",size:"icon",className:"absolute top-1/2 -translate-y-1/2 right-4 bg-white/90 hover:bg-white shadow-lg",children:e?w.jsx(Lb,{className:"size-4"}):w.jsx(Ub,{className:"size-4"})}),w.jsx(_Y,{})]})})}),w.jsx(u5,{isSidebarOpen:e}),w.jsx("canvas",{ref:y,className:"hidden"})]})})}var SY=(e,t,r,i,o,u,c,h)=>{let p=document.documentElement,m=["light","dark"];function y(T){(Array.isArray(e)?e:[e]).forEach(x=>{let E=x==="class",O=E&&u?o.map(D=>u[D]||D):o;E?(p.classList.remove(...O),p.classList.add(u&&u[T]?u[T]:T)):p.setAttribute(x,T)}),g(T)}function g(T){h&&m.includes(T)&&(p.style.colorScheme=T)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)y(i);else try{let T=localStorage.getItem(t)||r,x=c&&T==="system"?b():T;y(x)}catch{}},xY=_.createContext(void 0),EY={setTheme:e=>{},themes:[]},TY=()=>{var e;return(e=_.useContext(xY))!=null?e:EY};_.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:i,enableColorScheme:o,defaultTheme:u,value:c,themes:h,nonce:p,scriptProps:m})=>{let y=JSON.stringify([r,t,u,e,h,c,i,o]).slice(1,-1);return _.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${SY.toString()})(${y})`}})});const OY=e=>{const t=Ve.c(7);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];const{theme:i}=TY(),u=i===void 0?"system":i;let c,h;t[2]===Symbol.for("react.memo_cache_sentinel")?(c={success:w.jsx(sC,{className:"size-4"}),info:w.jsx(q_,{className:"size-4"}),warning:w.jsx(I_,{className:"size-4"}),error:w.jsx(yC,{className:"size-4"}),loading:w.jsx(mC,{className:"size-4 animate-spin"})},h={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},t[2]=c,t[3]=h):(c=t[2],h=t[3]);let p;return t[4]!==r||t[5]!==u?(p=w.jsx(U5,{theme:u,className:"toaster group",icons:c,style:h,...r}),t[4]=r,t[5]=u,t[6]=p):p=t[6],p};iO.createRoot(document.getElementById("root")).render(w.jsx(_.StrictMode,{children:w.jsxs(kk,{children:[w.jsx(wY,{}),w.jsx(OY,{richColors:!0,position:"top-right"})]})}))});export default AY();
diff --git a/TrackingToolWeb/static/index.html b/TrackingToolWeb/static/index.html
index 63f95d8..0f4a9ba 100644
--- a/TrackingToolWeb/static/index.html
+++ b/TrackingToolWeb/static/index.html
@@ -8,7 +8,7 @@
= limit:
+ print(f"==> Bỏ qua {user.get('email')} vì đã đủ {limit} encoding ({count}/{limit})")
+ continue
+
+ # 👉 Nếu chưa đủ thì mới xử lý ảnh
+ histories_list = extract_images(histories)
+
+ for image in histories_list:
+ # Kiểm tra lại lần nữa trước khi thêm (tránh dư khi có nhiềsu ảnh)
+ if count >= limit:
+ print(f"==> Đã đạt {limit} encoding, dừng cho {user.get('email')}")
+ break
+
+ avatar = URL_BASE_RESOURCE + user.get("avatar", "")
+ image_url = URL_BASE_RESOURCE + image
+
+ print(user.get("name"), image_url)
+
+ result = register_face_handler(
+ name=user.get("name"),
+ email=user.get("email"),
+ avatar=avatar,
+ image_url=image_url
+ )
+
+ print("Result:", result)
+
+ # Tăng biến đếm sau mỗi lần thêm
+ if result.get("status"):
+ count += 1
+
+ db.close()
+ return response
+
+def test_valid_data():
+ response = users({"month": 10, "year": 2025})
+
+ if not response.get("status"):
+ print("API trả status=False")
+ return
+
+ raw_data = response.get("data")
+
+ if isinstance(raw_data, str):
+ try:
+ data = json.loads(raw_data)
+ except Exception as e:
+ print("[ERROR] Không parse được data:", e)
+ return
+ else:
+ data = raw_data
+
+ for item in data:
+ histories = item.get("history", [])
+ user = item.get("user")
+
+ if len(histories) <= 0 or not user:
+ continue
+
+ histories_list = extract_images(histories)
+
+ for image in histories_list:
+ # Tải ảnh từ server trước khi gửi
+ image_url = URL_BASE_RESOURCE + image
+ try:
+ res = requests.get(image_url)
+ res.raise_for_status()
+ except Exception as e:
+ print(f"[ERROR] Không tải được ảnh {image_url}: {e}")
+ continue
+
+ # Lưu tạm để upload
+ with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as tmp:
+ tmp.write(res.content)
+ tmp_path = tmp.name
+
+ # Gửi lên API
+ with open(tmp_path, "rb") as f:
+ r = requests.post(
+ "http://localhost:8000/checkin",
+ files={"file": f},
+ data={"camera_id": "cam1"}
+ )
+ print(r.status_code, r.json(), user.get("name"))
+
+ # Xóa file tạm
+ os.remove(tmp_path)
+
+ return response
+
+
+
+
+
+# sync_data_user()
+
+# test_valid_data()
+
+
+
diff --git a/TrackingToolWeb/uploads/checkin.jpg b/TrackingToolWeb/uploads/checkin.jpg
index d8906dd..0408ab9 100644
Binary files a/TrackingToolWeb/uploads/checkin.jpg and b/TrackingToolWeb/uploads/checkin.jpg differ
diff --git a/TrackingToolWeb/uploads/frame.jpg b/TrackingToolWeb/uploads/frame.jpg
index 391e939..b81a94e 100644
Binary files a/TrackingToolWeb/uploads/frame.jpg and b/TrackingToolWeb/uploads/frame.jpg differ