@zaide6137/m3-components-web 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,69 @@
1
- import {createContext,useRef,useState,useEffect,useMemo,useContext}from'react';import {jsx}from'react/jsx-runtime';function z(r){return r<0?-1:r===0?0:1}function nt(r,t,e){return (1-e)*r+e*t}function Gt(r,t,e){return e<r?r:e>t?t:e}function N(r,t,e){return e<r?r:e>t?t:e}function st(r){return r=r%360,r<0&&(r=r+360),r}function U(r){return r=r%360,r<0&&(r=r+360),r}function ht(r,t){let e=r[0]*t[0][0]+r[1]*t[0][1]+r[2]*t[0][2],n=r[0]*t[1][0]+r[1]*t[1][1]+r[2]*t[1][2],a=r[0]*t[2][0]+r[1]*t[2][1]+r[2]*t[2][2];return [e,n,a]}var Yt=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],oe=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Kt=[95.047,100,108.883];function Tt(r,t,e){return (255<<24|(r&255)<<16|(t&255)<<8|e&255)>>>0}function Bt(r){let t=at(r[0]),e=at(r[1]),n=at(r[2]);return Tt(t,e,n)}function ft(r){return r>>16&255}function pt(r){return r>>8&255}function dt(r){return r&255}function $t(r,t,e){let n=oe,a=n[0][0]*r+n[0][1]*t+n[0][2]*e,i=n[1][0]*r+n[1][1]*t+n[1][2]*e,o=n[2][0]*r+n[2][1]*t+n[2][2]*e,l=at(a),f=at(i),h=at(o);return Tt(l,f,h)}function ie(r){let t=j(ft(r)),e=j(pt(r)),n=j(dt(r));return ht([t,e,n],Yt)}function Rt(r){let t=j(ft(r)),e=j(pt(r)),n=j(dt(r)),a=Yt,i=a[0][0]*t+a[0][1]*e+a[0][2]*n,o=a[1][0]*t+a[1][1]*e+a[1][2]*n,l=a[2][0]*t+a[2][1]*e+a[2][2]*n,f=Kt,h=i/f[0],p=o/f[1],S=l/f[2],g=mt(h),y=mt(p),d=mt(S),m=116*y-16,P=500*(g-y),b=200*(y-d);return [m,P,b]}function Xt(r){let t=$(r),e=at(t);return Tt(e,e,e)}function At(r){let t=ie(r)[1];return 116*mt(t/100)-16}function $(r){return 100*se((r+16)/116)}function gt(r){return mt(r/100)*116-16}function j(r){let t=r/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function at(r){let t=r/100,e=0;return t<=.0031308?e=t*12.92:e=1.055*Math.pow(t,1/2.4)-.055,Gt(0,255,Math.round(e*255))}function qt(){return Kt}function mt(r){let t=.008856451679035631,e=24389/27;return r>t?Math.pow(r,1/3):(e*r+16)/116}function se(r){let t=.008856451679035631,e=24389/27,n=r*r*r;return n>t?n:(116*r-16)/e}var G=class r{static make(t=qt(),e=200/Math.PI*$(50)/100,n=50,a=2,i=false){let o=t,l=o[0]*.401288+o[1]*.650173+o[2]*-0.051461,f=o[0]*-0.250268+o[1]*1.204414+o[2]*.045854,h=o[0]*-2079e-6+o[1]*.048952+o[2]*.953127,p=.8+a/10,S=p>=.9?nt(.59,.69,(p-.9)*10):nt(.525,.59,(p-.8)*10),g=i?1:p*(1-1/3.6*Math.exp((-e-42)/92));g=g>1?1:g<0?0:g;let y=p,d=[g*(100/l)+1-g,g*(100/f)+1-g,g*(100/h)+1-g],m=1/(5*e+1),P=m*m*m*m,b=1-P,v=P*e+.1*b*b*Math.cbrt(5*e),I=$(n)/t[1],B=1.48+Math.sqrt(I),O=.725/Math.pow(I,.2),R=O,E=[Math.pow(v*d[0]*l/100,.42),Math.pow(v*d[1]*f/100,.42),Math.pow(v*d[2]*h/100,.42)],H=[400*E[0]/(E[0]+27.13),400*E[1]/(E[1]+27.13),400*E[2]/(E[2]+27.13)],_=(2*H[0]+H[1]+.05*H[2])*O;return new r(I,_,O,R,S,y,d,v,Math.pow(v,.25),B)}constructor(t,e,n,a,i,o,l,f,h,p){this.n=t,this.aw=e,this.nbb=n,this.ncb=a,this.c=i,this.nc=o,this.rgbD=l,this.fl=f,this.fLRoot=h,this.z=p;}};G.DEFAULT=G.make();var W=class r{constructor(t,e,n,a,i,o,l,f,h){this.hue=t,this.chroma=e,this.j=n,this.q=a,this.m=i,this.s=o,this.jstar=l,this.astar=f,this.bstar=h;}distance(t){let e=this.jstar-t.jstar,n=this.astar-t.astar,a=this.bstar-t.bstar,i=Math.sqrt(e*e+n*n+a*a);return 1.41*Math.pow(i,.63)}static fromInt(t){return r.fromIntInViewingConditions(t,G.DEFAULT)}static fromIntInViewingConditions(t,e){let n=(t&16711680)>>16,a=(t&65280)>>8,i=t&255,o=j(n),l=j(a),f=j(i),h=.41233895*o+.35762064*l+.18051042*f,p=.2126*o+.7152*l+.0722*f,S=.01932141*o+.11916382*l+.95034478*f,g=.401288*h+.650173*p-.051461*S,y=-0.250268*h+1.204414*p+.045854*S,d=-2079e-6*h+.048952*p+.953127*S,m=e.rgbD[0]*g,P=e.rgbD[1]*y,b=e.rgbD[2]*d,v=Math.pow(e.fl*Math.abs(m)/100,.42),I=Math.pow(e.fl*Math.abs(P)/100,.42),B=Math.pow(e.fl*Math.abs(b)/100,.42),O=z(m)*400*v/(v+27.13),R=z(P)*400*I/(I+27.13),E=z(b)*400*B/(B+27.13),H=(11*O+-12*R+E)/11,_=(O+R-2*E)/9,L=(20*O+20*R+21*E)/20,J=(40*O+20*R+E)/20,it=Math.atan2(_,H)*180/Math.PI,K=U(it),Pt=K*Math.PI/180,Ct=J*e.nbb,et=100*Math.pow(Ct/e.aw,e.c*e.z),St=4/e.c*Math.sqrt(et/100)*(e.aw+4)*e.fLRoot,vt=K<20.14?K+360:K,Ft=.25*(Math.cos(vt*Math.PI/180+2)+3.8),It=5e4/13*Ft*e.nc*e.ncb*Math.sqrt(H*H+_*_)/(L+.305),xt=Math.pow(It,.9)*Math.pow(1.64-Math.pow(.29,e.n),.73),Ut=xt*Math.sqrt(et/100),_t=Ut*e.fLRoot,ee=50*Math.sqrt(xt*e.c/(e.aw+4)),re=(1+100*.007)*et/(1+.007*et),zt=1/.0228*Math.log(1+.0228*_t),ne=zt*Math.cos(Pt),ae=zt*Math.sin(Pt);return new r(K,Ut,et,St,_t,ee,re,ne,ae)}static fromJch(t,e,n){return r.fromJchInViewingConditions(t,e,n,G.DEFAULT)}static fromJchInViewingConditions(t,e,n,a){let i=4/a.c*Math.sqrt(t/100)*(a.aw+4)*a.fLRoot,o=e*a.fLRoot,l=e/Math.sqrt(t/100),f=50*Math.sqrt(l*a.c/(a.aw+4)),h=n*Math.PI/180,p=(1+100*.007)*t/(1+.007*t),S=1/.0228*Math.log(1+.0228*o),g=S*Math.cos(h),y=S*Math.sin(h);return new r(n,e,t,i,o,f,p,g,y)}static fromUcs(t,e,n){return r.fromUcsInViewingConditions(t,e,n,G.DEFAULT)}static fromUcsInViewingConditions(t,e,n,a){let i=e,o=n,l=Math.sqrt(i*i+o*o),h=(Math.exp(l*.0228)-1)/.0228/a.fLRoot,p=Math.atan2(o,i)*(180/Math.PI);p<0&&(p+=360);let S=t/(1-(t-100)*.007);return r.fromJchInViewingConditions(S,h,p,a)}toInt(){return this.viewed(G.DEFAULT)}viewed(t){let e=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(e/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),a=this.hue*Math.PI/180,i=.25*(Math.cos(a+2)+3.8),o=t.aw*Math.pow(this.j/100,1/t.c/t.z),l=i*(5e4/13)*t.nc*t.ncb,f=o/t.nbb,h=Math.sin(a),p=Math.cos(a),S=23*(f+.305)*n/(23*l+11*n*p+108*n*h),g=S*p,y=S*h,d=(460*f+451*g+288*y)/1403,m=(460*f-891*g-261*y)/1403,P=(460*f-220*g-6300*y)/1403,b=Math.max(0,27.13*Math.abs(d)/(400-Math.abs(d))),v=z(d)*(100/t.fl)*Math.pow(b,1/.42),I=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),B=z(m)*(100/t.fl)*Math.pow(I,1/.42),O=Math.max(0,27.13*Math.abs(P)/(400-Math.abs(P))),R=z(P)*(100/t.fl)*Math.pow(O,1/.42),E=v/t.rgbD[0],H=B/t.rgbD[1],_=R/t.rgbD[2],L=1.86206786*E-1.01125463*H+.14918677*_,J=.38752654*E+.62144744*H-.00897398*_,tt=-0.0158415*E-.03412294*H+1.04996444*_;return $t(L,J,tt)}static fromXyzInViewingConditions(t,e,n,a){let i=.401288*t+.650173*e-.051461*n,o=-0.250268*t+1.204414*e+.045854*n,l=-2079e-6*t+.048952*e+.953127*n,f=a.rgbD[0]*i,h=a.rgbD[1]*o,p=a.rgbD[2]*l,S=Math.pow(a.fl*Math.abs(f)/100,.42),g=Math.pow(a.fl*Math.abs(h)/100,.42),y=Math.pow(a.fl*Math.abs(p)/100,.42),d=z(f)*400*S/(S+27.13),m=z(h)*400*g/(g+27.13),P=z(p)*400*y/(y+27.13),b=(11*d+-12*m+P)/11,v=(d+m-2*P)/9,I=(20*d+20*m+21*P)/20,B=(40*d+20*m+P)/20,R=Math.atan2(v,b)*180/Math.PI,E=R<0?R+360:R>=360?R-360:R,H=E*Math.PI/180,_=B*a.nbb,L=100*Math.pow(_/a.aw,a.c*a.z),J=4/a.c*Math.sqrt(L/100)*(a.aw+4)*a.fLRoot,tt=E<20.14?E+360:E,it=1/4*(Math.cos(tt*Math.PI/180+2)+3.8),Pt=5e4/13*it*a.nc*a.ncb*Math.sqrt(b*b+v*v)/(I+.305),Ct=Math.pow(Pt,.9)*Math.pow(1.64-Math.pow(.29,a.n),.73),et=Ct*Math.sqrt(L/100),St=et*a.fLRoot,vt=50*Math.sqrt(Ct*a.c/(a.aw+4)),Ft=(1+100*.007)*L/(1+.007*L),Et=Math.log(1+.0228*St)/.0228,It=Et*Math.cos(H),xt=Et*Math.sin(H);return new r(E,et,L,J,St,vt,Ft,It,xt)}xyzInViewingConditions(t){let e=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(e/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),a=this.hue*Math.PI/180,i=.25*(Math.cos(a+2)+3.8),o=t.aw*Math.pow(this.j/100,1/t.c/t.z),l=i*(5e4/13)*t.nc*t.ncb,f=o/t.nbb,h=Math.sin(a),p=Math.cos(a),S=23*(f+.305)*n/(23*l+11*n*p+108*n*h),g=S*p,y=S*h,d=(460*f+451*g+288*y)/1403,m=(460*f-891*g-261*y)/1403,P=(460*f-220*g-6300*y)/1403,b=Math.max(0,27.13*Math.abs(d)/(400-Math.abs(d))),v=z(d)*(100/t.fl)*Math.pow(b,1/.42),I=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),B=z(m)*(100/t.fl)*Math.pow(I,1/.42),O=Math.max(0,27.13*Math.abs(P)/(400-Math.abs(P))),R=z(P)*(100/t.fl)*Math.pow(O,1/.42),E=v/t.rgbD[0],H=B/t.rgbD[1],_=R/t.rgbD[2],L=1.86206786*E-1.01125463*H+.14918677*_,J=.38752654*E+.62144744*H-.00897398*_,tt=-0.0158415*E-.03412294*H+1.04996444*_;return [L,J,tt]}};var q=class r{static sanitizeRadians(t){return (t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let e=t/100,n=0;return e<=.0031308?n=e*12.92:n=1.055*Math.pow(e,1/2.4)-.055,n*255}static chromaticAdaptation(t){let e=Math.pow(Math.abs(t),.42);return z(t)*400*e/(e+27.13)}static hueOf(t){let e=ht(t,r.SCALED_DISCOUNT_FROM_LINRGB),n=r.chromaticAdaptation(e[0]),a=r.chromaticAdaptation(e[1]),i=r.chromaticAdaptation(e[2]),o=(11*n+-12*a+i)/11,l=(n+a-2*i)/9;return Math.atan2(l,o)}static areInCyclicOrder(t,e,n){let a=r.sanitizeRadians(e-t),i=r.sanitizeRadians(n-t);return a<i}static intercept(t,e,n){return (e-t)/(n-t)}static lerpPoint(t,e,n){return [t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e,t[2]+(n[2]-t[2])*e]}static setCoordinate(t,e,n,a){let i=r.intercept(t[a],e,n[a]);return r.lerpPoint(t,i,n)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,e){let n=r.Y_FROM_LINRGB[0],a=r.Y_FROM_LINRGB[1],i=r.Y_FROM_LINRGB[2],o=e%4<=1?0:100,l=e%2===0?0:100;if(e<4){let f=o,h=l,p=(t-f*a-h*i)/n;return r.isBounded(p)?[p,f,h]:[-1,-1,-1]}else if(e<8){let f=o,h=l,p=(t-h*n-f*i)/a;return r.isBounded(p)?[h,p,f]:[-1,-1,-1]}else {let f=o,h=l,p=(t-f*n-h*a)/i;return r.isBounded(p)?[f,h,p]:[-1,-1,-1]}}static bisectToSegment(t,e){let n=[-1,-1,-1],a=n,i=0,o=0,l=false,f=true;for(let h=0;h<12;h++){let p=r.nthVertex(t,h);if(p[0]<0)continue;let S=r.hueOf(p);if(!l){n=p,a=p,i=S,o=S,l=true;continue}(f||r.areInCyclicOrder(i,S,o))&&(f=false,r.areInCyclicOrder(i,e,S)?(a=p,o=S):(n=p,i=S));}return [n,a]}static midpoint(t,e){return [(t[0]+e[0])/2,(t[1]+e[1])/2,(t[2]+e[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,e){let n=r.bisectToSegment(t,e),a=n[0],i=r.hueOf(a),o=n[1];for(let l=0;l<3;l++)if(a[l]!==o[l]){let f=-1,h=255;a[l]<o[l]?(f=r.criticalPlaneBelow(r.trueDelinearized(a[l])),h=r.criticalPlaneAbove(r.trueDelinearized(o[l]))):(f=r.criticalPlaneAbove(r.trueDelinearized(a[l])),h=r.criticalPlaneBelow(r.trueDelinearized(o[l])));for(let p=0;p<8&&!(Math.abs(h-f)<=1);p++){let S=Math.floor((f+h)/2),g=r.CRITICAL_PLANES[S],y=r.setCoordinate(a,g,o,l),d=r.hueOf(y);r.areInCyclicOrder(i,e,d)?(o=y,h=S):(a=y,i=d,f=S);}}return r.midpoint(a,o)}static inverseChromaticAdaptation(t){let e=Math.abs(t),n=Math.max(0,27.13*e/(400-e));return z(t)*Math.pow(n,1/.42)}static findResultByJ(t,e,n){let a=Math.sqrt(n)*11,i=G.DEFAULT,o=1/Math.pow(1.64-Math.pow(.29,i.n),.73),f=.25*(Math.cos(t+2)+3.8)*(5e4/13)*i.nc*i.ncb,h=Math.sin(t),p=Math.cos(t);for(let S=0;S<5;S++){let g=a/100,y=e===0||a===0?0:e/Math.sqrt(g),d=Math.pow(y*o,1/.9),P=i.aw*Math.pow(g,1/i.c/i.z)/i.nbb,b=23*(P+.305)*d/(23*f+11*d*p+108*d*h),v=b*p,I=b*h,B=(460*P+451*v+288*I)/1403,O=(460*P-891*v-261*I)/1403,R=(460*P-220*v-6300*I)/1403,E=r.inverseChromaticAdaptation(B),H=r.inverseChromaticAdaptation(O),_=r.inverseChromaticAdaptation(R),L=ht([E,H,_],r.LINRGB_FROM_SCALED_DISCOUNT);if(L[0]<0||L[1]<0||L[2]<0)return 0;let J=r.Y_FROM_LINRGB[0],tt=r.Y_FROM_LINRGB[1],it=r.Y_FROM_LINRGB[2],K=J*L[0]+tt*L[1]+it*L[2];if(K<=0)return 0;if(S===4||Math.abs(K-n)<.002)return L[0]>100.01||L[1]>100.01||L[2]>100.01?0:Bt(L);a=a-(K-n)*a/(2*K);}return 0}static solveToInt(t,e,n){if(e<1e-4||n<1e-4||n>99.9999)return Xt(n);t=U(t);let a=t/180*Math.PI,i=$(n),o=r.findResultByJ(a,e,i);if(o!==0)return o;let l=r.bisectToLimit(i,a);return Bt(l)}static solveToCam(t,e,n){return W.fromInt(r.solveToInt(t,e,n))}};q.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];q.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];q.Y_FROM_LINRGB=[.2126,.7152,.0722];q.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var x=class r{static from(t,e,n){return new r(q.solveToInt(t,e,n))}static fromInt(t){return new r(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(q.solveToInt(t,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(q.solveToInt(this.internalHue,t,this.internalTone));}get tone(){return this.internalTone}set tone(t){this.setInternalState(q.solveToInt(this.internalHue,this.internalChroma,t));}setValue(t,e){this[t]=e;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let e=W.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=At(t),this.argb=t;}setInternalState(t){let e=W.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=At(t),this.argb=t;}inViewingConditions(t){let n=W.fromInt(this.toInt()).xyzInViewingConditions(t),a=W.fromXyzInViewingConditions(n[0],n[1],n[2],G.make());return r.from(a.hue,a.chroma,gt(n[1]))}};var V=class r{static ratioOfTones(t,e){return t=N(0,100,t),e=N(0,100,e),r.ratioOfYs($(t),$(e))}static ratioOfYs(t,e){let n=t>e?t:e,a=n===e?t:e;return (n+5)/(a+5)}static lighter(t,e){if(t<0||t>100)return -1;let n=$(t),a=e*(n+5)-5,i=r.ratioOfYs(a,n),o=Math.abs(i-e);if(i<e&&o>.04)return -1;let l=gt(a)+.4;return l<0||l>100?-1:l}static darker(t,e){if(t<0||t>100)return -1;let n=$(t),a=(n+5)/e-5,i=r.ratioOfYs(n,a),o=Math.abs(i-e);if(i<e&&o>.04)return -1;let l=gt(a)-.4;return l<0||l>100?-1:l}static lighterUnsafe(t,e){let n=r.lighter(t,e);return n<0?100:n}static darkerUnsafe(t,e){let n=r.darker(t,e);return n<0?0:n}};var ot=class r{static isDisliked(t){let e=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,a=Math.round(t.tone)<65;return e&&n&&a}static fixIfDisliked(t){return r.isDisliked(t)?x.from(t.hue,t.chroma,70):t}};function ce(r,t,e){if(r.name!==e.name)throw new Error(`Attempting to extend color ${r.name} with color ${e.name} of different name for spec version ${t}.`);if(r.isBackground!==e.isBackground)throw new Error(`Attempting to extend color ${r.name} as a ${r.isBackground?"background":"foreground"} with color ${e.name} as a ${e.isBackground?"background":"foreground"} for spec version ${t}.`)}function k(r,t,e){return ce(r,t,e),c.fromPalette({name:r.name,palette:n=>n.specVersion===t?e.palette(n):r.palette(n),tone:n=>n.specVersion===t?e.tone(n):r.tone(n),isBackground:r.isBackground,chromaMultiplier:n=>{let a=n.specVersion===t?e.chromaMultiplier:r.chromaMultiplier;return a!==void 0?a(n):1},background:n=>{let a=n.specVersion===t?e.background:r.background;return a!==void 0?a(n):void 0},secondBackground:n=>{let a=n.specVersion===t?e.secondBackground:r.secondBackground;return a!==void 0?a(n):void 0},contrastCurve:n=>{let a=n.specVersion===t?e.contrastCurve:r.contrastCurve;return a!==void 0?a(n):void 0},toneDeltaPair:n=>{let a=n.specVersion===t?e.toneDeltaPair:r.toneDeltaPair;return a!==void 0?a(n):void 0}})}var c=class r{static fromPalette(t){return new r(t.name??"",t.palette,t.tone??r.getInitialToneFromBackground(t.background),t.isBackground??false,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?e=>50:e=>t(e)?t(e).getTone(e):50}constructor(t,e,n,a,i,o,l,f,h){if(this.name=t,this.palette=e,this.tone=n,this.isBackground=a,this.chromaMultiplier=i,this.background=o,this.secondBackground=l,this.contrastCurve=f,this.toneDeltaPair=h,this.hctCache=new Map,!o&&l)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!o&&f)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(o&&!f)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return r.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(t){return this.getHct(t).toInt()}getHct(t){let e=this.hctCache.get(t);if(e!=null)return e;let n=jt(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n}getTone(t){return jt(t.specVersion).getTone(t,this)}static foregroundTone(t,e){let n=V.lighterUnsafe(t,e),a=V.darkerUnsafe(t,e),i=V.ratioOfTones(n,t),o=V.ratioOfTones(a,t);if(r.tonePrefersLightForeground(t)){let f=Math.abs(i-o)<.1&&i<e&&o<e;return i>=e||i>=o||f?n:a}else return o>=e||o>=i?a:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return r.tonePrefersLightForeground(t)&&!r.toneAllowsLightForeground(t)?49:t}},Lt=class{getHct(t,e){let n=e.getTone(t);return e.palette(t).getHct(n)}getTone(t,e){let n=t.contrastLevel<0,a=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(a){let i=a.roleA,o=a.roleB,l=a.delta,f=a.polarity,h=a.stayTogether,p=f==="nearer"||f==="lighter"&&!t.isDark||f==="darker"&&t.isDark,S=p?i:o,g=p?o:i,y=e.name===S.name,d=t.isDark?1:-1,m=S.tone(t),P=g.tone(t);if(e.background&&S.contrastCurve&&g.contrastCurve){let b=e.background(t),v=S.contrastCurve(t),I=g.contrastCurve(t);if(b&&v&&I){let B=b.getTone(t),O=v.get(t.contrastLevel),R=I.get(t.contrastLevel);V.ratioOfTones(B,m)<O&&(m=c.foregroundTone(B,O)),V.ratioOfTones(B,P)<R&&(P=c.foregroundTone(B,R)),n&&(m=c.foregroundTone(B,O),P=c.foregroundTone(B,R));}}return (P-m)*d<l&&(P=N(0,100,m+l*d),(P-m)*d>=l||(m=N(0,100,P-l*d))),50<=m&&m<60?d>0?(m=60,P=Math.max(P,m+l*d)):(m=49,P=Math.min(P,m+l*d)):50<=P&&P<60&&(h?d>0?(m=60,P=Math.max(P,m+l*d)):(m=49,P=Math.min(P,m+l*d)):d>0?P=60:P=49),y?m:P}else {let i=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return i;let o=e.background(t).getTone(t),l=e.contrastCurve(t).get(t.contrastLevel);if(V.ratioOfTones(o,i)>=l||(i=c.foregroundTone(o,l)),n&&(i=c.foregroundTone(o,l)),e.isBackground&&50<=i&&i<60&&(V.ratioOfTones(49,o)>=l?i=49:i=60),e.secondBackground==null||e.secondBackground(t)===void 0)return i;let[f,h]=[e.background,e.secondBackground],[p,S]=[f(t).getTone(t),h(t).getTone(t)],[g,y]=[Math.max(p,S),Math.min(p,S)];if(V.ratioOfTones(g,i)>=l&&V.ratioOfTones(y,i)>=l)return i;let d=V.lighter(g,l),m=V.darker(y,l),P=[];return d!==-1&&P.push(d),m!==-1&&P.push(m),c.tonePrefersLightForeground(p)||c.tonePrefersLightForeground(S)?d<0?100:d:P.length===1?P[0]:m<0?0:m}}},Ot=class{getHct(t,e){let n=e.palette(t),a=e.getTone(t),i=n.hue,o=n.chroma*(e.chromaMultiplier?e.chromaMultiplier(t):1);return x.from(i,o,a)}getTone(t,e){let n=e.toneDeltaPair?e.toneDeltaPair(t):void 0;if(n){let a=n.roleA,i=n.roleB,o=n.polarity,l=n.constraint,f=o==="darker"||o==="relative_lighter"&&t.isDark||o==="relative_darker"&&!t.isDark?-n.delta:n.delta,h=e.name===a.name,p=h?a:i,S=h?i:a,g=p.tone(t),y=S.getTone(t),d=f*(h?1:-1);if(l==="exact"?g=N(0,100,y+d):l==="nearer"?d>0?g=N(0,100,N(y,y+d,g)):g=N(0,100,N(y+d,y,g)):l==="farther"&&(d>0?g=N(y+d,100,g):g=N(0,y+d,g)),e.background&&e.contrastCurve){let m=e.background(t),P=e.contrastCurve(t);if(m&&P){let b=m.getTone(t),v=P.get(t.contrastLevel);g=V.ratioOfTones(b,g)>=v&&t.contrastLevel>=0?g:c.foregroundTone(b,v);}}return e.isBackground&&!e.name.endsWith("_fixed_dim")&&(g>=57?g=N(65,100,g):g=N(0,49,g)),g}else {let a=e.tone(t);if(e.background==null||e.background(t)===void 0||e.contrastCurve==null||e.contrastCurve(t)===void 0)return a;let i=e.background(t).getTone(t),o=e.contrastCurve(t).get(t.contrastLevel);if(a=V.ratioOfTones(i,a)>=o&&t.contrastLevel>=0?a:c.foregroundTone(i,o),e.isBackground&&!e.name.endsWith("_fixed_dim")&&(a>=57?a=N(65,100,a):a=N(0,49,a)),e.secondBackground==null||e.secondBackground(t)===void 0)return a;let[l,f]=[e.background,e.secondBackground],[h,p]=[l(t).getTone(t),f(t).getTone(t)],[S,g]=[Math.max(h,p),Math.min(h,p)];if(V.ratioOfTones(S,a)>=o&&V.ratioOfTones(g,a)>=o)return a;let y=V.lighter(S,o),d=V.darker(g,o),m=[];return y!==-1&&m.push(y),d!==-1&&m.push(d),c.tonePrefersLightForeground(h)||c.tonePrefersLightForeground(p)?y<0?100:y:m.length===1?m[0]:d<0?0:d}}},ue=new Lt,le=new Ot;function jt(r){return r==="2025"?le:ue}var C=class r{static fromInt(t){let e=x.fromInt(t);return r.fromHct(e)}static fromHct(t){return new r(t.hue,t.chroma,t)}static fromHueAndChroma(t,e){let n=new Vt(t,e).create();return new r(t,e,n)}constructor(t,e,n){this.hue=t,this.chroma=e,this.keyColor=n,this.cache=new Map;}tone(t){let e=this.cache.get(t);return e===void 0&&(t==99&&x.isYellow(this.hue)?e=this.averageArgb(this.tone(98),this.tone(100)):e=x.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,e)),e}getHct(t){return x.fromInt(this.tone(t))}averageArgb(t,e){let n=t>>>16&255,a=t>>>8&255,i=t&255,o=e>>>16&255,l=e>>>8&255,f=e&255,h=Math.round((n+o)/2),p=Math.round((a+l)/2),S=Math.round((i+f)/2);return (255<<24|(h&255)<<16|(p&255)<<8|S&255)>>>0}},Vt=class{constructor(t,e){this.hue=t,this.requestedChroma=e,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let a=0,i=100;for(;a<i;){let o=Math.floor((a+i)/2),l=this.maxChroma(o)<this.maxChroma(o+1);if(this.maxChroma(o)>=this.requestedChroma-.01)if(Math.abs(a-50)<Math.abs(i-50))i=o;else {if(a===o)return x.from(this.hue,this.requestedChroma,a);a=o;}else l?a=o+1:i=o;}return x.from(this.hue,this.requestedChroma,a)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let e=x.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,e),e}};var yt=class r{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),e=this.tempsByHct;return t.sort((n,a)=>e.get(n)-e.get(a)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,e=12){let n=Math.round(this.input.hue),a=this.hctsByHue[n],i=this.relativeTemperature(a),o=[a],l=0;for(let d=0;d<360;d++){let m=st(n+d),P=this.hctsByHue[m],b=this.relativeTemperature(P),v=Math.abs(b-i);i=b,l+=v;}let f=1,h=l/e,p=0;for(i=this.relativeTemperature(a);o.length<e;){let d=st(n+f),m=this.hctsByHue[d],P=this.relativeTemperature(m),b=Math.abs(P-i);p+=b;let v=o.length*h,I=p>=v,B=1;for(;I&&o.length<e;){o.push(m);let O=(o.length+B)*h;I=p>=O,B++;}if(i=P,f++,f>360){for(;o.length<e;)o.push(m);break}}let S=[this.input],g=Math.floor((t-1)/2);for(let d=1;d<g+1;d++){let m=0-d;for(;m<0;)m=o.length+m;m>=o.length&&(m=m%o.length),S.splice(0,0,o[m]);}let y=t-g-1;for(let d=1;d<y+1;d++){let m=d;for(;m<0;)m=o.length+m;m>=o.length&&(m=m%o.length),S.push(o[m]);}return S}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,e=this.tempsByHct.get(this.coldest),n=this.warmest.hue,i=this.tempsByHct.get(this.warmest)-e,o=r.isBetween(this.input.hue,t,n),l=o?n:t,f=o?t:n,h=1,p=1e3,S=this.hctsByHue[Math.round(this.input.hue)],g=1-this.inputRelativeTemperature;for(let y=0;y<=360;y+=1){let d=U(l+h*y);if(!r.isBetween(d,l,f))continue;let m=this.hctsByHue[Math.round(d)],P=(this.tempsByHct.get(m)-e)/i,b=Math.abs(g-P);b<p&&(p=b,S=m);}return this.complementCache=S,this.complementCache}relativeTemperature(t){let e=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return e===0?.5:n/e}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),e=new Map;for(let n of t)e.set(n,r.rawTemperature(n));return this.tempsByHctCache=e,e}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let e=0;e<=360;e+=1){let n=x.from(e,this.input.chroma,this.input.tone);t.push(n);}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,e,n){return e<n?e<=t&&t<=n:e<=t||t<=n}static rawTemperature(t){let e=Rt(t.toInt()),n=U(Math.atan2(e[2],e[1])*180/Math.PI),a=Math.sqrt(e[1]*e[1]+e[2]*e[2]);return -0.5+.02*Math.pow(a,1.07)*Math.cos(U(n-50)*Math.PI/180)}};var T=class{constructor(t,e,n,a){this.low=t,this.normal=e,this.medium=n,this.high=a;}get(t){return t<=-1?this.low:t<0?nt(this.low,this.normal,(t- -1)/1):t<.5?nt(this.normal,this.medium,(t-0)/.5):t<1?nt(this.medium,this.high,(t-.5)/.5):this.high}};var w=class{constructor(t,e,n,a,i,o){this.roleA=t,this.roleB=e,this.delta=n,this.polarity=a,this.stayTogether=i,this.constraint=o,this.constraint=o??"exact";}};var s;(function(r){r[r.MONOCHROME=0]="MONOCHROME",r[r.NEUTRAL=1]="NEUTRAL",r[r.TONAL_SPOT=2]="TONAL_SPOT",r[r.VIBRANT=3]="VIBRANT",r[r.EXPRESSIVE=4]="EXPRESSIVE",r[r.FIDELITY=5]="FIDELITY",r[r.CONTENT=6]="CONTENT",r[r.RAINBOW=7]="RAINBOW",r[r.FRUIT_SALAD=8]="FRUIT_SALAD";})(s||(s={}));function ct(r){return r.variant===s.FIDELITY||r.variant===s.CONTENT}function M(r){return r.variant===s.MONOCHROME}function he(r,t,e,n){let a=e,i=x.from(r,t,e);if(i.chroma<t){let o=i.chroma;for(;i.chroma<t;){a+=n?-1:1;let l=x.from(r,t,a);if(o>l.chroma||Math.abs(l.chroma-t)<.4)break;let f=Math.abs(l.chroma-t),h=Math.abs(i.chroma-t);f<h&&(i=l),o=Math.max(o,l.chroma);}}return a}var kt=class{primaryPaletteKeyColor(){return c.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return c.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return c.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return c.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return c.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return c.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return c.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return c.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new T(3,3,4.5,7)})}surface(){return c.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return c.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new T(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return c.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new T(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return c.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new T(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return c.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new T(10,10,11,12).get(t.contrastLevel):new T(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return c.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new T(12,12,16,20).get(t.contrastLevel):new T(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return c.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new T(17,17,21,25).get(t.contrastLevel):new T(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return c.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new T(22,22,26,30).get(t.contrastLevel):new T(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return c.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new T(4.5,7,11,21)})}surfaceVariant(){return c.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return c.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new T(3,4.5,7,11)})}inverseSurface(){return c.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return c.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new T(4.5,7,11,21)})}outline(){return c.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1.5,3,4.5,7)})}outlineVariant(){return c.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5)})}shadow(){return c.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return c.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return c.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return c.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>M(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(3,4.5,7,7),toneDeltaPair:t=>new w(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return c.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>M(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new T(4.5,7,11,21)})}primaryContainer(){return c.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>ct(t)?t.sourceColorHct.tone:M(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return c.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>ct(t)?c.foregroundTone(this.primaryContainer().tone(t),4.5):M(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new T(3,4.5,7,11)})}inversePrimary(){return c.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new T(3,4.5,7,7)})}secondary(){return c.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(3,4.5,7,7),toneDeltaPair:t=>new w(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return c.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>M(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new T(4.5,7,11,21)})}secondaryContainer(){return c.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let e=t.isDark?30:90;return M(t)?t.isDark?30:85:ct(t)?he(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return c.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>M(t)?t.isDark?90:10:ct(t)?c.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new T(3,4.5,7,11)})}tertiary(){return c.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>M(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(3,4.5,7,7),toneDeltaPair:t=>new w(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return c.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>M(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new T(4.5,7,11,21)})}tertiaryContainer(){return c.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(M(t))return t.isDark?60:49;if(!ct(t))return t.isDark?30:90;let e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return ot.fixIfDisliked(e).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return c.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>M(t)?t.isDark?0:100:ct(t)?c.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new T(3,4.5,7,11)})}error(){return c.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(3,4.5,7,7),toneDeltaPair:t=>new w(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return c.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new T(4.5,7,11,21)})}errorContainer(){return c.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return c.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>M(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new T(3,4.5,7,11)})}primaryFixed(){return c.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>M(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return c.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>M(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return c.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>M(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new T(4.5,7,11,21)})}onPrimaryFixedVariant(){return c.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>M(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new T(3,4.5,7,11)})}secondaryFixed(){return c.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>M(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return c.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>M(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return c.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new T(4.5,7,11,21)})}onSecondaryFixedVariant(){return c.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>M(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new T(3,4.5,7,11)})}tertiaryFixed(){return c.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>M(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return c.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>M(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new T(1,1,3,4.5),toneDeltaPair:t=>new w(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return c.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>M(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new T(4.5,7,11,21)})}onTertiaryFixedVariant(){return c.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>M(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new T(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function D(r,t=0,e=100,n=1){let a=Wt(r.hue,r.chroma*n,100,true);return N(t,e,a)}function rt(r,t=0,e=100){let n=Wt(r.hue,r.chroma,0,false);return N(t,e,n)}function Wt(r,t,e,n){let a=e,i=x.from(r,t,a);for(;i.chroma<t&&!(e<0||e>100);){e+=n?-1:1;let o=x.from(r,t,e);i.chroma<o.chroma&&(i=o,a=e);}return a}function A(r){return r===1.5?new T(1.5,1.5,3,5.5):r===3?new T(3,3,4.5,7):r===4.5?new T(4.5,4.5,7,11):r===6?new T(6,6,7,11):r===7?new T(7,7,11,21):r===9?new T(9,9,11,21):r===11?new T(11,11,21,21):r===21?new T(21,21,21,21):new T(r,r,7,21)}var Dt=class extends kt{surface(){let t=c.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>(super.surface().tone(e),e.platform==="phone"?e.isDark?4:x.isYellow(e.neutralPalette.hue)?99:e.variant===s.VIBRANT?97:98:0),isBackground:true});return k(super.surface(),"2025",t)}surfaceDim(){let t=c.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?4:x.isYellow(e.neutralPalette.hue)?90:e.variant===s.VIBRANT?85:87,isBackground:true,chromaMultiplier:e=>{if(!e.isDark){if(e.variant===s.NEUTRAL)return 2.5;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===s.VIBRANT)return 1.36}return 1}});return k(super.surfaceDim(),"2025",t)}surfaceBright(){let t=c.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?18:x.isYellow(e.neutralPalette.hue)?99:e.variant===s.VIBRANT?97:98,isBackground:true,chromaMultiplier:e=>{if(e.isDark){if(e.variant===s.NEUTRAL)return 2.5;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?2.7:1.75;if(e.variant===s.VIBRANT)return 1.36}return 1}});return k(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=c.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?0:100,isBackground:true});return k(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=c.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?6:x.isYellow(e.neutralPalette.hue)?98:e.variant===s.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.3;if(e.variant===s.TONAL_SPOT)return 1.25;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?1.3:1.15;if(e.variant===s.VIBRANT)return 1.08}return 1}});return k(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=c.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?9:x.isYellow(e.neutralPalette.hue)?96:e.variant===s.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.6;if(e.variant===s.TONAL_SPOT)return 1.4;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?1.6:1.3;if(e.variant===s.VIBRANT)return 1.15}return 1}});return k(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=c.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.platform==="phone"?e.isDark?12:x.isYellow(e.neutralPalette.hue)?94:e.variant===s.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 1.9;if(e.variant===s.TONAL_SPOT)return 1.5;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?1.95:1.45;if(e.variant===s.VIBRANT)return 1.22}return 1}});return k(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=c.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?15:x.isYellow(e.neutralPalette.hue)?92:e.variant===s.VIBRANT?88:90,isBackground:true,chromaMultiplier:e=>e.variant===s.NEUTRAL?2.2:e.variant===s.TONAL_SPOT?1.7:e.variant===s.EXPRESSIVE?x.isYellow(e.neutralPalette.hue)?2.3:1.6:e.variant===s.VIBRANT?1.29:1});return k(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=c.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.variant===s.VIBRANT?D(e.neutralPalette,0,100,1.1):c.getInitialToneFromBackground(n=>n.platform==="phone"?this.highestSurface(n):this.surfaceContainerHigh())(e),chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.isDark&&e.platform==="phone"?A(11):A(9)});return k(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=c.fromPalette({name:"on_surface_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?e.isDark?A(6):A(4.5):A(7)});return k(super.onSurfaceVariant(),"2025",t)}outline(){let t=c.fromPalette({name:"outline",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?A(3):A(4.5)});return k(super.outline(),"2025",t)}outlineVariant(){let t=c.fromPalette({name:"outline_variant",palette:e=>e.neutralPalette,chromaMultiplier:e=>{if(e.platform==="phone"){if(e.variant===s.NEUTRAL)return 2.2;if(e.variant===s.TONAL_SPOT)return 1.7;if(e.variant===s.EXPRESSIVE)return x.isYellow(e.neutralPalette.hue)?e.isDark?3:2.3:1.6}return 1},background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?A(1.5):A(3)});return k(super.outlineVariant(),"2025",t)}inverseSurface(){let t=c.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?98:4,isBackground:true});return k(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=c.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,background:e=>this.inverseSurface(),contrastCurve:e=>A(7)});return k(super.inverseOnSurface(),"2025",t)}primary(){let t=c.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>e.variant===s.NEUTRAL?e.platform==="phone"?e.isDark?80:40:90:e.variant===s.TONAL_SPOT?e.platform==="phone"?e.isDark?80:D(e.primaryPalette):D(e.primaryPalette,0,90):e.variant===s.EXPRESSIVE?e.platform==="phone"?D(e.primaryPalette,0,x.isYellow(e.primaryPalette.hue)?25:x.isCyan(e.primaryPalette.hue)?88:98):D(e.primaryPalette):e.platform==="phone"?D(e.primaryPalette,0,x.isCyan(e.primaryPalette.hue)?88:98):D(e.primaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?A(4.5):A(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return k(super.primary(),"2025",t)}primaryDim(){return c.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===s.NEUTRAL?85:t.variant===s.TONAL_SPOT?D(t.primaryPalette,0,90):D(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>A(4.5),toneDeltaPair:t=>new w(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=c.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,background:e=>e.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onPrimary(),"2025",t)}primaryContainer(){let t=c.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>e.platform==="watch"?30:e.variant===s.NEUTRAL?e.isDark?30:90:e.variant===s.TONAL_SPOT?e.isDark?rt(e.primaryPalette,35,93):D(e.primaryPalette,0,90):e.variant===s.EXPRESSIVE?e.isDark?D(e.primaryPalette,30,93):D(e.primaryPalette,78,x.isCyan(e.primaryPalette.hue)?88:90):e.isDark?rt(e.primaryPalette,66,93):D(e.primaryPalette,66,x.isCyan(e.primaryPalette.hue)?88:93),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="phone"?void 0:new w(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=c.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,background:e=>this.primaryContainer(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=c.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(n)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=c.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>this.primaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new w(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return k(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=c.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>A(7)});return k(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=c.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,background:e=>this.primaryFixedDim(),contrastCurve:e=>A(4.5)});return k(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=c.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>D(e.primaryPalette),background:e=>this.inverseSurface(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.inversePrimary(),"2025",t)}secondary(){let t=c.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?e.variant===s.NEUTRAL?90:D(e.secondaryPalette,0,90):e.variant===s.NEUTRAL?e.isDark?rt(e.secondaryPalette,0,98):D(e.secondaryPalette):e.variant===s.VIBRANT?D(e.secondaryPalette,0,e.isDark?90:98):e.isDark?80:D(e.secondaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?A(4.5):A(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return k(super.secondary(),"2025",t)}secondaryDim(){return c.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===s.NEUTRAL?85:D(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>A(4.5),toneDeltaPair:t=>new w(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=c.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,background:e=>e.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onSecondary(),"2025",t)}secondaryContainer(){let t=c.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>e.platform==="watch"?30:e.variant===s.VIBRANT?e.isDark?rt(e.secondaryPalette,30,40):D(e.secondaryPalette,84,90):e.variant===s.EXPRESSIVE?e.isDark?15:D(e.secondaryPalette,90,95):e.isDark?25:90,isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new w(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=c.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,background:e=>this.secondaryContainer(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=c.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(n)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=c.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>this.secondaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new w(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return k(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=c.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>A(7)});return k(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=c.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,background:e=>this.secondaryFixedDim(),contrastCurve:e=>A(4.5)});return k(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=c.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===s.TONAL_SPOT?D(e.tertiaryPalette,0,90):D(e.tertiaryPalette):e.variant===s.EXPRESSIVE||e.variant===s.VIBRANT?D(e.tertiaryPalette,0,x.isCyan(e.tertiaryPalette.hue)?88:e.isDark?98:100):e.isDark?D(e.tertiaryPalette,0,98):D(e.tertiaryPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?A(4.5):A(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return k(super.tertiary(),"2025",t)}tertiaryDim(){return c.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===s.TONAL_SPOT?D(t.tertiaryPalette,0,90):D(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>A(4.5),toneDeltaPair:t=>new w(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=c.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,background:e=>e.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=c.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>e.platform==="watch"?e.variant===s.TONAL_SPOT?D(e.tertiaryPalette,0,90):D(e.tertiaryPalette):e.variant===s.NEUTRAL?e.isDark?D(e.tertiaryPalette,0,93):D(e.tertiaryPalette,0,96):e.variant===s.TONAL_SPOT?D(e.tertiaryPalette,0,e.isDark?93:100):e.variant===s.EXPRESSIVE?D(e.tertiaryPalette,75,x.isCyan(e.tertiaryPalette.hue)?88:e.isDark?93:100):e.isDark?D(e.tertiaryPalette,0,93):D(e.tertiaryPalette,72,100),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new w(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=c.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryContainer(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=c.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>{let n=Object.assign({},e,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(n)},isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=c.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>this.tertiaryFixed().getTone(e),isBackground:true,toneDeltaPair:e=>new w(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return k(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=c.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>A(7)});return k(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=c.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,background:e=>this.tertiaryFixedDim(),contrastCurve:e=>A(4.5)});return k(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=c.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.platform==="phone"?e.isDark?rt(e.errorPalette,0,98):D(e.errorPalette):rt(e.errorPalette),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):this.surfaceContainerHigh(),contrastCurve:e=>e.platform==="phone"?A(4.5):A(7),toneDeltaPair:e=>e.platform==="phone"?new w(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return k(super.error(),"2025",t)}errorDim(){return c.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>rt(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>A(4.5),toneDeltaPair:t=>new w(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=c.fromPalette({name:"on_error",palette:e=>e.errorPalette,background:e=>e.platform==="phone"?this.error():this.errorDim(),contrastCurve:e=>e.platform==="phone"?A(6):A(7)});return k(super.onError(),"2025",t)}errorContainer(){let t=c.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.platform==="watch"?30:e.isDark?rt(e.errorPalette,30,93):D(e.errorPalette,0,90),isBackground:true,background:e=>e.platform==="phone"?this.highestSurface(e):void 0,toneDeltaPair:e=>e.platform==="watch"?new w(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:e=>e.platform==="phone"&&e.contrastLevel>0?A(1.5):void 0});return k(super.errorContainer(),"2025",t)}onErrorContainer(){let t=c.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,background:e=>this.errorContainer(),contrastCurve:e=>e.platform==="phone"?A(4.5):A(7)});return k(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return k(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return k(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return k(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:e=>e.platform==="watch"?100:this.onSurface().getTone(e)});return k(super.onBackground(),"2025",t)}};var u=class r{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0);}highestSurface(t){return r.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return r.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return r.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return r.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return r.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return r.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return r.colorSpec.errorPaletteKeyColor()}background(){return r.colorSpec.background()}onBackground(){return r.colorSpec.onBackground()}surface(){return r.colorSpec.surface()}surfaceDim(){return r.colorSpec.surfaceDim()}surfaceBright(){return r.colorSpec.surfaceBright()}surfaceContainerLowest(){return r.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return r.colorSpec.surfaceContainerLow()}surfaceContainer(){return r.colorSpec.surfaceContainer()}surfaceContainerHigh(){return r.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return r.colorSpec.surfaceContainerHighest()}onSurface(){return r.colorSpec.onSurface()}surfaceVariant(){return r.colorSpec.surfaceVariant()}onSurfaceVariant(){return r.colorSpec.onSurfaceVariant()}outline(){return r.colorSpec.outline()}outlineVariant(){return r.colorSpec.outlineVariant()}inverseSurface(){return r.colorSpec.inverseSurface()}inverseOnSurface(){return r.colorSpec.inverseOnSurface()}shadow(){return r.colorSpec.shadow()}scrim(){return r.colorSpec.scrim()}surfaceTint(){return r.colorSpec.surfaceTint()}primary(){return r.colorSpec.primary()}primaryDim(){return r.colorSpec.primaryDim()}onPrimary(){return r.colorSpec.onPrimary()}primaryContainer(){return r.colorSpec.primaryContainer()}onPrimaryContainer(){return r.colorSpec.onPrimaryContainer()}inversePrimary(){return r.colorSpec.inversePrimary()}primaryFixed(){return r.colorSpec.primaryFixed()}primaryFixedDim(){return r.colorSpec.primaryFixedDim()}onPrimaryFixed(){return r.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return r.colorSpec.onPrimaryFixedVariant()}secondary(){return r.colorSpec.secondary()}secondaryDim(){return r.colorSpec.secondaryDim()}onSecondary(){return r.colorSpec.onSecondary()}secondaryContainer(){return r.colorSpec.secondaryContainer()}onSecondaryContainer(){return r.colorSpec.onSecondaryContainer()}secondaryFixed(){return r.colorSpec.secondaryFixed()}secondaryFixedDim(){return r.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return r.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return r.colorSpec.onSecondaryFixedVariant()}tertiary(){return r.colorSpec.tertiary()}tertiaryDim(){return r.colorSpec.tertiaryDim()}onTertiary(){return r.colorSpec.onTertiary()}tertiaryContainer(){return r.colorSpec.tertiaryContainer()}onTertiaryContainer(){return r.colorSpec.onTertiaryContainer()}tertiaryFixed(){return r.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return r.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return r.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return r.colorSpec.onTertiaryFixedVariant()}error(){return r.colorSpec.error()}errorDim(){return r.colorSpec.errorDim()}onError(){return r.colorSpec.onError()}errorContainer(){return r.colorSpec.errorContainer()}onErrorContainer(){return r.colorSpec.onErrorContainer()}static highestSurface(t){return r.colorSpec.highestSurface(t)}};u.contentAccentToneDelta=15;u.colorSpec=new Dt;u.primaryPaletteKeyColor=u.colorSpec.primaryPaletteKeyColor();u.secondaryPaletteKeyColor=u.colorSpec.secondaryPaletteKeyColor();u.tertiaryPaletteKeyColor=u.colorSpec.tertiaryPaletteKeyColor();u.neutralPaletteKeyColor=u.colorSpec.neutralPaletteKeyColor();u.neutralVariantPaletteKeyColor=u.colorSpec.neutralVariantPaletteKeyColor();u.background=u.colorSpec.background();u.onBackground=u.colorSpec.onBackground();u.surface=u.colorSpec.surface();u.surfaceDim=u.colorSpec.surfaceDim();u.surfaceBright=u.colorSpec.surfaceBright();u.surfaceContainerLowest=u.colorSpec.surfaceContainerLowest();u.surfaceContainerLow=u.colorSpec.surfaceContainerLow();u.surfaceContainer=u.colorSpec.surfaceContainer();u.surfaceContainerHigh=u.colorSpec.surfaceContainerHigh();u.surfaceContainerHighest=u.colorSpec.surfaceContainerHighest();u.onSurface=u.colorSpec.onSurface();u.surfaceVariant=u.colorSpec.surfaceVariant();u.onSurfaceVariant=u.colorSpec.onSurfaceVariant();u.inverseSurface=u.colorSpec.inverseSurface();u.inverseOnSurface=u.colorSpec.inverseOnSurface();u.outline=u.colorSpec.outline();u.outlineVariant=u.colorSpec.outlineVariant();u.shadow=u.colorSpec.shadow();u.scrim=u.colorSpec.scrim();u.surfaceTint=u.colorSpec.surfaceTint();u.primary=u.colorSpec.primary();u.onPrimary=u.colorSpec.onPrimary();u.primaryContainer=u.colorSpec.primaryContainer();u.onPrimaryContainer=u.colorSpec.onPrimaryContainer();u.inversePrimary=u.colorSpec.inversePrimary();u.secondary=u.colorSpec.secondary();u.onSecondary=u.colorSpec.onSecondary();u.secondaryContainer=u.colorSpec.secondaryContainer();u.onSecondaryContainer=u.colorSpec.onSecondaryContainer();u.tertiary=u.colorSpec.tertiary();u.onTertiary=u.colorSpec.onTertiary();u.tertiaryContainer=u.colorSpec.tertiaryContainer();u.onTertiaryContainer=u.colorSpec.onTertiaryContainer();u.error=u.colorSpec.error();u.onError=u.colorSpec.onError();u.errorContainer=u.colorSpec.errorContainer();u.onErrorContainer=u.colorSpec.onErrorContainer();u.primaryFixed=u.colorSpec.primaryFixed();u.primaryFixedDim=u.colorSpec.primaryFixedDim();u.onPrimaryFixed=u.colorSpec.onPrimaryFixed();u.onPrimaryFixedVariant=u.colorSpec.onPrimaryFixedVariant();u.secondaryFixed=u.colorSpec.secondaryFixed();u.secondaryFixedDim=u.colorSpec.secondaryFixedDim();u.onSecondaryFixed=u.colorSpec.onSecondaryFixed();u.onSecondaryFixedVariant=u.colorSpec.onSecondaryFixedVariant();u.tertiaryFixed=u.colorSpec.tertiaryFixed();u.tertiaryFixedDim=u.colorSpec.tertiaryFixedDim();u.onTertiaryFixed=u.colorSpec.onTertiaryFixed();u.onTertiaryFixedVariant=u.colorSpec.onTertiaryFixedVariant();var F=class r{static maybeFallbackSpecVersion(t,e){switch(e){case s.EXPRESSIVE:case s.VIBRANT:case s.TONAL_SPOT:case s.NEUTRAL:return t;default:return "2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=r.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??ut(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??ut(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??ut(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??ut(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??ut(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??ut(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??C.fromHueAndChroma(25,84),this.colors=new u;}toString(){return `Scheme: variant=${s[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,e,n){let a=Math.min(e.length-1,n.length),i=t.hue;for(let o=0;o<a;o++)if(i>=e[o]&&i<e[o+1])return U(n[o]);return i}static getRotatedHue(t,e,n){let a=r.getPiecewiseHue(t,e,n);return Math.min(e.length-1,n.length)<=0&&(a=0),U(t.hue+a)}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let t=this.colors.primaryDim();if(t===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let t=this.colors.secondaryDim();if(t===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let t=this.colors.tertiaryDim();if(t===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let t=this.colors.errorDim();if(t===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};F.DEFAULT_SPEC_VERSION="2021";F.DEFAULT_PLATFORM="phone";var bt=class{getPrimaryPalette(t,e,n,a,i){switch(t){case s.CONTENT:case s.FIDELITY:return C.fromHueAndChroma(e.hue,e.chroma);case s.FRUIT_SALAD:return C.fromHueAndChroma(U(e.hue-50),48);case s.MONOCHROME:return C.fromHueAndChroma(e.hue,0);case s.NEUTRAL:return C.fromHueAndChroma(e.hue,12);case s.RAINBOW:return C.fromHueAndChroma(e.hue,48);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,36);case s.EXPRESSIVE:return C.fromHueAndChroma(U(e.hue+240),40);case s.VIBRANT:return C.fromHueAndChroma(e.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,e,n,a,i){switch(t){case s.CONTENT:case s.FIDELITY:return C.fromHueAndChroma(e.hue,Math.max(e.chroma-32,e.chroma*.5));case s.FRUIT_SALAD:return C.fromHueAndChroma(U(e.hue-50),36);case s.MONOCHROME:return C.fromHueAndChroma(e.hue,0);case s.NEUTRAL:return C.fromHueAndChroma(e.hue,8);case s.RAINBOW:return C.fromHueAndChroma(e.hue,16);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,16);case s.EXPRESSIVE:return C.fromHueAndChroma(F.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case s.VIBRANT:return C.fromHueAndChroma(F.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,e,n,a,i){switch(t){case s.CONTENT:return C.fromHct(ot.fixIfDisliked(new yt(e).analogous(3,6)[2]));case s.FIDELITY:return C.fromHct(ot.fixIfDisliked(new yt(e).complement));case s.FRUIT_SALAD:return C.fromHueAndChroma(e.hue,36);case s.MONOCHROME:return C.fromHueAndChroma(e.hue,0);case s.NEUTRAL:return C.fromHueAndChroma(e.hue,16);case s.RAINBOW:case s.TONAL_SPOT:return C.fromHueAndChroma(U(e.hue+60),24);case s.EXPRESSIVE:return C.fromHueAndChroma(F.getRotatedHue(e,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case s.VIBRANT:return C.fromHueAndChroma(F.getRotatedHue(e,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,e,n,a,i){switch(t){case s.CONTENT:case s.FIDELITY:return C.fromHueAndChroma(e.hue,e.chroma/8);case s.FRUIT_SALAD:return C.fromHueAndChroma(e.hue,10);case s.MONOCHROME:return C.fromHueAndChroma(e.hue,0);case s.NEUTRAL:return C.fromHueAndChroma(e.hue,2);case s.RAINBOW:return C.fromHueAndChroma(e.hue,0);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,6);case s.EXPRESSIVE:return C.fromHueAndChroma(U(e.hue+15),8);case s.VIBRANT:return C.fromHueAndChroma(e.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,e,n,a,i){switch(t){case s.CONTENT:return C.fromHueAndChroma(e.hue,e.chroma/8+4);case s.FIDELITY:return C.fromHueAndChroma(e.hue,e.chroma/8+4);case s.FRUIT_SALAD:return C.fromHueAndChroma(e.hue,16);case s.MONOCHROME:return C.fromHueAndChroma(e.hue,0);case s.NEUTRAL:return C.fromHueAndChroma(e.hue,2);case s.RAINBOW:return C.fromHueAndChroma(e.hue,0);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,8);case s.EXPRESSIVE:return C.fromHueAndChroma(U(e.hue+15),12);case s.VIBRANT:return C.fromHueAndChroma(e.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,e,n,a,i){}},Ht=class r extends bt{getPrimaryPalette(t,e,n,a,i){switch(t){case s.NEUTRAL:return C.fromHueAndChroma(e.hue,a==="phone"?x.isBlue(e.hue)?12:8:x.isBlue(e.hue)?16:12);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,a==="phone"&&n?26:32);case s.EXPRESSIVE:return C.fromHueAndChroma(e.hue,a==="phone"?n?36:48:40);case s.VIBRANT:return C.fromHueAndChroma(e.hue,a==="phone"?74:56);default:return super.getPrimaryPalette(t,e,n,a,i)}}getSecondaryPalette(t,e,n,a,i){switch(t){case s.NEUTRAL:return C.fromHueAndChroma(e.hue,a==="phone"?x.isBlue(e.hue)?6:4:x.isBlue(e.hue)?10:6);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,16);case s.EXPRESSIVE:return C.fromHueAndChroma(F.getRotatedHue(e,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),a==="phone"&&n?16:24);case s.VIBRANT:return C.fromHueAndChroma(F.getRotatedHue(e,[0,38,105,140,333,360],[-14,10,-14,10,-14]),a==="phone"?56:36);default:return super.getSecondaryPalette(t,e,n,a,i)}}getTertiaryPalette(t,e,n,a,i){switch(t){case s.NEUTRAL:return C.fromHueAndChroma(F.getRotatedHue(e,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),a==="phone"?20:36);case s.TONAL_SPOT:return C.fromHueAndChroma(F.getRotatedHue(e,[0,20,71,161,333,360],[-40,48,-32,40,-32]),a==="phone"?28:32);case s.EXPRESSIVE:return C.fromHueAndChroma(F.getRotatedHue(e,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case s.VIBRANT:return C.fromHueAndChroma(F.getRotatedHue(e,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(t,e,n,a,i)}}static getExpressiveNeutralHue(t){return F.getRotatedHue(t,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(t,e,n){let a=r.getExpressiveNeutralHue(t);return n==="phone"?e?x.isYellow(a)?6:14:18:12}static getVibrantNeutralHue(t){return F.getRotatedHue(t,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(t,e){let n=r.getVibrantNeutralHue(t);return e==="phone"||x.isBlue(n)?28:20}getNeutralPalette(t,e,n,a,i){switch(t){case s.NEUTRAL:return C.fromHueAndChroma(e.hue,a==="phone"?1.4:6);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,a==="phone"?5:10);case s.EXPRESSIVE:return C.fromHueAndChroma(r.getExpressiveNeutralHue(e),r.getExpressiveNeutralChroma(e,n,a));case s.VIBRANT:return C.fromHueAndChroma(r.getVibrantNeutralHue(e),r.getVibrantNeutralChroma(e,a));default:return super.getNeutralPalette(t,e,n,a,i)}}getNeutralVariantPalette(t,e,n,a,i){switch(t){case s.NEUTRAL:return C.fromHueAndChroma(e.hue,(a==="phone"?1.4:6)*2.2);case s.TONAL_SPOT:return C.fromHueAndChroma(e.hue,(a==="phone"?5:10)*1.7);case s.EXPRESSIVE:let o=r.getExpressiveNeutralHue(e),l=r.getExpressiveNeutralChroma(e,n,a);return C.fromHueAndChroma(o,l*(o>=105&&o<125?1.6:2.3));case s.VIBRANT:let f=r.getVibrantNeutralHue(e),h=r.getVibrantNeutralChroma(e,a);return C.fromHueAndChroma(f,h*1.29);default:return super.getNeutralVariantPalette(t,e,n,a,i)}}getErrorPalette(t,e,n,a,i){let o=F.getPiecewiseHue(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case s.NEUTRAL:return C.fromHueAndChroma(o,a==="phone"?50:40);case s.TONAL_SPOT:return C.fromHueAndChroma(o,a==="phone"?60:48);case s.EXPRESSIVE:return C.fromHueAndChroma(o,a==="phone"?64:48);case s.VIBRANT:return C.fromHueAndChroma(o,a==="phone"?80:60);default:return super.getErrorPalette(t,e,n,a,i)}}},me=new bt,fe=new Ht;function ut(r){return r==="2025"?fe:me}var wt=class extends F{constructor(t,e,n,a=F.DEFAULT_SPEC_VERSION,i=F.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:s.VIBRANT,contrastLevel:n,isDark:e,platform:i,specVersion:a});}};function Nt(r){let t=ft(r),e=pt(r),n=dt(r),a=[t.toString(16),e.toString(16),n.toString(16)];for(let[i,o]of a.entries())o.length===1&&(a[i]="0"+o);return "#"+a.join("")}function Zt(r){r=r.replace("#","");let t=r.length===3,e=r.length===6,n=r.length===8;if(!t&&!e&&!n)throw new Error("unexpected hex "+r);let a=0,i=0,o=0;return t?(a=Q(r.slice(0,1).repeat(2)),i=Q(r.slice(1,2).repeat(2)),o=Q(r.slice(2,3).repeat(2))):e?(a=Q(r.slice(0,2)),i=Q(r.slice(2,4)),o=Q(r.slice(4,6))):n&&(a=Q(r.slice(2,4)),i=Q(r.slice(4,6)),o=Q(r.slice(6,8))),(255<<24|(a&255)<<16|(i&255)<<8|o&255)>>>0}function Q(r){return parseInt(r,16)}function lt(r,t){let e=x.fromInt(Zt(r)),n=new wt(e,t,0),a={},i=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let o of i){let l=u[o];l&&(a[o]=Nt(l.getArgb(n)));}return a}function pa(r,t){let e=r.replace("#",""),n=parseInt(e.substring(0,2),16),a=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return `rgba(${n}, ${a}, ${i}, ${t})`}function da(r){let t=r.replace("#",""),e=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return .2126*e+.7152*n+.0722*a<128}var te=createContext(null),xe=lt("#6750A4",false),Ca=({children:r,seedColor:t="#6750A4",defaultColorScheme:e="auto"})=>{let n=useRef(t),[a,i]=useState(e),[o,l]=useState(()=>{let h=e==="dark";return e==="auto"&&typeof window<"u"&&(h=window.matchMedia("(prefers-color-scheme: dark)").matches),lt(n.current,h)});useEffect(()=>{if(a==="auto"&&typeof window<"u"){let h=window.matchMedia("(prefers-color-scheme: dark)"),p=S=>{l(lt(n.current,S.matches));};return h.addEventListener("change",p),()=>h.removeEventListener("change",p)}},[a]);let f=useMemo(()=>({themeColors:o,systemTheme:a,setThemeColors:h=>{n.current=h;let p=a==="dark";a==="auto"&&(p=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),l(lt(h,p));},setColorScheme:h=>{i(h);let p=h==="dark";h==="auto"&&(p=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),l(lt(n.current,p));}}),[o,a]);return jsx(te.Provider,{value:f,children:r})},Sa=()=>{let r=useContext(te);return r||{themeColors:xe,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}}};/*! Bundled license information:
1
+ import {createContext,forwardRef,useMemo,useImperativeHandle,useState,useRef,useEffect,useContext}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useGlobalTheme,hexToArgba}from'@zaide6137/m3-components-web';import {motion,AnimatePresence}from'framer-motion';import {momentLocalizer,Calendar}from'react-big-calendar';var ol=Object.create;var zn=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var il=Object.getOwnPropertyNames;var ll=Object.getPrototypeOf,cl=Object.prototype.hasOwnProperty;var Gn=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var ul=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var hl=(s,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of il(t))!cl.call(s,c)&&c!==r&&zn(s,c,{get:()=>t[c],enumerable:!(l=sl(t,c))||l.enumerable});return s};var jn=(s,t,r)=>(r=s!=null?ol(ll(s)):{},hl(!s||!s.__esModule?zn(r,"default",{value:s,enumerable:true}):r,s));var Zr=ul((Xr,wt)=>{(function(s,t){typeof Xr=="object"&&typeof wt<"u"?wt.exports=t():typeof define=="function"&&define.amd?define(t):s.moment=t();})(Xr,(function(){var s;function t(){return s.apply(null,arguments)}function r(e){s=e;}function l(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function c(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function h(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function d(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var n;for(n in e)if(h(e,n))return false;return true}function p(e){return e===void 0}function k(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function S(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function x(e,n){var a=[],o,i=e.length;for(o=0;o<i;++o)a.push(n(e[o],o));return a}function P(e,n){for(var a in n)h(n,a)&&(e[a]=n[a]);return h(n,"toString")&&(e.toString=n.toString),h(n,"valueOf")&&(e.valueOf=n.valueOf),e}function D(e,n,a,o){return wn(e,n,a,o,true).utc()}function C(){return {empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidEra:null,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],era:null,meridiem:null,rfc2822:false,weekdayMismatch:false}}function m(e){return e._pf==null&&(e._pf=C()),e._pf}var w;Array.prototype.some?w=Array.prototype.some:w=function(e){var n=Object(this),a=n.length>>>0,o;for(o=0;o<a;o++)if(o in n&&e.call(this,n[o],o,n))return true;return false};function T(e){var n=null,a=false,o=e._d&&!isNaN(e._d.getTime());if(o&&(n=m(e),a=w.call(n.parsedDateParts,function(i){return i!=null}),o=n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&a),e._strict&&(o=o&&n.charsLeftOver===0&&n.unusedTokens.length===0&&n.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=o;else return o;return e._isValid}function Y(e){var n=D(NaN);return e!=null?P(m(n),e):m(n).userInvalidated=true,n}var B=t.momentProperties=[],K=false;function J(e,n){var a,o,i,u=B.length;if(p(n._isAMomentObject)||(e._isAMomentObject=n._isAMomentObject),p(n._i)||(e._i=n._i),p(n._f)||(e._f=n._f),p(n._l)||(e._l=n._l),p(n._strict)||(e._strict=n._strict),p(n._tzm)||(e._tzm=n._tzm),p(n._isUTC)||(e._isUTC=n._isUTC),p(n._offset)||(e._offset=n._offset),p(n._pf)||(e._pf=m(n)),p(n._locale)||(e._locale=n._locale),u>0)for(a=0;a<u;a++)o=B[a],i=n[o],p(i)||(e[o]=i);return e}function X(e){J(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),K===false&&(K=true,t.updateOffset(this),K=false);}function H(e){return e instanceof X||e!=null&&e._isAMomentObject!=null}function z(e){t.suppressDeprecationWarnings===false&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e);}function G(e,n){var a=true;return P(function(){if(t.deprecationHandler!=null&&t.deprecationHandler(null,e),a){var o=[],i,u,g,M=arguments.length;for(u=0;u<M;u++){if(i="",typeof arguments[u]=="object"){i+=`
2
+ [`+u+"] ";for(g in arguments[0])h(arguments[0],g)&&(i+=g+": "+arguments[0][g]+", ");i=i.slice(0,-2);}else i=arguments[u];o.push(i);}z(e+`
3
+ Arguments: `+Array.prototype.slice.call(o).join("")+`
4
+ `+new Error().stack),a=false;}return n.apply(this,arguments)},n)}var te={};function Z(e,n){t.deprecationHandler!=null&&t.deprecationHandler(e,n),te[e]||(z(n),te[e]=true);}t.suppressDeprecationWarnings=false,t.deprecationHandler=null;function oe(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function ye(e){var n,a;for(a in e)h(e,a)&&(n=e[a],oe(n)?this[a]=n:this["_"+a]=n);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source);}function we(e,n){var a=P({},e),o;for(o in n)h(n,o)&&(c(e[o])&&c(n[o])?(a[o]={},P(a[o],e[o]),P(a[o],n[o])):n[o]!=null?a[o]=n[o]:delete a[o]);for(o in e)h(e,o)&&!h(n,o)&&c(e[o])&&(a[o]=P({},a[o]));return a}function L(e){e!=null&&this.set(e);}var fe;Object.keys?fe=Object.keys:fe=function(e){var n,a=[];for(n in e)h(e,n)&&a.push(n);return a};var Fe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function xe(e,n,a){var o=this._calendar[e]||this._calendar.sameElse;return oe(o)?o.call(n,a):o}function de(e,n,a){var o=""+Math.abs(e),i=n-o.length,u=e>=0;return (u?a?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var et=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ke=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tt={},Re={};function O(e,n,a,o){var i=o;typeof o=="string"&&(i=function(){return this[o]()}),e&&(Re[e]=i),n&&(Re[n[0]]=function(){return de(i.apply(this,arguments),n[1],n[2])}),a&&(Re[a]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)});}function Ht(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ut(e){var n=e.match(et),a,o;for(a=0,o=n.length;a<o;a++)Re[n[a]]?n[a]=Re[n[a]]:n[a]=Ht(n[a]);return function(i){var u="",g;for(g=0;g<o;g++)u+=oe(n[g])?n[g].call(i,e):n[g];return u}}function lt(e,n){return e.isValid()?(n=Wt(n,e.localeData()),tt[n]=tt[n]||Ut(n),tt[n](e)):e.localeData().invalidDate()}function Wt(e,n){var a=5;function o(i){return n.longDateFormat(i)||i}for(Ke.lastIndex=0;a>=0&&Ke.test(e);)e=e.replace(Ke,o),Ke.lastIndex=0,a-=1;return e}var zt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function yr(e){var n=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return n||!a?n:(this._longDateFormat[e]=a.match(et).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var br="Invalid date";function ma(){return this._invalidDate}var pa="%d",ga=/\d{1,2}/;function ya(e){return this._ordinal.replace("%d",e)}var ba={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Sa(e,n,a,o){var i=this._relativeTime[a];return oe(i)?i(e,n,a,o):i.replace(/%d/i,e)}function ka(e,n){var a=this._relativeTime[e>0?"future":"past"];return oe(a)?a(n):a.replace(/%s/i,n)}var Qr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Pe(e){return typeof e=="string"?Qr[e]||Qr[e.toLowerCase()]:void 0}function Sr(e){var n={},a,o;for(o in e)h(e,o)&&(a=Pe(o),a&&(n[a]=e[o]));return n}var wa={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function xa(e){var n=[],a;for(a in e)h(e,a)&&n.push({unit:a,priority:wa[a]});return n.sort(function(o,i){return o.priority-i.priority}),n}var en=/\d/,Se=/\d\d/,tn=/\d{3}/,kr=/\d{4}/,Gt=/[+-]?\d{6}/,re=/\d\d?/,rn=/\d\d\d\d?/,nn=/\d\d\d\d\d\d?/,jt=/\d{1,3}/,wr=/\d{1,4}/,$t=/[+-]?\d{1,6}/,ct=/\d+/,qt=/[+-]?\d+/,Pa=/Z|[+-]\d\d:?\d\d/gi,Kt=/Z|[+-]\d\d(?::?\d\d)?/gi,va=/[+-]?\d+(\.\d{1,3})?/,xt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut=/^[1-9]\d?/,xr=/^([1-9]\d|\d)/,Xt;Xt={};function A(e,n,a){Xt[e]=oe(n)?n:function(o,i){return o&&a?a:n};}function Da(e,n){return h(Xt,e)?Xt[e](n._strict,n._locale):new RegExp(Ca(e))}function Ca(e){return Le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,a,o,i,u){return a||o||i||u}))}function Le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ve(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function U(e){var n=+e,a=0;return n!==0&&isFinite(n)&&(a=ve(n)),a}var Pr={};function ee(e,n){var a,o=n,i;for(typeof e=="string"&&(e=[e]),k(n)&&(o=function(u,g){g[n]=U(u);}),i=e.length,a=0;a<i;a++)Pr[e[a]]=o;}function Pt(e,n){ee(e,function(a,o,i,u){i._w=i._w||{},n(a,i._w,i,u);});}function Ta(e,n,a){n!=null&&h(Pr,e)&&Pr[e](n,a._a,a,e);}function Zt(e){return e%4===0&&e%100!==0||e%400===0}var me=0,Ye=1,Ee=2,ue=3,Ce=4,Ve=5,rt=6,_a=7,Ma=8;O("Y",0,0,function(){var e=this.year();return e<=9999?de(e,4):"+"+e}),O(0,["YY",2],0,function(){return this.year()%100}),O(0,["YYYY",4],0,"year"),O(0,["YYYYY",5],0,"year"),O(0,["YYYYYY",6,true],0,"year"),A("Y",qt),A("YY",re,Se),A("YYYY",wr,kr),A("YYYYY",$t,Gt),A("YYYYYY",$t,Gt),ee(["YYYYY","YYYYYY"],me),ee("YYYY",function(e,n){n[me]=e.length===2?t.parseTwoDigitYear(e):U(e);}),ee("YY",function(e,n){n[me]=t.parseTwoDigitYear(e);}),ee("Y",function(e,n){n[me]=parseInt(e,10);});function vt(e){return Zt(e)?366:365}t.parseTwoDigitYear=function(e){return U(e)+(U(e)>68?1900:2e3)};var an=ht("FullYear",true);function Aa(){return Zt(this.year())}function ht(e,n){return function(a){return a!=null?(on(this,e,a),t.updateOffset(this,n),this):Dt(this,e)}}function Dt(e,n){if(!e.isValid())return NaN;var a=e._d,o=e._isUTC;switch(n){case "Milliseconds":return o?a.getUTCMilliseconds():a.getMilliseconds();case "Seconds":return o?a.getUTCSeconds():a.getSeconds();case "Minutes":return o?a.getUTCMinutes():a.getMinutes();case "Hours":return o?a.getUTCHours():a.getHours();case "Date":return o?a.getUTCDate():a.getDate();case "Day":return o?a.getUTCDay():a.getDay();case "Month":return o?a.getUTCMonth():a.getMonth();case "FullYear":return o?a.getUTCFullYear():a.getFullYear();default:return NaN}}function on(e,n,a){var o,i,u,g,M;if(!(!e.isValid()||isNaN(a))){switch(o=e._d,i=e._isUTC,n){case "Milliseconds":return void(i?o.setUTCMilliseconds(a):o.setMilliseconds(a));case "Seconds":return void(i?o.setUTCSeconds(a):o.setSeconds(a));case "Minutes":return void(i?o.setUTCMinutes(a):o.setMinutes(a));case "Hours":return void(i?o.setUTCHours(a):o.setHours(a));case "Date":return void(i?o.setUTCDate(a):o.setDate(a));case "FullYear":break;default:return}u=a,g=e.month(),M=e.date(),M=M===29&&g===1&&!Zt(u)?28:M,i?o.setUTCFullYear(u,g,M):o.setFullYear(u,g,M);}}function Oa(e){return e=Pe(e),oe(this[e])?this[e]():this}function Fa(e,n){if(typeof e=="object"){e=Sr(e);var a=xa(e),o,i=a.length;for(o=0;o<i;o++)this[a[o].unit](e[a[o].unit]);}else if(e=Pe(e),oe(this[e]))return this[e](n);return this}function Ra(e,n){return (e%n+n)%n}var ie;Array.prototype.indexOf?ie=Array.prototype.indexOf:ie=function(e){var n;for(n=0;n<this.length;++n)if(this[n]===e)return n;return -1};function vr(e,n){if(isNaN(e)||isNaN(n))return NaN;var a=Ra(n,12);return e+=(n-a)/12,a===1?Zt(e)?29:28:31-a%7%2}O("M",["MM",2],"Mo",function(){return this.month()+1}),O("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),O("MMMM",0,0,function(e){return this.localeData().months(this,e)}),A("M",re,ut),A("MM",re,Se),A("MMM",function(e,n){return n.monthsShortRegex(e)}),A("MMMM",function(e,n){return n.monthsRegex(e)}),ee(["M","MM"],function(e,n){n[Ye]=U(e)-1;}),ee(["MMM","MMMM"],function(e,n,a,o){var i=a._locale.monthsParse(e,o,a._strict);i!=null?n[Ye]=i:m(a).invalidMonth=e;});var Ea="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),sn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ln=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ia=xt,Na=xt;function La(e,n){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ln).test(n)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone}function Ya(e,n){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ln.test(n)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Va(e,n,a){var o,i,u,g=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)u=D([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(u,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(u,"").toLocaleLowerCase();return a?n==="MMM"?(i=ie.call(this._shortMonthsParse,g),i!==-1?i:null):(i=ie.call(this._longMonthsParse,g),i!==-1?i:null):n==="MMM"?(i=ie.call(this._shortMonthsParse,g),i!==-1?i:(i=ie.call(this._longMonthsParse,g),i!==-1?i:null)):(i=ie.call(this._longMonthsParse,g),i!==-1?i:(i=ie.call(this._shortMonthsParse,g),i!==-1?i:null))}function Ba(e,n,a){var o,i,u;if(this._monthsParseExact)return Va.call(this,e,n,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(i=D([2e3,o]),a&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!a&&!this._monthsParse[o]&&(u="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="MMMM"&&this._longMonthsParse[o].test(e))return o;if(a&&n==="MMM"&&this._shortMonthsParse[o].test(e))return o;if(!a&&this._monthsParse[o].test(e))return o}}function cn(e,n){if(!e.isValid())return e;if(typeof n=="string"){if(/^\d+$/.test(n))n=U(n);else if(n=e.localeData().monthsParse(n),!k(n))return e}var a=n,o=e.date();return o=o<29?o:Math.min(o,vr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,o):e._d.setMonth(a,o),e}function un(e){return e!=null?(cn(this,e),t.updateOffset(this,true),this):Dt(this,"Month")}function Ha(){return vr(this.year(),this.month())}function Ua(e){return this._monthsParseExact?(h(this,"_monthsRegex")||hn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ia),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Wa(e){return this._monthsParseExact?(h(this,"_monthsRegex")||hn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Na),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hn(){function e(N,W){return W.length-N.length}var n=[],a=[],o=[],i,u,g,M;for(i=0;i<12;i++)u=D([2e3,i]),g=Le(this.monthsShort(u,"")),M=Le(this.months(u,"")),n.push(g),a.push(M),o.push(M),o.push(g);n.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i");}function za(e,n,a,o,i,u,g){var M;return e<100&&e>=0?(M=new Date(e+400,n,a,o,i,u,g),isFinite(M.getFullYear())&&M.setFullYear(e)):M=new Date(e,n,a,o,i,u,g),M}function Ct(e){var n,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,n=new Date(Date.UTC.apply(null,a)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(e)):n=new Date(Date.UTC.apply(null,arguments)),n}function Jt(e,n,a){var o=7+n-a,i=(7+Ct(e,0,o).getUTCDay()-n)%7;return -i+o-1}function dn(e,n,a,o,i){var u=(7+a-o)%7,g=Jt(e,o,i),M=1+7*(n-1)+u+g,N,W;return M<=0?(N=e-1,W=vt(N)+M):M>vt(e)?(N=e+1,W=M-vt(e)):(N=e,W=M),{year:N,dayOfYear:W}}function Tt(e,n,a){var o=Jt(e.year(),n,a),i=Math.floor((e.dayOfYear()-o-1)/7)+1,u,g;return i<1?(g=e.year()-1,u=i+Be(g,n,a)):i>Be(e.year(),n,a)?(u=i-Be(e.year(),n,a),g=e.year()+1):(g=e.year(),u=i),{week:u,year:g}}function Be(e,n,a){var o=Jt(e,n,a),i=Jt(e+1,n,a);return (vt(e)-o+i)/7}O("w",["ww",2],"wo","week"),O("W",["WW",2],"Wo","isoWeek"),A("w",re,ut),A("ww",re,Se),A("W",re,ut),A("WW",re,Se),Pt(["w","ww","W","WW"],function(e,n,a,o){n[o.substr(0,1)]=U(e);});function Ga(e){return Tt(e,this._week.dow,this._week.doy).week}var ja={dow:0,doy:6};function $a(){return this._week.dow}function qa(){return this._week.doy}function Ka(e){var n=this.localeData().week(this);return e==null?n:this.add((e-n)*7,"d")}function Xa(e){var n=Tt(this,1,4).week;return e==null?n:this.add((e-n)*7,"d")}O("d",0,"do","day"),O("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),O("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),O("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),O("e",0,0,"weekday"),O("E",0,0,"isoWeekday"),A("d",re),A("e",re),A("E",re),A("dd",function(e,n){return n.weekdaysMinRegex(e)}),A("ddd",function(e,n){return n.weekdaysShortRegex(e)}),A("dddd",function(e,n){return n.weekdaysRegex(e)}),Pt(["dd","ddd","dddd"],function(e,n,a,o){var i=a._locale.weekdaysParse(e,o,a._strict);i!=null?n.d=i:m(a).invalidWeekday=e;}),Pt(["d","e","E"],function(e,n,a,o){n[o]=U(e);});function Za(e,n){return typeof e!="string"?e:isNaN(e)?(e=n.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Ja(e,n){return typeof e=="string"?n.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Dr(e,n){return e.slice(n,7).concat(e.slice(0,n))}var Qa="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),eo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),to=xt,ro=xt,no=xt;function ao(e,n){var a=l(this._weekdays)?this._weekdays:this._weekdays[e&&e!==true&&this._weekdays.isFormat.test(n)?"format":"standalone"];return e===true?Dr(a,this._week.dow):e?a[e.day()]:a}function oo(e){return e===true?Dr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function so(e){return e===true?Dr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function io(e,n,a){var o,i,u,g=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)u=D([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(u,"").toLocaleLowerCase();return a?n==="dddd"?(i=ie.call(this._weekdaysParse,g),i!==-1?i:null):n==="ddd"?(i=ie.call(this._shortWeekdaysParse,g),i!==-1?i:null):(i=ie.call(this._minWeekdaysParse,g),i!==-1?i:null):n==="dddd"?(i=ie.call(this._weekdaysParse,g),i!==-1||(i=ie.call(this._shortWeekdaysParse,g),i!==-1)?i:(i=ie.call(this._minWeekdaysParse,g),i!==-1?i:null)):n==="ddd"?(i=ie.call(this._shortWeekdaysParse,g),i!==-1||(i=ie.call(this._weekdaysParse,g),i!==-1)?i:(i=ie.call(this._minWeekdaysParse,g),i!==-1?i:null)):(i=ie.call(this._minWeekdaysParse,g),i!==-1||(i=ie.call(this._weekdaysParse,g),i!==-1)?i:(i=ie.call(this._shortWeekdaysParse,g),i!==-1?i:null))}function lo(e,n,a){var o,i,u;if(this._weekdaysParseExact)return io.call(this,e,n,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(i=D([2e3,1]).day(o),a&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(u="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(u.replace(".",""),"i")),a&&n==="dddd"&&this._fullWeekdaysParse[o].test(e))return o;if(a&&n==="ddd"&&this._shortWeekdaysParse[o].test(e))return o;if(a&&n==="dd"&&this._minWeekdaysParse[o].test(e))return o;if(!a&&this._weekdaysParse[o].test(e))return o}}function co(e){if(!this.isValid())return e!=null?this:NaN;var n=Dt(this,"Day");return e!=null?(e=Za(e,this.localeData()),this.add(e-n,"d")):n}function uo(e){if(!this.isValid())return e!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return e==null?n:this.add(e-n,"d")}function ho(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var n=Ja(e,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function fo(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Cr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=to),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function mo(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Cr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ro),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function po(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Cr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=no),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Cr(){function e(ge,Ge){return Ge.length-ge.length}var n=[],a=[],o=[],i=[],u,g,M,N,W;for(u=0;u<7;u++)g=D([2e3,1]).day(u),M=Le(this.weekdaysMin(g,"")),N=Le(this.weekdaysShort(g,"")),W=Le(this.weekdays(g,"")),n.push(M),a.push(N),o.push(W),i.push(M),i.push(N),i.push(W);n.sort(e),a.sort(e),o.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i");}function Tr(){return this.hours()%12||12}function go(){return this.hours()||24}O("H",["HH",2],0,"hour"),O("h",["hh",2],0,Tr),O("k",["kk",2],0,go),O("hmm",0,0,function(){return ""+Tr.apply(this)+de(this.minutes(),2)}),O("hmmss",0,0,function(){return ""+Tr.apply(this)+de(this.minutes(),2)+de(this.seconds(),2)}),O("Hmm",0,0,function(){return ""+this.hours()+de(this.minutes(),2)}),O("Hmmss",0,0,function(){return ""+this.hours()+de(this.minutes(),2)+de(this.seconds(),2)});function mn(e,n){O(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)});}mn("a",true),mn("A",false);function pn(e,n){return n._meridiemParse}A("a",pn),A("A",pn),A("H",re,xr),A("h",re,ut),A("k",re,ut),A("HH",re,Se),A("hh",re,Se),A("kk",re,Se),A("hmm",rn),A("hmmss",nn),A("Hmm",rn),A("Hmmss",nn),ee(["H","HH"],ue),ee(["k","kk"],function(e,n,a){var o=U(e);n[ue]=o===24?0:o;}),ee(["a","A"],function(e,n,a){a._isPm=a._locale.isPM(e),a._meridiem=e;}),ee(["h","hh"],function(e,n,a){n[ue]=U(e),m(a).bigHour=true;}),ee("hmm",function(e,n,a){var o=e.length-2;n[ue]=U(e.substr(0,o)),n[Ce]=U(e.substr(o)),m(a).bigHour=true;}),ee("hmmss",function(e,n,a){var o=e.length-4,i=e.length-2;n[ue]=U(e.substr(0,o)),n[Ce]=U(e.substr(o,2)),n[Ve]=U(e.substr(i)),m(a).bigHour=true;}),ee("Hmm",function(e,n,a){var o=e.length-2;n[ue]=U(e.substr(0,o)),n[Ce]=U(e.substr(o));}),ee("Hmmss",function(e,n,a){var o=e.length-4,i=e.length-2;n[ue]=U(e.substr(0,o)),n[Ce]=U(e.substr(o,2)),n[Ve]=U(e.substr(i));});function yo(e){return (e+"").toLowerCase().charAt(0)==="p"}var bo=/[ap]\.?m?\.?/i,So=ht("Hours",true);function ko(e,n,a){return e>11?a?"pm":"PM":a?"am":"AM"}var gn={calendar:Fe,longDateFormat:zt,invalidDate:br,ordinal:pa,dayOfMonthOrdinalParse:ga,relativeTime:ba,months:Ea,monthsShort:sn,week:ja,weekdays:Qa,weekdaysMin:eo,weekdaysShort:fn,meridiemParse:bo},ae={},_t={},Mt;function wo(e,n){var a,o=Math.min(e.length,n.length);for(a=0;a<o;a+=1)if(e[a]!==n[a])return a;return o}function yn(e){return e&&e.toLowerCase().replace("_","-")}function xo(e){for(var n=0,a,o,i,u;n<e.length;){for(u=yn(e[n]).split("-"),a=u.length,o=yn(e[n+1]),o=o?o.split("-"):null;a>0;){if(i=Qt(u.slice(0,a).join("-")),i)return i;if(o&&o.length>=a&&wo(u,o)>=a-1)break;a--;}n++;}return Mt}function Po(e){return !!(e&&e.match("^[^/\\\\]*$"))}function Qt(e){var n=null,a;if(ae[e]===void 0&&typeof wt<"u"&&wt&&wt.exports&&Po(e))try{n=Mt._abbr,a=Gn,a("./locale/"+e),Xe(n);}catch{ae[e]=null;}return ae[e]}function Xe(e,n){var a;return e&&(p(n)?a=He(e):a=_r(e,n),a?Mt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Mt._abbr}function _r(e,n){if(n!==null){var a,o=gn;if(n.abbr=e,ae[e]!=null)Z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=ae[e]._config;else if(n.parentLocale!=null)if(ae[n.parentLocale]!=null)o=ae[n.parentLocale]._config;else if(a=Qt(n.parentLocale),a!=null)o=a._config;else return _t[n.parentLocale]||(_t[n.parentLocale]=[]),_t[n.parentLocale].push({name:e,config:n}),null;return ae[e]=new L(we(o,n)),_t[e]&&_t[e].forEach(function(i){_r(i.name,i.config);}),Xe(e),ae[e]}else return delete ae[e],null}function vo(e,n){if(n!=null){var a,o,i=gn;ae[e]!=null&&ae[e].parentLocale!=null?ae[e].set(we(ae[e]._config,n)):(o=Qt(e),o!=null&&(i=o._config),n=we(i,n),o==null&&(n.abbr=e),a=new L(n),a.parentLocale=ae[e],ae[e]=a),Xe(e);}else ae[e]!=null&&(ae[e].parentLocale!=null?(ae[e]=ae[e].parentLocale,e===Xe()&&Xe(e)):ae[e]!=null&&delete ae[e]);return ae[e]}function He(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Mt;if(!l(e)){if(n=Qt(e),n)return n;e=[e];}return xo(e)}function Do(){return fe(ae)}function Mr(e){var n,a=e._a;return a&&m(e).overflow===-2&&(n=a[Ye]<0||a[Ye]>11?Ye:a[Ee]<1||a[Ee]>vr(a[me],a[Ye])?Ee:a[ue]<0||a[ue]>24||a[ue]===24&&(a[Ce]!==0||a[Ve]!==0||a[rt]!==0)?ue:a[Ce]<0||a[Ce]>59?Ce:a[Ve]<0||a[Ve]>59?Ve:a[rt]<0||a[rt]>999?rt:-1,m(e)._overflowDayOfYear&&(n<me||n>Ee)&&(n=Ee),m(e)._overflowWeeks&&n===-1&&(n=_a),m(e)._overflowWeekday&&n===-1&&(n=Ma),m(e).overflow=n),e}var Co=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,To=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_o=/Z|[+-]\d\d(?::?\d\d)?/,er=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,false],["YYYY",/\d{4}/,false]],Ar=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mo=/^\/?Date\((-?\d+)/i,Ao=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Oo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function bn(e){var n,a,o=e._i,i=Co.exec(o)||To.exec(o),u,g,M,N,W=er.length,ge=Ar.length;if(i){for(m(e).iso=true,n=0,a=W;n<a;n++)if(er[n][1].exec(i[1])){g=er[n][0],u=er[n][2]!==false;break}if(g==null){e._isValid=false;return}if(i[3]){for(n=0,a=ge;n<a;n++)if(Ar[n][1].exec(i[3])){M=(i[2]||" ")+Ar[n][0];break}if(M==null){e._isValid=false;return}}if(!u&&M!=null){e._isValid=false;return}if(i[4])if(_o.exec(i[4]))N="Z";else {e._isValid=false;return}e._f=g+(M||"")+(N||""),Fr(e);}else e._isValid=false;}function Fo(e,n,a,o,i,u){var g=[Ro(e),sn.indexOf(n),parseInt(a,10),parseInt(o,10),parseInt(i,10)];return u&&g.push(parseInt(u,10)),g}function Ro(e){var n=parseInt(e,10);return n<=49?2e3+n:n<=999?1900+n:n}function Eo(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Io(e,n,a){if(e){var o=fn.indexOf(e),i=new Date(n[0],n[1],n[2]).getDay();if(o!==i)return m(a).weekdayMismatch=true,a._isValid=false,false}return true}function No(e,n,a){if(e)return Oo[e];if(n)return 0;var o=parseInt(a,10),i=o%100,u=(o-i)/100;return u*60+i}function Sn(e){var n=Ao.exec(Eo(e._i)),a;if(n){if(a=Fo(n[4],n[3],n[2],n[5],n[6],n[7]),!Io(n[1],a,e))return;e._a=a,e._tzm=No(n[8],n[9],n[10]),e._d=Ct.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=true;}else e._isValid=false;}function Lo(e){var n=Mo.exec(e._i);if(n!==null){e._d=new Date(+n[1]);return}if(bn(e),e._isValid===false)delete e._isValid;else return;if(Sn(e),e._isValid===false)delete e._isValid;else return;e._strict?e._isValid=false:t.createFromInputFallback(e);}t.createFromInputFallback=G("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""));});function dt(e,n,a){return e??n??a}function Yo(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Or(e){var n,a,o=[],i,u,g;if(!e._d){for(i=Yo(e),e._w&&e._a[Ee]==null&&e._a[Ye]==null&&Vo(e),e._dayOfYear!=null&&(g=dt(e._a[me],i[me]),(e._dayOfYear>vt(g)||e._dayOfYear===0)&&(m(e)._overflowDayOfYear=true),a=Ct(g,0,e._dayOfYear),e._a[Ye]=a.getUTCMonth(),e._a[Ee]=a.getUTCDate()),n=0;n<3&&e._a[n]==null;++n)e._a[n]=o[n]=i[n];for(;n<7;n++)e._a[n]=o[n]=e._a[n]==null?n===2?1:0:e._a[n];e._a[ue]===24&&e._a[Ce]===0&&e._a[Ve]===0&&e._a[rt]===0&&(e._nextDay=true,e._a[ue]=0),e._d=(e._useUTC?Ct:za).apply(null,o),u=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ue]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==u&&(m(e).weekdayMismatch=true);}}function Vo(e){var n,a,o,i,u,g,M,N,W;n=e._w,n.GG!=null||n.W!=null||n.E!=null?(u=1,g=4,a=dt(n.GG,e._a[me],Tt(ne(),1,4).year),o=dt(n.W,1),i=dt(n.E,1),(i<1||i>7)&&(N=true)):(u=e._locale._week.dow,g=e._locale._week.doy,W=Tt(ne(),u,g),a=dt(n.gg,e._a[me],W.year),o=dt(n.w,W.week),n.d!=null?(i=n.d,(i<0||i>6)&&(N=true)):n.e!=null?(i=n.e+u,(n.e<0||n.e>6)&&(N=true)):i=u),o<1||o>Be(a,u,g)?m(e)._overflowWeeks=true:N!=null?m(e)._overflowWeekday=true:(M=dn(a,o,i,u,g),e._a[me]=M.year,e._dayOfYear=M.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Fr(e){if(e._f===t.ISO_8601){bn(e);return}if(e._f===t.RFC_2822){Sn(e);return}e._a=[],m(e).empty=true;var n=""+e._i,a,o,i,u,g,M=n.length,N=0,W,ge;for(i=Wt(e._f,e._locale).match(et)||[],ge=i.length,a=0;a<ge;a++)u=i[a],o=(n.match(Da(u,e))||[])[0],o&&(g=n.substr(0,n.indexOf(o)),g.length>0&&m(e).unusedInput.push(g),n=n.slice(n.indexOf(o)+o.length),N+=o.length),Re[u]?(o?m(e).empty=false:m(e).unusedTokens.push(u),Ta(u,o,e)):e._strict&&!o&&m(e).unusedTokens.push(u);m(e).charsLeftOver=M-N,n.length>0&&m(e).unusedInput.push(n),e._a[ue]<=12&&m(e).bigHour===true&&e._a[ue]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[ue]=Bo(e._locale,e._a[ue],e._meridiem),W=m(e).era,W!==null&&(e._a[me]=e._locale.erasConvertYear(W,e._a[me])),Or(e),Mr(e);}function Bo(e,n,a){var o;return a==null?n:e.meridiemHour!=null?e.meridiemHour(n,a):(e.isPM!=null&&(o=e.isPM(a),o&&n<12&&(n+=12),!o&&n===12&&(n=0)),n)}function Ho(e){var n,a,o,i,u,g,M=false,N=e._f.length;if(N===0){m(e).invalidFormat=true,e._d=new Date(NaN);return}for(i=0;i<N;i++)u=0,g=false,n=J({},e),e._useUTC!=null&&(n._useUTC=e._useUTC),n._f=e._f[i],Fr(n),T(n)&&(g=true),u+=m(n).charsLeftOver,u+=m(n).unusedTokens.length*10,m(n).score=u,M?u<o&&(o=u,a=n):(o==null||u<o||g)&&(o=u,a=n,g&&(M=true));P(e,a||n);}function Uo(e){if(!e._d){var n=Sr(e._i),a=n.day===void 0?n.date:n.day;e._a=x([n.year,n.month,a,n.hour,n.minute,n.second,n.millisecond],function(o){return o&&parseInt(o,10)}),Or(e);}}function Wo(e){var n=new X(Mr(kn(e)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function kn(e){var n=e._i,a=e._f;return e._locale=e._locale||He(e._l),n===null||a===void 0&&n===""?Y({nullInput:true}):(typeof n=="string"&&(e._i=n=e._locale.preparse(n)),H(n)?new X(Mr(n)):(S(n)?e._d=n:l(a)?Ho(e):a?Fr(e):zo(e),T(e)||(e._d=null),e))}function zo(e){var n=e._i;p(n)?e._d=new Date(t.now()):S(n)?e._d=new Date(n.valueOf()):typeof n=="string"?Lo(e):l(n)?(e._a=x(n.slice(0),function(a){return parseInt(a,10)}),Or(e)):c(n)?Uo(e):k(n)?e._d=new Date(n):t.createFromInputFallback(e);}function wn(e,n,a,o,i){var u={};return (n===true||n===false)&&(o=n,n=void 0),(a===true||a===false)&&(o=a,a=void 0),(c(e)&&d(e)||l(e)&&e.length===0)&&(e=void 0),u._isAMomentObject=true,u._useUTC=u._isUTC=i,u._l=a,u._i=e,u._f=n,u._strict=o,Wo(u)}function ne(e,n,a,o){return wn(e,n,a,o,false)}var Go=G("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ne.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Y()}),jo=G("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ne.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Y()});function xn(e,n){var a,o;if(n.length===1&&l(n[0])&&(n=n[0]),!n.length)return ne();for(a=n[0],o=1;o<n.length;++o)(!n[o].isValid()||n[o][e](a))&&(a=n[o]);return a}function $o(){var e=[].slice.call(arguments,0);return xn("isBefore",e)}function qo(){var e=[].slice.call(arguments,0);return xn("isAfter",e)}var Ko=function(){return Date.now?Date.now():+new Date},At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xo(e){var n,a=false,o,i=At.length;for(n in e)if(h(e,n)&&!(ie.call(At,n)!==-1&&(e[n]==null||!isNaN(e[n]))))return false;for(o=0;o<i;++o)if(e[At[o]]){if(a)return false;parseFloat(e[At[o]])!==U(e[At[o]])&&(a=true);}return true}function Zo(){return this._isValid}function Jo(){return Te(NaN)}function tr(e){var n=Sr(e),a=n.year||0,o=n.quarter||0,i=n.month||0,u=n.week||n.isoWeek||0,g=n.day||0,M=n.hour||0,N=n.minute||0,W=n.second||0,ge=n.millisecond||0;this._isValid=Xo(n),this._milliseconds=+ge+W*1e3+N*6e4+M*1e3*60*60,this._days=+g+u*7,this._months=+i+o*3+a*12,this._data={},this._locale=He(),this._bubble();}function rr(e){return e instanceof tr}function Rr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Qo(e,n,a){var o=Math.min(e.length,n.length),i=Math.abs(e.length-n.length),u=0,g;for(g=0;g<o;g++)(U(e[g])!==U(n[g]))&&u++;return u+i}function Pn(e,n){O(e,0,0,function(){var a=this.utcOffset(),o="+";return a<0&&(a=-a,o="-"),o+de(~~(a/60),2)+n+de(~~a%60,2)});}Pn("Z",":"),Pn("ZZ",""),A("Z",Kt),A("ZZ",Kt),ee(["Z","ZZ"],function(e,n,a){a._useUTC=true,a._tzm=Er(Kt,e);});var es=/([\+\-]|\d\d)/gi;function Er(e,n){var a=(n||"").match(e),o,i,u;return a===null?null:(o=a[a.length-1]||[],i=(o+"").match(es)||["-",0,0],u=+(i[1]*60)+U(i[2]),u===0?0:i[0]==="+"?u:-u)}function Ir(e,n){var a,o;return n._isUTC?(a=n.clone(),o=(H(e)||S(e)?e.valueOf():ne(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+o),t.updateOffset(a,false),a):ne(e).local()}function Nr(e){return -Math.round(e._d.getTimezoneOffset())}t.updateOffset=function(){};function ts(e,n,a){var o=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Er(Kt,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return !this._isUTC&&n&&(i=Nr(this)),this._offset=e,this._isUTC=true,i!=null&&this.add(i,"m"),o!==e&&(!n||this._changeInProgress?Tn(this,Te(e-o,"m"),1,false):this._changeInProgress||(this._changeInProgress=true,t.updateOffset(this,true),this._changeInProgress=null)),this}else return this._isUTC?o:Nr(this)}function rs(e,n){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,n),this):-this.utcOffset()}function ns(e){return this.utcOffset(0,e)}function as(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=false,e&&this.subtract(Nr(this),"m")),this}function os(){if(this._tzm!=null)this.utcOffset(this._tzm,false,true);else if(typeof this._i=="string"){var e=Er(Pa,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,true);}return this}function ss(e){return this.isValid()?(e=e?ne(e).utcOffset():0,(this.utcOffset()-e)%60===0):false}function is(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ls(){if(!p(this._isDSTShifted))return this._isDSTShifted;var e={},n;return J(e,this),e=kn(e),e._a?(n=e._isUTC?D(e._a):ne(e._a),this._isDSTShifted=this.isValid()&&Qo(e._a,n.toArray())>0):this._isDSTShifted=false,this._isDSTShifted}function cs(){return this.isValid()?!this._isUTC:false}function us(){return this.isValid()?this._isUTC:false}function vn(){return this.isValid()?this._isUTC&&this._offset===0:false}var hs=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ds=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Te(e,n){var a=e,o=null,i,u,g;return rr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:k(e)||!isNaN(+e)?(a={},n?a[n]=+e:a.milliseconds=+e):(o=hs.exec(e))?(i=o[1]==="-"?-1:1,a={y:0,d:U(o[Ee])*i,h:U(o[ue])*i,m:U(o[Ce])*i,s:U(o[Ve])*i,ms:U(Rr(o[rt]*1e3))*i}):(o=ds.exec(e))?(i=o[1]==="-"?-1:1,a={y:nt(o[2],i),M:nt(o[3],i),w:nt(o[4],i),d:nt(o[5],i),h:nt(o[6],i),m:nt(o[7],i),s:nt(o[8],i)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(g=fs(ne(a.from),ne(a.to)),a={},a.ms=g.milliseconds,a.M=g.months),u=new tr(a),rr(e)&&h(e,"_locale")&&(u._locale=e._locale),rr(e)&&h(e,"_isValid")&&(u._isValid=e._isValid),u}Te.fn=tr.prototype,Te.invalid=Jo;function nt(e,n){var a=e&&parseFloat(e.replace(",","."));return (isNaN(a)?0:a)*n}function Dn(e,n){var a={};return a.months=n.month()-e.month()+(n.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(n)&&--a.months,a.milliseconds=+n-+e.clone().add(a.months,"M"),a}function fs(e,n){var a;return e.isValid()&&n.isValid()?(n=Ir(n,e),e.isBefore(n)?a=Dn(e,n):(a=Dn(n,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Cn(e,n){return function(a,o){var i,u;return o!==null&&!isNaN(+o)&&(Z(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=a,a=o,o=u),i=Te(a,o),Tn(this,i,e),this}}function Tn(e,n,a,o){var i=n._milliseconds,u=Rr(n._days),g=Rr(n._months);e.isValid()&&(o=o??true,g&&cn(e,Dt(e,"Month")+g*a),u&&on(e,"Date",Dt(e,"Date")+u*a),i&&e._d.setTime(e._d.valueOf()+i*a),o&&t.updateOffset(e,u||g));}var ms=Cn(1,"add"),ps=Cn(-1,"subtract");function _n(e){return typeof e=="string"||e instanceof String}function gs(e){return H(e)||S(e)||_n(e)||k(e)||bs(e)||ys(e)||e===null||e===void 0}function ys(e){var n=c(e)&&!d(e),a=false,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,u,g=o.length;for(i=0;i<g;i+=1)u=o[i],a=a||h(e,u);return n&&a}function bs(e){var n=l(e),a=false;return n&&(a=e.filter(function(o){return !k(o)&&_n(e)}).length===0),n&&a}function Ss(e){var n=c(e)&&!d(e),a=false,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,u;for(i=0;i<o.length;i+=1)u=o[i],a=a||h(e,u);return n&&a}function ks(e,n){var a=e.diff(n,"days",true);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function ws(e,n){arguments.length===1&&(arguments[0]?gs(arguments[0])?(e=arguments[0],n=void 0):Ss(arguments[0])&&(n=arguments[0],e=void 0):(e=void 0,n=void 0));var a=e||ne(),o=Ir(a,this).startOf("day"),i=t.calendarFormat(this,o)||"sameElse",u=n&&(oe(n[i])?n[i].call(this,a):n[i]);return this.format(u||this.localeData().calendar(i,this,ne(a)))}function xs(){return new X(this)}function Ps(e,n){var a=H(e)?e:ne(e);return this.isValid()&&a.isValid()?(n=Pe(n)||"millisecond",n==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(n).valueOf()):false}function vs(e,n){var a=H(e)?e:ne(e);return this.isValid()&&a.isValid()?(n=Pe(n)||"millisecond",n==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(n).valueOf()<a.valueOf()):false}function Ds(e,n,a,o){var i=H(e)?e:ne(e),u=H(n)?n:ne(n);return this.isValid()&&i.isValid()&&u.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(i,a):!this.isBefore(i,a))&&(o[1]===")"?this.isBefore(u,a):!this.isAfter(u,a))):false}function Cs(e,n){var a=H(e)?e:ne(e),o;return this.isValid()&&a.isValid()?(n=Pe(n)||"millisecond",n==="millisecond"?this.valueOf()===a.valueOf():(o=a.valueOf(),this.clone().startOf(n).valueOf()<=o&&o<=this.clone().endOf(n).valueOf())):false}function Ts(e,n){return this.isSame(e,n)||this.isAfter(e,n)}function _s(e,n){return this.isSame(e,n)||this.isBefore(e,n)}function Ms(e,n,a){var o,i,u;if(!this.isValid())return NaN;if(o=Ir(e,this),!o.isValid())return NaN;switch(i=(o.utcOffset()-this.utcOffset())*6e4,n=Pe(n),n){case "year":u=nr(this,o)/12;break;case "month":u=nr(this,o);break;case "quarter":u=nr(this,o)/3;break;case "second":u=(this-o)/1e3;break;case "minute":u=(this-o)/6e4;break;case "hour":u=(this-o)/36e5;break;case "day":u=(this-o-i)/864e5;break;case "week":u=(this-o-i)/6048e5;break;default:u=this-o;}return a?u:ve(u)}function nr(e,n){if(e.date()<n.date())return -nr(n,e);var a=(n.year()-e.year())*12+(n.month()-e.month()),o=e.clone().add(a,"months"),i,u;return n-o<0?(i=e.clone().add(a-1,"months"),u=(n-o)/(o-i)):(i=e.clone().add(a+1,"months"),u=(n-o)/(i-o)),-(a+u)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function As(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Os(e){if(!this.isValid())return null;var n=e!==true,a=n?this.clone().utc():this;return a.year()<0||a.year()>9999?lt(a,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):oe(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",lt(a,"Z")):lt(a,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Fs(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var e="moment",n="",a,o,i,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),a="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",u=n+'[")]',this.format(a+o+i+u)}function Rs(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=lt(this,e);return this.localeData().postformat(n)}function Es(e,n){return this.isValid()&&(H(e)&&e.isValid()||ne(e).isValid())?Te({to:this,from:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Is(e){return this.from(ne(),e)}function Ns(e,n){return this.isValid()&&(H(e)&&e.isValid()||ne(e).isValid())?Te({from:this,to:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Ls(e){return this.to(ne(),e)}function Mn(e){var n;return e===void 0?this._locale._abbr:(n=He(e),n!=null&&(this._locale=n),this)}var An=G("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 On(){return this._locale}var ar=1e3,ft=60*ar,or=60*ft,Fn=(365*400+97)*24*or;function mt(e,n){return (e%n+n)%n}function Rn(e,n,a){return e<100&&e>=0?new Date(e+400,n,a)-Fn:new Date(e,n,a).valueOf()}function En(e,n,a){return e<100&&e>=0?Date.UTC(e+400,n,a)-Fn:Date.UTC(e,n,a)}function Ys(e){var n,a;if(e=Pe(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?En:Rn,e){case "year":n=a(this.year(),0,1);break;case "quarter":n=a(this.year(),this.month()-this.month()%3,1);break;case "month":n=a(this.year(),this.month(),1);break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday());break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case "day":case "date":n=a(this.year(),this.month(),this.date());break;case "hour":n=this._d.valueOf(),n-=mt(n+(this._isUTC?0:this.utcOffset()*ft),or);break;case "minute":n=this._d.valueOf(),n-=mt(n,ft);break;case "second":n=this._d.valueOf(),n-=mt(n,ar);break}return this._d.setTime(n),t.updateOffset(this,true),this}function Vs(e){var n,a;if(e=Pe(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?En:Rn,e){case "year":n=a(this.year()+1,0,1)-1;break;case "quarter":n=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case "month":n=a(this.year(),this.month()+1,1)-1;break;case "week":n=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case "isoWeek":n=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case "day":case "date":n=a(this.year(),this.month(),this.date()+1)-1;break;case "hour":n=this._d.valueOf(),n+=or-mt(n+(this._isUTC?0:this.utcOffset()*ft),or)-1;break;case "minute":n=this._d.valueOf(),n+=ft-mt(n,ft)-1;break;case "second":n=this._d.valueOf(),n+=ar-mt(n,ar)-1;break}return this._d.setTime(n),t.updateOffset(this,true),this}function Bs(){return this._d.valueOf()-(this._offset||0)*6e4}function Hs(){return Math.floor(this.valueOf()/1e3)}function Us(){return new Date(this.valueOf())}function Ws(){var e=this;return [e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zs(){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 Gs(){return this.isValid()?this.toISOString():null}function js(){return T(this)}function $s(){return P({},m(this))}function qs(){return m(this).overflow}function Ks(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}O("N",0,0,"eraAbbr"),O("NN",0,0,"eraAbbr"),O("NNN",0,0,"eraAbbr"),O("NNNN",0,0,"eraName"),O("NNNNN",0,0,"eraNarrow"),O("y",["y",1],"yo","eraYear"),O("y",["yy",2],0,"eraYear"),O("y",["yyy",3],0,"eraYear"),O("y",["yyyy",4],0,"eraYear"),A("N",Lr),A("NN",Lr),A("NNN",Lr),A("NNNN",si),A("NNNNN",ii),ee(["N","NN","NNN","NNNN","NNNNN"],function(e,n,a,o){var i=a._locale.erasParse(e,o,a._strict);i?m(a).era=i:m(a).invalidEra=e;}),A("y",ct),A("yy",ct),A("yyy",ct),A("yyyy",ct),A("yo",li),ee(["y","yy","yyy","yyyy"],me),ee(["yo"],function(e,n,a,o){var i;a._locale._eraYearOrdinalRegex&&(i=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?n[me]=a._locale.eraYearOrdinalParse(e,i):n[me]=parseInt(e,10);});function Xs(e,n){var a,o,i,u=this._eras||He("en")._eras;for(a=0,o=u.length;a<o;++a)switch(typeof u[a].since==="string"&&(i=t(u[a].since).startOf("day"),u[a].since=i.valueOf()),typeof u[a].until){case "undefined":u[a].until=1/0;break;case "string":i=t(u[a].until).startOf("day").valueOf(),u[a].until=i.valueOf();break}return u}function Zs(e,n,a){var o,i,u=this.eras(),g,M,N;for(e=e.toUpperCase(),o=0,i=u.length;o<i;++o)if(g=u[o].name.toUpperCase(),M=u[o].abbr.toUpperCase(),N=u[o].narrow.toUpperCase(),a)switch(n){case "N":case "NN":case "NNN":if(M===e)return u[o];break;case "NNNN":if(g===e)return u[o];break;case "NNNNN":if(N===e)return u[o];break}else if([g,M,N].indexOf(e)>=0)return u[o]}function Js(e,n){var a=e.since<=e.until?1:-1;return n===void 0?t(e.since).year():t(e.since).year()+(n-e.offset)*a}function Qs(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].name;return ""}function ei(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].narrow;return ""}function ti(){var e,n,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return o[e].abbr;return ""}function ri(){var e,n,a,o,i=this.localeData().eras();for(e=0,n=i.length;e<n;++e)if(a=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return (this.year()-t(i[e].since).year())*a+i[e].offset;return this.year()}function ni(e){return h(this,"_erasNameRegex")||Yr.call(this),e?this._erasNameRegex:this._erasRegex}function ai(e){return h(this,"_erasAbbrRegex")||Yr.call(this),e?this._erasAbbrRegex:this._erasRegex}function oi(e){return h(this,"_erasNarrowRegex")||Yr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Lr(e,n){return n.erasAbbrRegex(e)}function si(e,n){return n.erasNameRegex(e)}function ii(e,n){return n.erasNarrowRegex(e)}function li(e,n){return n._eraYearOrdinalRegex||ct}function Yr(){var e=[],n=[],a=[],o=[],i,u,g,M,N,W=this.eras();for(i=0,u=W.length;i<u;++i)g=Le(W[i].name),M=Le(W[i].abbr),N=Le(W[i].narrow),n.push(g),e.push(M),a.push(N),o.push(g),o.push(M),o.push(N);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i");}O(0,["gg",2],0,function(){return this.weekYear()%100}),O(0,["GG",2],0,function(){return this.isoWeekYear()%100});function sr(e,n){O(0,[e,e.length],0,n);}sr("gggg","weekYear"),sr("ggggg","weekYear"),sr("GGGG","isoWeekYear"),sr("GGGGG","isoWeekYear"),A("G",qt),A("g",qt),A("GG",re,Se),A("gg",re,Se),A("GGGG",wr,kr),A("gggg",wr,kr),A("GGGGG",$t,Gt),A("ggggg",$t,Gt),Pt(["gggg","ggggg","GGGG","GGGGG"],function(e,n,a,o){n[o.substr(0,2)]=U(e);}),Pt(["gg","GG"],function(e,n,a,o){n[o]=t.parseTwoDigitYear(e);});function ci(e){return In.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ui(e){return In.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hi(){return Be(this.year(),1,4)}function di(){return Be(this.isoWeekYear(),1,4)}function fi(){var e=this.localeData()._week;return Be(this.year(),e.dow,e.doy)}function mi(){var e=this.localeData()._week;return Be(this.weekYear(),e.dow,e.doy)}function In(e,n,a,o,i){var u;return e==null?Tt(this,o,i).year:(u=Be(e,o,i),n>u&&(n=u),pi.call(this,e,n,a,o,i))}function pi(e,n,a,o,i){var u=dn(e,n,a,o,i),g=Ct(u.year,0,u.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}O("Q",0,"Qo","quarter"),A("Q",en),ee("Q",function(e,n){n[Ye]=(U(e)-1)*3;});function gi(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}O("D",["DD",2],"Do","date"),A("D",re,ut),A("DD",re,Se),A("Do",function(e,n){return e?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),ee(["D","DD"],Ee),ee("Do",function(e,n){n[Ee]=U(e.match(re)[0]);});var Nn=ht("Date",true);O("DDD",["DDDD",3],"DDDo","dayOfYear"),A("DDD",jt),A("DDDD",tn),ee(["DDD","DDDD"],function(e,n,a){a._dayOfYear=U(e);});function yi(e){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?n:this.add(e-n,"d")}O("m",["mm",2],0,"minute"),A("m",re,xr),A("mm",re,Se),ee(["m","mm"],Ce);var bi=ht("Minutes",false);O("s",["ss",2],0,"second"),A("s",re,xr),A("ss",re,Se),ee(["s","ss"],Ve);var Si=ht("Seconds",false);O("S",0,0,function(){return ~~(this.millisecond()/100)}),O(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),O(0,["SSS",3],0,"millisecond"),O(0,["SSSS",4],0,function(){return this.millisecond()*10}),O(0,["SSSSS",5],0,function(){return this.millisecond()*100}),O(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),O(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),O(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),O(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),A("S",jt,en),A("SS",jt,Se),A("SSS",jt,tn);var Ze,Ln;for(Ze="SSSS";Ze.length<=9;Ze+="S")A(Ze,ct);function ki(e,n){n[rt]=U(("0."+e)*1e3);}for(Ze="S";Ze.length<=9;Ze+="S")ee(Ze,ki);Ln=ht("Milliseconds",false),O("z",0,0,"zoneAbbr"),O("zz",0,0,"zoneName");function wi(){return this._isUTC?"UTC":""}function xi(){return this._isUTC?"Coordinated Universal Time":""}var v=X.prototype;v.add=ms,v.calendar=ws,v.clone=xs,v.diff=Ms,v.endOf=Vs,v.format=Rs,v.from=Es,v.fromNow=Is,v.to=Ns,v.toNow=Ls,v.get=Oa,v.invalidAt=qs,v.isAfter=Ps,v.isBefore=vs,v.isBetween=Ds,v.isSame=Cs,v.isSameOrAfter=Ts,v.isSameOrBefore=_s,v.isValid=js,v.lang=An,v.locale=Mn,v.localeData=On,v.max=jo,v.min=Go,v.parsingFlags=$s,v.set=Fa,v.startOf=Ys,v.subtract=ps,v.toArray=Ws,v.toObject=zs,v.toDate=Us,v.toISOString=Os,v.inspect=Fs,typeof Symbol<"u"&&Symbol.for!=null&&(v[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),v.toJSON=Gs,v.toString=As,v.unix=Hs,v.valueOf=Bs,v.creationData=Ks,v.eraName=Qs,v.eraNarrow=ei,v.eraAbbr=ti,v.eraYear=ri,v.year=an,v.isLeapYear=Aa,v.weekYear=ci,v.isoWeekYear=ui,v.quarter=v.quarters=gi,v.month=un,v.daysInMonth=Ha,v.week=v.weeks=Ka,v.isoWeek=v.isoWeeks=Xa,v.weeksInYear=fi,v.weeksInWeekYear=mi,v.isoWeeksInYear=hi,v.isoWeeksInISOWeekYear=di,v.date=Nn,v.day=v.days=co,v.weekday=uo,v.isoWeekday=ho,v.dayOfYear=yi,v.hour=v.hours=So,v.minute=v.minutes=bi,v.second=v.seconds=Si,v.millisecond=v.milliseconds=Ln,v.utcOffset=ts,v.utc=ns,v.local=as,v.parseZone=os,v.hasAlignedHourOffset=ss,v.isDST=is,v.isLocal=cs,v.isUtcOffset=us,v.isUtc=vn,v.isUTC=vn,v.zoneAbbr=wi,v.zoneName=xi,v.dates=G("dates accessor is deprecated. Use date instead.",Nn),v.months=G("months accessor is deprecated. Use month instead",un),v.years=G("years accessor is deprecated. Use year instead",an),v.zone=G("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",rs),v.isDSTShifted=G("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ls);function Pi(e){return ne(e*1e3)}function vi(){return ne.apply(null,arguments).parseZone()}function Yn(e){return e}var q=L.prototype;q.calendar=xe,q.longDateFormat=yr,q.invalidDate=ma,q.ordinal=ya,q.preparse=Yn,q.postformat=Yn,q.relativeTime=Sa,q.pastFuture=ka,q.set=ye,q.eras=Xs,q.erasParse=Zs,q.erasConvertYear=Js,q.erasAbbrRegex=ai,q.erasNameRegex=ni,q.erasNarrowRegex=oi,q.months=La,q.monthsShort=Ya,q.monthsParse=Ba,q.monthsRegex=Wa,q.monthsShortRegex=Ua,q.week=Ga,q.firstDayOfYear=qa,q.firstDayOfWeek=$a,q.weekdays=ao,q.weekdaysMin=so,q.weekdaysShort=oo,q.weekdaysParse=lo,q.weekdaysRegex=fo,q.weekdaysShortRegex=mo,q.weekdaysMinRegex=po,q.isPM=yo,q.meridiem=ko;function ir(e,n,a,o){var i=He(),u=D().set(o,n);return i[a](u,e)}function Vn(e,n,a){if(k(e)&&(n=e,e=void 0),e=e||"",n!=null)return ir(e,n,a,"month");var o,i=[];for(o=0;o<12;o++)i[o]=ir(e,o,a,"month");return i}function Vr(e,n,a,o){typeof e=="boolean"?(k(n)&&(a=n,n=void 0),n=n||""):(n=e,a=n,e=false,k(n)&&(a=n,n=void 0),n=n||"");var i=He(),u=e?i._week.dow:0,g,M=[];if(a!=null)return ir(n,(a+u)%7,o,"day");for(g=0;g<7;g++)M[g]=ir(n,(g+u)%7,o,"day");return M}function Di(e,n){return Vn(e,n,"months")}function Ci(e,n){return Vn(e,n,"monthsShort")}function Ti(e,n,a){return Vr(e,n,a,"weekdays")}function _i(e,n,a){return Vr(e,n,a,"weekdaysShort")}function Mi(e,n,a){return Vr(e,n,a,"weekdaysMin")}Xe("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 n=e%10,a=U(e%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return e+a}}),t.lang=G("moment.lang is deprecated. Use moment.locale instead.",Xe),t.langData=G("moment.langData is deprecated. Use moment.localeData instead.",He);var Ue=Math.abs;function Ai(){var e=this._data;return this._milliseconds=Ue(this._milliseconds),this._days=Ue(this._days),this._months=Ue(this._months),e.milliseconds=Ue(e.milliseconds),e.seconds=Ue(e.seconds),e.minutes=Ue(e.minutes),e.hours=Ue(e.hours),e.months=Ue(e.months),e.years=Ue(e.years),this}function Bn(e,n,a,o){var i=Te(n,a);return e._milliseconds+=o*i._milliseconds,e._days+=o*i._days,e._months+=o*i._months,e._bubble()}function Oi(e,n){return Bn(this,e,n,1)}function Fi(e,n){return Bn(this,e,n,-1)}function Hn(e){return e<0?Math.floor(e):Math.ceil(e)}function Ri(){var e=this._milliseconds,n=this._days,a=this._months,o=this._data,i,u,g,M,N;return e>=0&&n>=0&&a>=0||e<=0&&n<=0&&a<=0||(e+=Hn(Br(a)+n)*864e5,n=0,a=0),o.milliseconds=e%1e3,i=ve(e/1e3),o.seconds=i%60,u=ve(i/60),o.minutes=u%60,g=ve(u/60),o.hours=g%24,n+=ve(g/24),N=ve(Un(n)),a+=N,n-=Hn(Br(N)),M=ve(a/12),a%=12,o.days=n,o.months=a,o.years=M,this}function Un(e){return e*4800/146097}function Br(e){return e*146097/4800}function Ei(e){if(!this.isValid())return NaN;var n,a,o=this._milliseconds;if(e=Pe(e),e==="month"||e==="quarter"||e==="year")switch(n=this._days+o/864e5,a=this._months+Un(n),e){case "month":return a;case "quarter":return a/3;case "year":return a/12}else switch(n=this._days+Math.round(Br(this._months)),e){case "week":return n/7+o/6048e5;case "day":return n+o/864e5;case "hour":return n*24+o/36e5;case "minute":return n*1440+o/6e4;case "second":return n*86400+o/1e3;case "millisecond":return Math.floor(n*864e5)+o;default:throw new Error("Unknown unit "+e)}}function We(e){return function(){return this.as(e)}}var Wn=We("ms"),Ii=We("s"),Ni=We("m"),Li=We("h"),Yi=We("d"),Vi=We("w"),Bi=We("M"),Hi=We("Q"),Ui=We("y"),Wi=Wn;function zi(){return Te(this)}function Gi(e){return e=Pe(e),this.isValid()?this[e+"s"]():NaN}function at(e){return function(){return this.isValid()?this._data[e]:NaN}}var ji=at("milliseconds"),$i=at("seconds"),qi=at("minutes"),Ki=at("hours"),Xi=at("days"),Zi=at("months"),Ji=at("years");function Qi(){return ve(this.days()/7)}var ze=Math.round,pt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function el(e,n,a,o,i){return i.relativeTime(n||1,!!a,e,o)}function tl(e,n,a,o){var i=Te(e).abs(),u=ze(i.as("s")),g=ze(i.as("m")),M=ze(i.as("h")),N=ze(i.as("d")),W=ze(i.as("M")),ge=ze(i.as("w")),Ge=ze(i.as("y")),Je=u<=a.ss&&["s",u]||u<a.s&&["ss",u]||g<=1&&["m"]||g<a.m&&["mm",g]||M<=1&&["h"]||M<a.h&&["hh",M]||N<=1&&["d"]||N<a.d&&["dd",N];return a.w!=null&&(Je=Je||ge<=1&&["w"]||ge<a.w&&["ww",ge]),Je=Je||W<=1&&["M"]||W<a.M&&["MM",W]||Ge<=1&&["y"]||["yy",Ge],Je[2]=n,Je[3]=+e>0,Je[4]=o,el.apply(null,Je)}function rl(e){return e===void 0?ze:typeof e=="function"?(ze=e,true):false}function nl(e,n){return pt[e]===void 0?false:n===void 0?pt[e]:(pt[e]=n,e==="s"&&(pt.ss=n-1),true)}function al(e,n){if(!this.isValid())return this.localeData().invalidDate();var a=false,o=pt,i,u;return typeof e=="object"&&(n=e,e=false),typeof e=="boolean"&&(a=e),typeof n=="object"&&(o=Object.assign({},pt,n),n.s!=null&&n.ss==null&&(o.ss=n.s-1)),i=this.localeData(),u=tl(this,!a,o,i),a&&(u=i.pastFuture(+this,u)),i.postformat(u)}var Hr=Math.abs;function gt(e){return (e>0)-(e<0)||+e}function lr(){if(!this.isValid())return this.localeData().invalidDate();var e=Hr(this._milliseconds)/1e3,n=Hr(this._days),a=Hr(this._months),o,i,u,g,M=this.asSeconds(),N,W,ge,Ge;return M?(o=ve(e/60),i=ve(o/60),e%=60,o%=60,u=ve(a/12),a%=12,g=e?e.toFixed(3).replace(/\.?0+$/,""):"",N=M<0?"-":"",W=gt(this._months)!==gt(M)?"-":"",ge=gt(this._days)!==gt(M)?"-":"",Ge=gt(this._milliseconds)!==gt(M)?"-":"",N+"P"+(u?W+u+"Y":"")+(a?W+a+"M":"")+(n?ge+n+"D":"")+(i||o||e?"T":"")+(i?Ge+i+"H":"")+(o?Ge+o+"M":"")+(e?Ge+g+"S":"")):"P0D"}var j=tr.prototype;j.isValid=Zo,j.abs=Ai,j.add=Oi,j.subtract=Fi,j.as=Ei,j.asMilliseconds=Wn,j.asSeconds=Ii,j.asMinutes=Ni,j.asHours=Li,j.asDays=Yi,j.asWeeks=Vi,j.asMonths=Bi,j.asQuarters=Hi,j.asYears=Ui,j.valueOf=Wi,j._bubble=Ri,j.clone=zi,j.get=Gi,j.milliseconds=ji,j.seconds=$i,j.minutes=qi,j.hours=Ki,j.days=Xi,j.weeks=Qi,j.months=Zi,j.years=Ji,j.humanize=al,j.toISOString=lr,j.toString=lr,j.toJSON=lr,j.locale=Mn,j.localeData=On,j.toIsoString=G("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lr),j.lang=An,O("X",0,0,"unix"),O("x",0,0,"valueOf"),A("x",qt),A("X",va),ee("X",function(e,n,a){a._d=new Date(parseFloat(e)*1e3);}),ee("x",function(e,n,a){a._d=new Date(U(e));});return t.version="2.30.1",r(ne),t.fn=v,t.min=$o,t.max=qo,t.now=Ko,t.utc=D,t.unix=Pi,t.months=Di,t.isDate=S,t.locale=Xe,t.invalid=Y,t.duration=Te,t.isMoment=H,t.weekdays=Ti,t.parseZone=vi,t.localeData=He,t.isDuration=rr,t.monthsShort=Ci,t.weekdaysMin=Mi,t.defineLocale=_r,t.updateLocale=vo,t.locales=Do,t.weekdaysShort=_i,t.normalizeUnits=Pe,t.relativeTimeRounding=rl,t.relativeTimeThreshold=nl,t.calendarFormat=ks,t.prototype=v,t.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"},t}));});function pe(s){return s<0?-1:s===0?0:1}function ot(s,t,r){return (1-r)*s+r*t}function $n(s,t,r){return r<s?s:r>t?t:r}function ce(s,t,r){return r<s?s:r>t?t:r}function yt(s){return s=s%360,s<0&&(s=s+360),s}function he(s){return s=s%360,s<0&&(s=s+360),s}function Ot(s,t){let r=s[0]*t[0][0]+s[1]*t[0][1]+s[2]*t[0][2],l=s[0]*t[1][0]+s[1]*t[1][1]+s[2]*t[1][2],c=s[0]*t[2][0]+s[1]*t[2][1]+s[2]*t[2][2];return [r,l,c]}var qn=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],dl=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-0.20395524564742123,1.0571799111220335]],Kn=[95.047,100,108.883];function cr(s,t,r){return (255<<24|(s&255)<<16|(t&255)<<8|r&255)>>>0}function Wr(s){let t=st(s[0]),r=st(s[1]),l=st(s[2]);return cr(t,r,l)}function Rt(s){return s>>16&255}function Et(s){return s>>8&255}function It(s){return s&255}function Xn(s,t,r){let l=dl,c=l[0][0]*s+l[0][1]*t+l[0][2]*r,h=l[1][0]*s+l[1][1]*t+l[1][2]*r,d=l[2][0]*s+l[2][1]*t+l[2][2]*r,p=st(c),k=st(h),S=st(d);return cr(p,k,S)}function fl(s){let t=Ie(Rt(s)),r=Ie(Et(s)),l=Ie(It(s));return Ot([t,r,l],qn)}function zr(s){let t=Ie(Rt(s)),r=Ie(Et(s)),l=Ie(It(s)),c=qn,h=c[0][0]*t+c[0][1]*r+c[0][2]*l,d=c[1][0]*t+c[1][1]*r+c[1][2]*l,p=c[2][0]*t+c[2][1]*r+c[2][2]*l,k=Kn,S=h/k[0],x=d/k[1],P=p/k[2],D=Ft(S),C=Ft(x),m=Ft(P),w=116*C-16,T=500*(D-C),Y=200*(C-m);return [w,T,Y]}function Zn(s){let t=_e(s),r=st(t);return cr(r,r,r)}function ur(s){let t=fl(s)[1];return 116*Ft(t/100)-16}function _e(s){return 100*ml((s+16)/116)}function Nt(s){return Ft(s/100)*116-16}function Ie(s){let t=s/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function st(s){let t=s/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,$n(0,255,Math.round(r*255))}function Jn(){return Kn}function Ft(s){let t=.008856451679035631,r=24389/27;return s>t?Math.pow(s,1/3):(r*s+16)/116}function ml(s){let t=.008856451679035631,r=24389/27,l=s*s*s;return l>t?l:(116*s-16)/r}var ke=class s{static make(t=Jn(),r=200/Math.PI*_e(50)/100,l=50,c=2,h=false){let d=t,p=d[0]*.401288+d[1]*.650173+d[2]*-0.051461,k=d[0]*-0.250268+d[1]*1.204414+d[2]*.045854,S=d[0]*-2079e-6+d[1]*.048952+d[2]*.953127,x=.8+c/10,P=x>=.9?ot(.59,.69,(x-.9)*10):ot(.525,.59,(x-.8)*10),D=h?1:x*(1-1/3.6*Math.exp((-r-42)/92));D=D>1?1:D<0?0:D;let C=x,m=[D*(100/p)+1-D,D*(100/k)+1-D,D*(100/S)+1-D],w=1/(5*r+1),T=w*w*w*w,Y=1-T,B=T*r+.1*Y*Y*Math.cbrt(5*r),K=_e(l)/t[1],J=1.48+Math.sqrt(K),X=.725/Math.pow(K,.2),H=X,z=[Math.pow(B*m[0]*p/100,.42),Math.pow(B*m[1]*k/100,.42),Math.pow(B*m[2]*S/100,.42)],G=[400*z[0]/(z[0]+27.13),400*z[1]/(z[1]+27.13),400*z[2]/(z[2]+27.13)],te=(2*G[0]+G[1]+.05*G[2])*X;return new s(K,te,X,H,P,C,m,B,Math.pow(B,.25),J)}constructor(t,r,l,c,h,d,p,k,S,x){this.n=t,this.aw=r,this.nbb=l,this.ncb=c,this.c=h,this.nc=d,this.rgbD=p,this.fl=k,this.fLRoot=S,this.z=x;}};ke.DEFAULT=ke.make();var Ne=class s{constructor(t,r,l,c,h,d,p,k,S){this.hue=t,this.chroma=r,this.j=l,this.q=c,this.m=h,this.s=d,this.jstar=p,this.astar=k,this.bstar=S;}distance(t){let r=this.jstar-t.jstar,l=this.astar-t.astar,c=this.bstar-t.bstar,h=Math.sqrt(r*r+l*l+c*c);return 1.41*Math.pow(h,.63)}static fromInt(t){return s.fromIntInViewingConditions(t,ke.DEFAULT)}static fromIntInViewingConditions(t,r){let l=(t&16711680)>>16,c=(t&65280)>>8,h=t&255,d=Ie(l),p=Ie(c),k=Ie(h),S=.41233895*d+.35762064*p+.18051042*k,x=.2126*d+.7152*p+.0722*k,P=.01932141*d+.11916382*p+.95034478*k,D=.401288*S+.650173*x-.051461*P,C=-0.250268*S+1.204414*x+.045854*P,m=-2079e-6*S+.048952*x+.953127*P,w=r.rgbD[0]*D,T=r.rgbD[1]*C,Y=r.rgbD[2]*m,B=Math.pow(r.fl*Math.abs(w)/100,.42),K=Math.pow(r.fl*Math.abs(T)/100,.42),J=Math.pow(r.fl*Math.abs(Y)/100,.42),X=pe(w)*400*B/(B+27.13),H=pe(T)*400*K/(K+27.13),z=pe(Y)*400*J/(J+27.13),G=(11*X+-12*H+z)/11,te=(X+H-2*z)/9,Z=(20*X+20*H+21*z)/20,oe=(40*X+20*H+z)/20,we=Math.atan2(te,G)*180/Math.PI,L=he(we),fe=L*Math.PI/180,Fe=oe*r.nbb,xe=100*Math.pow(Fe/r.aw,r.c*r.z),de=4/r.c*Math.sqrt(xe/100)*(r.aw+4)*r.fLRoot,et=L<20.14?L+360:L,Ke=.25*(Math.cos(et*Math.PI/180+2)+3.8),Re=5e4/13*Ke*r.nc*r.ncb*Math.sqrt(G*G+te*te)/(Z+.305),O=Math.pow(Re,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Ht=O*Math.sqrt(xe/100),Ut=Ht*r.fLRoot,lt=50*Math.sqrt(O*r.c/(r.aw+4)),Wt=(1+100*.007)*xe/(1+.007*xe),zt=1/.0228*Math.log(1+.0228*Ut),yr=zt*Math.cos(fe),br=zt*Math.sin(fe);return new s(L,Ht,xe,de,Ut,lt,Wt,yr,br)}static fromJch(t,r,l){return s.fromJchInViewingConditions(t,r,l,ke.DEFAULT)}static fromJchInViewingConditions(t,r,l,c){let h=4/c.c*Math.sqrt(t/100)*(c.aw+4)*c.fLRoot,d=r*c.fLRoot,p=r/Math.sqrt(t/100),k=50*Math.sqrt(p*c.c/(c.aw+4)),S=l*Math.PI/180,x=(1+100*.007)*t/(1+.007*t),P=1/.0228*Math.log(1+.0228*d),D=P*Math.cos(S),C=P*Math.sin(S);return new s(l,r,t,h,d,k,x,D,C)}static fromUcs(t,r,l){return s.fromUcsInViewingConditions(t,r,l,ke.DEFAULT)}static fromUcsInViewingConditions(t,r,l,c){let h=r,d=l,p=Math.sqrt(h*h+d*d),S=(Math.exp(p*.0228)-1)/.0228/c.fLRoot,x=Math.atan2(d,h)*(180/Math.PI);x<0&&(x+=360);let P=t/(1-(t-100)*.007);return s.fromJchInViewingConditions(P,S,x,c)}toInt(){return this.viewed(ke.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,h=.25*(Math.cos(c+2)+3.8),d=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=h*(5e4/13)*t.nc*t.ncb,k=d/t.nbb,S=Math.sin(c),x=Math.cos(c),P=23*(k+.305)*l/(23*p+11*l*x+108*l*S),D=P*x,C=P*S,m=(460*k+451*D+288*C)/1403,w=(460*k-891*D-261*C)/1403,T=(460*k-220*D-6300*C)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),B=pe(m)*(100/t.fl)*Math.pow(Y,1/.42),K=Math.max(0,27.13*Math.abs(w)/(400-Math.abs(w))),J=pe(w)*(100/t.fl)*Math.pow(K,1/.42),X=Math.max(0,27.13*Math.abs(T)/(400-Math.abs(T))),H=pe(T)*(100/t.fl)*Math.pow(X,1/.42),z=B/t.rgbD[0],G=J/t.rgbD[1],te=H/t.rgbD[2],Z=1.86206786*z-1.01125463*G+.14918677*te,oe=.38752654*z+.62144744*G-.00897398*te,ye=-0.0158415*z-.03412294*G+1.04996444*te;return Xn(Z,oe,ye)}static fromXyzInViewingConditions(t,r,l,c){let h=.401288*t+.650173*r-.051461*l,d=-0.250268*t+1.204414*r+.045854*l,p=-2079e-6*t+.048952*r+.953127*l,k=c.rgbD[0]*h,S=c.rgbD[1]*d,x=c.rgbD[2]*p,P=Math.pow(c.fl*Math.abs(k)/100,.42),D=Math.pow(c.fl*Math.abs(S)/100,.42),C=Math.pow(c.fl*Math.abs(x)/100,.42),m=pe(k)*400*P/(P+27.13),w=pe(S)*400*D/(D+27.13),T=pe(x)*400*C/(C+27.13),Y=(11*m+-12*w+T)/11,B=(m+w-2*T)/9,K=(20*m+20*w+21*T)/20,J=(40*m+20*w+T)/20,H=Math.atan2(B,Y)*180/Math.PI,z=H<0?H+360:H>=360?H-360:H,G=z*Math.PI/180,te=J*c.nbb,Z=100*Math.pow(te/c.aw,c.c*c.z),oe=4/c.c*Math.sqrt(Z/100)*(c.aw+4)*c.fLRoot,ye=z<20.14?z+360:z,we=1/4*(Math.cos(ye*Math.PI/180+2)+3.8),fe=5e4/13*we*c.nc*c.ncb*Math.sqrt(Y*Y+B*B)/(K+.305),Fe=Math.pow(fe,.9)*Math.pow(1.64-Math.pow(.29,c.n),.73),xe=Fe*Math.sqrt(Z/100),de=xe*c.fLRoot,et=50*Math.sqrt(Fe*c.c/(c.aw+4)),Ke=(1+100*.007)*Z/(1+.007*Z),tt=Math.log(1+.0228*de)/.0228,Re=tt*Math.cos(G),O=tt*Math.sin(G);return new s(z,xe,Z,oe,de,et,Ke,Re,O)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),l=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),c=this.hue*Math.PI/180,h=.25*(Math.cos(c+2)+3.8),d=t.aw*Math.pow(this.j/100,1/t.c/t.z),p=h*(5e4/13)*t.nc*t.ncb,k=d/t.nbb,S=Math.sin(c),x=Math.cos(c),P=23*(k+.305)*l/(23*p+11*l*x+108*l*S),D=P*x,C=P*S,m=(460*k+451*D+288*C)/1403,w=(460*k-891*D-261*C)/1403,T=(460*k-220*D-6300*C)/1403,Y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),B=pe(m)*(100/t.fl)*Math.pow(Y,1/.42),K=Math.max(0,27.13*Math.abs(w)/(400-Math.abs(w))),J=pe(w)*(100/t.fl)*Math.pow(K,1/.42),X=Math.max(0,27.13*Math.abs(T)/(400-Math.abs(T))),H=pe(T)*(100/t.fl)*Math.pow(X,1/.42),z=B/t.rgbD[0],G=J/t.rgbD[1],te=H/t.rgbD[2],Z=1.86206786*z-1.01125463*G+.14918677*te,oe=.38752654*z+.62144744*G-.00897398*te,ye=-0.0158415*z-.03412294*G+1.04996444*te;return [Z,oe,ye]}};var Ae=class s{static sanitizeRadians(t){return (t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,l=0;return r<=.0031308?l=r*12.92:l=1.055*Math.pow(r,1/2.4)-.055,l*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return pe(t)*400*r/(r+27.13)}static hueOf(t){let r=Ot(t,s.SCALED_DISCOUNT_FROM_LINRGB),l=s.chromaticAdaptation(r[0]),c=s.chromaticAdaptation(r[1]),h=s.chromaticAdaptation(r[2]),d=(11*l+-12*c+h)/11,p=(l+c-2*h)/9;return Math.atan2(p,d)}static areInCyclicOrder(t,r,l){let c=s.sanitizeRadians(r-t),h=s.sanitizeRadians(l-t);return c<h}static intercept(t,r,l){return (r-t)/(l-t)}static lerpPoint(t,r,l){return [t[0]+(l[0]-t[0])*r,t[1]+(l[1]-t[1])*r,t[2]+(l[2]-t[2])*r]}static setCoordinate(t,r,l,c){let h=s.intercept(t[c],r,l[c]);return s.lerpPoint(t,h,l)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let l=s.Y_FROM_LINRGB[0],c=s.Y_FROM_LINRGB[1],h=s.Y_FROM_LINRGB[2],d=r%4<=1?0:100,p=r%2===0?0:100;if(r<4){let k=d,S=p,x=(t-k*c-S*h)/l;return s.isBounded(x)?[x,k,S]:[-1,-1,-1]}else if(r<8){let k=d,S=p,x=(t-S*l-k*h)/c;return s.isBounded(x)?[S,x,k]:[-1,-1,-1]}else {let k=d,S=p,x=(t-k*l-S*c)/h;return s.isBounded(x)?[k,S,x]:[-1,-1,-1]}}static bisectToSegment(t,r){let l=[-1,-1,-1],c=l,h=0,d=0,p=false,k=true;for(let S=0;S<12;S++){let x=s.nthVertex(t,S);if(x[0]<0)continue;let P=s.hueOf(x);if(!p){l=x,c=x,h=P,d=P,p=true;continue}(k||s.areInCyclicOrder(h,P,d))&&(k=false,s.areInCyclicOrder(h,r,P)?(c=x,d=P):(l=x,h=P));}return [l,c]}static midpoint(t,r){return [(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let l=s.bisectToSegment(t,r),c=l[0],h=s.hueOf(c),d=l[1];for(let p=0;p<3;p++)if(c[p]!==d[p]){let k=-1,S=255;c[p]<d[p]?(k=s.criticalPlaneBelow(s.trueDelinearized(c[p])),S=s.criticalPlaneAbove(s.trueDelinearized(d[p]))):(k=s.criticalPlaneAbove(s.trueDelinearized(c[p])),S=s.criticalPlaneBelow(s.trueDelinearized(d[p])));for(let x=0;x<8&&!(Math.abs(S-k)<=1);x++){let P=Math.floor((k+S)/2),D=s.CRITICAL_PLANES[P],C=s.setCoordinate(c,D,d,p),m=s.hueOf(C);s.areInCyclicOrder(h,r,m)?(d=C,S=P):(c=C,h=m,k=P);}}return s.midpoint(c,d)}static inverseChromaticAdaptation(t){let r=Math.abs(t),l=Math.max(0,27.13*r/(400-r));return pe(t)*Math.pow(l,1/.42)}static findResultByJ(t,r,l){let c=Math.sqrt(l)*11,h=ke.DEFAULT,d=1/Math.pow(1.64-Math.pow(.29,h.n),.73),k=.25*(Math.cos(t+2)+3.8)*(5e4/13)*h.nc*h.ncb,S=Math.sin(t),x=Math.cos(t);for(let P=0;P<5;P++){let D=c/100,C=r===0||c===0?0:r/Math.sqrt(D),m=Math.pow(C*d,1/.9),T=h.aw*Math.pow(D,1/h.c/h.z)/h.nbb,Y=23*(T+.305)*m/(23*k+11*m*x+108*m*S),B=Y*x,K=Y*S,J=(460*T+451*B+288*K)/1403,X=(460*T-891*B-261*K)/1403,H=(460*T-220*B-6300*K)/1403,z=s.inverseChromaticAdaptation(J),G=s.inverseChromaticAdaptation(X),te=s.inverseChromaticAdaptation(H),Z=Ot([z,G,te],s.LINRGB_FROM_SCALED_DISCOUNT);if(Z[0]<0||Z[1]<0||Z[2]<0)return 0;let oe=s.Y_FROM_LINRGB[0],ye=s.Y_FROM_LINRGB[1],we=s.Y_FROM_LINRGB[2],L=oe*Z[0]+ye*Z[1]+we*Z[2];if(L<=0)return 0;if(P===4||Math.abs(L-l)<.002)return Z[0]>100.01||Z[1]>100.01||Z[2]>100.01?0:Wr(Z);c=c-(L-l)*c/(2*L);}return 0}static solveToInt(t,r,l){if(r<1e-4||l<1e-4||l>99.9999)return Zn(l);t=he(t);let c=t/180*Math.PI,h=_e(l),d=s.findResultByJ(c,r,h);if(d!==0)return d;let p=s.bisectToLimit(h,c);return Wr(p)}static solveToCam(t,r,l){return Ne.fromInt(s.solveToInt(t,r,l))}};Ae.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ae.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ae.Y_FROM_LINRGB=[.2126,.7152,.0722];Ae.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var F=class s{static from(t,r,l){return new s(Ae.solveToInt(t,r,l))}static fromInt(t){return new s(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ae.solveToInt(t,this.internalChroma,this.internalTone));}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ae.solveToInt(this.internalHue,t,this.internalTone));}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ae.solveToInt(this.internalHue,this.internalChroma,t));}setValue(t,r){this[t]=r;}toString(){return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}constructor(t){this.argb=t;let r=Ne.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=ur(t),this.argb=t;}setInternalState(t){let r=Ne.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=ur(t),this.argb=t;}inViewingConditions(t){let l=Ne.fromInt(this.toInt()).xyzInViewingConditions(t),c=Ne.fromXyzInViewingConditions(l[0],l[1],l[2],ke.make());return s.from(c.hue,c.chroma,Nt(l[1]))}};var le=class s{static ratioOfTones(t,r){return t=ce(0,100,t),r=ce(0,100,r),s.ratioOfYs(_e(t),_e(r))}static ratioOfYs(t,r){let l=t>r?t:r,c=l===r?t:r;return (l+5)/(c+5)}static lighter(t,r){if(t<0||t>100)return -1;let l=_e(t),c=r*(l+5)-5,h=s.ratioOfYs(c,l),d=Math.abs(h-r);if(h<r&&d>.04)return -1;let p=Nt(c)+.4;return p<0||p>100?-1:p}static darker(t,r){if(t<0||t>100)return -1;let l=_e(t),c=(l+5)/r-5,h=s.ratioOfYs(l,c),d=Math.abs(h-r);if(h<r&&d>.04)return -1;let p=Nt(c)-.4;return p<0||p>100?-1:p}static lighterUnsafe(t,r){let l=s.lighter(t,r);return l<0?100:l}static darkerUnsafe(t,r){let l=s.darker(t,r);return l<0?0:l}};var it=class s{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,l=Math.round(t.chroma)>16,c=Math.round(t.tone)<65;return r&&l&&c}static fixIfDisliked(t){return s.isDisliked(t)?F.from(t.hue,t.chroma,70):t}};function pl(s,t,r){if(s.name!==r.name)throw new Error(`Attempting to extend color ${s.name} with color ${r.name} of different name for spec version ${t}.`);if(s.isBackground!==r.isBackground)throw new Error(`Attempting to extend color ${s.name} as a ${s.isBackground?"background":"foreground"} with color ${r.name} as a ${r.isBackground?"background":"foreground"} for spec version ${t}.`)}function I(s,t,r){return pl(s,t,r),y.fromPalette({name:s.name,palette:l=>l.specVersion===t?r.palette(l):s.palette(l),tone:l=>l.specVersion===t?r.tone(l):s.tone(l),isBackground:s.isBackground,chromaMultiplier:l=>{let c=l.specVersion===t?r.chromaMultiplier:s.chromaMultiplier;return c!==void 0?c(l):1},background:l=>{let c=l.specVersion===t?r.background:s.background;return c!==void 0?c(l):void 0},secondBackground:l=>{let c=l.specVersion===t?r.secondBackground:s.secondBackground;return c!==void 0?c(l):void 0},contrastCurve:l=>{let c=l.specVersion===t?r.contrastCurve:s.contrastCurve;return c!==void 0?c(l):void 0},toneDeltaPair:l=>{let c=l.specVersion===t?r.toneDeltaPair:s.toneDeltaPair;return c!==void 0?c(l):void 0}})}var y=class s{static fromPalette(t){return new s(t.name??"",t.palette,t.tone??s.getInitialToneFromBackground(t.background),t.isBackground??false,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}static getInitialToneFromBackground(t){return t===void 0?r=>50:r=>t(r)?t(r).getTone(r):50}constructor(t,r,l,c,h,d,p,k,S){if(this.name=t,this.palette=r,this.tone=l,this.isBackground=c,this.chromaMultiplier=h,this.background=d,this.secondBackground=p,this.contrastCurve=k,this.toneDeltaPair=S,this.hctCache=new Map,!d&&p)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!d&&k)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(d&&!k)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return s.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear();}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let l=Qn(t.specVersion).getHct(t,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,l),l}getTone(t){return Qn(t.specVersion).getTone(t,this)}static foregroundTone(t,r){let l=le.lighterUnsafe(t,r),c=le.darkerUnsafe(t,r),h=le.ratioOfTones(l,t),d=le.ratioOfTones(c,t);if(s.tonePrefersLightForeground(t)){let k=Math.abs(h-d)<.1&&h<r&&d<r;return h>=r||h>=d||k?l:c}else return d>=r||d>=h?c:l}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return s.tonePrefersLightForeground(t)&&!s.toneAllowsLightForeground(t)?49:t}},Gr=class{getHct(t,r){let l=r.getTone(t);return r.palette(t).getHct(l)}getTone(t,r){let l=t.contrastLevel<0,c=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(c){let h=c.roleA,d=c.roleB,p=c.delta,k=c.polarity,S=c.stayTogether,x=k==="nearer"||k==="lighter"&&!t.isDark||k==="darker"&&t.isDark,P=x?h:d,D=x?d:h,C=r.name===P.name,m=t.isDark?1:-1,w=P.tone(t),T=D.tone(t);if(r.background&&P.contrastCurve&&D.contrastCurve){let Y=r.background(t),B=P.contrastCurve(t),K=D.contrastCurve(t);if(Y&&B&&K){let J=Y.getTone(t),X=B.get(t.contrastLevel),H=K.get(t.contrastLevel);le.ratioOfTones(J,w)<X&&(w=y.foregroundTone(J,X)),le.ratioOfTones(J,T)<H&&(T=y.foregroundTone(J,H)),l&&(w=y.foregroundTone(J,X),T=y.foregroundTone(J,H));}}return (T-w)*m<p&&(T=ce(0,100,w+p*m),(T-w)*m>=p||(w=ce(0,100,T-p*m))),50<=w&&w<60?m>0?(w=60,T=Math.max(T,w+p*m)):(w=49,T=Math.min(T,w+p*m)):50<=T&&T<60&&(S?m>0?(w=60,T=Math.max(T,w+p*m)):(w=49,T=Math.min(T,w+p*m)):m>0?T=60:T=49),C?w:T}else {let h=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return h;let d=r.background(t).getTone(t),p=r.contrastCurve(t).get(t.contrastLevel);if(le.ratioOfTones(d,h)>=p||(h=y.foregroundTone(d,p)),l&&(h=y.foregroundTone(d,p)),r.isBackground&&50<=h&&h<60&&(le.ratioOfTones(49,d)>=p?h=49:h=60),r.secondBackground==null||r.secondBackground(t)===void 0)return h;let[k,S]=[r.background,r.secondBackground],[x,P]=[k(t).getTone(t),S(t).getTone(t)],[D,C]=[Math.max(x,P),Math.min(x,P)];if(le.ratioOfTones(D,h)>=p&&le.ratioOfTones(C,h)>=p)return h;let m=le.lighter(D,p),w=le.darker(C,p),T=[];return m!==-1&&T.push(m),w!==-1&&T.push(w),y.tonePrefersLightForeground(x)||y.tonePrefersLightForeground(P)?m<0?100:m:T.length===1?T[0]:w<0?0:w}}},jr=class{getHct(t,r){let l=r.palette(t),c=r.getTone(t),h=l.hue,d=l.chroma*(r.chromaMultiplier?r.chromaMultiplier(t):1);return F.from(h,d,c)}getTone(t,r){let l=r.toneDeltaPair?r.toneDeltaPair(t):void 0;if(l){let c=l.roleA,h=l.roleB,d=l.polarity,p=l.constraint,k=d==="darker"||d==="relative_lighter"&&t.isDark||d==="relative_darker"&&!t.isDark?-l.delta:l.delta,S=r.name===c.name,x=S?c:h,P=S?h:c,D=x.tone(t),C=P.getTone(t),m=k*(S?1:-1);if(p==="exact"?D=ce(0,100,C+m):p==="nearer"?m>0?D=ce(0,100,ce(C,C+m,D)):D=ce(0,100,ce(C+m,C,D)):p==="farther"&&(m>0?D=ce(C+m,100,D):D=ce(0,C+m,D)),r.background&&r.contrastCurve){let w=r.background(t),T=r.contrastCurve(t);if(w&&T){let Y=w.getTone(t),B=T.get(t.contrastLevel);D=le.ratioOfTones(Y,D)>=B&&t.contrastLevel>=0?D:y.foregroundTone(Y,B);}}return r.isBackground&&!r.name.endsWith("_fixed_dim")&&(D>=57?D=ce(65,100,D):D=ce(0,49,D)),D}else {let c=r.tone(t);if(r.background==null||r.background(t)===void 0||r.contrastCurve==null||r.contrastCurve(t)===void 0)return c;let h=r.background(t).getTone(t),d=r.contrastCurve(t).get(t.contrastLevel);if(c=le.ratioOfTones(h,c)>=d&&t.contrastLevel>=0?c:y.foregroundTone(h,d),r.isBackground&&!r.name.endsWith("_fixed_dim")&&(c>=57?c=ce(65,100,c):c=ce(0,49,c)),r.secondBackground==null||r.secondBackground(t)===void 0)return c;let[p,k]=[r.background,r.secondBackground],[S,x]=[p(t).getTone(t),k(t).getTone(t)],[P,D]=[Math.max(S,x),Math.min(S,x)];if(le.ratioOfTones(P,c)>=d&&le.ratioOfTones(D,c)>=d)return c;let C=le.lighter(P,d),m=le.darker(D,d),w=[];return C!==-1&&w.push(C),m!==-1&&w.push(m),y.tonePrefersLightForeground(S)||y.tonePrefersLightForeground(x)?C<0?100:C:w.length===1?w[0]:m<0?0:m}}},gl=new Gr,yl=new jr;function Qn(s){return s==="2025"?yl:gl}var _=class s{static fromInt(t){let r=F.fromInt(t);return s.fromHct(r)}static fromHct(t){return new s(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let l=new $r(t,r).create();return new s(t,r,l)}constructor(t,r,l){this.hue=t,this.chroma=r,this.keyColor=l,this.cache=new Map;}tone(t){let r=this.cache.get(t);return r===void 0&&(t==99&&F.isYellow(this.hue)?r=this.averageArgb(this.tone(98),this.tone(100)):r=F.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return F.fromInt(this.tone(t))}averageArgb(t,r){let l=t>>>16&255,c=t>>>8&255,h=t&255,d=r>>>16&255,p=r>>>8&255,k=r&255,S=Math.round((l+d)/2),x=Math.round((c+p)/2),P=Math.round((h+k)/2);return (255<<24|(S&255)<<16|(x&255)<<8|P&255)>>>0}},$r=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200;}create(){let c=0,h=100;for(;c<h;){let d=Math.floor((c+h)/2),p=this.maxChroma(d)<this.maxChroma(d+1);if(this.maxChroma(d)>=this.requestedChroma-.01)if(Math.abs(c-50)<Math.abs(h-50))h=d;else {if(c===d)return F.from(this.hue,this.requestedChroma,c);c=d;}else p?c=d+1:h=d;}return F.from(this.hue,this.requestedChroma,c)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=F.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var Lt=class s{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null;}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((l,c)=>r.get(l)-r.get(c)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let l=Math.round(this.input.hue),c=this.hctsByHue[l],h=this.relativeTemperature(c),d=[c],p=0;for(let m=0;m<360;m++){let w=yt(l+m),T=this.hctsByHue[w],Y=this.relativeTemperature(T),B=Math.abs(Y-h);h=Y,p+=B;}let k=1,S=p/r,x=0;for(h=this.relativeTemperature(c);d.length<r;){let m=yt(l+k),w=this.hctsByHue[m],T=this.relativeTemperature(w),Y=Math.abs(T-h);x+=Y;let B=d.length*S,K=x>=B,J=1;for(;K&&d.length<r;){d.push(w);let X=(d.length+J)*S;K=x>=X,J++;}if(h=T,k++,k>360){for(;d.length<r;)d.push(w);break}}let P=[this.input],D=Math.floor((t-1)/2);for(let m=1;m<D+1;m++){let w=0-m;for(;w<0;)w=d.length+w;w>=d.length&&(w=w%d.length),P.splice(0,0,d[w]);}let C=t-D-1;for(let m=1;m<C+1;m++){let w=m;for(;w<0;)w=d.length+w;w>=d.length&&(w=w%d.length),P.push(d[w]);}return P}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),l=this.warmest.hue,h=this.tempsByHct.get(this.warmest)-r,d=s.isBetween(this.input.hue,t,l),p=d?l:t,k=d?t:l,S=1,x=1e3,P=this.hctsByHue[Math.round(this.input.hue)],D=1-this.inputRelativeTemperature;for(let C=0;C<=360;C+=1){let m=he(p+S*C);if(!s.isBetween(m,p,k))continue;let w=this.hctsByHue[Math.round(m)],T=(this.tempsByHct.get(w)-r)/h,Y=Math.abs(D-T);Y<x&&(x=Y,P=w);}return this.complementCache=P,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),l=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:l/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let l of t)r.set(l,s.rawTemperature(l));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let l=F.from(r,this.input.chroma,this.input.tone);t.push(l);}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,l){return r<l?r<=t&&t<=l:r<=t||t<=l}static rawTemperature(t){let r=zr(t.toInt()),l=he(Math.atan2(r[2],r[1])*180/Math.PI),c=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return -0.5+.02*Math.pow(c,1.07)*Math.cos(he(l-50)*Math.PI/180)}};var R=class{constructor(t,r,l,c){this.low=t,this.normal=r,this.medium=l,this.high=c;}get(t){return t<=-1?this.low:t<0?ot(this.low,this.normal,(t- -1)/1):t<.5?ot(this.normal,this.medium,(t-0)/.5):t<1?ot(this.medium,this.high,(t-.5)/.5):this.high}};var $=class{constructor(t,r,l,c,h,d){this.roleA=t,this.roleB=r,this.delta=l,this.polarity=c,this.stayTogether=h,this.constraint=d,this.constraint=d??"exact";}};var f;(function(s){s[s.MONOCHROME=0]="MONOCHROME",s[s.NEUTRAL=1]="NEUTRAL",s[s.TONAL_SPOT=2]="TONAL_SPOT",s[s.VIBRANT=3]="VIBRANT",s[s.EXPRESSIVE=4]="EXPRESSIVE",s[s.FIDELITY=5]="FIDELITY",s[s.CONTENT=6]="CONTENT",s[s.RAINBOW=7]="RAINBOW",s[s.FRUIT_SALAD=8]="FRUIT_SALAD";})(f||(f={}));function bt(s){return s.variant===f.FIDELITY||s.variant===f.CONTENT}function se(s){return s.variant===f.MONOCHROME}function bl(s,t,r,l){let c=r,h=F.from(s,t,r);if(h.chroma<t){let d=h.chroma;for(;h.chroma<t;){c+=l?-1:1;let p=F.from(s,t,c);if(d>p.chroma||Math.abs(p.chroma-t)<.4)break;let k=Math.abs(p.chroma-t),S=Math.abs(h.chroma-t);k<S&&(h=p),d=Math.max(d,p.chroma);}}return c}var hr=class{primaryPaletteKeyColor(){return y.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return y.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return y.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return y.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return y.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return y.fromPalette({name:"error_palette_key_color",palette:t=>t.errorPalette,tone:t=>t.errorPalette.keyColor.tone})}background(){return y.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}onBackground(){return y.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.background(),contrastCurve:t=>new R(3,3,4.5,7)})}surface(){return y.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:true})}surfaceDim(){return y.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new R(87,87,80,75).get(t.contrastLevel),isBackground:true})}surfaceBright(){return y.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(24,24,29,34).get(t.contrastLevel):98,isBackground:true})}surfaceContainerLowest(){return y.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(4,4,2,0).get(t.contrastLevel):100,isBackground:true})}surfaceContainerLow(){return y.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(10,10,11,12).get(t.contrastLevel):new R(96,96,96,95).get(t.contrastLevel),isBackground:true})}surfaceContainer(){return y.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(12,12,16,20).get(t.contrastLevel):new R(94,94,92,90).get(t.contrastLevel),isBackground:true})}surfaceContainerHigh(){return y.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(17,17,21,25).get(t.contrastLevel):new R(92,92,88,85).get(t.contrastLevel),isBackground:true})}surfaceContainerHighest(){return y.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new R(22,22,26,30).get(t.contrastLevel):new R(90,90,84,80).get(t.contrastLevel),isBackground:true})}onSurface(){return y.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>this.highestSurface(t),contrastCurve:t=>new R(4.5,7,11,21)})}surfaceVariant(){return y.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:true})}onSurfaceVariant(){return y.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,11)})}inverseSurface(){return y.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20,isBackground:true})}inverseOnSurface(){return y.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>this.inverseSurface(),contrastCurve:t=>new R(4.5,7,11,21)})}outline(){return y.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1.5,3,4.5,7)})}outlineVariant(){return y.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5)})}shadow(){return y.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0})}scrim(){return y.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0})}surfaceTint(){return y.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:true})}primary(){return y.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>se(t)?t.isDark?100:0:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new $(this.primaryContainer(),this.primary(),10,"nearer",false)})}primaryDim(){}onPrimary(){return y.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>se(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.primary(),contrastCurve:t=>new R(4.5,7,11,21)})}primaryContainer(){return y.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>bt(t)?t.sourceColorHct.tone:se(t)?t.isDark?85:25:t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.primaryContainer(),this.primary(),10,"nearer",false)})}onPrimaryContainer(){return y.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>bt(t)?y.foregroundTone(this.primaryContainer().tone(t),4.5):se(t)?t.isDark?0:100:t.isDark?90:30,background:t=>this.primaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}inversePrimary(){return y.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>this.inverseSurface(),contrastCurve:t=>new R(3,4.5,7,7)})}secondary(){return y.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new $(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}secondaryDim(){}onSecondary(){return y.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>se(t)?t.isDark?10:100:t.isDark?20:100,background:t=>this.secondary(),contrastCurve:t=>new R(4.5,7,11,21)})}secondaryContainer(){return y.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{let r=t.isDark?30:90;return se(t)?t.isDark?30:85:bt(t)?bl(t.secondaryPalette.hue,t.secondaryPalette.chroma,r,!t.isDark):r},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.secondaryContainer(),this.secondary(),10,"nearer",false)})}onSecondaryContainer(){return y.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>se(t)?t.isDark?90:10:bt(t)?y.foregroundTone(this.secondaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.secondaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiary(){return y.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?90:25:t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new $(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}tertiaryDim(){}onTertiary(){return y.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?10:90:t.isDark?20:100,background:t=>this.tertiary(),contrastCurve:t=>new R(4.5,7,11,21)})}tertiaryContainer(){return y.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(se(t))return t.isDark?60:49;if(!bt(t))return t.isDark?30:90;let r=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return it.fixIfDisliked(r).tone},isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.tertiaryContainer(),this.tertiary(),10,"nearer",false)})}onTertiaryContainer(){return y.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>se(t)?t.isDark?0:100:bt(t)?y.foregroundTone(this.tertiaryContainer().tone(t),4.5):t.isDark?90:30,background:t=>this.tertiaryContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}error(){return y.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(3,4.5,7,7),toneDeltaPair:t=>new $(this.errorContainer(),this.error(),10,"nearer",false)})}errorDim(){}onError(){return y.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>this.error(),contrastCurve:t=>new R(4.5,7,11,21)})}errorContainer(){return y.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.errorContainer(),this.error(),10,"nearer",false)})}onErrorContainer(){return y.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>se(t)?t.isDark?90:10:t.isDark?90:30,background:t=>this.errorContainer(),contrastCurve:t=>new R(3,4.5,7,11)})}primaryFixed(){return y.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>se(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}primaryFixedDim(){return y.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>se(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",true)})}onPrimaryFixed(){return y.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>se(t)?100:10,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onPrimaryFixedVariant(){return y.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>se(t)?90:30,background:t=>this.primaryFixedDim(),secondBackground:t=>this.primaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}secondaryFixed(){return y.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>se(t)?80:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}secondaryFixedDim(){return y.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>se(t)?70:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",true)})}onSecondaryFixed(){return y.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onSecondaryFixedVariant(){return y.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>se(t)?25:30,background:t=>this.secondaryFixedDim(),secondBackground:t=>this.secondaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}tertiaryFixed(){return y.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>se(t)?40:90,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}tertiaryFixedDim(){return y.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>se(t)?30:80,isBackground:true,background:t=>this.highestSurface(t),contrastCurve:t=>new R(1,1,3,4.5),toneDeltaPair:t=>new $(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",true)})}onTertiaryFixed(){return y.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>se(t)?100:10,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(4.5,7,11,21)})}onTertiaryFixedVariant(){return y.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>se(t)?90:30,background:t=>this.tertiaryFixedDim(),secondBackground:t=>this.tertiaryFixed(),contrastCurve:t=>new R(3,4.5,7,11)})}highestSurface(t){return t.isDark?this.surfaceBright():this.surfaceDim()}};function V(s,t=0,r=100,l=1){let c=ea(s.hue,s.chroma*l,100,true);return ce(t,r,c)}function Qe(s,t=0,r=100){let l=ea(s.hue,s.chroma,0,false);return ce(t,r,l)}function ea(s,t,r,l){let c=r,h=F.from(s,t,c);for(;h.chroma<t&&!(r<0||r>100);){r+=l?-1:1;let d=F.from(s,t,r);h.chroma<d.chroma&&(h=d,c=r);}return c}function E(s){return s===1.5?new R(1.5,1.5,3,5.5):s===3?new R(3,3,4.5,7):s===4.5?new R(4.5,4.5,7,11):s===6?new R(6,6,7,11):s===7?new R(7,7,11,21):s===9?new R(9,9,11,21):s===11?new R(11,11,21,21):s===21?new R(21,21,21,21):new R(s,s,7,21)}var dr=class extends hr{surface(){let t=y.fromPalette({name:"surface",palette:r=>r.neutralPalette,tone:r=>(super.surface().tone(r),r.platform==="phone"?r.isDark?4:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98:0),isBackground:true});return I(super.surface(),"2025",t)}surfaceDim(){let t=y.fromPalette({name:"surface_dim",palette:r=>r.neutralPalette,tone:r=>r.isDark?4:F.isYellow(r.neutralPalette.hue)?90:r.variant===f.VIBRANT?85:87,isBackground:true,chromaMultiplier:r=>{if(!r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return I(super.surfaceDim(),"2025",t)}surfaceBright(){let t=y.fromPalette({name:"surface_bright",palette:r=>r.neutralPalette,tone:r=>r.isDark?18:F.isYellow(r.neutralPalette.hue)?99:r.variant===f.VIBRANT?97:98,isBackground:true,chromaMultiplier:r=>{if(r.isDark){if(r.variant===f.NEUTRAL)return 2.5;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?2.7:1.75;if(r.variant===f.VIBRANT)return 1.36}return 1}});return I(super.surfaceBright(),"2025",t)}surfaceContainerLowest(){let t=y.fromPalette({name:"surface_container_lowest",palette:r=>r.neutralPalette,tone:r=>r.isDark?0:100,isBackground:true});return I(super.surfaceContainerLowest(),"2025",t)}surfaceContainerLow(){let t=y.fromPalette({name:"surface_container_low",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?6:F.isYellow(r.neutralPalette.hue)?98:r.variant===f.VIBRANT?95:96:15,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.3;if(r.variant===f.TONAL_SPOT)return 1.25;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.3:1.15;if(r.variant===f.VIBRANT)return 1.08}return 1}});return I(super.surfaceContainerLow(),"2025",t)}surfaceContainer(){let t=y.fromPalette({name:"surface_container",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?9:F.isYellow(r.neutralPalette.hue)?96:r.variant===f.VIBRANT?92:94:20,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.6;if(r.variant===f.TONAL_SPOT)return 1.4;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.6:1.3;if(r.variant===f.VIBRANT)return 1.15}return 1}});return I(super.surfaceContainer(),"2025",t)}surfaceContainerHigh(){let t=y.fromPalette({name:"surface_container_high",palette:r=>r.neutralPalette,tone:r=>r.platform==="phone"?r.isDark?12:F.isYellow(r.neutralPalette.hue)?94:r.variant===f.VIBRANT?90:92:25,isBackground:true,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 1.9;if(r.variant===f.TONAL_SPOT)return 1.5;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?1.95:1.45;if(r.variant===f.VIBRANT)return 1.22}return 1}});return I(super.surfaceContainerHigh(),"2025",t)}surfaceContainerHighest(){let t=y.fromPalette({name:"surface_container_highest",palette:r=>r.neutralPalette,tone:r=>r.isDark?15:F.isYellow(r.neutralPalette.hue)?92:r.variant===f.VIBRANT?88:90,isBackground:true,chromaMultiplier:r=>r.variant===f.NEUTRAL?2.2:r.variant===f.TONAL_SPOT?1.7:r.variant===f.EXPRESSIVE?F.isYellow(r.neutralPalette.hue)?2.3:1.6:r.variant===f.VIBRANT?1.29:1});return I(super.surfaceContainerHighest(),"2025",t)}onSurface(){let t=y.fromPalette({name:"on_surface",palette:r=>r.neutralPalette,tone:r=>r.variant===f.VIBRANT?V(r.neutralPalette,0,100,1.1):y.getInitialToneFromBackground(l=>l.platform==="phone"?this.highestSurface(l):this.surfaceContainerHigh())(r),chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.isDark&&r.platform==="phone"?E(11):E(9)});return I(super.onSurface(),"2025",t)}onSurfaceVariant(){let t=y.fromPalette({name:"on_surface_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?r.isDark?E(6):E(4.5):E(7)});return I(super.onSurfaceVariant(),"2025",t)}outline(){let t=y.fromPalette({name:"outline",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?E(3):E(4.5)});return I(super.outline(),"2025",t)}outlineVariant(){let t=y.fromPalette({name:"outline_variant",palette:r=>r.neutralPalette,chromaMultiplier:r=>{if(r.platform==="phone"){if(r.variant===f.NEUTRAL)return 2.2;if(r.variant===f.TONAL_SPOT)return 1.7;if(r.variant===f.EXPRESSIVE)return F.isYellow(r.neutralPalette.hue)?r.isDark?3:2.3:1.6}return 1},background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?E(1.5):E(3)});return I(super.outlineVariant(),"2025",t)}inverseSurface(){let t=y.fromPalette({name:"inverse_surface",palette:r=>r.neutralPalette,tone:r=>r.isDark?98:4,isBackground:true});return I(super.inverseSurface(),"2025",t)}inverseOnSurface(){let t=y.fromPalette({name:"inverse_on_surface",palette:r=>r.neutralPalette,background:r=>this.inverseSurface(),contrastCurve:r=>E(7)});return I(super.inverseOnSurface(),"2025",t)}primary(){let t=y.fromPalette({name:"primary",palette:r=>r.primaryPalette,tone:r=>r.variant===f.NEUTRAL?r.platform==="phone"?r.isDark?80:40:90:r.variant===f.TONAL_SPOT?r.platform==="phone"?r.isDark?80:V(r.primaryPalette):V(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.platform==="phone"?V(r.primaryPalette,0,F.isYellow(r.primaryPalette.hue)?25:F.isCyan(r.primaryPalette.hue)?88:98):V(r.primaryPalette):r.platform==="phone"?V(r.primaryPalette,0,F.isCyan(r.primaryPalette.hue)?88:98):V(r.primaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?E(4.5):E(7),toneDeltaPair:r=>r.platform==="phone"?new $(this.primaryContainer(),this.primary(),5,"relative_lighter",true,"farther"):void 0});return I(super.primary(),"2025",t)}primaryDim(){return y.fromPalette({name:"primary_dim",palette:t=>t.primaryPalette,tone:t=>t.variant===f.NEUTRAL?85:t.variant===f.TONAL_SPOT?V(t.primaryPalette,0,90):V(t.primaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>E(4.5),toneDeltaPair:t=>new $(this.primaryDim(),this.primary(),5,"darker",true,"farther")})}onPrimary(){let t=y.fromPalette({name:"on_primary",palette:r=>r.primaryPalette,background:r=>r.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onPrimary(),"2025",t)}primaryContainer(){let t=y.fromPalette({name:"primary_container",palette:r=>r.primaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.NEUTRAL?r.isDark?30:90:r.variant===f.TONAL_SPOT?r.isDark?Qe(r.primaryPalette,35,93):V(r.primaryPalette,0,90):r.variant===f.EXPRESSIVE?r.isDark?V(r.primaryPalette,30,93):V(r.primaryPalette,78,F.isCyan(r.primaryPalette.hue)?88:90):r.isDark?Qe(r.primaryPalette,66,93):V(r.primaryPalette,66,F.isCyan(r.primaryPalette.hue)?88:93),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="phone"?void 0:new $(this.primaryContainer(),this.primaryDim(),10,"darker",true,"farther"),contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.primaryContainer(),"2025",t)}onPrimaryContainer(){let t=y.fromPalette({name:"on_primary_container",palette:r=>r.primaryPalette,background:r=>this.primaryContainer(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onPrimaryContainer(),"2025",t)}primaryFixed(){let t=y.fromPalette({name:"primary_fixed",palette:r=>r.primaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.primaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.primaryFixed(),"2025",t)}primaryFixedDim(){let t=y.fromPalette({name:"primary_fixed_dim",palette:r=>r.primaryPalette,tone:r=>this.primaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new $(this.primaryFixedDim(),this.primaryFixed(),5,"darker",true,"exact")});return I(super.primaryFixedDim(),"2025",t)}onPrimaryFixed(){let t=y.fromPalette({name:"on_primary_fixed",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>E(7)});return I(super.onPrimaryFixed(),"2025",t)}onPrimaryFixedVariant(){let t=y.fromPalette({name:"on_primary_fixed_variant",palette:r=>r.primaryPalette,background:r=>this.primaryFixedDim(),contrastCurve:r=>E(4.5)});return I(super.onPrimaryFixedVariant(),"2025",t)}inversePrimary(){let t=y.fromPalette({name:"inverse_primary",palette:r=>r.primaryPalette,tone:r=>V(r.primaryPalette),background:r=>this.inverseSurface(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.inversePrimary(),"2025",t)}secondary(){let t=y.fromPalette({name:"secondary",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?r.variant===f.NEUTRAL?90:V(r.secondaryPalette,0,90):r.variant===f.NEUTRAL?r.isDark?Qe(r.secondaryPalette,0,98):V(r.secondaryPalette):r.variant===f.VIBRANT?V(r.secondaryPalette,0,r.isDark?90:98):r.isDark?80:V(r.secondaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?E(4.5):E(7),toneDeltaPair:r=>r.platform==="phone"?new $(this.secondaryContainer(),this.secondary(),5,"relative_lighter",true,"farther"):void 0});return I(super.secondary(),"2025",t)}secondaryDim(){return y.fromPalette({name:"secondary_dim",palette:t=>t.secondaryPalette,tone:t=>t.variant===f.NEUTRAL?85:V(t.secondaryPalette,0,90),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>E(4.5),toneDeltaPair:t=>new $(this.secondaryDim(),this.secondary(),5,"darker",true,"farther")})}onSecondary(){let t=y.fromPalette({name:"on_secondary",palette:r=>r.secondaryPalette,background:r=>r.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onSecondary(),"2025",t)}secondaryContainer(){let t=y.fromPalette({name:"secondary_container",palette:r=>r.secondaryPalette,tone:r=>r.platform==="watch"?30:r.variant===f.VIBRANT?r.isDark?Qe(r.secondaryPalette,30,40):V(r.secondaryPalette,84,90):r.variant===f.EXPRESSIVE?r.isDark?15:V(r.secondaryPalette,90,95):r.isDark?25:90,isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new $(this.secondaryContainer(),this.secondaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.secondaryContainer(),"2025",t)}onSecondaryContainer(){let t=y.fromPalette({name:"on_secondary_container",palette:r=>r.secondaryPalette,background:r=>this.secondaryContainer(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onSecondaryContainer(),"2025",t)}secondaryFixed(){let t=y.fromPalette({name:"secondary_fixed",palette:r=>r.secondaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.secondaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.secondaryFixed(),"2025",t)}secondaryFixedDim(){let t=y.fromPalette({name:"secondary_fixed_dim",palette:r=>r.secondaryPalette,tone:r=>this.secondaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new $(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",true,"exact")});return I(super.secondaryFixedDim(),"2025",t)}onSecondaryFixed(){let t=y.fromPalette({name:"on_secondary_fixed",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>E(7)});return I(super.onSecondaryFixed(),"2025",t)}onSecondaryFixedVariant(){let t=y.fromPalette({name:"on_secondary_fixed_variant",palette:r=>r.secondaryPalette,background:r=>this.secondaryFixedDim(),contrastCurve:r=>E(4.5)});return I(super.onSecondaryFixedVariant(),"2025",t)}tertiary(){let t=y.fromPalette({name:"tertiary",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?V(r.tertiaryPalette,0,90):V(r.tertiaryPalette):r.variant===f.EXPRESSIVE||r.variant===f.VIBRANT?V(r.tertiaryPalette,0,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?98:100):r.isDark?V(r.tertiaryPalette,0,98):V(r.tertiaryPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?E(4.5):E(7),toneDeltaPair:r=>r.platform==="phone"?new $(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",true,"farther"):void 0});return I(super.tertiary(),"2025",t)}tertiaryDim(){return y.fromPalette({name:"tertiary_dim",palette:t=>t.tertiaryPalette,tone:t=>t.variant===f.TONAL_SPOT?V(t.tertiaryPalette,0,90):V(t.tertiaryPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>E(4.5),toneDeltaPair:t=>new $(this.tertiaryDim(),this.tertiary(),5,"darker",true,"farther")})}onTertiary(){let t=y.fromPalette({name:"on_tertiary",palette:r=>r.tertiaryPalette,background:r=>r.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onTertiary(),"2025",t)}tertiaryContainer(){let t=y.fromPalette({name:"tertiary_container",palette:r=>r.tertiaryPalette,tone:r=>r.platform==="watch"?r.variant===f.TONAL_SPOT?V(r.tertiaryPalette,0,90):V(r.tertiaryPalette):r.variant===f.NEUTRAL?r.isDark?V(r.tertiaryPalette,0,93):V(r.tertiaryPalette,0,96):r.variant===f.TONAL_SPOT?V(r.tertiaryPalette,0,r.isDark?93:100):r.variant===f.EXPRESSIVE?V(r.tertiaryPalette,75,F.isCyan(r.tertiaryPalette.hue)?88:r.isDark?93:100):r.isDark?V(r.tertiaryPalette,0,93):V(r.tertiaryPalette,72,100),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new $(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.tertiaryContainer(),"2025",t)}onTertiaryContainer(){let t=y.fromPalette({name:"on_tertiary_container",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryContainer(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onTertiaryContainer(),"2025",t)}tertiaryFixed(){let t=y.fromPalette({name:"tertiary_fixed",palette:r=>r.tertiaryPalette,tone:r=>{let l=Object.assign({},r,{isDark:false,contrastLevel:0});return this.tertiaryContainer().getTone(l)},isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.tertiaryFixed(),"2025",t)}tertiaryFixedDim(){let t=y.fromPalette({name:"tertiary_fixed_dim",palette:r=>r.tertiaryPalette,tone:r=>this.tertiaryFixed().getTone(r),isBackground:true,toneDeltaPair:r=>new $(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",true,"exact")});return I(super.tertiaryFixedDim(),"2025",t)}onTertiaryFixed(){let t=y.fromPalette({name:"on_tertiary_fixed",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>E(7)});return I(super.onTertiaryFixed(),"2025",t)}onTertiaryFixedVariant(){let t=y.fromPalette({name:"on_tertiary_fixed_variant",palette:r=>r.tertiaryPalette,background:r=>this.tertiaryFixedDim(),contrastCurve:r=>E(4.5)});return I(super.onTertiaryFixedVariant(),"2025",t)}error(){let t=y.fromPalette({name:"error",palette:r=>r.errorPalette,tone:r=>r.platform==="phone"?r.isDark?Qe(r.errorPalette,0,98):V(r.errorPalette):Qe(r.errorPalette),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):this.surfaceContainerHigh(),contrastCurve:r=>r.platform==="phone"?E(4.5):E(7),toneDeltaPair:r=>r.platform==="phone"?new $(this.errorContainer(),this.error(),5,"relative_lighter",true,"farther"):void 0});return I(super.error(),"2025",t)}errorDim(){return y.fromPalette({name:"error_dim",palette:t=>t.errorPalette,tone:t=>Qe(t.errorPalette),isBackground:true,background:t=>this.surfaceContainerHigh(),contrastCurve:t=>E(4.5),toneDeltaPair:t=>new $(this.errorDim(),this.error(),5,"darker",true,"farther")})}onError(){let t=y.fromPalette({name:"on_error",palette:r=>r.errorPalette,background:r=>r.platform==="phone"?this.error():this.errorDim(),contrastCurve:r=>r.platform==="phone"?E(6):E(7)});return I(super.onError(),"2025",t)}errorContainer(){let t=y.fromPalette({name:"error_container",palette:r=>r.errorPalette,tone:r=>r.platform==="watch"?30:r.isDark?Qe(r.errorPalette,30,93):V(r.errorPalette,0,90),isBackground:true,background:r=>r.platform==="phone"?this.highestSurface(r):void 0,toneDeltaPair:r=>r.platform==="watch"?new $(this.errorContainer(),this.errorDim(),10,"darker",true,"farther"):void 0,contrastCurve:r=>r.platform==="phone"&&r.contrastLevel>0?E(1.5):void 0});return I(super.errorContainer(),"2025",t)}onErrorContainer(){let t=y.fromPalette({name:"on_error_container",palette:r=>r.errorPalette,background:r=>this.errorContainer(),contrastCurve:r=>r.platform==="phone"?E(4.5):E(7)});return I(super.onErrorContainer(),"2025",t)}surfaceVariant(){let t=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return I(super.surfaceVariant(),"2025",t)}surfaceTint(){let t=Object.assign(this.primary().clone(),{name:"surface_tint"});return I(super.surfaceTint(),"2025",t)}background(){let t=Object.assign(this.surface().clone(),{name:"background"});return I(super.background(),"2025",t)}onBackground(){let t=Object.assign(this.onSurface().clone(),{name:"on_background",tone:r=>r.platform==="watch"?100:this.onSurface().getTone(r)});return I(super.onBackground(),"2025",t)}};var b=class s{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(t=>t!==void 0);}highestSurface(t){return s.colorSpec.highestSurface(t)}primaryPaletteKeyColor(){return s.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return s.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return s.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return s.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return s.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return s.colorSpec.errorPaletteKeyColor()}background(){return s.colorSpec.background()}onBackground(){return s.colorSpec.onBackground()}surface(){return s.colorSpec.surface()}surfaceDim(){return s.colorSpec.surfaceDim()}surfaceBright(){return s.colorSpec.surfaceBright()}surfaceContainerLowest(){return s.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return s.colorSpec.surfaceContainerLow()}surfaceContainer(){return s.colorSpec.surfaceContainer()}surfaceContainerHigh(){return s.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return s.colorSpec.surfaceContainerHighest()}onSurface(){return s.colorSpec.onSurface()}surfaceVariant(){return s.colorSpec.surfaceVariant()}onSurfaceVariant(){return s.colorSpec.onSurfaceVariant()}outline(){return s.colorSpec.outline()}outlineVariant(){return s.colorSpec.outlineVariant()}inverseSurface(){return s.colorSpec.inverseSurface()}inverseOnSurface(){return s.colorSpec.inverseOnSurface()}shadow(){return s.colorSpec.shadow()}scrim(){return s.colorSpec.scrim()}surfaceTint(){return s.colorSpec.surfaceTint()}primary(){return s.colorSpec.primary()}primaryDim(){return s.colorSpec.primaryDim()}onPrimary(){return s.colorSpec.onPrimary()}primaryContainer(){return s.colorSpec.primaryContainer()}onPrimaryContainer(){return s.colorSpec.onPrimaryContainer()}inversePrimary(){return s.colorSpec.inversePrimary()}primaryFixed(){return s.colorSpec.primaryFixed()}primaryFixedDim(){return s.colorSpec.primaryFixedDim()}onPrimaryFixed(){return s.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return s.colorSpec.onPrimaryFixedVariant()}secondary(){return s.colorSpec.secondary()}secondaryDim(){return s.colorSpec.secondaryDim()}onSecondary(){return s.colorSpec.onSecondary()}secondaryContainer(){return s.colorSpec.secondaryContainer()}onSecondaryContainer(){return s.colorSpec.onSecondaryContainer()}secondaryFixed(){return s.colorSpec.secondaryFixed()}secondaryFixedDim(){return s.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return s.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return s.colorSpec.onSecondaryFixedVariant()}tertiary(){return s.colorSpec.tertiary()}tertiaryDim(){return s.colorSpec.tertiaryDim()}onTertiary(){return s.colorSpec.onTertiary()}tertiaryContainer(){return s.colorSpec.tertiaryContainer()}onTertiaryContainer(){return s.colorSpec.onTertiaryContainer()}tertiaryFixed(){return s.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return s.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return s.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return s.colorSpec.onTertiaryFixedVariant()}error(){return s.colorSpec.error()}errorDim(){return s.colorSpec.errorDim()}onError(){return s.colorSpec.onError()}errorContainer(){return s.colorSpec.errorContainer()}onErrorContainer(){return s.colorSpec.onErrorContainer()}static highestSurface(t){return s.colorSpec.highestSurface(t)}};b.contentAccentToneDelta=15;b.colorSpec=new dr;b.primaryPaletteKeyColor=b.colorSpec.primaryPaletteKeyColor();b.secondaryPaletteKeyColor=b.colorSpec.secondaryPaletteKeyColor();b.tertiaryPaletteKeyColor=b.colorSpec.tertiaryPaletteKeyColor();b.neutralPaletteKeyColor=b.colorSpec.neutralPaletteKeyColor();b.neutralVariantPaletteKeyColor=b.colorSpec.neutralVariantPaletteKeyColor();b.background=b.colorSpec.background();b.onBackground=b.colorSpec.onBackground();b.surface=b.colorSpec.surface();b.surfaceDim=b.colorSpec.surfaceDim();b.surfaceBright=b.colorSpec.surfaceBright();b.surfaceContainerLowest=b.colorSpec.surfaceContainerLowest();b.surfaceContainerLow=b.colorSpec.surfaceContainerLow();b.surfaceContainer=b.colorSpec.surfaceContainer();b.surfaceContainerHigh=b.colorSpec.surfaceContainerHigh();b.surfaceContainerHighest=b.colorSpec.surfaceContainerHighest();b.onSurface=b.colorSpec.onSurface();b.surfaceVariant=b.colorSpec.surfaceVariant();b.onSurfaceVariant=b.colorSpec.onSurfaceVariant();b.inverseSurface=b.colorSpec.inverseSurface();b.inverseOnSurface=b.colorSpec.inverseOnSurface();b.outline=b.colorSpec.outline();b.outlineVariant=b.colorSpec.outlineVariant();b.shadow=b.colorSpec.shadow();b.scrim=b.colorSpec.scrim();b.surfaceTint=b.colorSpec.surfaceTint();b.primary=b.colorSpec.primary();b.onPrimary=b.colorSpec.onPrimary();b.primaryContainer=b.colorSpec.primaryContainer();b.onPrimaryContainer=b.colorSpec.onPrimaryContainer();b.inversePrimary=b.colorSpec.inversePrimary();b.secondary=b.colorSpec.secondary();b.onSecondary=b.colorSpec.onSecondary();b.secondaryContainer=b.colorSpec.secondaryContainer();b.onSecondaryContainer=b.colorSpec.onSecondaryContainer();b.tertiary=b.colorSpec.tertiary();b.onTertiary=b.colorSpec.onTertiary();b.tertiaryContainer=b.colorSpec.tertiaryContainer();b.onTertiaryContainer=b.colorSpec.onTertiaryContainer();b.error=b.colorSpec.error();b.onError=b.colorSpec.onError();b.errorContainer=b.colorSpec.errorContainer();b.onErrorContainer=b.colorSpec.onErrorContainer();b.primaryFixed=b.colorSpec.primaryFixed();b.primaryFixedDim=b.colorSpec.primaryFixedDim();b.onPrimaryFixed=b.colorSpec.onPrimaryFixed();b.onPrimaryFixedVariant=b.colorSpec.onPrimaryFixedVariant();b.secondaryFixed=b.colorSpec.secondaryFixed();b.secondaryFixedDim=b.colorSpec.secondaryFixedDim();b.onSecondaryFixed=b.colorSpec.onSecondaryFixed();b.onSecondaryFixedVariant=b.colorSpec.onSecondaryFixedVariant();b.tertiaryFixed=b.colorSpec.tertiaryFixed();b.tertiaryFixedDim=b.colorSpec.tertiaryFixedDim();b.onTertiaryFixed=b.colorSpec.onTertiaryFixed();b.onTertiaryFixedVariant=b.colorSpec.onTertiaryFixedVariant();var Q=class s{static maybeFallbackSpecVersion(t,r){switch(r){case f.EXPRESSIVE:case f.VIBRANT:case f.TONAL_SPOT:case f.NEUTRAL:return t;default:return "2021"}}constructor(t){this.sourceColorArgb=t.sourceColorHct.toInt(),this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.platform=t.platform??"phone",this.specVersion=s.maybeFallbackSpecVersion(t.specVersion??"2021",this.variant),this.sourceColorHct=t.sourceColorHct,this.primaryPalette=t.primaryPalette??St(this.specVersion).getPrimaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.secondaryPalette=t.secondaryPalette??St(this.specVersion).getSecondaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.tertiaryPalette=t.tertiaryPalette??St(this.specVersion).getTertiaryPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralPalette=t.neutralPalette??St(this.specVersion).getNeutralPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.neutralVariantPalette=t.neutralVariantPalette??St(this.specVersion).getNeutralVariantPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel),this.errorPalette=t.errorPalette??St(this.specVersion).getErrorPalette(this.variant,t.sourceColorHct,this.isDark,this.platform,this.contrastLevel)??_.fromHueAndChroma(25,84),this.colors=new b;}toString(){return `Scheme: variant=${f[this.variant]}, mode=${this.isDark?"dark":"light"}, platform=${this.platform}, contrastLevel=${this.contrastLevel.toFixed(1)}, seed=${this.sourceColorHct.toString()}, specVersion=${this.specVersion}`}static getPiecewiseHue(t,r,l){let c=Math.min(r.length-1,l.length),h=t.hue;for(let d=0;d<c;d++)if(h>=r[d]&&h<r[d+1])return he(l[d]);return h}static getRotatedHue(t,r,l){let c=s.getPiecewiseHue(t,r,l);return Math.min(r.length-1,l.length)<=0&&(c=0),he(t.hue+c)}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(this.colors.primaryPaletteKeyColor())}get secondaryPaletteKeyColor(){return this.getArgb(this.colors.secondaryPaletteKeyColor())}get tertiaryPaletteKeyColor(){return this.getArgb(this.colors.tertiaryPaletteKeyColor())}get neutralPaletteKeyColor(){return this.getArgb(this.colors.neutralPaletteKeyColor())}get neutralVariantPaletteKeyColor(){return this.getArgb(this.colors.neutralVariantPaletteKeyColor())}get errorPaletteKeyColor(){return this.getArgb(this.colors.errorPaletteKeyColor())}get background(){return this.getArgb(this.colors.background())}get onBackground(){return this.getArgb(this.colors.onBackground())}get surface(){return this.getArgb(this.colors.surface())}get surfaceDim(){return this.getArgb(this.colors.surfaceDim())}get surfaceBright(){return this.getArgb(this.colors.surfaceBright())}get surfaceContainerLowest(){return this.getArgb(this.colors.surfaceContainerLowest())}get surfaceContainerLow(){return this.getArgb(this.colors.surfaceContainerLow())}get surfaceContainer(){return this.getArgb(this.colors.surfaceContainer())}get surfaceContainerHigh(){return this.getArgb(this.colors.surfaceContainerHigh())}get surfaceContainerHighest(){return this.getArgb(this.colors.surfaceContainerHighest())}get onSurface(){return this.getArgb(this.colors.onSurface())}get surfaceVariant(){return this.getArgb(this.colors.surfaceVariant())}get onSurfaceVariant(){return this.getArgb(this.colors.onSurfaceVariant())}get inverseSurface(){return this.getArgb(this.colors.inverseSurface())}get inverseOnSurface(){return this.getArgb(this.colors.inverseOnSurface())}get outline(){return this.getArgb(this.colors.outline())}get outlineVariant(){return this.getArgb(this.colors.outlineVariant())}get shadow(){return this.getArgb(this.colors.shadow())}get scrim(){return this.getArgb(this.colors.scrim())}get surfaceTint(){return this.getArgb(this.colors.surfaceTint())}get primary(){return this.getArgb(this.colors.primary())}get primaryDim(){let t=this.colors.primaryDim();if(t===void 0)throw new Error("`primaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onPrimary(){return this.getArgb(this.colors.onPrimary())}get primaryContainer(){return this.getArgb(this.colors.primaryContainer())}get onPrimaryContainer(){return this.getArgb(this.colors.onPrimaryContainer())}get primaryFixed(){return this.getArgb(this.colors.primaryFixed())}get primaryFixedDim(){return this.getArgb(this.colors.primaryFixedDim())}get onPrimaryFixed(){return this.getArgb(this.colors.onPrimaryFixed())}get onPrimaryFixedVariant(){return this.getArgb(this.colors.onPrimaryFixedVariant())}get inversePrimary(){return this.getArgb(this.colors.inversePrimary())}get secondary(){return this.getArgb(this.colors.secondary())}get secondaryDim(){let t=this.colors.secondaryDim();if(t===void 0)throw new Error("`secondaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onSecondary(){return this.getArgb(this.colors.onSecondary())}get secondaryContainer(){return this.getArgb(this.colors.secondaryContainer())}get onSecondaryContainer(){return this.getArgb(this.colors.onSecondaryContainer())}get secondaryFixed(){return this.getArgb(this.colors.secondaryFixed())}get secondaryFixedDim(){return this.getArgb(this.colors.secondaryFixedDim())}get onSecondaryFixed(){return this.getArgb(this.colors.onSecondaryFixed())}get onSecondaryFixedVariant(){return this.getArgb(this.colors.onSecondaryFixedVariant())}get tertiary(){return this.getArgb(this.colors.tertiary())}get tertiaryDim(){let t=this.colors.tertiaryDim();if(t===void 0)throw new Error("`tertiaryDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onTertiary(){return this.getArgb(this.colors.onTertiary())}get tertiaryContainer(){return this.getArgb(this.colors.tertiaryContainer())}get onTertiaryContainer(){return this.getArgb(this.colors.onTertiaryContainer())}get tertiaryFixed(){return this.getArgb(this.colors.tertiaryFixed())}get tertiaryFixedDim(){return this.getArgb(this.colors.tertiaryFixedDim())}get onTertiaryFixed(){return this.getArgb(this.colors.onTertiaryFixed())}get onTertiaryFixedVariant(){return this.getArgb(this.colors.onTertiaryFixedVariant())}get error(){return this.getArgb(this.colors.error())}get errorDim(){let t=this.colors.errorDim();if(t===void 0)throw new Error("`errorDim` color is undefined prior to 2025 spec.");return this.getArgb(t)}get onError(){return this.getArgb(this.colors.onError())}get errorContainer(){return this.getArgb(this.colors.errorContainer())}get onErrorContainer(){return this.getArgb(this.colors.onErrorContainer())}};Q.DEFAULT_SPEC_VERSION="2021";Q.DEFAULT_PLATFORM="phone";var fr=class{getPrimaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma);case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),48);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,12);case f.RAINBOW:return _.fromHueAndChroma(r.hue,48);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,36);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+240),40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,200);default:throw new Error(`Unsupported variant: ${t}`)}}getSecondaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,Math.max(r.chroma-32,r.chroma*.5));case f.FRUIT_SALAD:return _.fromHueAndChroma(he(r.hue-50),36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,8);case f.RAINBOW:return _.fromHueAndChroma(r.hue,16);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[45,95,45,20,45,90,45,45,45]),24);case f.VIBRANT:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[18,15,10,12,15,18,15,12,12]),24);default:throw new Error(`Unsupported variant: ${t}`)}}getTertiaryPalette(t,r,l,c,h){switch(t){case f.CONTENT:return _.fromHct(it.fixIfDisliked(new Lt(r).analogous(3,6)[2]));case f.FIDELITY:return _.fromHct(it.fixIfDisliked(new Lt(r).complement));case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,36);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,16);case f.RAINBOW:case f.TONAL_SPOT:return _.fromHueAndChroma(he(r.hue+60),24);case f.EXPRESSIVE:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,21,51,121,151,191,271,321,360],[120,120,20,45,20,15,20,120,120]),32);case f.VIBRANT:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,41,61,101,131,181,251,301,360],[35,30,20,25,30,35,30,25,25]),32);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralPalette(t,r,l,c,h){switch(t){case f.CONTENT:case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,10);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,6);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),8);case f.VIBRANT:return _.fromHueAndChroma(r.hue,10);default:throw new Error(`Unsupported variant: ${t}`)}}getNeutralVariantPalette(t,r,l,c,h){switch(t){case f.CONTENT:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FIDELITY:return _.fromHueAndChroma(r.hue,r.chroma/8+4);case f.FRUIT_SALAD:return _.fromHueAndChroma(r.hue,16);case f.MONOCHROME:return _.fromHueAndChroma(r.hue,0);case f.NEUTRAL:return _.fromHueAndChroma(r.hue,2);case f.RAINBOW:return _.fromHueAndChroma(r.hue,0);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,8);case f.EXPRESSIVE:return _.fromHueAndChroma(he(r.hue+15),12);case f.VIBRANT:return _.fromHueAndChroma(r.hue,12);default:throw new Error(`Unsupported variant: ${t}`)}}getErrorPalette(t,r,l,c,h){}},qr=class s extends fr{getPrimaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?12:8:F.isBlue(r.hue)?16:12);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"&&l?26:32);case f.EXPRESSIVE:return _.fromHueAndChroma(r.hue,c==="phone"?l?36:48:40);case f.VIBRANT:return _.fromHueAndChroma(r.hue,c==="phone"?74:56);default:return super.getPrimaryPalette(t,r,l,c,h)}}getSecondaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?F.isBlue(r.hue)?6:4:F.isBlue(r.hue)?10:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,16);case f.EXPRESSIVE:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),c==="phone"&&l?16:24);case f.VIBRANT:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,38,105,140,333,360],[-14,10,-14,10,-14]),c==="phone"?56:36);default:return super.getSecondaryPalette(t,r,l,c,h)}}getTertiaryPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),c==="phone"?20:36);case f.TONAL_SPOT:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,20,71,161,333,360],[-40,48,-32,40,-32]),c==="phone"?28:32);case f.EXPRESSIVE:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48);case f.VIBRANT:return _.fromHueAndChroma(Q.getRotatedHue(r,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56);default:return super.getTertiaryPalette(t,r,l,c,h)}}static getExpressiveNeutralHue(t){return Q.getRotatedHue(t,[0,71,124,253,278,300,360],[10,0,10,0,10,0])}static getExpressiveNeutralChroma(t,r,l){let c=s.getExpressiveNeutralHue(t);return l==="phone"?r?F.isYellow(c)?6:14:18:12}static getVibrantNeutralHue(t){return Q.getRotatedHue(t,[0,38,105,140,333,360],[-14,10,-14,10,-14])}static getVibrantNeutralChroma(t,r){let l=s.getVibrantNeutralHue(t);return r==="phone"||F.isBlue(l)?28:20}getNeutralPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,c==="phone"?1.4:6);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,c==="phone"?5:10);case f.EXPRESSIVE:return _.fromHueAndChroma(s.getExpressiveNeutralHue(r),s.getExpressiveNeutralChroma(r,l,c));case f.VIBRANT:return _.fromHueAndChroma(s.getVibrantNeutralHue(r),s.getVibrantNeutralChroma(r,c));default:return super.getNeutralPalette(t,r,l,c,h)}}getNeutralVariantPalette(t,r,l,c,h){switch(t){case f.NEUTRAL:return _.fromHueAndChroma(r.hue,(c==="phone"?1.4:6)*2.2);case f.TONAL_SPOT:return _.fromHueAndChroma(r.hue,(c==="phone"?5:10)*1.7);case f.EXPRESSIVE:let d=s.getExpressiveNeutralHue(r),p=s.getExpressiveNeutralChroma(r,l,c);return _.fromHueAndChroma(d,p*(d>=105&&d<125?1.6:2.3));case f.VIBRANT:let k=s.getVibrantNeutralHue(r),S=s.getVibrantNeutralChroma(r,c);return _.fromHueAndChroma(k,S*1.29);default:return super.getNeutralVariantPalette(t,r,l,c,h)}}getErrorPalette(t,r,l,c,h){let d=Q.getPiecewiseHue(r,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);switch(t){case f.NEUTRAL:return _.fromHueAndChroma(d,c==="phone"?50:40);case f.TONAL_SPOT:return _.fromHueAndChroma(d,c==="phone"?60:48);case f.EXPRESSIVE:return _.fromHueAndChroma(d,c==="phone"?64:48);case f.VIBRANT:return _.fromHueAndChroma(d,c==="phone"?80:60);default:return super.getErrorPalette(t,r,l,c,h)}}},Sl=new fr,kl=new qr;function St(s){return s==="2025"?kl:Sl}var mr=class extends Q{constructor(t,r,l,c=Q.DEFAULT_SPEC_VERSION,h=Q.DEFAULT_PLATFORM){super({sourceColorHct:t,variant:f.VIBRANT,contrastLevel:l,isDark:r,platform:h,specVersion:c});}};function Kr(s){let t=Rt(s),r=Et(s),l=It(s),c=[t.toString(16),r.toString(16),l.toString(16)];for(let[h,d]of c.entries())d.length===1&&(c[h]="0"+d);return "#"+c.join("")}function ra(s){s=s.replace("#","");let t=s.length===3,r=s.length===6,l=s.length===8;if(!t&&!r&&!l)throw new Error("unexpected hex "+s);let c=0,h=0,d=0;return t?(c=$e(s.slice(0,1).repeat(2)),h=$e(s.slice(1,2).repeat(2)),d=$e(s.slice(2,3).repeat(2))):r?(c=$e(s.slice(0,2)),h=$e(s.slice(2,4)),d=$e(s.slice(4,6))):l&&(c=$e(s.slice(2,4)),h=$e(s.slice(4,6)),d=$e(s.slice(6,8))),(255<<24|(c&255)<<16|(h&255)<<8|d&255)>>>0}function $e(s){return parseInt(s,16)}function kt(s,t){let r=F.fromInt(ra(s)),l=new mr(r,t,0),c={},h=["primary","onPrimary","primaryContainer","onPrimaryContainer","secondary","onSecondary","secondaryContainer","onSecondaryContainer","tertiary","onTertiary","tertiaryContainer","onTertiaryContainer","error","onError","errorContainer","onErrorContainer","background","onBackground","surface","onSurface","surfaceVariant","onSurfaceVariant","outline","outlineVariant","shadow","scrim","inverseSurface","inverseOnSurface","inversePrimary","surfaceDim","surfaceBright","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest"];for(let d of h){let p=b[d];p&&(c[d]=Kr(p.getArgb(l)));}return c}function Bh(s,t){let r=s.replace("#",""),l=parseInt(r.substring(0,2),16),c=parseInt(r.substring(2,4),16),h=parseInt(r.substring(4,6),16);return `rgba(${l}, ${c}, ${h}, ${t})`}function na(s,t){let r=0,l=0,c=0;return s.length===4?(r=parseInt(s[1]+s[1],16),l=parseInt(s[2]+s[2],16),c=parseInt(s[3]+s[3],16)):s.length===7&&(r=parseInt(s.slice(1,3),16),l=parseInt(s.slice(3,5),16),c=parseInt(s.slice(5,7),16)),`rgba(${r}, ${l}, ${c}, ${t})`}function Hh(s){let t=s.replace("#",""),r=parseInt(t.substring(0,2),16),l=parseInt(t.substring(2,4),16),c=parseInt(t.substring(4,6),16);return .2126*r+.7152*l+.0722*c<128}var oa=createContext(null),_l=kt("#6750A4",false),Gh=({children:s,seedColor:t="#6750A4",defaultColorScheme:r="auto"})=>{let l=useRef(t),[c,h]=useState(r),[d,p]=useState(()=>{let S=r==="dark";return r==="auto"&&typeof window<"u"&&(S=window.matchMedia("(prefers-color-scheme: dark)").matches),kt(l.current,S)});useEffect(()=>{if(c==="auto"&&typeof window<"u"){let S=window.matchMedia("(prefers-color-scheme: dark)"),x=P=>{p(kt(l.current,P.matches));};return S.addEventListener("change",x),()=>S.removeEventListener("change",x)}},[c]);let k=useMemo(()=>({themeColors:d,systemTheme:c,setThemeColors:S=>{l.current=S;let x=c==="dark";c==="auto"&&(x=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(kt(S,x));},setColorScheme:S=>{h(S);let x=S==="dark";S==="auto"&&(x=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:false),p(kt(l.current,x));}}),[d,c]);return jsx(oa.Provider,{value:k,children:s})},jh=()=>{let s=useContext(oa);return s||{themeColors:_l,systemTheme:"auto",setThemeColors:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")},setColorScheme:()=>{throw new Error("[@zaide6137/m3-components-web] Wrap your app in <ThemeProvider>.")}}};var Bt=jn(Zr());var Jr=jn(Zr());var sa=forwardRef((s,t)=>{let{className:r,shape:l,type:c,hoverEffect:h=true,text:d,icon:p,onClick:k,disabled:S,loading:x=false}=s,{themeColors:P}=useGlobalTheme(),D=S?c==="filled"?{backgroundColor:hexToArgba(P.onSurface,.12),color:hexToArgba(P.onSurface,.38),border:"none"}:{backgroundColor:"transparent",color:hexToArgba(P.onSurface,.38),border:`1px solid ${hexToArgba(P.onSurface,.12)}`}:c==="filled"?{backgroundColor:P.primary,color:P.onPrimary,border:"none"}:{backgroundColor:"transparent",color:P.primary,border:`1px solid ${P.primary}`},C=l==="rounded-full"?32:l==="rounded-lg"?12:4;return jsx(motion.button,{disabled:S||x,onClick:!S&&!x?k:void 0,className:`m3-components-button-root m3-components-button-${l} ${r||""}`,style:{backgroundColor:D.backgroundColor,color:D.color,border:D.border},initial:{borderRadius:C},animate:{borderRadius:C},whileHover:!S&&!x&&h?{borderRadius:8,backgroundColor:c==="outlined"?hexToArgba(P.primary,.08):P.primary,scale:1.02}:{},whileTap:!S&&!x?{scale:.96}:{},transition:{duration:.2,ease:"easeInOut"},children:jsxs("div",{className:"m3-components-button-content",children:[x&&jsx("span",{style:{marginRight:"4px"},children:"... "}),p&&jsx("span",{className:"m3-components-button-icon",children:p}),jsx("span",{className:"m3-components-button-text",children:d})]})})});var la=({date:s,onPrev:t,onNext:r,onToday:l,view:c,onViewChange:h})=>{let{themeColors:d}=useGlobalTheme(),[p,k]=useState(false),S=(0, Jr.default)(),x=S.format("MMM").toUpperCase(),P=S.format("DD"),D=(0, Jr.default)(s).format("MMMM YYYY"),C=Math.ceil(S.date()/7),m=c.charAt(0).toUpperCase()+c.slice(1);return jsxs("div",{className:"m3-components-bigcalendar-toolbar-wrapper",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-left-content",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-date-badge",style:{backgroundColor:d.surfaceContainerLowest,borderColor:d.outlineVariant},children:[jsx("div",{className:"m3-components-bigcalendar-toolbar-badge-header",style:{backgroundColor:d.primary},children:jsx("span",{className:"m3-components-bigcalendar-toolbar-badge-month-text",style:{color:d.onPrimary},children:x})}),jsx("span",{className:"m3-components-bigcalendar-toolbar-badge-day-text",style:{color:d.onSurface},children:P})]}),jsxs("div",{className:"flex flex-col",children:[jsx("h1",{className:"text-xl font-bold",style:{color:d.onSurface},children:D}),jsxs("span",{className:"m3-components-bigcalendar-toolbar-week-chip",style:{color:d.onSurfaceVariant,borderColor:d.outlineVariant},children:["Week ",C]})]})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-right-content",children:[jsxs("div",{className:"m3-components-bigcalendar-toolbar-nav-segmented",style:{borderColor:d.outlineVariant},children:[jsx("button",{onClick:t,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-border-separator-right",style:{borderColor:d.outlineVariant,color:d.onSurface},children:jsx(Fragment,{})}),jsx("button",{onClick:l,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-today-btn",style:{color:d.onSurface},children:"Today"}),jsx("button",{onClick:r,className:"m3-components-bigcalendar-toolbar-nav-btn m3-components-bigcalendar-toolbar-border-separator-left",style:{borderColor:d.outlineVariant,color:d.onSurface},children:jsx(Fragment,{})})]}),jsxs("div",{className:"m3-components-bigcalendar-toolbar-dropdown-host",children:[jsxs("button",{onClick:()=>k(!p),className:"m3-components-bigcalendar-toolbar-dropdown-toggle",style:{borderColor:d.outlineVariant,color:d.onSurface},children:[m,jsx("svg",{className:`m3-components-bigcalendar-toolbar-icon-rotate ${p?"m3-components-bigcalendar-toolbar-icon-rotate-active":""}`})]}),jsx(AnimatePresence,{children:p&&jsx(motion.div,{className:"m3-components-bigcalendar-toolbar-dropdown-panel",style:{backgroundColor:d.surfaceContainerHigh,borderColor:d.outlineVariant},children:["month","week","day"].map(w=>jsx("button",{onClick:()=>h(w),className:"m3-components-bigcalendar-toolbar-dropdown-option",style:{color:c===w?d.primary:d.onSurface},children:w.charAt(0).toUpperCase()+w.slice(1)},w))})})]}),jsx(sa,{type:"filled",shape:"rounded-lg",text:"+ Create",onClick:()=>{},className:"m3-components-bigcalendar-toolbar-create-btn"})]})]})};var ua=({event:s,onMouseEnter:t,onMouseLeave:r})=>{let l=s.resource,c=l.eventStyleFilled??true,h=l.eventStyle||{backgroundColor:l.eventSeedColor||"#6750A4",contentColor:"#FFFFFF"},d=c?h.backgroundColor:hexToArgba(h.backgroundColor,.15),p=c?"transparent":h.backgroundColor,k=c?h.contentColor:h.backgroundColor,S=useRef(null),[x,P]=useState(1e3);useEffect(()=>{if(!S.current)return;let C=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{m[0]&&P(m[0].contentRect.width);});});return C.observe(S.current),()=>C.disconnect()},[]);let D=x<120;return jsx("div",{ref:S,className:"m3-components-bigcalendar-event-root",children:D?jsx(motion.div,{className:"m3-components-bigcalendar-event-dot",onMouseEnter:C=>t(C,l),onMouseLeave:r,style:{backgroundColor:d,borderColor:p==="transparent"?h.backgroundColor:p}}):jsx(motion.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},onMouseEnter:C=>t(C,l),onMouseLeave:r,className:"m3-components-bigcalendar-event-chip",style:{backgroundColor:d,color:k,border:c?"none":`1.5px solid ${p}`},children:jsxs("div",{className:"m3-components-bigcalendar-event-content",children:[jsx("span",{className:"m3-components-bigcalendar-event-title",children:l.eventTitle}),l.eventTrailingIcon&&jsx("div",{className:"m3-components-bigcalendar-event-trailing",style:{color:k},children:l.eventTrailingIcon})]})})})};var Ad=forwardRef((s,t)=>{let{currentDate:r,filterOptions:l,events:c,toolBar:h,filterBar:d,filterBy:p,backgroundMode:k,defaultView:S="month",enableAnimations:x=true,slideVariants:P={enter:L=>({x:L>0?"10%":"-10%",opacity:0}),center:{zIndex:1,x:0,opacity:1},exit:L=>({zIndex:0,x:L<0?"10%":"-10%",opacity:0})},transition:D={type:"spring",stiffness:300,damping:30,opacity:{duration:.2}},onEventClicked:C}=s,{themeColors:m}=useGlobalTheme(),w=s.currentDate===null?new Date:new Date(s.currentDate),T=momentLocalizer(Bt.default),Y=useMemo(()=>c?c.filter(L=>!p||p.length===0||p.includes("All")?true:p.every(fe=>L.eventCategory?.includes(fe))).map(L=>{let{eventTitle:fe,eventStart:Fe,eventEnd:xe,...de}=L;return {title:fe,start:new Date(Fe),end:new Date(xe),resource:de}}):[],[c,p]),B=useMemo(()=>({event:L=>jsx(ua,{...L,onMouseEnter:()=>{},onMouseLeave:()=>{}})}),[]);useImperativeHandle(t,()=>({previousMonth:()=>{K();},nextMonth:()=>{J();},jumpToNow:()=>{X();}}));let K=()=>{z(-1),te((0, Bt.default)(r).subtract(1,Z).toDate());},J=()=>{z(1),te((0, Bt.default)(r).add(1,Z).toDate());},X=()=>{z(0),te(new Date);},[H,z]=useState(0),[G,te]=useState(w),[Z,oe]=useState(S),[ye,we]=useState(l);return jsx("div",{children:jsxs(motion.div,{layout:true,className:"m3-components-bigcalendar-root",style:{backgroundColor:m.surfaceContainerHigh,borderColor:m.outlineVariant},children:[jsxs("div",{className:"m3-components-bigcalendar-header-area",children:[jsx(la,{date:(0, Bt.default)(r).toDate(),view:Z,onViewChange:oe,onPrev:K,onNext:J,onToday:X}),d?d(l):jsx("div",{className:"m3-components-bigcalendar-filter-row",children:l.map(L=>jsx("button",{onClick:()=>{we(fe=>fe.includes(L)?fe.filter(Fe=>Fe!==L):[...fe,L]);},className:"m3-components-bigcalendar-filter-chip",style:{backgroundColor:ye.includes(L)?m.onSurface:"transparent",color:ye.includes(L)?m.surface:m.onSurfaceVariant,borderColor:ye.includes(L)?m.onSurface:m.outlineVariant},children:L},L))})]}),jsx("div",{className:"m3-components-bigcalendar-divider",style:{backgroundColor:m.outlineVariant}}),jsx("div",{className:"m3-components-bigcalendar-view-host rbc-container-wrapper",children:jsx(AnimatePresence,{initial:false,custom:H,mode:"wait",children:jsx(motion.div,{custom:H,variants:P,initial:"enter",animate:"center",exit:"exit",transition:D,className:"m3-components-bigcalendar-viewport",children:jsx(Calendar,{localizer:T,events:Y,date:r,view:Z,onNavigate:L=>te(L),onView:L=>{(L==="month"||L==="week"||L==="day")&&oe(L);},onSelectEvent:L=>C?.(L),toolbar:false,components:B,eventPropGetter:()=>({style:{backgroundColor:"transparent",border:"none",padding:"1px 2px"}})})},w.toISOString())})}),jsx("style",{jsx:true,global:true,children:`
5
+ .rbc-container-wrapper .rbc-calendar { font-family: inherit; border: none; }
6
+ .rbc-container-wrapper .rbc-month-view { border: none; overflow: hidden; }
7
+ .rbc-container-wrapper .rbc-month-row { border-top: 1px solid ${m.outlineVariant}; }
8
+ .rbc-container-wrapper .rbc-day-bg { border-left: 1px solid ${m.outlineVariant}; }
9
+ .rbc-container-wrapper .rbc-day-bg:first-child { border-left: none; }
10
+ .rbc-container-wrapper .rbc-header {
11
+ border-bottom: 1px solid ${m.outlineVariant};
12
+ border-left: none;
13
+ height: 36px;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ font-size: 10px;
18
+ font-weight: 800;
19
+ text-transform: uppercase;
20
+ letter-spacing: 0.1em;
21
+ color: ${m.onSurfaceVariant};
22
+ }
23
+ .rbc-container-wrapper .rbc-date-cell {
24
+ padding: 4px 6px;
25
+ font-size: 11px;
26
+ font-weight: 800;
27
+ color: ${m.onSurface};
28
+ }
29
+ .rbc-container-wrapper .rbc-date-cell > button,
30
+ .rbc-container-wrapper .rbc-date-cell > a {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 24px;
35
+ height: 24px;
36
+ border-radius: 50%;
37
+ background: transparent;
38
+ color: inherit;
39
+ outline: none;
40
+ border: none;
41
+ }
42
+ .rbc-container-wrapper .rbc-date-cell.rbc-now > button,
43
+ .rbc-container-wrapper .rbc-date-cell.rbc-now > a {
44
+ background-color: ${m.primary};
45
+ color: ${m.onPrimary};
46
+ }
47
+ .rbc-container-wrapper .rbc-show-more {
48
+ background-color: transparent !important;
49
+ color: ${m.primary} !important;
50
+ font-size: 11px;
51
+ font-weight: 700;
52
+ margin-top: 8px;
53
+ margin-left: 4px;
54
+ padding-left: 4px;
55
+ }
56
+ .rbc-container-wrapper .rbc-off-range-bg { background-color: transparent; opacity: 0.3; }
57
+ .rbc-container-wrapper .rbc-today { background-color: ${na(m.primary,.03)}; }
58
+ .rbc-container-wrapper .rbc-event { background: transparent; }
59
+ `})]})})});/*! Bundled license information:
60
+
61
+ moment/moment.js:
62
+ (*! moment.js *)
63
+ (*! version : 2.30.1 *)
64
+ (*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
65
+ (*! license : MIT *)
66
+ (*! momentjs.com *)
2
67
 
3
68
  @material/material-color-utilities/utils/math_utils.js:
4
69
  @material/material-color-utilities/utils/color_utils.js:
@@ -108,4 +173,4 @@ import {createContext,useRef,useState,useEffect,useMemo,useContext}from'react';i
108
173
  * See the License for the specific language governing permissions and
109
174
  * limitations under the License.
110
175
  *)
111
- */export{te as ThemeContext,Ca as ThemeProvider,lt as createModernTheme,pa as hexToArgba,da as isDarkBackground,Sa as useGlobalTheme};
176
+ */export{Ad as BigCalendar,sa as Button,oa as ThemeContext,Gh as ThemeProvider,kt as createModernTheme,Bh as hexToArgba,na as hexToRgba,Hh as isDarkBackground,jh as useGlobalTheme};