diff --git a/assets/Color-ERTF36HU-rlRgfIB0.js b/assets/Color-ERTF36HU-DhtFufZU.js similarity index 99% rename from assets/Color-ERTF36HU-rlRgfIB0.js rename to assets/Color-ERTF36HU-DhtFufZU.js index dfd660ff..bbfbf575 100644 --- a/assets/Color-ERTF36HU-rlRgfIB0.js +++ b/assets/Color-ERTF36HU-DhtFufZU.js @@ -1 +1 @@ -import{al as Me,am as ie,an as Ce,ao as $,a2 as ue,a0 as $e,H as Oe,ap as Ie,aq as Ne}from"./index-D_yKE35a.js";import{g as fe,R as h,r as m}from"./index-0d5eMwbi.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Se,he={};for(const e of Object.keys(F))he[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,c;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=s/(a+o):c=s/(2-a-o),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,c=e[2]/255,i=Math.max(s,l,c),d=i-Math.min(s,l,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(s),n=f(l),r=f(c),s===i?o=r-n:l===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Re(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,c[i]=s*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,s];case 1:return[l,r,s];case 2:return[s,r,c];case 3:return[s,l,r];case 4:return[c,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const c=n+a*(l-n);let i,d,f;switch(s){default:case 6:case 0:i=l,d=c,f=n;break;case 1:i=c,d=l,f=n;break;case 2:i=n,d=l,f=c;break;case 3:i=n,d=c,f=l;break;case 4:i=c,d=n,f=l;break;case 5:i=l,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,c=o**3,i=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,c;return s<1?l=a/(1-s):l=0,s<=0?c=0:o===t?c=(n-r)/s%6:o===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{N[e]={},Object.defineProperty(N[e],"channels",{value:K[e].channels}),Object.defineProperty(N[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];N[e][r]=Be(o),N[e][r].raw=qe(o)})});var Xe=N;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=at,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,s,l,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,lt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,H=o;return r=o=void 0,i=v,s=e.apply(H,C),s}function j(v){return i=v,l=setTimeout(b,t),d?x(v):s}function M(v){var C=v-c,H=v-i,ee=t-C;return f?ut(ee,a-H):ee}function p(v){var C=v-c,H=v-i;return c===void 0||C>=t||C<0||f&&H>=a}function b(){var v=W();if(p(v))return w(v);l=setTimeout(b,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=o=l=void 0}function k(){return l===void 0?s:w(W())}function O(){var v=W(),C=p(v);if(r=arguments,o=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(b,t),x(c)}return l===void 0&&(l=setTimeout(b,t)),s}return O.cancel=E,O.flush=k,O}var ht=ft;const dt=fe(ht);function I(){return(I=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function V(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(oe(o.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=c.current,w=A(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(ae(b),!function(k,O){return O&&!z(k)}(b,c.current)&&w)){if(z(b)){c.current=!0;var E=b.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),a(oe(w,b,l.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[s,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",I({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),T=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},mt=function(e){return be(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},bt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:bt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(me(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},me=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:y(255*[r,l,s,s,c,r][i]),g:y(255*[c,r,r,l,s,s][i]),b:y(255*[s,s,c,r,r,l][i]),a:y(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?be({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},be=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=T(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),m.useEffect(function(){var i;ye(a,l.current.hsva)||e.equal(i=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},se=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!se.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,se.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:mt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,I({},e,{colorModel:Ct}))},Ot=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:R(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(Ot,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},It={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,I({},e,{colorModel:It}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=me(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,I({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Ht=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ft=$($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Tt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,')`,le=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=$(Oe.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(Ie)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),Xt=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Dt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Wt=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Kt=/^\s*#?([0-9a-f]{3})\s*$/i,Vt={hex:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.rgb.hsl([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([s,l,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([s,l,c]).toLowerCase()}`}}if(Wt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.hsl.rgb([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([s,l,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([s,l,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[s,l]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=m.useMemo(()=>At(n,o,s).toLowerCase(),[n,o,s]),i=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(l=>typeof l=="string"?S(l):l.title?{...S(l.color),keyword:l.title}:S(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=m.useCallback(l=>{l!=null&&l.valid&&(a.some(c=>D(c[n])===D(l[n]))||o(c=>c.concat(l)))},[n,a]);return{presets:a,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1,argType:l})=>{var E;let c=m.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Gt(t,c),{presets:M,addPreset:p}=Ut(a,g,x),b=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(Ht,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(zt,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Tt,null,M.map((k,O)=>h.createElement(ue,{key:`${k.value}-${O}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:k.keyword||k.value})},h.createElement(le,{value:k[x],active:g&&D(k[x])===D(g[x]),onClick:()=>f(k.value)})))))},h.createElement(le,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:j}):null)},sn=Yt;export{Yt as ColorControl,sn as default}; +import{al as Me,am as ie,an as Ce,ao as $,a2 as ue,a0 as $e,H as Oe,ap as Ie,aq as Ne}from"./index-CMsN8z4D.js";import{g as fe,R as h,r as m}from"./index-0d5eMwbi.js";import"./iframe-CUIcjkDA.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Se,he={};for(const e of Object.keys(F))he[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,c;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=s/(a+o):c=s/(2-a-o),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,c=e[2]/255,i=Math.max(s,l,c),d=i-Math.min(s,l,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(s),n=f(l),r=f(c),s===i?o=r-n:l===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Re(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,c[i]=s*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,s];case 1:return[l,r,s];case 2:return[s,r,c];case 3:return[s,l,r];case 4:return[c,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const c=n+a*(l-n);let i,d,f;switch(s){default:case 6:case 0:i=l,d=c,f=n;break;case 1:i=c,d=l,f=n;break;case 2:i=n,d=l,f=c;break;case 3:i=n,d=c,f=l;break;case 4:i=c,d=n,f=l;break;case 5:i=l,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,c=o**3,i=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,c;return s<1?l=a/(1-s):l=0,s<=0?c=0:o===t?c=(n-r)/s%6:o===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{N[e]={},Object.defineProperty(N[e],"channels",{value:K[e].channels}),Object.defineProperty(N[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];N[e][r]=Be(o),N[e][r].raw=qe(o)})});var Xe=N;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=at,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,s,l,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,lt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,H=o;return r=o=void 0,i=v,s=e.apply(H,C),s}function j(v){return i=v,l=setTimeout(b,t),d?x(v):s}function M(v){var C=v-c,H=v-i,ee=t-C;return f?ut(ee,a-H):ee}function p(v){var C=v-c,H=v-i;return c===void 0||C>=t||C<0||f&&H>=a}function b(){var v=W();if(p(v))return w(v);l=setTimeout(b,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=o=l=void 0}function k(){return l===void 0?s:w(W())}function O(){var v=W(),C=p(v);if(r=arguments,o=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(b,t),x(c)}return l===void 0&&(l=setTimeout(b,t)),s}return O.cancel=E,O.flush=k,O}var ht=ft;const dt=fe(ht);function I(){return(I=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function V(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(oe(o.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=c.current,w=A(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(ae(b),!function(k,O){return O&&!z(k)}(b,c.current)&&w)){if(z(b)){c.current=!0;var E=b.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),a(oe(w,b,l.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[s,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",I({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),T=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},mt=function(e){return be(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},bt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:bt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(me(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},me=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:y(255*[r,l,s,s,c,r][i]),g:y(255*[c,r,r,l,s,s][i]),b:y(255*[s,s,c,r,r,l][i]),a:y(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?be({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},be=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=T(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),m.useEffect(function(){var i;ye(a,l.current.hsva)||e.equal(i=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},se=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!se.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,se.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:mt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,I({},e,{colorModel:Ct}))},Ot=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:R(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(Ot,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},It={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,I({},e,{colorModel:It}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=me(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,I({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Ht=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ft=$($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Tt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,')`,le=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=$(Oe.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(Ie)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),Xt=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Dt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Wt=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Kt=/^\s*#?([0-9a-f]{3})\s*$/i,Vt={hex:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.rgb.hsl([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([s,l,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([s,l,c]).toLowerCase()}`}}if(Wt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.hsl.rgb([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([s,l,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([s,l,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[s,l]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=m.useMemo(()=>At(n,o,s).toLowerCase(),[n,o,s]),i=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(l=>typeof l=="string"?S(l):l.title?{...S(l.color),keyword:l.title}:S(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=m.useCallback(l=>{l!=null&&l.valid&&(a.some(c=>D(c[n])===D(l[n]))||o(c=>c.concat(l)))},[n,a]);return{presets:a,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1,argType:l})=>{var E;let c=m.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Gt(t,c),{presets:M,addPreset:p}=Ut(a,g,x),b=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(Ht,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(zt,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Tt,null,M.map((k,O)=>h.createElement(ue,{key:`${k.value}-${O}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:k.keyword||k.value})},h.createElement(le,{value:k[x],active:g&&D(k[x])===D(g[x]),onClick:()=>f(k.value)})))))},h.createElement(le,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:j}):null)},sn=Yt;export{Yt as ColorControl,sn as default}; diff --git a/assets/DocsRenderer-CFRXHY34-CfxJRWUd.js b/assets/DocsRenderer-CFRXHY34-DLLN-W5u.js similarity index 90% rename from assets/DocsRenderer-CFRXHY34-CfxJRWUd.js rename to assets/DocsRenderer-CFRXHY34-DLLN-W5u.js index 631e9d0a..8df1919a 100644 --- a/assets/DocsRenderer-CFRXHY34-CfxJRWUd.js +++ b/assets/DocsRenderer-CFRXHY34-DLLN-W5u.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CFK-oMtb.js","./index-0d5eMwbi.js"])))=>i.map(i=>d[i]); -import{_ as p}from"./iframe-9T-PF226.js";import{R as e,r as c}from"./index-0d5eMwbi.js";import{af as l,ag as u,ah as h,ai as E}from"./index-D_yKE35a.js";import{renderElement as d,unmountElement as x}from"./react-18-BH3B7EqY.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var _={code:l,a:u,...h},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},O=class{constructor(){this.render=async(t,r,n)=>{let s={..._,...r==null?void 0:r.components},a=E;return new Promise((i,m)=>{p(async()=>{const{MDXProvider:o}=await import("./index-CFK-oMtb.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>d(e.createElement(D,{showException:m,key:Math.random()},e.createElement(o,{components:s},e.createElement(a,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{x(t)}}};export{O as DocsRenderer,_ as defaultComponents}; +import{_ as p}from"./iframe-CUIcjkDA.js";import{R as e,r as c}from"./index-0d5eMwbi.js";import{af as l,ag as u,ah as h,ai as E}from"./index-CMsN8z4D.js";import{renderElement as d,unmountElement as x}from"./react-18-BH3B7EqY.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var _={code:l,a:u,...h},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},O=class{constructor(){this.render=async(t,r,n)=>{let s={..._,...r==null?void 0:r.components},a=E;return new Promise((i,m)=>{p(async()=>{const{MDXProvider:o}=await import("./index-CFK-oMtb.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>d(e.createElement(D,{showException:m,key:Math.random()},e.createElement(o,{components:s},e.createElement(a,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{x(t)}}};export{O as DocsRenderer,_ as defaultComponents}; diff --git a/assets/active-element-history-DI7yoVCB.js b/assets/active-element-history-DjNnwGR_.js similarity index 88% rename from assets/active-element-history-DI7yoVCB.js rename to assets/active-element-history-DjNnwGR_.js index 2500cb54..4fe7fafc 100644 --- a/assets/active-element-history-DI7yoVCB.js +++ b/assets/active-element-history-DjNnwGR_.js @@ -1 +1 @@ -import{r as d}from"./index-0d5eMwbi.js";import{o as f}from"./use-sync-refs-DqQDZvJ6.js";import{f as s}from"./focus-management-DaVlPEX1.js";function L(t,e){let n=d.useRef([]),o=f(t);d.useEffect(()=>{let u=[...n.current];for(let[c,i]of e.entries())if(n.current[c]!==i){let a=o(e,u);return n.current=e,a}},[o,...e])}function m(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let r=[];m(()=>{function t(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||r[0]===e.target)return;let n=e.target;n=n.closest(s),r.unshift(n??e.target),r=r.filter(o=>o!=null&&o.isConnected),r.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});export{L as m,r}; +import{r as d}from"./index-0d5eMwbi.js";import{o as f}from"./use-sync-refs-DhZgiOVe.js";import{f as s}from"./focus-management-CKkqTXfi.js";function L(t,e){let n=d.useRef([]),o=f(t);d.useEffect(()=>{let u=[...n.current];for(let[c,i]of e.entries())if(n.current[c]!==i){let a=o(e,u);return n.current=e,a}},[o,...e])}function m(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let r=[];m(()=>{function t(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||r[0]===e.target)return;let n=e.target;n=n.closest(s),r.unshift(n??e.target),r=r.filter(o=>o!=null&&o.isConnected),r.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});export{L as m,r}; diff --git a/assets/alert-WFlrTABt.js b/assets/alert-sTfywL0-.js similarity index 90% rename from assets/alert-WFlrTABt.js rename to assets/alert-sTfywL0-.js index b7dfabe9..3b97567a 100644 --- a/assets/alert-WFlrTABt.js +++ b/assets/alert-sTfywL0-.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{c as n}from"./class-names-DnY5YZNL.js";import{c as o,d,e as g,f as u}from"./zoom-to-fit-icon-DdsCB6de.js";const m={info:"border-primary-400 bg-primary-50 text-primary-600",danger:"border-danger-400 bg-danger-50 text-danger-500",warning:"border-warning-500 bg-warning-50 text-warning-600",success:"border-success-400 bg-success-50 text-success-500"},p={info:"fill-primary-500",danger:"fill-danger-400",success:"fill-success-400",warning:"fill-warning-500"},f={info:o,success:d,warning:g,danger:u},t=({title:s,children:a,intent:r,className:i,...c})=>{const l=f[r];return e.jsxs("div",{role:"alert",className:n("flex flex-row gap-4 rounded-lg border px-4 py-3 text-neutral-800",m[r],i),...c,children:[e.jsx(l,{className:n("h-4 w-4 flex-shrink-0",p[r])}),e.jsxs("div",{className:"flex-grow",children:[e.jsx("div",{className:"text-sm font-medium",children:s}),a&&e.jsx("div",{className:"pt-1 text-sm text-neutral-800",children:a})]})]})};try{t.displayName="Alert",t.__docgenInfo={description:"",displayName:"Alert",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},intent:{defaultValue:null,description:"",name:"intent",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"warning"'},{value:'"danger"'}]}}}}}catch{}export{t as A}; +import{j as e}from"./jsx-runtime-C798UXYj.js";import{c as n}from"./class-names-DnY5YZNL.js";import{c as o,d,e as g,f as u}from"./zoom-to-fit-icon-DdsCB6de.js";const m={info:"border-primary-400 bg-primary-50 text-primary-600",danger:"border-danger-400 bg-danger-50 text-danger-500",warning:"border-warning-500 bg-warning-50 text-warning-600",success:"border-success-400 bg-success-50 text-success-500"},p={info:"fill-primary-500",danger:"fill-danger-400",success:"fill-success-400",warning:"fill-warning-500"},f={info:o,success:d,warning:g,danger:u},t=({title:s,children:a,intent:r,className:i,...c})=>{const l=f[r];return e.jsxs("div",{role:"alert",className:n("flex flex-row gap-4 rounded-lg border px-4 py-3 text-neutral-800",m[r],i),...c,children:[e.jsx(l,{className:n("h-4 w-4 flex-shrink-0",p[r])}),e.jsxs("div",{className:"flex-grow",children:[e.jsx("div",{className:"text-sm font-medium",children:s}),a&&e.jsx("div",{className:"pt-1 text-sm text-neutral-800",children:a})]})]})};try{t.displayName="Alert",t.__docgenInfo={description:"",displayName:"Alert",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},intent:{defaultValue:null,description:"",name:"intent",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"warning"'},{value:'"danger"'},{value:'"info"'}]}}}}}catch{}export{t as A}; diff --git a/assets/alert.stories-DBAGVE4m.js b/assets/alert.stories-4-JUwPHE.js similarity index 96% rename from assets/alert.stories-DBAGVE4m.js rename to assets/alert.stories-4-JUwPHE.js index 3eb8e403..8a6171ad 100644 --- a/assets/alert.stories-DBAGVE4m.js +++ b/assets/alert.stories-4-JUwPHE.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-C798UXYj.js";import{A as u}from"./alert-WFlrTABt.js";import{g as x,h as f}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./zoom-to-fit-icon-DdsCB6de.js";const A=["info","success","warning","danger"],C={title:"Alert",component:u,parameters:{layout:"fullscreen",...x("Wide and big alert bar to inform user about important things")},args:{title:"Alert Title",children:"Alert content",intent:"info"}},r={},e={argTypes:{intent:f},render:({children:h,...y})=>s.jsx("div",{className:"flex flex-col gap-4",children:A.map(t=>s.jsx(u,{...y,intent:t,children:h},t))})},n={...e,args:{children:void 0},argTypes:{...e.argTypes,children:f}};var a,o,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};var c,l,d;e.parameters={...e.parameters,docs:{...(c=e.parameters)==null?void 0:c.docs,source:{originalSource:`{ +import{j as s}from"./jsx-runtime-C798UXYj.js";import{A as u}from"./alert-sTfywL0-.js";import{g as x,h as f}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./zoom-to-fit-icon-DdsCB6de.js";const A=["info","success","warning","danger"],C={title:"Alert",component:u,parameters:{layout:"fullscreen",...x("Wide and big alert bar to inform user about important things")},args:{title:"Alert Title",children:"Alert content",intent:"info"}},r={},e={argTypes:{intent:f},render:({children:h,...y})=>s.jsx("div",{className:"flex flex-col gap-4",children:A.map(t=>s.jsx(u,{...y,intent:t,children:h},t))})},n={...e,args:{children:void 0},argTypes:{...e.argTypes,children:f}};var a,o,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(i=(o=r.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};var c,l,d;e.parameters={...e.parameters,docs:{...(c=e.parameters)==null?void 0:c.docs,source:{originalSource:`{ argTypes: { intent: hiddenArgControl }, diff --git a/assets/avatar-Cxzsye4J.js b/assets/avatar-D9Pz4PuL.js similarity index 87% rename from assets/avatar-Cxzsye4J.js rename to assets/avatar-D9Pz4PuL.js index f397282e..63705ed7 100644 --- a/assets/avatar-Cxzsye4J.js +++ b/assets/avatar-D9Pz4PuL.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";const l={primary:"bg-primary-200 text-primary-500 ",success:"bg-success-200 text-success-600",neutral:"bg-neutral-200 text-neutral-800",warning:"bg-warning-100 text-warning-700",danger:"bg-danger-100 text-danger-600"},n=({color:e="primary",children:t,onClick:a})=>{const s=t.substring(0,2);return r.jsx("div",{className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full font-sans text-xs ${l[e]}`,onClick:a,onKeyDown:a,tabIndex:0,role:"button",children:r.jsx("span",{className:"uppercase",children:s})})};try{n.displayName="Avatar",n.__docgenInfo={description:"",displayName:"Avatar",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}},color:{defaultValue:{value:"primary"},description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"warning"'},{value:'"danger"'},{value:'"primary"'},{value:'"neutral"'}]}}}}}catch{}export{n as A}; +import{j as r}from"./jsx-runtime-C798UXYj.js";const l={primary:"bg-primary-200 text-primary-500 ",success:"bg-success-200 text-success-600",neutral:"bg-neutral-200 text-neutral-800",warning:"bg-warning-100 text-warning-700",danger:"bg-danger-100 text-danger-600"},n=({color:e="primary",children:t,onClick:a})=>{const s=t.substring(0,2);return r.jsx("div",{className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full font-sans text-xs ${l[e]}`,onClick:a,onKeyDown:a,tabIndex:0,role:"button",children:r.jsx("span",{className:"uppercase",children:s})})};try{n.displayName="Avatar",n.__docgenInfo={description:"",displayName:"Avatar",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}},color:{defaultValue:{value:"primary"},description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"success"'},{value:'"neutral"'},{value:'"warning"'},{value:'"danger"'}]}}}}}catch{}export{n as A}; diff --git a/assets/avatar.stories-HUeKQiUe.js b/assets/avatar.stories-fIH0Z5HF.js similarity index 95% rename from assets/avatar.stories-HUeKQiUe.js rename to assets/avatar.stories-fIH0Z5HF.js index 0fbc6844..18d3cfa8 100644 --- a/assets/avatar.stories-HUeKQiUe.js +++ b/assets/avatar.stories-fIH0Z5HF.js @@ -1,4 +1,4 @@ -import{j as s}from"./jsx-runtime-C798UXYj.js";import{A as m}from"./avatar-Cxzsye4J.js";import{g as f,h as d}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";const o=["primary","success","neutral","warning","danger"],A={title:"Avatar",component:m,parameters:f("Circular user icon. It displays first 2 characters from the passed children text "),args:{children:"Name Lastname",color:o[0]},argTypes:{color:{options:o},onClick:d}},r={},e={argTypes:{color:d},render:({children:g,...u})=>s.jsx("div",{className:"flex flex-col gap-4",children:o.map(a=>s.jsx(m,{...u,color:a,children:g},a))})};var t,c,n;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:"{}",...(n=(c=r.parameters)==null?void 0:c.docs)==null?void 0:n.source}}};var l,i,p;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`{ +import{j as s}from"./jsx-runtime-C798UXYj.js";import{A as m}from"./avatar-D9Pz4PuL.js";import{g as f,h as d}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";const o=["primary","success","neutral","warning","danger"],A={title:"Avatar",component:m,parameters:f("Circular user icon. It displays first 2 characters from the passed children text "),args:{children:"Name Lastname",color:o[0]},argTypes:{color:{options:o},onClick:d}},r={},e={argTypes:{color:d},render:({children:g,...u})=>s.jsx("div",{className:"flex flex-col gap-4",children:o.map(a=>s.jsx(m,{...u,color:a,children:g},a))})};var t,c,n;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:"{}",...(n=(c=r.parameters)==null?void 0:c.docs)==null?void 0:n.source}}};var l,i,p;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`{ argTypes: { color: hiddenArgControl }, diff --git a/assets/badge-BIezdMmM.js b/assets/badge-Da1HxQE-.js similarity index 91% rename from assets/badge-BIezdMmM.js rename to assets/badge-Da1HxQE-.js index 1ec9c6ee..95ea3726 100644 --- a/assets/badge-BIezdMmM.js +++ b/assets/badge-Da1HxQE-.js @@ -1 +1 @@ -import{j as u}from"./jsx-runtime-C798UXYj.js";import{c as i}from"./class-names-DnY5YZNL.js";const o={primary:"bg-primary-100 text-primary-500",violet:"bg-violet-100 text-violet-800",green:"bg-success-100 text-success-600",neutral:"bg-neutral-200 text-neutral-800",yellow:"bg-warning-100 text-warning-600",teal:"bg-teal-100 text-teal-800",orange:"bg-orange-100 text-orange-800",pink:"bg-pink-300 text-pink-800",red:"bg-danger-100 text-danger-600",purple:"bg-purple-100 text-purple-800"},p={rounded:"rounded-full",default:"rounded"},t=({type:a="primary",shape:r="default",children:n,onClick:e})=>{const l=e?"cursor-pointer":"pointer-events-none";return u.jsx("div",{tabIndex:e?0:void 0,role:"button","aria-label":"Badge",className:i("inline-flex h-4 items-center px-2 text-xs font-semibold uppercase tracking-wide",o[a],p[r],l),onClick:e,onKeyDown:e,children:n})};try{t.displayName="Badge",t.__docgenInfo={description:"",displayName:"Badge",props:{type:{defaultValue:{value:"primary"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"violet"'},{value:'"green"'},{value:'"neutral"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}},shape:{defaultValue:{value:"default"},description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"rounded"'},{value:'"default"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}export{t as B}; +import{j as u}from"./jsx-runtime-C798UXYj.js";import{c as i}from"./class-names-DnY5YZNL.js";const o={primary:"bg-primary-100 text-primary-500",violet:"bg-violet-100 text-violet-800",green:"bg-success-100 text-success-600",neutral:"bg-neutral-200 text-neutral-800",yellow:"bg-warning-100 text-warning-600",teal:"bg-teal-100 text-teal-800",orange:"bg-orange-100 text-orange-800",pink:"bg-pink-300 text-pink-800",red:"bg-danger-100 text-danger-600",purple:"bg-purple-100 text-purple-800"},p={rounded:"rounded-full",default:"rounded"},t=({type:a="primary",shape:r="default",children:n,onClick:e})=>{const l=e?"cursor-pointer":"pointer-events-none";return u.jsx("div",{tabIndex:e?0:void 0,role:"button","aria-label":"Badge",className:i("inline-flex h-4 items-center px-2 text-xs font-semibold uppercase tracking-wide",o[a],p[r],l),onClick:e,onKeyDown:e,children:n})};try{t.displayName="Badge",t.__docgenInfo={description:"",displayName:"Badge",props:{type:{defaultValue:{value:"primary"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"neutral"'},{value:'"violet"'},{value:'"green"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}},shape:{defaultValue:{value:"default"},description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"rounded"'},{value:'"default"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}export{t as B}; diff --git a/assets/badge.stories-DloSsjdd.js b/assets/badge.stories-gP-6Aq3K.js similarity index 96% rename from assets/badge.stories-DloSsjdd.js rename to assets/badge.stories-gP-6Aq3K.js index a3a43dcd..9d7e814d 100644 --- a/assets/badge.stories-DloSsjdd.js +++ b/assets/badge.stories-gP-6Aq3K.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{B as g}from"./badge-BIezdMmM.js";import{h as n}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const y=["primary","violet","green","neutral","yellow","teal","orange","pink","red","purple"],u=["default","rounded"],B={title:"Badge",component:g,args:{children:"Badge Label"},argTypes:{onClick:n}},a={},s={args:{onClick:void 0},argTypes:{type:n,shape:n},render:({children:m,...h})=>r.jsx("div",{className:"container grid grid-cols-2 gap-4",children:u.map(e=>r.jsxs("div",{className:"grid gap-4",children:[r.jsx("header",{children:e}),y.map(o=>r.jsx(g,{...h,shape:e,type:o,children:m},e+o))]},e))})};var d,p,t;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(t=(p=a.parameters)==null?void 0:p.docs)==null?void 0:t.source}}};var i,l,c;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{j as r}from"./jsx-runtime-C798UXYj.js";import{B as g}from"./badge-Da1HxQE-.js";import{h as n}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const y=["primary","violet","green","neutral","yellow","teal","orange","pink","red","purple"],u=["default","rounded"],B={title:"Badge",component:g,args:{children:"Badge Label"},argTypes:{onClick:n}},a={},s={args:{onClick:void 0},argTypes:{type:n,shape:n},render:({children:m,...h})=>r.jsx("div",{className:"container grid grid-cols-2 gap-4",children:u.map(e=>r.jsxs("div",{className:"grid gap-4",children:[r.jsx("header",{children:e}),y.map(o=>r.jsx(g,{...h,shape:e,type:o,children:m},e+o))]},e))})};var d,p,t;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(t=(p=a.parameters)==null?void 0:p.docs)==null?void 0:t.source}}};var i,l,c;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ args: { onClick: undefined }, diff --git a/assets/button-CNKqPViR.js b/assets/button-C58NXHn_.js similarity index 95% rename from assets/button-CNKqPViR.js rename to assets/button-C58NXHn_.js index 9bfc222c..f1fab1e0 100644 --- a/assets/button-CNKqPViR.js +++ b/assets/button-C58NXHn_.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as g}from"./class-names-DnY5YZNL.js";import{S as c}from"./spinner-CrXB3JgE.js";const m={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"text-neutral-700 bg-neutral-0 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-800 active:bg-neutral-100 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:border-neutral-300 disabled:bg-neutral-0 fill-neutral-0",minimal:"text-neutral-700 hover:bg-neutral-100 hover:text-neutral-800 active:bg-neutral-200 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:bg-neutral-0 fill-neutral-0 underline",danger:"text-neutral-0 bg-danger-500 hover:bg-danger-500 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-400 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600 disabled:fill-danger-100"},l={primary:"text-neutral-0",secondary:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",minimal:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",danger:"","danger-secondary":""},i=({variant:e="primary",className:o,children:u,loading:a,LeftIcon:n,RightIcon:t,...d})=>{const s=g("group flex h-8 items-center gap-2 whitespace-nowrap rounded px-4 text-xs font-semibold focus:outline-none disabled:cursor-not-allowed",m[e],o);return r.jsxs("button",{className:s,...d,children:[a?r.jsx(c,{size:"small"}):null,n&&!a?r.jsx(n,{className:`${l[e]} h-3 w-3`}):null,u,t?r.jsx(t,{className:`${l[e]} h-3 w-3`}):null]})};try{i.displayName="Button",i.__docgenInfo={description:"",displayName:"Button",props:{variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},RightIcon:{defaultValue:null,description:"",name:"RightIcon",required:!1,type:{name:"ElementType"}}}}}catch{}export{i as B}; +import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as g}from"./class-names-DnY5YZNL.js";import{S as c}from"./spinner-CrXB3JgE.js";const m={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"text-neutral-700 bg-neutral-0 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-800 active:bg-neutral-100 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:border-neutral-300 disabled:bg-neutral-0 fill-neutral-0",minimal:"text-neutral-700 hover:bg-neutral-100 hover:text-neutral-800 active:bg-neutral-200 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:bg-neutral-0 fill-neutral-0 underline",danger:"text-neutral-0 bg-danger-500 hover:bg-danger-500 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-400 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600 disabled:fill-danger-100"},l={primary:"text-neutral-0",secondary:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",minimal:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",danger:"","danger-secondary":""},i=({variant:e="primary",className:o,children:u,loading:a,LeftIcon:n,RightIcon:t,...d})=>{const s=g("group flex h-8 items-center gap-2 whitespace-nowrap rounded px-4 text-xs font-semibold focus:outline-none disabled:cursor-not-allowed",m[e],o);return r.jsxs("button",{className:s,...d,children:[a?r.jsx(c,{size:"small"}):null,n&&!a?r.jsx(n,{className:`${l[e]} h-3 w-3`}):null,u,t?r.jsx(t,{className:`${l[e]} h-3 w-3`}):null]})};try{i.displayName="Button",i.__docgenInfo={description:"",displayName:"Button",props:{variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"danger"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},RightIcon:{defaultValue:null,description:"",name:"RightIcon",required:!1,type:{name:"ElementType"}}}}}catch{}export{i as B}; diff --git a/assets/button.stories-D9pdHdIx.js b/assets/button.stories-DBEWuQ19.js similarity index 97% rename from assets/button.stories-D9pdHdIx.js rename to assets/button.stories-DBEWuQ19.js index cb5147d3..5f472b6c 100644 --- a/assets/button.stories-D9pdHdIx.js +++ b/assets/button.stories-DBEWuQ19.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-C798UXYj.js";import{B}from"./button-CNKqPViR.js";import{S as j,a as R,b as D}from"./zoom-to-fit-icon-DdsCB6de.js";import{h as k}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./spinner-CrXB3JgE.js";const A=["primary","secondary","minimal","danger","danger-secondary"],s={undefined:void 0,ChatIcon:j,DiagramTreeIcon:R,LockIcon:D},i={description:"Icon component",options:Object.keys(s),mapping:s},z={title:"Button",component:B,args:{children:"Badge Label",LeftIcon:void 0,RightIcon:void 0,loading:!1},argTypes:{onClick:k,LeftIcon:i,RightIcon:i}},r={},e={args:{LeftIcon:s.ChatIcon,RightIcon:s.LockIcon}},o={args:{loading:!0}},a={args:{disabled:!0}},n={argTypes:{type:k},render:({children:C,...T})=>c.jsx("div",{className:"flex flex-col gap-4",children:A.map(t=>c.jsx(B,{...T,type:"button",variant:t,children:C},t))})};var d,p,m;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var g,l,u;e.parameters={...e.parameters,docs:{...(g=e.parameters)==null?void 0:g.docs,source:{originalSource:`{ +import{j as c}from"./jsx-runtime-C798UXYj.js";import{B}from"./button-C58NXHn_.js";import{S as j,a as R,b as D}from"./zoom-to-fit-icon-DdsCB6de.js";import{h as k}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./spinner-CrXB3JgE.js";const A=["primary","secondary","minimal","danger","danger-secondary"],s={undefined:void 0,ChatIcon:j,DiagramTreeIcon:R,LockIcon:D},i={description:"Icon component",options:Object.keys(s),mapping:s},z={title:"Button",component:B,args:{children:"Badge Label",LeftIcon:void 0,RightIcon:void 0,loading:!1},argTypes:{onClick:k,LeftIcon:i,RightIcon:i}},r={},e={args:{LeftIcon:s.ChatIcon,RightIcon:s.LockIcon}},o={args:{loading:!0}},a={args:{disabled:!0}},n={argTypes:{type:k},render:({children:C,...T})=>c.jsx("div",{className:"flex flex-col gap-4",children:A.map(t=>c.jsx(B,{...T,type:"button",variant:t,children:C},t))})};var d,p,m;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var g,l,u;e.parameters={...e.parameters,docs:{...(g=e.parameters)==null?void 0:g.docs,source:{originalSource:`{ args: { LeftIcon: icons.ChatIcon, RightIcon: icons.LockIcon diff --git a/assets/description-D9Ee5mtv.js b/assets/description-CaDbXm72.js similarity index 72% rename from assets/description-D9Ee5mtv.js rename to assets/description-CaDbXm72.js index b74221c5..a9a5201d 100644 --- a/assets/description-D9Ee5mtv.js +++ b/assets/description-CaDbXm72.js @@ -1 +1 @@ -import{r as o,R as p}from"./index-0d5eMwbi.js";import{L as x,o as C,y as g,n as h,D as E}from"./use-sync-refs-DqQDZvJ6.js";let d=o.createContext(void 0);function D(){return o.useContext(d)}function M({value:r,children:e}){return p.createElement(d.Provider,{value:r},e)}let c=o.createContext(null);c.displayName="DescriptionContext";function m(){let r=o.useContext(c);if(r===null){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,m),e}return r}function T(){var r,e;return(e=(r=o.useContext(c))==null?void 0:r.value)!=null?e:void 0}function j(){let[r,e]=o.useState([]);return[r.length>0?r.join(" "):void 0,o.useMemo(()=>function(t){let s=C(u=>(e(n=>[...n,u]),()=>e(n=>{let i=n.slice(),a=i.indexOf(u);return a!==-1&&i.splice(a,1),i}))),l=o.useMemo(()=>({register:s,slot:t.slot,name:t.name,props:t.props,value:t.value}),[s,t.slot,t.name,t.props,t.value]);return p.createElement(c.Provider,{value:l},t.children)},[e])]}let P="p";function S(r,e){let t=o.useId(),s=D(),{id:l=`headlessui-description-${t}`,...u}=r,n=m(),i=g(e);h(()=>n.register(l),[l,n.register]);let a=s||!1,v=o.useMemo(()=>({...n.slot,disabled:a}),[n.slot,a]),f={ref:i,...n.props,id:l};return E()({ourProps:f,theirProps:u,slot:v,defaultTag:P,name:n.name||"Description"})}let $=x(S),k=Object.assign($,{});export{k as H,T as U,D as a,M as l,j as w}; +import{r as o,R as p}from"./index-0d5eMwbi.js";import{K as x,o as C,y as g,n as h,L as E}from"./use-sync-refs-DhZgiOVe.js";let d=o.createContext(void 0);function D(){return o.useContext(d)}function T({value:r,children:e}){return p.createElement(d.Provider,{value:r},e)}let c=o.createContext(null);c.displayName="DescriptionContext";function m(){let r=o.useContext(c);if(r===null){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,m),e}return r}function $(){var r,e;return(e=(r=o.useContext(c))==null?void 0:r.value)!=null?e:void 0}function j(){let[r,e]=o.useState([]);return[r.length>0?r.join(" "):void 0,o.useMemo(()=>function(t){let s=C(u=>(e(n=>[...n,u]),()=>e(n=>{let i=n.slice(),a=i.indexOf(u);return a!==-1&&i.splice(a,1),i}))),l=o.useMemo(()=>({register:s,slot:t.slot,name:t.name,props:t.props,value:t.value}),[s,t.slot,t.name,t.props,t.value]);return p.createElement(c.Provider,{value:l},t.children)},[e])]}let P="p";function S(r,e){let t=o.useId(),s=D(),{id:l=`headlessui-description-${t}`,...u}=r,n=m(),i=g(e);h(()=>n.register(l),[l,n.register]);let a=s||!1,v=o.useMemo(()=>({...n.slot,disabled:a}),[n.slot,a]),f={ref:i,...n.props,id:l};return E()({ourProps:f,theirProps:u,slot:v,defaultTag:P,name:n.name||"Description"})}let b=x(S),k=Object.assign(b,{});export{k as H,$ as U,D as a,T as l,j as w}; diff --git a/assets/dialog-CQKMlc6b.js b/assets/dialog-CQKMlc6b.js deleted file mode 100644 index 408c9cef..00000000 --- a/assets/dialog-CQKMlc6b.js +++ /dev/null @@ -1 +0,0 @@ -import{r as u,R as c}from"./index-0d5eMwbi.js";import{o as Fe}from"./keyboard-C2Ifhsxt.js";import{E as te}from"./use-event-listener-CochUv0b.js";import{x as j,n as ne,c as he,t as $e,R as be,f as Te,m as ye,l as Z,r as De,X as ke}from"./portal-CLj4HHuk.js";import{n as Re,L as I,y as x,o as k,u as Y,p as Pe,D as M,c as re,M as _}from"./use-sync-refs-DqQDZvJ6.js";import{y as Ie}from"./use-inert-others-CzqV763I.js";import{u as Ce,a as L,b as Se,R as Me,O as K}from"./use-tab-direction-BMI6OSML.js";import{l as oe}from"./use-server-handoff-complete-JgOu4JLg.js";import{C as Le}from"./close-provider-CZp7Lqob.js";import{u as ae,i as O,s as Oe}from"./open-closed-DC3t9YEZ.js";import{H as xe,w as He}from"./description-D9Ee5mtv.js";import{f as le}from"./use-is-mounted-DT-lZL-u.js";import{m as U,r as N}from"./active-element-history-DI7yoVCB.js";import{f as Q,s as X}from"./hidden-BrNieFV6.js";import{P as S,F as $,I as F,T as J}from"./focus-management-DaVlPEX1.js";import{z as Ae,F as ue}from"./transition-CZnz1fcq.js";function Be(e,t=typeof document<"u"?document.defaultView:null,n){let r=j(e,"escape");te(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Fe.Escape&&n(o))})}function Ne(){var e;let[t]=u.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=u.useState((e=t==null?void 0:t.matches)!=null?e:!1);return Re(()=>{if(!t)return;function o(l){r(l.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function ie(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Ye="div";var D=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(D||{});function je(e,t){let n=u.useRef(null),r=x(n,t),{initialFocus:o,initialFocusFallback:l,containers:s,features:a=15,...d}=e;oe()||(a=0);let i=ne(n);qe(a,{ownerDocument:i});let f=Ge(a,{ownerDocument:i,container:n,initialFocus:o,initialFocusFallback:l});We(a,{ownerDocument:i,container:n,containers:s,previousActiveElement:f});let R=Ce(),b=k(m=>{let h=n.current;h&&(v=>v())(()=>{Y(R.current,{[L.Forwards]:()=>{S(h,$.First,{skipElements:[m.relatedTarget,l]})},[L.Backwards]:()=>{S(h,$.Last,{skipElements:[m.relatedTarget,l]})}})})}),E=j(!!(a&2),"focus-trap#tab-lock"),g=Pe(),T=u.useRef(!1),y={ref:r,onKeyDown(m){m.key=="Tab"&&(T.current=!0,g.requestAnimationFrame(()=>{T.current=!1}))},onBlur(m){if(!(a&4))return;let h=ie(s);n.current instanceof HTMLElement&&h.add(n.current);let v=m.relatedTarget;v instanceof HTMLElement&&v.dataset.headlessuiFocusGuard!=="true"&&(se(h,v)||(T.current?S(n.current,Y(R.current,{[L.Forwards]:()=>$.Next,[L.Backwards]:()=>$.Previous})|$.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&F(m.target)))}},w=M();return c.createElement(c.Fragment,null,E&&c.createElement(Q,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:b,features:X.Focusable}),w({ourProps:y,theirProps:d,defaultTag:Ye,name:"FocusTrap"}),E&&c.createElement(Q,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:b,features:X.Focusable}))}let Ue=I(je),Ve=Object.assign(Ue,{features:D});function ze(e=!0){let t=u.useRef(N.slice());return U(([n],[r])=>{r===!0&&n===!1&&re(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=N.slice())},[e,N,t]),k(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function qe(e,{ownerDocument:t}){let n=!!(e&8),r=ze(n);U(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&F(r())},[n]),he(()=>{n&&F(r())})}function Ge(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let l=u.useRef(null),s=j(!!(e&1),"focus-trap#initial-focus"),a=le();return U(()=>{if(e===0)return;if(!s){o!=null&&o.current&&F(o.current);return}let d=n.current;d&&re(()=>{if(!a.current)return;let i=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===i){l.current=i;return}}else if(d.contains(i)){l.current=i;return}if(r!=null&&r.current)F(r.current);else{if(e&16){if(S(d,$.First|$.AutoFocus)!==J.Error)return}else if(S(d,$.First)!==J.Error)return;if(o!=null&&o.current&&(F(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the ")}l.current=t==null?void 0:t.activeElement})},[o,s,e]),l}function We(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let l=le(),s=!!(e&4);te(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!l.current)return;let d=ie(r);n.current instanceof HTMLElement&&d.add(n.current);let i=o.current;if(!i)return;let f=a.target;f&&f instanceof HTMLElement?se(d,f)?(o.current=f,F(f)):(a.preventDefault(),a.stopPropagation(),F(i)):F(o.current)},!0)}function se(e,t){for(let n of e)if(n.contains(t))return!0;return!1}var Ze=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ze||{}),_e=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(_e||{});let Ke={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},V=u.createContext(null);V.displayName="DialogContext";function H(e){let t=u.useContext(V);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,H),n}return t}function Qe(e,t){return Y(t.type,Ke,e,t)}let ee=I(function(e,t){let n=u.useId(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:l,initialFocus:s,role:a="dialog",autoFocus:d=!0,__demoMode:i=!1,unmount:f=!1,...R}=e,b=u.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(b.current||(b.current=!0,console.warn(`Invalid role [${a}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=ae();o===void 0&&E!==null&&(o=(E&O.Open)===O.Open);let g=u.useRef(null),T=x(g,t),y=ne(g),w=o?0:1,[m,h]=u.useReducer(Qe,{titleId:null,descriptionId:null,panelRef:u.createRef()}),v=k(()=>l(!1)),z=k(p=>h({type:0,id:p})),P=oe()?w===0:!1,[ce,de]=$e(),fe={get current(){var p;return(p=m.panelRef.current)!=null?p:g.current}},A=Se(),{resolveContainers:B}=Me({mainTreeNode:A,portals:ce,defaultContainers:[fe]}),q=E!==null?(E&O.Closing)===O.Closing:!1;Ie(i||q?!1:P,{allowed:k(()=>{var p,W;return[(W=(p=g.current)==null?void 0:p.closest("[data-headlessui-portal]"))!=null?W:null]}),disallowed:k(()=>{var p;return[(p=A==null?void 0:A.closest("body > *:not(#headlessui-portal-root)"))!=null?p:null]})}),be(P,B,p=>{p.preventDefault(),v()}),Be(P,y==null?void 0:y.defaultView,p=>{p.preventDefault(),p.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),v()}),Te(i||q?!1:P,y,B),ye(P,g,v);let[pe,me]=He(),ve=u.useMemo(()=>[{dialogState:w,close:v,setTitleId:z,unmount:f},m],[w,m,v,z,f]),G=u.useMemo(()=>({open:w===0}),[w]),ge={ref:T,id:r,role:a,tabIndex:-1,"aria-modal":i?void 0:w===0?!0:void 0,"aria-labelledby":m.titleId,"aria-describedby":pe,unmount:f},Ee=!Ne(),C=D.None;P&&!i&&(C|=D.RestoreFocus,C|=D.TabLock,d&&(C|=D.AutoFocus),Ee&&(C|=D.InitialFocus));let we=M();return c.createElement(Oe,null,c.createElement(Z,{force:!0},c.createElement(De,null,c.createElement(V.Provider,{value:ve},c.createElement(ke,{target:g},c.createElement(Z,{force:!1},c.createElement(me,{slot:G},c.createElement(de,null,c.createElement(Ve,{initialFocus:s,initialFocusFallback:g,containers:B,features:C},c.createElement(Le,{value:v},we({ourProps:ge,theirProps:R,slot:G,defaultTag:Xe,features:Je,visible:w===0,name:"Dialog"})))))))))))}),Xe="div",Je=_.RenderStrategy|_.Static;function et(e,t){let{transition:n=!1,open:r,...o}=e,l=ae(),s=e.hasOwnProperty("open")||l!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!l&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?c.createElement(K,null,c.createElement(Ae,{show:r,transition:n,unmount:o.unmount},c.createElement(ee,{ref:t,...o}))):c.createElement(K,null,c.createElement(ee,{ref:t,open:r,...o}))}let tt="div";function nt(e,t){let n=u.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...l}=e,[{dialogState:s,unmount:a},d]=H("Dialog.Panel"),i=x(t,d.panelRef),f=u.useMemo(()=>({open:s===0}),[s]),R=k(y=>{y.stopPropagation()}),b={ref:i,id:r,onClick:R},E=o?ue:u.Fragment,g=o?{unmount:a}:{},T=M();return c.createElement(E,{...g},T({ourProps:b,theirProps:l,slot:f,defaultTag:tt,name:"Dialog.Panel"}))}let rt="div";function ot(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:l}]=H("Dialog.Backdrop"),s=u.useMemo(()=>({open:o===0}),[o]),a={ref:t,"aria-hidden":!0},d=n?ue:u.Fragment,i=n?{unmount:l}:{},f=M();return c.createElement(d,{...i},f({ourProps:a,theirProps:r,slot:s,defaultTag:rt,name:"Dialog.Backdrop"}))}let at="h2";function lt(e,t){let n=u.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:l,setTitleId:s}]=H("Dialog.Title"),a=x(t);u.useEffect(()=>(s(r),()=>s(null)),[r,s]);let d=u.useMemo(()=>({open:l===0}),[l]),i={ref:a,id:r};return M()({ourProps:i,theirProps:o,slot:d,defaultTag:at,name:"Dialog.Title"})}let ut=I(et),it=I(nt);I(ot);let st=I(lt),kt=Object.assign(ut,{Panel:it,Title:st,Description:xe});export{st as Y,it as j,kt as y}; diff --git a/assets/dialog-E4vf5oPi.js b/assets/dialog-E4vf5oPi.js new file mode 100644 index 00000000..0d066690 --- /dev/null +++ b/assets/dialog-E4vf5oPi.js @@ -0,0 +1 @@ +import{r as u,R as c}from"./index-0d5eMwbi.js";import{o as Fe}from"./keyboard-D0BTZntQ.js";import{E as te}from"./use-event-listener-EaZKqAMH.js";import{x as j,n as ne,c as he,t as $e,R as be,f as Te,m as ye,l as W,r as De,X as ke}from"./portal-BQQr4JoD.js";import{n as Re,K as I,y as x,o as k,u as Y,p as Pe,L,c as re,O as Z}from"./use-sync-refs-DhZgiOVe.js";import{y as Ie}from"./use-inert-others-D4nVU6H_.js";import{u as Ce,a as M,b as Se,R as Le,O as _}from"./use-tab-direction-CvE89ORz.js";import{l as oe}from"./use-server-handoff-complete-UouYGEcd.js";import{C as Me}from"./close-provider-CZp7Lqob.js";import{u as ae,i as O,s as Oe}from"./open-closed-FM4Rfwkx.js";import{H as xe,w as He}from"./description-CaDbXm72.js";import{f as le}from"./use-is-mounted-DN0doZLi.js";import{m as U,r as N}from"./active-element-history-DjNnwGR_.js";import{f as Q,s as X}from"./hidden-DfUyyskI.js";import{P as S,F as $,I as F,T as J}from"./focus-management-CKkqTXfi.js";import{z as Ae,F as ue}from"./transition-BD9NB0Zn.js";function Be(e,t=typeof document<"u"?document.defaultView:null,n){let r=j(e,"escape");te(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Fe.Escape&&n(o))})}function Ne(){var e;let[t]=u.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=u.useState((e=t==null?void 0:t.matches)!=null?e:!1);return Re(()=>{if(!t)return;function o(l){r(l.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function ie(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Ye="div";var D=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(D||{});function je(e,t){let n=u.useRef(null),r=x(n,t),{initialFocus:o,initialFocusFallback:l,containers:s,features:a=15,...d}=e;oe()||(a=0);let i=ne(n);qe(a,{ownerDocument:i});let f=Ge(a,{ownerDocument:i,container:n,initialFocus:o,initialFocusFallback:l});Ke(a,{ownerDocument:i,container:n,containers:s,previousActiveElement:f});let R=Ce(),b=k(m=>{let h=n.current;h&&(v=>v())(()=>{Y(R.current,{[M.Forwards]:()=>{S(h,$.First,{skipElements:[m.relatedTarget,l]})},[M.Backwards]:()=>{S(h,$.Last,{skipElements:[m.relatedTarget,l]})}})})}),E=j(!!(a&2),"focus-trap#tab-lock"),g=Pe(),T=u.useRef(!1),y={ref:r,onKeyDown(m){m.key=="Tab"&&(T.current=!0,g.requestAnimationFrame(()=>{T.current=!1}))},onBlur(m){if(!(a&4))return;let h=ie(s);n.current instanceof HTMLElement&&h.add(n.current);let v=m.relatedTarget;v instanceof HTMLElement&&v.dataset.headlessuiFocusGuard!=="true"&&(se(h,v)||(T.current?S(n.current,Y(R.current,{[M.Forwards]:()=>$.Next,[M.Backwards]:()=>$.Previous})|$.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&F(m.target)))}},w=L();return c.createElement(c.Fragment,null,E&&c.createElement(Q,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:b,features:X.Focusable}),w({ourProps:y,theirProps:d,defaultTag:Ye,name:"FocusTrap"}),E&&c.createElement(Q,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:b,features:X.Focusable}))}let Ue=I(je),Ve=Object.assign(Ue,{features:D});function ze(e=!0){let t=u.useRef(N.slice());return U(([n],[r])=>{r===!0&&n===!1&&re(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=N.slice())},[e,N,t]),k(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function qe(e,{ownerDocument:t}){let n=!!(e&8),r=ze(n);U(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&F(r())},[n]),he(()=>{n&&F(r())})}function Ge(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let l=u.useRef(null),s=j(!!(e&1),"focus-trap#initial-focus"),a=le();return U(()=>{if(e===0)return;if(!s){o!=null&&o.current&&F(o.current);return}let d=n.current;d&&re(()=>{if(!a.current)return;let i=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===i){l.current=i;return}}else if(d.contains(i)){l.current=i;return}if(r!=null&&r.current)F(r.current);else{if(e&16){if(S(d,$.First|$.AutoFocus)!==J.Error)return}else if(S(d,$.First)!==J.Error)return;if(o!=null&&o.current&&(F(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the ")}l.current=t==null?void 0:t.activeElement})},[o,s,e]),l}function Ke(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let l=le(),s=!!(e&4);te(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!l.current)return;let d=ie(r);n.current instanceof HTMLElement&&d.add(n.current);let i=o.current;if(!i)return;let f=a.target;f&&f instanceof HTMLElement?se(d,f)?(o.current=f,F(f)):(a.preventDefault(),a.stopPropagation(),F(i)):F(o.current)},!0)}function se(e,t){for(let n of e)if(n.contains(t))return!0;return!1}var We=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(We||{}),Ze=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Ze||{});let _e={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},V=u.createContext(null);V.displayName="DialogContext";function H(e){let t=u.useContext(V);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,H),n}return t}function Qe(e,t){return Y(t.type,_e,e,t)}let ee=I(function(e,t){let n=u.useId(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:l,initialFocus:s,role:a="dialog",autoFocus:d=!0,__demoMode:i=!1,unmount:f=!1,...R}=e,b=u.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(b.current||(b.current=!0,console.warn(`Invalid role [${a}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=ae();o===void 0&&E!==null&&(o=(E&O.Open)===O.Open);let g=u.useRef(null),T=x(g,t),y=ne(g),w=o?0:1,[m,h]=u.useReducer(Qe,{titleId:null,descriptionId:null,panelRef:u.createRef()}),v=k(()=>l(!1)),z=k(p=>h({type:0,id:p})),P=oe()?w===0:!1,[ce,de]=$e(),fe={get current(){var p;return(p=m.panelRef.current)!=null?p:g.current}},A=Se(),{resolveContainers:B}=Le({mainTreeNode:A,portals:ce,defaultContainers:[fe]}),q=E!==null?(E&O.Closing)===O.Closing:!1;Ie(i||q?!1:P,{allowed:k(()=>{var p,K;return[(K=(p=g.current)==null?void 0:p.closest("[data-headlessui-portal]"))!=null?K:null]}),disallowed:k(()=>{var p;return[(p=A==null?void 0:A.closest("body > *:not(#headlessui-portal-root)"))!=null?p:null]})}),be(P,B,p=>{p.preventDefault(),v()}),Be(P,y==null?void 0:y.defaultView,p=>{p.preventDefault(),p.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),v()}),Te(i||q?!1:P,y,B),ye(P,g,v);let[pe,me]=He(),ve=u.useMemo(()=>[{dialogState:w,close:v,setTitleId:z,unmount:f},m],[w,m,v,z,f]),G=u.useMemo(()=>({open:w===0}),[w]),ge={ref:T,id:r,role:a,tabIndex:-1,"aria-modal":i?void 0:w===0?!0:void 0,"aria-labelledby":m.titleId,"aria-describedby":pe,unmount:f},Ee=!Ne(),C=D.None;P&&!i&&(C|=D.RestoreFocus,C|=D.TabLock,d&&(C|=D.AutoFocus),Ee&&(C|=D.InitialFocus));let we=L();return c.createElement(Oe,null,c.createElement(W,{force:!0},c.createElement(De,null,c.createElement(V.Provider,{value:ve},c.createElement(ke,{target:g},c.createElement(W,{force:!1},c.createElement(me,{slot:G},c.createElement(de,null,c.createElement(Ve,{initialFocus:s,initialFocusFallback:g,containers:B,features:C},c.createElement(Me,{value:v},we({ourProps:ge,theirProps:R,slot:G,defaultTag:Xe,features:Je,visible:w===0,name:"Dialog"})))))))))))}),Xe="div",Je=Z.RenderStrategy|Z.Static;function et(e,t){let{transition:n=!1,open:r,...o}=e,l=ae(),s=e.hasOwnProperty("open")||l!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!l&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?c.createElement(_,null,c.createElement(Ae,{show:r,transition:n,unmount:o.unmount},c.createElement(ee,{ref:t,...o}))):c.createElement(_,null,c.createElement(ee,{ref:t,open:r,...o}))}let tt="div";function nt(e,t){let n=u.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...l}=e,[{dialogState:s,unmount:a},d]=H("Dialog.Panel"),i=x(t,d.panelRef),f=u.useMemo(()=>({open:s===0}),[s]),R=k(y=>{y.stopPropagation()}),b={ref:i,id:r,onClick:R},E=o?ue:u.Fragment,g=o?{unmount:a}:{},T=L();return c.createElement(E,{...g},T({ourProps:b,theirProps:l,slot:f,defaultTag:tt,name:"Dialog.Panel"}))}let rt="div";function ot(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:l}]=H("Dialog.Backdrop"),s=u.useMemo(()=>({open:o===0}),[o]),a={ref:t,"aria-hidden":!0},d=n?ue:u.Fragment,i=n?{unmount:l}:{},f=L();return c.createElement(d,{...i},f({ourProps:a,theirProps:r,slot:s,defaultTag:rt,name:"Dialog.Backdrop"}))}let at="h2";function lt(e,t){let n=u.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:l,setTitleId:s}]=H("Dialog.Title"),a=x(t);u.useEffect(()=>(s(r),()=>s(null)),[r,s]);let d=u.useMemo(()=>({open:l===0}),[l]),i={ref:a,id:r};return L()({ourProps:i,theirProps:o,slot:d,defaultTag:at,name:"Dialog.Title"})}let ut=I(et),it=I(nt);I(ot);let st=I(lt),kt=Object.assign(ut,{Panel:it,Title:st,Description:xe});export{st as Y,it as j,kt as y}; diff --git a/assets/dialog.stories-BX6_XaCw.js b/assets/dialog.stories--vBXMhbN.js similarity index 91% rename from assets/dialog.stories-BX6_XaCw.js rename to assets/dialog.stories--vBXMhbN.js index 988b7014..a5f55953 100644 --- a/assets/dialog.stories-BX6_XaCw.js +++ b/assets/dialog.stories--vBXMhbN.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as l}from"./index-0d5eMwbi.js";import{g as O,h as c}from"./storybook-utils-C5xEhci0.js";import{H as R}from"./description-D9Ee5mtv.js";import{y as M,j as q,Y as A}from"./dialog-CQKMlc6b.js";import{z as W,F as v}from"./transition-CZnz1fcq.js";import{j as G,k as E}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as f}from"./class-names-DnY5YZNL.js";import{I as z}from"./icon-button-k2wtPfcV.js";import{B as b}from"./button-CNKqPViR.js";import{F as a}from"./form-field-2xLK_lYH.js";import{T as x}from"./toggle-Bp5D17gs.js";import{A as P}from"./alert-WFlrTABt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./keyboard-C2Ifhsxt.js";import"./use-event-listener-CochUv0b.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./index-BoyHNU0R.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./use-inert-others-CzqV763I.js";import"./use-tab-direction-BMI6OSML.js";import"./hidden-BrNieFV6.js";import"./close-provider-CZp7Lqob.js";import"./open-closed-DC3t9YEZ.js";import"./use-is-mounted-DT-lZL-u.js";import"./active-element-history-DI7yoVCB.js";import"./spinner-CrXB3JgE.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./form-fields-B2NmhAAW.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./tag-C9CGXtt3.js";const d=({isShown:o,children:s,className:r,isCloseable:n=!0,footer:t,footerPosition:i="end",onClose:g,title:_,hasBackground:L=!0,position:w="center"})=>{const p=(H=!1)=>{n&&g&&g(H)};return e.jsx(W,{show:o,as:l.Fragment,children:e.jsxs(M,{as:"div",onClose:p,children:[L?e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e.jsx("div",{className:"fixed inset-0 z-40 bg-modal-background","aria-hidden":"true",onClick:()=>p(!0)})}):null,e.jsx("div",{className:f("fixed inset-0 z-50 flex overflow-y-auto p-8",w==="bottom-right"&&"items-end justify-end",w==="center"&&"items-center justify-center"),children:e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:e.jsxs(q,{className:f("flex w-[736px] transform flex-col overflow-y-auto rounded-md bg-neutral-0 shadow-lg transition-all",!t&&"pb-8",r),children:[e.jsxs("div",{className:"relative mx-10 mt-10",children:[e.jsx(A,{className:"mb-6 pr-12 text-lg font-semibold text-neutral-900",children:_}),n&&e.jsx(z,{className:"absolute right-0 top-0",Icon:G,variant:"minimal",onClick:()=>p(!1)}),e.jsx(R,{as:"div",children:s})]}),!!t&&e.jsx("div",{id:"dialog-footer",className:f("sticky bottom-0 left-0 flex flex-row gap-2 bg-neutral-0 px-10 pb-8 pt-8",i==="end"?"justify-end":"justify-start"),children:t})]})})})]})})};try{d.displayName="Dialog",d.__docgenInfo={description:"",displayName:"Dialog",props:{isShown:{defaultValue:null,description:"",name:"isShown",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"((submitted: boolean) => void)"}},isCloseable:{defaultValue:{value:"true"},description:"",name:"isCloseable",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},footer:{defaultValue:null,description:"",name:"footer",required:!1,type:{name:"ReactNode"}},footerPosition:{defaultValue:{value:"end"},description:"",name:"footerPosition",required:!1,type:{name:"enum",value:[{value:'"end"'},{value:'"start"'}]}},hasBackground:{defaultValue:{value:"true"},description:"",name:"hasBackground",required:!1,type:{name:"boolean"}},position:{defaultValue:{value:"center"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"bottom-right"'}]}}}}}catch{}const y=()=>{},Y=()=>e.jsx("span",{children:"test footer 🍭"}),B=({onClose:o})=>e.jsxs(e.Fragment,{children:[e.jsx(b,{variant:"secondary",onClick:()=>o==null?void 0:o(!1),children:"Cancel"}),e.jsx(b,{variant:"primary",LeftIcon:E,onClick:()=>o==null?void 0:o(!0),children:"Confirm"})]}),F={undefined:void 0,SpanFooter:e.jsx(Y,{}),buttons:e.jsx(B,{})},Q={options:Object.keys(F),mapping:F},Ve={title:"Dialog",component:d,parameters:{...O("Modal showing on top of the screen"),inlineStories:!1},args:{title:"Dialog Title",children:"Dialog Description",isShown:!1,footer:void 0},argTypes:{isShown:c,onClose:c,footer:Q},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,isShown:r,onClose:t,children:o})]})}},h={},m={argTypes:{footer:c},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,footer:e.jsx(B,{onClose:()=>n(!1)}),isShown:r,onClose:t,children:o})]})}},u={args:{children:e.jsxs(e.Fragment,{children:[e.jsx(x.Switch,{checked:!0,ariaLabel:"test",onChange:y}),e.jsx("p",{className:"py-10",children:"Paragraph Content"}),e.jsxs(a,{children:[e.jsxs(a.LabelGroup,{children:[e.jsx(a.Label,{htmlFor:"value",children:"Label"}),e.jsx(a.Description,{id:"value-description",children:"Description"})]}),e.jsxs(a.RadioInput,{id:"value",value:"value_1",onChange:y,children:[e.jsx(a.RadioInput.Option,{value:"value_1",children:"Value 1"}),e.jsx(a.RadioInput.Option,{value:"value_2",children:"Value 2"}),e.jsx(a.RadioInput.Option,{value:"value_3",disabled:!0,children:"Value 3"})]})]}),e.jsx("p",{className:"py-5",children:` +import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as l}from"./index-0d5eMwbi.js";import{g as O,h as c}from"./storybook-utils-C5xEhci0.js";import{H as R}from"./description-CaDbXm72.js";import{y as M,j as q,Y as A}from"./dialog-E4vf5oPi.js";import{z as W,F as v}from"./transition-BD9NB0Zn.js";import{j as G,k as E}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as f}from"./class-names-DnY5YZNL.js";import{I as z}from"./icon-button-BGxZn9fU.js";import{B as b}from"./button-C58NXHn_.js";import{F as a}from"./form-field-MCn42VmW.js";import{T as x}from"./toggle-BFn01nbt.js";import{A as P}from"./alert-sTfywL0-.js";import"./use-sync-refs-DhZgiOVe.js";import"./keyboard-D0BTZntQ.js";import"./use-event-listener-EaZKqAMH.js";import"./portal-BQQr4JoD.js";import"./focus-management-CKkqTXfi.js";import"./index-BoyHNU0R.js";import"./use-server-handoff-complete-UouYGEcd.js";import"./use-inert-others-D4nVU6H_.js";import"./use-tab-direction-CvE89ORz.js";import"./hidden-DfUyyskI.js";import"./close-provider-CZp7Lqob.js";import"./open-closed-FM4Rfwkx.js";import"./use-is-mounted-DN0doZLi.js";import"./active-element-history-DjNnwGR_.js";import"./spinner-CrXB3JgE.js";import"./use-resolve-button-type-HzzQKYtS.js";import"./form-fields-HWr4pxRQ.js";import"./label-fWs8-lsP.js";import"./bugs-DpEN4NTH.js";import"./use-text-value-D3ZnWpLS.js";import"./floating-Bhi-vCn9.js";import"./badge-Da1HxQE-.js";import"./index-BgfbgFhO.js";import"./tag-C9CGXtt3.js";const d=({isShown:o,children:s,className:r,isCloseable:n=!0,footer:t,footerPosition:i="end",onClose:g,title:_,hasBackground:L=!0,position:w="center"})=>{const p=(H=!1)=>{n&&g&&g(H)};return e.jsx(W,{show:o,as:l.Fragment,children:e.jsxs(M,{as:"div",onClose:p,children:[L?e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e.jsx("div",{className:"fixed inset-0 z-40 bg-modal-background","aria-hidden":"true",onClick:()=>p(!0)})}):null,e.jsx("div",{className:f("fixed inset-0 z-50 flex overflow-y-auto p-8",w==="bottom-right"&&"items-end justify-end",w==="center"&&"items-center justify-center"),children:e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:e.jsxs(q,{className:f("flex w-[736px] transform flex-col overflow-y-auto rounded-md bg-neutral-0 shadow-lg transition-all",!t&&"pb-8",r),children:[e.jsxs("div",{className:"relative mx-10 mt-10",children:[e.jsx(A,{className:"mb-6 pr-12 text-lg font-semibold text-neutral-900",children:_}),n&&e.jsx(z,{className:"absolute right-0 top-0",Icon:G,variant:"minimal",onClick:()=>p(!1)}),e.jsx(R,{as:"div",children:s})]}),!!t&&e.jsx("div",{id:"dialog-footer",className:f("sticky bottom-0 left-0 flex flex-row gap-2 bg-neutral-0 px-10 pb-8 pt-8",i==="end"?"justify-end":"justify-start"),children:t})]})})})]})})};try{d.displayName="Dialog",d.__docgenInfo={description:"",displayName:"Dialog",props:{isShown:{defaultValue:null,description:"",name:"isShown",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"((submitted: boolean) => void)"}},isCloseable:{defaultValue:{value:"true"},description:"",name:"isCloseable",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},footer:{defaultValue:null,description:"",name:"footer",required:!1,type:{name:"ReactNode"}},footerPosition:{defaultValue:{value:"end"},description:"",name:"footerPosition",required:!1,type:{name:"enum",value:[{value:'"end"'},{value:'"start"'}]}},hasBackground:{defaultValue:{value:"true"},description:"",name:"hasBackground",required:!1,type:{name:"boolean"}},position:{defaultValue:{value:"center"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"bottom-right"'}]}}}}}catch{}const y=()=>{},Y=()=>e.jsx("span",{children:"test footer 🍭"}),B=({onClose:o})=>e.jsxs(e.Fragment,{children:[e.jsx(b,{variant:"secondary",onClick:()=>o==null?void 0:o(!1),children:"Cancel"}),e.jsx(b,{variant:"primary",LeftIcon:E,onClick:()=>o==null?void 0:o(!0),children:"Confirm"})]}),F={undefined:void 0,SpanFooter:e.jsx(Y,{}),buttons:e.jsx(B,{})},Q={options:Object.keys(F),mapping:F},Ve={title:"Dialog",component:d,parameters:{...O("Modal showing on top of the screen"),inlineStories:!1},args:{title:"Dialog Title",children:"Dialog Description",isShown:!1,footer:void 0},argTypes:{isShown:c,onClose:c,footer:Q},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,isShown:r,onClose:t,children:o})]})}},h={},m={argTypes:{footer:c},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,footer:e.jsx(B,{onClose:()=>n(!1)}),isShown:r,onClose:t,children:o})]})}},u={args:{children:e.jsxs(e.Fragment,{children:[e.jsx(x.Switch,{checked:!0,ariaLabel:"test",onChange:y}),e.jsx("p",{className:"py-10",children:"Paragraph Content"}),e.jsxs(a,{children:[e.jsxs(a.LabelGroup,{children:[e.jsx(a.Label,{htmlFor:"value",children:"Label"}),e.jsx(a.Description,{id:"value-description",children:"Description"})]}),e.jsxs(a.RadioInput,{id:"value",value:"value_1",onChange:y,children:[e.jsx(a.RadioInput.Option,{value:"value_1",children:"Value 1"}),e.jsx(a.RadioInput.Option,{value:"value_2",children:"Value 2"}),e.jsx(a.RadioInput.Option,{value:"value_3",disabled:!0,children:"Value 3"})]})]}),e.jsx("p",{className:"py-5",children:` "Oh, hush, hush, my child!" said Van Helsing. "God does not purchase souls in this wise; and the Devil, though he may purchase, does not keep faith. But God is merciful and just, and knows your pain and your devotion to that dear Madam diff --git a/assets/disclosure-CNBAsrob.js b/assets/disclosure-CNBAsrob.js deleted file mode 100644 index a332a78f..00000000 --- a/assets/disclosure-CNBAsrob.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as J,a as W,w as X,e as _}from"./use-resolve-button-type-D_6M6Au0.js";import{R as S,r as l}from"./index-0d5eMwbi.js";import{M as j,L as T,y as x,T as q,o as I,D as h,u as k,W as K}from"./use-sync-refs-DqQDZvJ6.js";import{c as z,i as C,u as G,x as Q,R as Y,s as Z}from"./open-closed-DC3t9YEZ.js";import{C as ee}from"./close-provider-CZp7Lqob.js";import{r as te}from"./bugs-DpEN4NTH.js";import{u as le,o as P}from"./keyboard-C2Ifhsxt.js";var L;let re=(L=S.startTransition)!=null?L:function(e){e()};var ne=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ne||{}),oe=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))(oe||{});let se={0:e=>({...e,disclosureState:k(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},w=l.createContext(null);w.displayName="DisclosureContext";function B(e){let t=l.useContext(w);if(t===null){let i=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,B),i}return t}let M=l.createContext(null);M.displayName="DisclosureAPIContext";function A(e){let t=l.useContext(M);if(t===null){let i=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,A),i}return t}let R=l.createContext(null);R.displayName="DisclosurePanelContext";function ae(){return l.useContext(R)}function ue(e,t){return k(t.type,se,e,t)}let ie=l.Fragment;function ce(e,t){let{defaultOpen:i=!1,...c}=e,a=l.useRef(null),d=x(t,q(u=>{a.current=u},e.as===void 0||e.as===l.Fragment)),p=l.useReducer(ue,{disclosureState:i?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:r,buttonId:n},b]=p,o=I(u=>{b({type:1});let m=le(a);if(!m||!n)return;let E=u?u instanceof HTMLElement?u:u.current instanceof HTMLElement?u.current:m.getElementById(n):m.getElementById(n);E==null||E.focus()}),D=l.useMemo(()=>({close:o}),[o]),f=l.useMemo(()=>({open:r===0,close:o}),[r,o]),y={ref:d},$=h();return S.createElement(w.Provider,{value:p},S.createElement(M.Provider,{value:D},S.createElement(ee,{value:o},S.createElement(z,{value:k(r,{0:C.Open,1:C.Closed})},$({ourProps:y,theirProps:c,slot:f,defaultTag:ie,name:"Disclosure"})))))}let de="button";function pe(e,t){let i=l.useId(),{id:c=`headlessui-disclosure-button-${i}`,disabled:a=!1,autoFocus:d=!1,...p}=e,[r,n]=B("Disclosure.Button"),b=ae(),o=b===null?!1:b===r.panelId,D=l.useRef(null),f=x(D,t,I(s=>{if(!o)return n({type:4,element:s})}));l.useEffect(()=>{if(!o)return n({type:2,buttonId:c}),()=>{n({type:2,buttonId:null})}},[c,n,o]);let y=I(s=>{var v;if(o){if(r.disclosureState===1)return;switch(s.key){case P.Space:case P.Enter:s.preventDefault(),s.stopPropagation(),n({type:0}),(v=r.buttonElement)==null||v.focus();break}}else switch(s.key){case P.Space:case P.Enter:s.preventDefault(),s.stopPropagation(),n({type:0});break}}),$=I(s=>{switch(s.key){case P.Space:s.preventDefault();break}}),u=I(s=>{var v;te(s.currentTarget)||a||(o?(n({type:0}),(v=r.buttonElement)==null||v.focus()):n({type:0}))}),{isFocusVisible:m,focusProps:E}=J({autoFocus:d}),{isHovered:g,hoverProps:F}=W({isDisabled:a}),{pressed:O,pressProps:H}=X({disabled:a}),U=l.useMemo(()=>({open:r.disclosureState===0,hover:g,active:O,disabled:a,focus:m,autofocus:d}),[r,g,O,m,a,d]),N=_(e,r.buttonElement),V=o?K({ref:f,type:N,disabled:a||void 0,autoFocus:d,onKeyDown:y,onClick:u},E,F,H):K({ref:f,id:c,type:N,"aria-expanded":r.disclosureState===0,"aria-controls":r.panelElement?r.panelId:void 0,disabled:a||void 0,autoFocus:d,onKeyDown:y,onKeyUp:$,onClick:u},E,F,H);return h()({ourProps:V,theirProps:p,slot:U,defaultTag:de,name:"Disclosure.Button"})}let me="div",fe=j.RenderStrategy|j.Static;function Ee(e,t){let i=l.useId(),{id:c=`headlessui-disclosure-panel-${i}`,transition:a=!1,...d}=e,[p,r]=B("Disclosure.Panel"),{close:n}=A("Disclosure.Panel"),[b,o]=l.useState(null),D=x(t,I(g=>{re(()=>r({type:5,element:g}))}),o);l.useEffect(()=>(r({type:3,panelId:c}),()=>{r({type:3,panelId:null})}),[c,r]);let f=G(),[y,$]=Q(a,b,f!==null?(f&C.Open)===C.Open:p.disclosureState===0),u=l.useMemo(()=>({open:p.disclosureState===0,close:n}),[p.disclosureState,n]),m={ref:D,id:c,...Y($)},E=h();return S.createElement(Z,null,S.createElement(R.Provider,{value:p.panelId},E({ourProps:m,theirProps:d,slot:u,defaultTag:me,features:fe,visible:y,name:"Disclosure.Panel"})))}let Se=T(ce),be=T(pe),ye=T(Ee),Te=Object.assign(Se,{Button:be,Panel:ye});export{be as C,ye as R,Te as j}; diff --git a/assets/disclosure-D6QOZLzO.js b/assets/disclosure-D6QOZLzO.js new file mode 100644 index 00000000..7e34c689 --- /dev/null +++ b/assets/disclosure-D6QOZLzO.js @@ -0,0 +1 @@ +import{$ as V,a as J,w as X,e as q}from"./use-resolve-button-type-HzzQKYtS.js";import{R as S,r as l}from"./index-0d5eMwbi.js";import{O as N,K as T,y as x,T as z,o as I,L as h,u as k,_ as j}from"./use-sync-refs-DhZgiOVe.js";import{c as G,i as C,u as Q,x as W,R as Y,s as Z}from"./open-closed-FM4Rfwkx.js";import{C as ee}from"./close-provider-CZp7Lqob.js";import{r as te}from"./bugs-DpEN4NTH.js";import{u as le,o as $}from"./keyboard-D0BTZntQ.js";var L;let re=(L=S.startTransition)!=null?L:function(e){e()};var ne=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ne||{}),oe=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))(oe||{});let se={0:e=>({...e,disclosureState:k(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},w=l.createContext(null);w.displayName="DisclosureContext";function B(e){let t=l.useContext(w);if(t===null){let i=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,B),i}return t}let R=l.createContext(null);R.displayName="DisclosureAPIContext";function _(e){let t=l.useContext(R);if(t===null){let i=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,_),i}return t}let F=l.createContext(null);F.displayName="DisclosurePanelContext";function ae(){return l.useContext(F)}function ue(e,t){return k(t.type,se,e,t)}let ie=l.Fragment;function ce(e,t){let{defaultOpen:i=!1,...c}=e,a=l.useRef(null),d=x(t,z(u=>{a.current=u},e.as===void 0||e.as===l.Fragment)),p=l.useReducer(ue,{disclosureState:i?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:r,buttonId:n},b]=p,o=I(u=>{b({type:1});let m=le(a);if(!m||!n)return;let E=u?u instanceof HTMLElement?u:u.current instanceof HTMLElement?u.current:m.getElementById(n):m.getElementById(n);E==null||E.focus()}),v=l.useMemo(()=>({close:o}),[o]),f=l.useMemo(()=>({open:r===0,close:o}),[r,o]),y={ref:d},D=h();return S.createElement(w.Provider,{value:p},S.createElement(R.Provider,{value:v},S.createElement(ee,{value:o},S.createElement(G,{value:k(r,{0:C.Open,1:C.Closed})},D({ourProps:y,theirProps:c,slot:f,defaultTag:ie,name:"Disclosure"})))))}let de="button";function pe(e,t){let i=l.useId(),{id:c=`headlessui-disclosure-button-${i}`,disabled:a=!1,autoFocus:d=!1,...p}=e,[r,n]=B("Disclosure.Button"),b=ae(),o=b===null?!1:b===r.panelId,v=l.useRef(null),f=x(v,t,I(s=>{if(!o)return n({type:4,element:s})}));l.useEffect(()=>{if(!o)return n({type:2,buttonId:c}),()=>{n({type:2,buttonId:null})}},[c,n,o]);let y=I(s=>{var P;if(o){if(r.disclosureState===1)return;switch(s.key){case $.Space:case $.Enter:s.preventDefault(),s.stopPropagation(),n({type:0}),(P=r.buttonElement)==null||P.focus();break}}else switch(s.key){case $.Space:case $.Enter:s.preventDefault(),s.stopPropagation(),n({type:0});break}}),D=I(s=>{switch(s.key){case $.Space:s.preventDefault();break}}),u=I(s=>{var P;te(s.currentTarget)||a||(o?(n({type:0}),(P=r.buttonElement)==null||P.focus()):n({type:0}))}),{isFocusVisible:m,focusProps:E}=V({autoFocus:d}),{isHovered:g,hoverProps:O}=J({isDisabled:a}),{pressed:M,pressProps:H}=X({disabled:a}),A=l.useMemo(()=>({open:r.disclosureState===0,hover:g,active:M,disabled:a,focus:m,autofocus:d}),[r,g,M,m,a,d]),K=q(e,r.buttonElement),U=o?j({ref:f,type:K,disabled:a||void 0,autoFocus:d,onKeyDown:y,onClick:u},E,O,H):j({ref:f,id:c,type:K,"aria-expanded":r.disclosureState===0,"aria-controls":r.panelElement?r.panelId:void 0,disabled:a||void 0,autoFocus:d,onKeyDown:y,onKeyUp:D,onClick:u},E,O,H);return h()({ourProps:U,theirProps:p,slot:A,defaultTag:de,name:"Disclosure.Button"})}let me="div",fe=N.RenderStrategy|N.Static;function Ee(e,t){let i=l.useId(),{id:c=`headlessui-disclosure-panel-${i}`,transition:a=!1,...d}=e,[p,r]=B("Disclosure.Panel"),{close:n}=_("Disclosure.Panel"),[b,o]=l.useState(null),v=x(t,I(g=>{re(()=>r({type:5,element:g}))}),o);l.useEffect(()=>(r({type:3,panelId:c}),()=>{r({type:3,panelId:null})}),[c,r]);let f=Q(),[y,D]=W(a,b,f!==null?(f&C.Open)===C.Open:p.disclosureState===0),u=l.useMemo(()=>({open:p.disclosureState===0,close:n}),[p.disclosureState,n]),m={ref:v,id:c,...Y(D)},E=h();return S.createElement(Z,null,S.createElement(F.Provider,{value:p.panelId},E({ourProps:m,theirProps:d,slot:u,defaultTag:me,features:fe,visible:y,name:"Disclosure.Panel"})))}let Se=T(ce),be=T(pe),ye=T(Ee),Te=Object.assign(Se,{Button:be,Panel:ye});export{be as C,ye as R,Te as j}; diff --git a/assets/disclosure.stories-DwfzQRRi.js b/assets/disclosure.stories-WpDepkEn.js similarity index 95% rename from assets/disclosure.stories-DwfzQRRi.js rename to assets/disclosure.stories-WpDepkEn.js index 7237eee8..04e55a98 100644 --- a/assets/disclosure.stories-DwfzQRRi.js +++ b/assets/disclosure.stories-WpDepkEn.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{l as h}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as f}from"./class-names-DnY5YZNL.js";import{j as B,C as P}from"./disclosure-CNBAsrob.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./open-closed-DC3t9YEZ.js";import"./close-provider-CZp7Lqob.js";import"./bugs-DpEN4NTH.js";const C=({children:r,...n})=>e.jsx(B.Panel,{...n,children:r}),v=({children:r,...n})=>e.jsx(P,{className:"headline-300 flex w-full items-center justify-between border-b border-t border-b-neutral-300 border-t-transparent bg-neutral-50 py-3 pl-3 pr-5 text-left text-neutral-900 focus:outline focus:outline-2 focus:outline-offset-0 focus:outline-primary-200",...n,children:({open:j})=>e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r}),e.jsx(h,{className:f("h-3 w-3",j&&"rotate-180 transform")})]})}),s=({children:r,defaultOpen:n=!1})=>e.jsx(B,{defaultOpen:n,children:r});s.Button=v;s.Panel=C;try{s.displayName="Disclosure",s.__docgenInfo={description:"",displayName:"Disclosure",props:{defaultOpen:{defaultValue:{value:"false"},description:"",name:"defaultOpen",required:!1,type:{name:"boolean"}}}}}catch{}const q={title:"Disclosure",component:s,parameters:{options:{showPanel:!1}}},o={render:()=>e.jsx("div",{className:"w-96",children:e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]})})},t={render:()=>e.jsxs("div",{className:"w-96",children:[e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]})]})},l={render:()=>e.jsxs("div",{className:"w-96",children:[e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{defaultOpen:!0,children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]})]})};var c,u,i;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{l as h}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as f}from"./class-names-DnY5YZNL.js";import{j as B,C as P}from"./disclosure-D6QOZLzO.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-HzzQKYtS.js";import"./keyboard-D0BTZntQ.js";import"./use-sync-refs-DhZgiOVe.js";import"./open-closed-FM4Rfwkx.js";import"./close-provider-CZp7Lqob.js";import"./bugs-DpEN4NTH.js";const C=({children:r,...n})=>e.jsx(B.Panel,{...n,children:r}),v=({children:r,...n})=>e.jsx(P,{className:"headline-300 flex w-full items-center justify-between border-b border-t border-b-neutral-300 border-t-transparent bg-neutral-50 py-3 pl-3 pr-5 text-left text-neutral-900 focus:outline focus:outline-2 focus:outline-offset-0 focus:outline-primary-200",...n,children:({open:j})=>e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r}),e.jsx(h,{className:f("h-3 w-3",j&&"rotate-180 transform")})]})}),s=({children:r,defaultOpen:n=!1})=>e.jsx(B,{defaultOpen:n,children:r});s.Button=v;s.Panel=C;try{s.displayName="Disclosure",s.__docgenInfo={description:"",displayName:"Disclosure",props:{defaultOpen:{defaultValue:{value:"false"},description:"",name:"defaultOpen",required:!1,type:{name:"boolean"}}}}}catch{}const q={title:"Disclosure",component:s,parameters:{options:{showPanel:!1}}},o={render:()=>e.jsx("div",{className:"w-96",children:e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]})})},t={render:()=>e.jsxs("div",{className:"w-96",children:[e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]})]})},l={render:()=>e.jsxs("div",{className:"w-96",children:[e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{defaultOpen:!0,children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]}),e.jsxs(s,{children:[e.jsx(s.Button,{children:"Disclosure Button"}),e.jsx(s.Panel,{children:"Disclosure Content"})]})]})};var c,u,i;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`{ render: () =>
Disclosure Button diff --git a/assets/entry-preview-Dr1n3Wdx.js b/assets/entry-preview-CaGNt_mb.js similarity index 99% rename from assets/entry-preview-Dr1n3Wdx.js rename to assets/entry-preview-CaGNt_mb.js index 8a4e4fc7..dbfa8f1c 100644 --- a/assets/entry-preview-Dr1n3Wdx.js +++ b/assets/entry-preview-CaGNt_mb.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./react-18-BH3B7EqY.js","./index-0d5eMwbi.js","./index-BoyHNU0R.js"])))=>i.map(i=>d[i]); -import{_ as er}from"./iframe-9T-PF226.js";import{_ as tr}from"./chunk-H6MOWX77-DTQOW814.js";import{g as rr,r as j,R as ie}from"./index-0d5eMwbi.js";import{r as nr}from"./index-BoyHNU0R.js";import"../sb-preview/runtime.js";var Me={exports:{}};const sr="2.0.0",wt=256,ir=Number.MAX_SAFE_INTEGER||9007199254740991,ar=16,or=wt-6,lr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ge={MAX_LENGTH:wt,MAX_SAFE_COMPONENT_LENGTH:ar,MAX_SAFE_BUILD_LENGTH:or,MAX_SAFE_INTEGER:ir,RELEASE_TYPES:lr,SEMVER_SPEC_VERSION:sr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Oe={};const ur=typeof process=="object"&&Oe&&Oe.NODE_DEBUG&&/\bsemver\b/i.test(Oe.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Re=ur;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=ge,i=Re;t=e.exports={};const l=t.re=[],u=t.safeRe=[],a=t.src=[],o=t.t={};let h=0;const p="[a-zA-Z0-9-]",L=[["\\s",1],["\\d",s],[p,n]],m=V=>{for(const[b,Y]of L)V=V.split(`${b}*`).join(`${b}{0,${Y}}`).split(`${b}+`).join(`${b}{1,${Y}}`);return V},d=(V,b,Y)=>{const w=m(b),W=h++;i(V,W,b),o[V]=W,a[W]=b,l[W]=new RegExp(b,Y?"g":void 0),u[W]=new RegExp(w,Y?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${a[o.NUMERICIDENTIFIER]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${a[o.NUMERICIDENTIFIERLOOSE]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${a[o.PRERELEASEIDENTIFIER]}(?:\\.${a[o.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${a[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[o.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${a[o.BUILDIDENTIFIER]}(?:\\.${a[o.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${a[o.MAINVERSION]}${a[o.PRERELEASE]}?${a[o.BUILD]}?`),d("FULL",`^${a[o.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${a[o.MAINVERSIONLOOSE]}${a[o.PRERELEASELOOSE]}?${a[o.BUILD]}?`),d("LOOSE",`^${a[o.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${a[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${a[o.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:${a[o.PRERELEASE]})?${a[o.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:${a[o.PRERELEASELOOSE]})?${a[o.BUILD]}?)?)?`),d("XRANGE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",`${a[o.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",a[o.COERCEPLAIN]+`(?:${a[o.PRERELEASE]})?(?:${a[o.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",a[o.COERCE],!0),d("COERCERTLFULL",a[o.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${a[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${a[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${a[o.LONECARET]}${a[o.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${a[o.LONECARET]}${a[o.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${a[o.GTLT]}\\s*(${a[o.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]}|${a[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${a[o.XRANGEPLAIN]})\\s+-\\s+(${a[o.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${a[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[o.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Me,Me.exports);var le=Me.exports;const cr=Object.freeze({loose:!0}),hr=Object.freeze({}),fr=e=>e?typeof e!="object"?cr:e:hr;var Ve=fr;const et=/^[0-9]+$/,Ct=(e,t)=>{const r=et.test(e),n=et.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:eCt(t,e);var _t={compareIdentifiers:Ct,rcompareIdentifiers:pr};const he=Re,{MAX_LENGTH:tt,MAX_SAFE_INTEGER:fe}=ge,{safeRe:rt,t:nt}=le,Er=Ve,{compareIdentifiers:K}=_t;let mr=class G{constructor(t,r){if(r=Er(r),t instanceof G){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>tt)throw new TypeError(`version is longer than ${tt} characters`);he("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?rt[nt.LOOSE]:rt[nt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>fe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),K(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var C=mr;const st=C,dr=(e,t,r=!1)=>{if(e instanceof st)return e;try{return new st(e,t)}catch(n){if(!r)return null;throw n}};var J=dr;const vr=J,$r=(e,t)=>{const r=vr(e,t);return r?r.version:null};var gr=$r;const Rr=J,yr=(e,t)=>{const r=Rr(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Ir=yr;const it=C,Lr=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new it(e instanceof it?e.version:e,r).inc(t,n,s).version}catch{return null}};var Nr=Lr;const at=J,Sr=(e,t)=>{const r=at(e,null,!0),n=at(t,null,!0),s=r.compare(n);if(s===0)return null;const i=s>0,l=i?r:n,u=i?n:r,a=!!l.prerelease.length;if(!!u.prerelease.length&&!a)return!u.patch&&!u.minor?"major":l.patch?"patch":l.minor?"minor":"major";const h=a?"pre":"";return r.major!==n.major?h+"major":r.minor!==n.minor?h+"minor":r.patch!==n.patch?h+"patch":"prerelease"};var Tr=Sr;const Or=C,Ar=(e,t)=>new Or(e,t).major;var wr=Ar;const Cr=C,_r=(e,t)=>new Cr(e,t).minor;var Dr=_r;const Pr=C,br=(e,t)=>new Pr(e,t).patch;var xr=br;const Ur=J,Fr=(e,t)=>{const r=Ur(e,t);return r&&r.prerelease.length?r.prerelease:null};var Gr=Fr;const ot=C,jr=(e,t,r)=>new ot(e,r).compare(new ot(t,r));var U=jr;const Mr=U,Xr=(e,t,r)=>Mr(t,e,r);var Vr=Xr;const Yr=U,Wr=(e,t)=>Yr(e,t,!0);var Hr=Wr;const lt=C,kr=(e,t,r)=>{const n=new lt(e,r),s=new lt(t,r);return n.compare(s)||n.compareBuild(s)};var Ye=kr;const qr=Ye,Br=(e,t)=>e.sort((r,n)=>qr(r,n,t));var Kr=Br;const zr=Ye,Zr=(e,t)=>e.sort((r,n)=>zr(n,r,t));var Jr=Zr;const Qr=U,en=(e,t,r)=>Qr(e,t,r)>0;var ye=en;const tn=U,rn=(e,t,r)=>tn(e,t,r)<0;var We=rn;const nn=U,sn=(e,t,r)=>nn(e,t,r)===0;var Dt=sn;const an=U,on=(e,t,r)=>an(e,t,r)!==0;var Pt=on;const ln=U,un=(e,t,r)=>ln(e,t,r)>=0;var He=un;const cn=U,hn=(e,t,r)=>cn(e,t,r)<=0;var ke=hn;const fn=Dt,pn=Pt,En=ye,mn=He,dn=We,vn=ke,$n=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return fn(e,r,n);case"!=":return pn(e,r,n);case">":return En(e,r,n);case">=":return mn(e,r,n);case"<":return dn(e,r,n);case"<=":return vn(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var bt=$n;const gn=C,Rn=J,{safeRe:pe,t:Ee}=le,yn=(e,t)=>{if(e instanceof gn)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?pe[Ee.COERCEFULL]:pe[Ee.COERCE]);else{const a=t.includePrerelease?pe[Ee.COERCERTLFULL]:pe[Ee.COERCERTL];let o;for(;(o=a.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),a.lastIndex=o.index+o[1].length+o[2].length;a.lastIndex=-1}if(r===null)return null;const n=r[2],s=r[3]||"0",i=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",u=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Rn(`${n}.${s}.${i}${l}${u}`,t)};var In=yn,Ae,ut;function Ln(){return ut||(ut=1,Ae=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Ae}var Nn=I;I.Node=q;I.create=I;function I(e){var t=this;if(t instanceof I||(t=new I),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(s){t.push(s)});else if(arguments.length>0)for(var r=0,n=arguments.length;r1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)r=e(r,n.value,s),n=n.next;return r};I.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)r=e(r,n.value,s),n=n.prev;return r};I.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};I.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};I.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new I;if(tthis.length&&(t=this.length);for(var n=0,s=this.head;s!==null&&nthis.length&&(t=this.length);for(var n=this.length,s=this.tail;s!==null&&n>t;n--)s=s.prev;for(;s!==null&&n>e;n--,s=s.prev)r.push(s.value);return r};I.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;s!==null&&n1;class wn{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[H]=t.max||1/0;const r=t.length||we;if(this[z]=typeof r!="function"?we:r,this[ae]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[k]=t.maxAge||0,this[M]=t.dispose,this[ct]=t.noDisposeOnSet||!1,this[xt]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[H]=t||1/0,re(this)}get max(){return this[H]}set allowStale(t){this[ae]=!!t}get allowStale(){return this[ae]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[k]=t,re(this)}get maxAge(){return this[k]}set lengthCalculator(t){typeof t!="function"&&(t=we),t!==this[z]&&(this[z]=t,this[X]=0,this[A].forEach(r=>{r.length=this[z](r.value,r.key),this[X]+=r.length})),re(this)}get lengthCalculator(){return this[z]}get length(){return this[X]}get itemCount(){return this[A].length}rforEach(t,r){r=r||this;for(let n=this[A].tail;n!==null;){const s=n.prev;ht(this,t,n,r),n=s}}forEach(t,r){r=r||this;for(let n=this[A].head;n!==null;){const s=n.next;ht(this,t,n,r),n=s}}keys(){return this[A].toArray().map(t=>t.key)}values(){return this[A].toArray().map(t=>t.value)}reset(){this[M]&&this[A]&&this[A].length&&this[A].forEach(t=>this[M](t.key,t.value)),this[x]=new Map,this[A]=new An,this[X]=0}dump(){return this[A].map(t=>de(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[A]}set(t,r,n){if(n=n||this[k],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0,i=this[z](r,t);if(this[x].has(t)){if(i>this[H])return Z(this,this[x].get(t)),!1;const a=this[x].get(t).value;return this[M]&&(this[ct]||this[M](t,a.value)),a.now=s,a.maxAge=n,a.value=r,this[X]+=i-a.length,a.length=i,this.get(t),re(this),!0}const l=new Cn(t,r,i,s,n);return l.length>this[H]?(this[M]&&this[M](t,r),!1):(this[X]+=l.length,this[A].unshift(l),this[x].set(t,this[A].head),re(this),!0)}has(t){if(!this[x].has(t))return!1;const r=this[x].get(t).value;return!de(this,r)}get(t){return Ce(this,t,!0)}peek(t){return Ce(this,t,!1)}pop(){const t=this[A].tail;return t?(Z(this,t),t.value):null}del(t){Z(this,this[x].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const l=i-r;l>0&&this.set(s.k,s.v,l)}}}prune(){this[x].forEach((t,r)=>Ce(this,r,!1))}}const Ce=(e,t,r)=>{const n=e[x].get(t);if(n){const s=n.value;if(de(e,s)){if(Z(e,n),!e[ae])return}else r&&(e[xt]&&(n.value.now=Date.now()),e[A].unshiftNode(n));return s.value}},de=(e,t)=>{if(!t||!t.maxAge&&!e[k])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[k]&&r>e[k]},re=e=>{if(e[X]>e[H])for(let t=e[A].tail;e[X]>e[H]&&t!==null;){const r=t.prev;Z(e,t),t=r}},Z=(e,t)=>{if(t){const r=t.value;e[M]&&e[M](r.key,r.value),e[X]-=r.length,e[x].delete(r.key),e[A].removeNode(t)}};class Cn{constructor(t,r,n,s,i){this.key=t,this.value=r,this.length=n,this.now=s,this.maxAge=i||0}}const ht=(e,t,r,n)=>{let s=r.value;de(e,s)&&(Z(e,r),e[ae]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};var _n=wn,_e,ft;function F(){if(ft)return _e;ft=1;class e{constructor(c,g){if(g=n(g),c instanceof e)return c.loose===!!g.loose&&c.includePrerelease===!!g.includePrerelease?c:new e(c.raw,g);if(c instanceof s)return this.raw=c.value,this.set=[[c]],this.format(),this;if(this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease,this.raw=c.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(v=>this.parseRange(v.trim())).filter(v=>v.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const v=this.set[0];if(this.set=this.set.filter($=>!d($[0])),this.set.length===0)this.set=[v];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&V($[0])){this.set=[$];break}}}this.format()}format(){return this.range=this.set.map(c=>c.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(c){const v=((this.options.includePrerelease&&L)|(this.options.loose&&m))+":"+c,$=r.get(v);if($)return $;const E=this.options.loose,R=E?u[a.HYPHENRANGELOOSE]:u[a.HYPHENRANGE];c=c.replace(R,Jt(this.options.includePrerelease)),i("hyphen replace",c),c=c.replace(u[a.COMPARATORTRIM],o),i("comparator trim",c),c=c.replace(u[a.TILDETRIM],h),i("tilde trim",c),c=c.replace(u[a.CARETTRIM],p),i("caret trim",c);let N=c.split(" ").map(T=>Y(T,this.options)).join(" ").split(/\s+/).map(T=>Zt(T,this.options));E&&(N=N.filter(T=>(i("loose invalid filter",T,this.options),!!T.match(u[a.COMPARATORLOOSE])))),i("range list",N);const y=new Map,S=N.map(T=>new s(T,this.options));for(const T of S){if(d(T))return[T];y.set(T.value,T)}y.size>1&&y.has("")&&y.delete("");const D=[...y.values()];return r.set(v,D),D}intersects(c,g){if(!(c instanceof e))throw new TypeError("a Range is required");return this.set.some(v=>b(v,g)&&c.set.some($=>b($,g)&&v.every(E=>$.every(R=>E.intersects(R,g)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new l(c,this.options)}catch{return!1}for(let g=0;gf.value==="<0.0.0-0",V=f=>f.value==="",b=(f,c)=>{let g=!0;const v=f.slice();let $=v.pop();for(;g&&v.length;)g=v.every(E=>$.intersects(E,c)),$=v.pop();return g},Y=(f,c)=>(i("comp",f,c),f=kt(f,c),i("caret",f),f=W(f,c),i("tildes",f),f=Bt(f,c),i("xrange",f),f=zt(f,c),i("stars",f),f),w=f=>!f||f.toLowerCase()==="x"||f==="*",W=(f,c)=>f.trim().split(/\s+/).map(g=>Ht(g,c)).join(" "),Ht=(f,c)=>{const g=c.loose?u[a.TILDELOOSE]:u[a.TILDE];return f.replace(g,(v,$,E,R,N)=>{i("tilde",f,v,$,E,R,N);let y;return w($)?y="":w(E)?y=`>=${$}.0.0 <${+$+1}.0.0-0`:w(R)?y=`>=${$}.${E}.0 <${$}.${+E+1}.0-0`:N?(i("replaceTilde pr",N),y=`>=${$}.${E}.${R}-${N} <${$}.${+E+1}.0-0`):y=`>=${$}.${E}.${R} <${$}.${+E+1}.0-0`,i("tilde return",y),y})},kt=(f,c)=>f.trim().split(/\s+/).map(g=>qt(g,c)).join(" "),qt=(f,c)=>{i("caret",f,c);const g=c.loose?u[a.CARETLOOSE]:u[a.CARET],v=c.includePrerelease?"-0":"";return f.replace(g,($,E,R,N,y)=>{i("caret",f,$,E,R,N,y);let S;return w(E)?S="":w(R)?S=`>=${E}.0.0${v} <${+E+1}.0.0-0`:w(N)?E==="0"?S=`>=${E}.${R}.0${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.0${v} <${+E+1}.0.0-0`:y?(i("replaceCaret pr",y),E==="0"?R==="0"?S=`>=${E}.${R}.${N}-${y} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}-${y} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N}-${y} <${+E+1}.0.0-0`):(i("no pr"),E==="0"?R==="0"?S=`>=${E}.${R}.${N}${v} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N} <${+E+1}.0.0-0`),i("caret return",S),S})},Bt=(f,c)=>(i("replaceXRanges",f,c),f.split(/\s+/).map(g=>Kt(g,c)).join(" ")),Kt=(f,c)=>{f=f.trim();const g=c.loose?u[a.XRANGELOOSE]:u[a.XRANGE];return f.replace(g,(v,$,E,R,N,y)=>{i("xRange",f,v,$,E,R,N,y);const S=w(E),D=S||w(R),T=D||w(N),te=T;return $==="="&&te&&($=""),y=c.includePrerelease?"-0":"",S?$===">"||$==="<"?v="<0.0.0-0":v="*":$&&te?(D&&(R=0),N=0,$===">"?($=">=",D?(E=+E+1,R=0,N=0):(R=+R+1,N=0)):$==="<="&&($="<",D?E=+E+1:R=+R+1),$==="<"&&(y="-0"),v=`${$+E}.${R}.${N}${y}`):D?v=`>=${E}.0.0${y} <${+E+1}.0.0-0`:T&&(v=`>=${E}.${R}.0${y} <${E}.${+R+1}.0-0`),i("xRange return",v),v})},zt=(f,c)=>(i("replaceStars",f,c),f.trim().replace(u[a.STAR],"")),Zt=(f,c)=>(i("replaceGTE0",f,c),f.trim().replace(u[c.includePrerelease?a.GTE0PRE:a.GTE0],"")),Jt=f=>(c,g,v,$,E,R,N,y,S,D,T,te,Hi)=>(w(v)?g="":w($)?g=`>=${v}.0.0${f?"-0":""}`:w(E)?g=`>=${v}.${$}.0${f?"-0":""}`:R?g=`>=${g}`:g=`>=${g}${f?"-0":""}`,w(S)?y="":w(D)?y=`<${+S+1}.0.0-0`:w(T)?y=`<${S}.${+D+1}.0-0`:te?y=`<=${S}.${D}.${T}-${te}`:f?y=`<${S}.${D}.${+T+1}-0`:y=`<=${y}`,`${g} ${y}`.trim()),Qt=(f,c,g)=>{for(let v=0;v0){const $=f[v].semver;if($.major===c.major&&$.minor===c.minor&&$.patch===c.patch)return!0}return!1}return!0};return _e}var De,pt;function Ie(){if(pt)return De;pt=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(h,p){if(p=r(p),h instanceof t){if(h.loose===!!p.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),l("comparator",h,p),this.options=p,this.loose=!!p.loose,this.parse(h),this.semver===e?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(h){const p=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],L=h.match(p);if(!L)throw new TypeError(`Invalid comparator: ${h}`);this.operator=L[1]!==void 0?L[1]:"",this.operator==="="&&(this.operator=""),L[2]?this.semver=new u(L[2],this.options.loose):this.semver=e}toString(){return this.value}test(h){if(l("Comparator.test",h,this.options.loose),this.semver===e||h===e)return!0;if(typeof h=="string")try{h=new u(h,this.options)}catch{return!1}return i(h,this.operator,this.semver,this.options)}intersects(h,p){if(!(h instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(h.value,p).test(this.value):h.operator===""?h.value===""?!0:new a(this.value,p).test(h.semver):(p=r(p),p.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||i(this.semver,"<",h.semver,p)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||i(this.semver,">",h.semver,p)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}De=t;const r=Ve,{safeRe:n,t:s}=le,i=bt,l=Re,u=C,a=F();return De}const Dn=F(),Pn=(e,t,r)=>{try{t=new Dn(t,r)}catch{return!1}return t.test(e)};var Le=Pn;const bn=F(),xn=(e,t)=>new bn(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Un=xn;const Fn=C,Gn=F(),jn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Gn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===-1)&&(n=l,s=new Fn(n,r))}),n};var Mn=jn;const Xn=C,Vn=F(),Yn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Vn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===1)&&(n=l,s=new Xn(n,r))}),n};var Wn=Yn;const Pe=C,Hn=F(),Et=ye,kn=(e,t)=>{e=new Hn(e,t);let r=new Pe("0.0.0");if(e.test(r)||(r=new Pe("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n{const u=new Pe(l.semver.version);switch(l.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||Et(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),i&&(!r||Et(r,i))&&(r=i)}return r&&e.test(r)?r:null};var qn=kn;const Bn=F(),Kn=(e,t)=>{try{return new Bn(e,t).range||"*"}catch{return null}};var zn=Kn;const Zn=C,Ut=Ie(),{ANY:Jn}=Ut,Qn=F(),es=Le,mt=ye,dt=We,ts=ke,rs=He,ns=(e,t,r,n)=>{e=new Zn(e,n),t=new Qn(t,n);let s,i,l,u,a;switch(r){case">":s=mt,i=ts,l=dt,u=">",a=">=";break;case"<":s=dt,i=rs,l=mt,u="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(es(e,t,n))return!1;for(let o=0;o{m.semver===Jn&&(m=new Ut(">=0.0.0")),p=p||m,L=L||m,s(m.semver,p.semver,n)?p=m:l(m.semver,L.semver,n)&&(L=m)}),p.operator===u||p.operator===a||(!L.operator||L.operator===u)&&i(e,L.semver))return!1;if(L.operator===a&&l(e,L.semver))return!1}return!0};var qe=ns;const ss=qe,is=(e,t,r)=>ss(e,t,">",r);var as=is;const os=qe,ls=(e,t,r)=>os(e,t,"<",r);var us=ls;const vt=F(),cs=(e,t,r)=>(e=new vt(e,r),t=new vt(t,r),e.intersects(t,r));var hs=cs;const fs=Le,ps=U;var Es=(e,t,r)=>{const n=[];let s=null,i=null;const l=e.sort((h,p)=>ps(h,p,r));for(const h of l)fs(h,t,r)?(i=h,s||(s=h)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);const u=[];for(const[h,p]of n)h===p?u.push(h):!p&&h===l[0]?u.push("*"):p?h===l[0]?u.push(`<=${p}`):u.push(`${h} - ${p}`):u.push(`>=${h}`);const a=u.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return a.length{if(e===t)return!0;e=new $t(e,r),t=new $t(t,r);let n=!1;e:for(const s of e.set){for(const i of t.set){const l=vs(s,i,r);if(n=n||l!==null,l)continue e}if(n)return!1}return!0},ds=[new Be(">=0.0.0-0")],gt=[new Be(">=0.0.0")],vs=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===be){if(t.length===1&&t[0].semver===be)return!0;r.includePrerelease?e=ds:e=gt}if(t.length===1&&t[0].semver===be){if(r.includePrerelease)return!0;t=gt}const n=new Set;let s,i;for(const m of e)m.operator===">"||m.operator===">="?s=Rt(s,m,r):m.operator==="<"||m.operator==="<="?i=yt(i,m,r):n.add(m.semver);if(n.size>1)return null;let l;if(s&&i){if(l=Ke(s.semver,i.semver,r),l>0)return null;if(l===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const m of n){if(s&&!ne(m,String(s),r)||i&&!ne(m,String(i),r))return null;for(const d of t)if(!ne(m,String(d),r))return!1;return!0}let u,a,o,h,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&i.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const m of t){if(h=h||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(L&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===L.major&&m.semver.minor===L.minor&&m.semver.patch===L.patch&&(L=!1),m.operator===">"||m.operator===">="){if(u=Rt(s,m,r),u===m&&u!==s)return!1}else if(s.operator===">="&&!ne(s.semver,String(m),r))return!1}if(i){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(a=yt(i,m,r),a===m&&a!==i)return!1}else if(i.operator==="<="&&!ne(i.semver,String(m),r))return!1}if(!m.operator&&(i||s)&&l!==0)return!1}return!(s&&o&&!i&&l!==0||i&&h&&!s&&l!==0||L||p)},Rt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},yt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var $s=ms;const xe=le,It=ge,gs=C,Lt=_t,Rs=J,ys=gr,Is=Ir,Ls=Nr,Ns=Tr,Ss=wr,Ts=Dr,Os=xr,As=Gr,ws=U,Cs=Vr,_s=Hr,Ds=Ye,Ps=Kr,bs=Jr,xs=ye,Us=We,Fs=Dt,Gs=Pt,js=He,Ms=ke,Xs=bt,Vs=In,Ys=Ie(),Ws=F(),Hs=Le,ks=Un,qs=Mn,Bs=Wn,Ks=qn,zs=zn,Zs=qe,Js=as,Qs=us,ei=hs,ti=Es,ri=$s;var ni={parse:Rs,valid:ys,clean:Is,inc:Ls,diff:Ns,major:Ss,minor:Ts,patch:Os,prerelease:As,compare:ws,rcompare:Cs,compareLoose:_s,compareBuild:Ds,sort:Ps,rsort:bs,gt:xs,lt:Us,eq:Fs,neq:Gs,gte:js,lte:Ms,cmp:Xs,coerce:Vs,Comparator:Ys,Range:Ws,satisfies:Hs,toComparators:ks,maxSatisfying:qs,minSatisfying:Bs,minVersion:Ks,validRange:zs,outside:Zs,gtr:Js,ltr:Qs,intersects:ei,simplifyRange:ti,subset:ri,SemVer:gs,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:It.SEMVER_SPEC_VERSION,RELEASE_TYPES:It.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const Nt=rr(ni);var O={};/** +import{_ as er}from"./iframe-CUIcjkDA.js";import{_ as tr}from"./chunk-H6MOWX77-DTQOW814.js";import{g as rr,r as j,R as ie}from"./index-0d5eMwbi.js";import{r as nr}from"./index-BoyHNU0R.js";import"../sb-preview/runtime.js";var Me={exports:{}};const sr="2.0.0",wt=256,ir=Number.MAX_SAFE_INTEGER||9007199254740991,ar=16,or=wt-6,lr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ge={MAX_LENGTH:wt,MAX_SAFE_COMPONENT_LENGTH:ar,MAX_SAFE_BUILD_LENGTH:or,MAX_SAFE_INTEGER:ir,RELEASE_TYPES:lr,SEMVER_SPEC_VERSION:sr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Oe={};const ur=typeof process=="object"&&Oe&&Oe.NODE_DEBUG&&/\bsemver\b/i.test(Oe.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Re=ur;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=ge,i=Re;t=e.exports={};const l=t.re=[],u=t.safeRe=[],a=t.src=[],o=t.t={};let h=0;const p="[a-zA-Z0-9-]",L=[["\\s",1],["\\d",s],[p,n]],m=V=>{for(const[b,Y]of L)V=V.split(`${b}*`).join(`${b}{0,${Y}}`).split(`${b}+`).join(`${b}{1,${Y}}`);return V},d=(V,b,Y)=>{const w=m(b),W=h++;i(V,W,b),o[V]=W,a[W]=b,l[W]=new RegExp(b,Y?"g":void 0),u[W]=new RegExp(w,Y?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${a[o.NUMERICIDENTIFIER]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${a[o.NUMERICIDENTIFIERLOOSE]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${a[o.PRERELEASEIDENTIFIER]}(?:\\.${a[o.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${a[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[o.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${a[o.BUILDIDENTIFIER]}(?:\\.${a[o.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${a[o.MAINVERSION]}${a[o.PRERELEASE]}?${a[o.BUILD]}?`),d("FULL",`^${a[o.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${a[o.MAINVERSIONLOOSE]}${a[o.PRERELEASELOOSE]}?${a[o.BUILD]}?`),d("LOOSE",`^${a[o.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${a[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${a[o.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:${a[o.PRERELEASE]})?${a[o.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:${a[o.PRERELEASELOOSE]})?${a[o.BUILD]}?)?)?`),d("XRANGE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",`${a[o.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",a[o.COERCEPLAIN]+`(?:${a[o.PRERELEASE]})?(?:${a[o.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",a[o.COERCE],!0),d("COERCERTLFULL",a[o.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${a[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${a[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${a[o.LONECARET]}${a[o.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${a[o.LONECARET]}${a[o.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${a[o.GTLT]}\\s*(${a[o.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]}|${a[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${a[o.XRANGEPLAIN]})\\s+-\\s+(${a[o.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${a[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[o.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Me,Me.exports);var le=Me.exports;const cr=Object.freeze({loose:!0}),hr=Object.freeze({}),fr=e=>e?typeof e!="object"?cr:e:hr;var Ve=fr;const et=/^[0-9]+$/,Ct=(e,t)=>{const r=et.test(e),n=et.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:eCt(t,e);var _t={compareIdentifiers:Ct,rcompareIdentifiers:pr};const he=Re,{MAX_LENGTH:tt,MAX_SAFE_INTEGER:fe}=ge,{safeRe:rt,t:nt}=le,Er=Ve,{compareIdentifiers:K}=_t;let mr=class G{constructor(t,r){if(r=Er(r),t instanceof G){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>tt)throw new TypeError(`version is longer than ${tt} characters`);he("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?rt[nt.LOOSE]:rt[nt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>fe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),K(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var C=mr;const st=C,dr=(e,t,r=!1)=>{if(e instanceof st)return e;try{return new st(e,t)}catch(n){if(!r)return null;throw n}};var J=dr;const vr=J,$r=(e,t)=>{const r=vr(e,t);return r?r.version:null};var gr=$r;const Rr=J,yr=(e,t)=>{const r=Rr(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Ir=yr;const it=C,Lr=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new it(e instanceof it?e.version:e,r).inc(t,n,s).version}catch{return null}};var Nr=Lr;const at=J,Sr=(e,t)=>{const r=at(e,null,!0),n=at(t,null,!0),s=r.compare(n);if(s===0)return null;const i=s>0,l=i?r:n,u=i?n:r,a=!!l.prerelease.length;if(!!u.prerelease.length&&!a)return!u.patch&&!u.minor?"major":l.patch?"patch":l.minor?"minor":"major";const h=a?"pre":"";return r.major!==n.major?h+"major":r.minor!==n.minor?h+"minor":r.patch!==n.patch?h+"patch":"prerelease"};var Tr=Sr;const Or=C,Ar=(e,t)=>new Or(e,t).major;var wr=Ar;const Cr=C,_r=(e,t)=>new Cr(e,t).minor;var Dr=_r;const Pr=C,br=(e,t)=>new Pr(e,t).patch;var xr=br;const Ur=J,Fr=(e,t)=>{const r=Ur(e,t);return r&&r.prerelease.length?r.prerelease:null};var Gr=Fr;const ot=C,jr=(e,t,r)=>new ot(e,r).compare(new ot(t,r));var U=jr;const Mr=U,Xr=(e,t,r)=>Mr(t,e,r);var Vr=Xr;const Yr=U,Wr=(e,t)=>Yr(e,t,!0);var Hr=Wr;const lt=C,kr=(e,t,r)=>{const n=new lt(e,r),s=new lt(t,r);return n.compare(s)||n.compareBuild(s)};var Ye=kr;const qr=Ye,Br=(e,t)=>e.sort((r,n)=>qr(r,n,t));var Kr=Br;const zr=Ye,Zr=(e,t)=>e.sort((r,n)=>zr(n,r,t));var Jr=Zr;const Qr=U,en=(e,t,r)=>Qr(e,t,r)>0;var ye=en;const tn=U,rn=(e,t,r)=>tn(e,t,r)<0;var We=rn;const nn=U,sn=(e,t,r)=>nn(e,t,r)===0;var Dt=sn;const an=U,on=(e,t,r)=>an(e,t,r)!==0;var Pt=on;const ln=U,un=(e,t,r)=>ln(e,t,r)>=0;var He=un;const cn=U,hn=(e,t,r)=>cn(e,t,r)<=0;var ke=hn;const fn=Dt,pn=Pt,En=ye,mn=He,dn=We,vn=ke,$n=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return fn(e,r,n);case"!=":return pn(e,r,n);case">":return En(e,r,n);case">=":return mn(e,r,n);case"<":return dn(e,r,n);case"<=":return vn(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var bt=$n;const gn=C,Rn=J,{safeRe:pe,t:Ee}=le,yn=(e,t)=>{if(e instanceof gn)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?pe[Ee.COERCEFULL]:pe[Ee.COERCE]);else{const a=t.includePrerelease?pe[Ee.COERCERTLFULL]:pe[Ee.COERCERTL];let o;for(;(o=a.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),a.lastIndex=o.index+o[1].length+o[2].length;a.lastIndex=-1}if(r===null)return null;const n=r[2],s=r[3]||"0",i=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",u=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Rn(`${n}.${s}.${i}${l}${u}`,t)};var In=yn,Ae,ut;function Ln(){return ut||(ut=1,Ae=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Ae}var Nn=I;I.Node=q;I.create=I;function I(e){var t=this;if(t instanceof I||(t=new I),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(s){t.push(s)});else if(arguments.length>0)for(var r=0,n=arguments.length;r1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)r=e(r,n.value,s),n=n.next;return r};I.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)r=e(r,n.value,s),n=n.prev;return r};I.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};I.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};I.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new I;if(tthis.length&&(t=this.length);for(var n=0,s=this.head;s!==null&&nthis.length&&(t=this.length);for(var n=this.length,s=this.tail;s!==null&&n>t;n--)s=s.prev;for(;s!==null&&n>e;n--,s=s.prev)r.push(s.value);return r};I.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;s!==null&&n1;class wn{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[H]=t.max||1/0;const r=t.length||we;if(this[z]=typeof r!="function"?we:r,this[ae]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[k]=t.maxAge||0,this[M]=t.dispose,this[ct]=t.noDisposeOnSet||!1,this[xt]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[H]=t||1/0,re(this)}get max(){return this[H]}set allowStale(t){this[ae]=!!t}get allowStale(){return this[ae]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[k]=t,re(this)}get maxAge(){return this[k]}set lengthCalculator(t){typeof t!="function"&&(t=we),t!==this[z]&&(this[z]=t,this[X]=0,this[A].forEach(r=>{r.length=this[z](r.value,r.key),this[X]+=r.length})),re(this)}get lengthCalculator(){return this[z]}get length(){return this[X]}get itemCount(){return this[A].length}rforEach(t,r){r=r||this;for(let n=this[A].tail;n!==null;){const s=n.prev;ht(this,t,n,r),n=s}}forEach(t,r){r=r||this;for(let n=this[A].head;n!==null;){const s=n.next;ht(this,t,n,r),n=s}}keys(){return this[A].toArray().map(t=>t.key)}values(){return this[A].toArray().map(t=>t.value)}reset(){this[M]&&this[A]&&this[A].length&&this[A].forEach(t=>this[M](t.key,t.value)),this[x]=new Map,this[A]=new An,this[X]=0}dump(){return this[A].map(t=>de(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[A]}set(t,r,n){if(n=n||this[k],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0,i=this[z](r,t);if(this[x].has(t)){if(i>this[H])return Z(this,this[x].get(t)),!1;const a=this[x].get(t).value;return this[M]&&(this[ct]||this[M](t,a.value)),a.now=s,a.maxAge=n,a.value=r,this[X]+=i-a.length,a.length=i,this.get(t),re(this),!0}const l=new Cn(t,r,i,s,n);return l.length>this[H]?(this[M]&&this[M](t,r),!1):(this[X]+=l.length,this[A].unshift(l),this[x].set(t,this[A].head),re(this),!0)}has(t){if(!this[x].has(t))return!1;const r=this[x].get(t).value;return!de(this,r)}get(t){return Ce(this,t,!0)}peek(t){return Ce(this,t,!1)}pop(){const t=this[A].tail;return t?(Z(this,t),t.value):null}del(t){Z(this,this[x].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const l=i-r;l>0&&this.set(s.k,s.v,l)}}}prune(){this[x].forEach((t,r)=>Ce(this,r,!1))}}const Ce=(e,t,r)=>{const n=e[x].get(t);if(n){const s=n.value;if(de(e,s)){if(Z(e,n),!e[ae])return}else r&&(e[xt]&&(n.value.now=Date.now()),e[A].unshiftNode(n));return s.value}},de=(e,t)=>{if(!t||!t.maxAge&&!e[k])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[k]&&r>e[k]},re=e=>{if(e[X]>e[H])for(let t=e[A].tail;e[X]>e[H]&&t!==null;){const r=t.prev;Z(e,t),t=r}},Z=(e,t)=>{if(t){const r=t.value;e[M]&&e[M](r.key,r.value),e[X]-=r.length,e[x].delete(r.key),e[A].removeNode(t)}};class Cn{constructor(t,r,n,s,i){this.key=t,this.value=r,this.length=n,this.now=s,this.maxAge=i||0}}const ht=(e,t,r,n)=>{let s=r.value;de(e,s)&&(Z(e,r),e[ae]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};var _n=wn,_e,ft;function F(){if(ft)return _e;ft=1;class e{constructor(c,g){if(g=n(g),c instanceof e)return c.loose===!!g.loose&&c.includePrerelease===!!g.includePrerelease?c:new e(c.raw,g);if(c instanceof s)return this.raw=c.value,this.set=[[c]],this.format(),this;if(this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease,this.raw=c.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(v=>this.parseRange(v.trim())).filter(v=>v.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const v=this.set[0];if(this.set=this.set.filter($=>!d($[0])),this.set.length===0)this.set=[v];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&V($[0])){this.set=[$];break}}}this.format()}format(){return this.range=this.set.map(c=>c.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(c){const v=((this.options.includePrerelease&&L)|(this.options.loose&&m))+":"+c,$=r.get(v);if($)return $;const E=this.options.loose,R=E?u[a.HYPHENRANGELOOSE]:u[a.HYPHENRANGE];c=c.replace(R,Jt(this.options.includePrerelease)),i("hyphen replace",c),c=c.replace(u[a.COMPARATORTRIM],o),i("comparator trim",c),c=c.replace(u[a.TILDETRIM],h),i("tilde trim",c),c=c.replace(u[a.CARETTRIM],p),i("caret trim",c);let N=c.split(" ").map(T=>Y(T,this.options)).join(" ").split(/\s+/).map(T=>Zt(T,this.options));E&&(N=N.filter(T=>(i("loose invalid filter",T,this.options),!!T.match(u[a.COMPARATORLOOSE])))),i("range list",N);const y=new Map,S=N.map(T=>new s(T,this.options));for(const T of S){if(d(T))return[T];y.set(T.value,T)}y.size>1&&y.has("")&&y.delete("");const D=[...y.values()];return r.set(v,D),D}intersects(c,g){if(!(c instanceof e))throw new TypeError("a Range is required");return this.set.some(v=>b(v,g)&&c.set.some($=>b($,g)&&v.every(E=>$.every(R=>E.intersects(R,g)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new l(c,this.options)}catch{return!1}for(let g=0;gf.value==="<0.0.0-0",V=f=>f.value==="",b=(f,c)=>{let g=!0;const v=f.slice();let $=v.pop();for(;g&&v.length;)g=v.every(E=>$.intersects(E,c)),$=v.pop();return g},Y=(f,c)=>(i("comp",f,c),f=kt(f,c),i("caret",f),f=W(f,c),i("tildes",f),f=Bt(f,c),i("xrange",f),f=zt(f,c),i("stars",f),f),w=f=>!f||f.toLowerCase()==="x"||f==="*",W=(f,c)=>f.trim().split(/\s+/).map(g=>Ht(g,c)).join(" "),Ht=(f,c)=>{const g=c.loose?u[a.TILDELOOSE]:u[a.TILDE];return f.replace(g,(v,$,E,R,N)=>{i("tilde",f,v,$,E,R,N);let y;return w($)?y="":w(E)?y=`>=${$}.0.0 <${+$+1}.0.0-0`:w(R)?y=`>=${$}.${E}.0 <${$}.${+E+1}.0-0`:N?(i("replaceTilde pr",N),y=`>=${$}.${E}.${R}-${N} <${$}.${+E+1}.0-0`):y=`>=${$}.${E}.${R} <${$}.${+E+1}.0-0`,i("tilde return",y),y})},kt=(f,c)=>f.trim().split(/\s+/).map(g=>qt(g,c)).join(" "),qt=(f,c)=>{i("caret",f,c);const g=c.loose?u[a.CARETLOOSE]:u[a.CARET],v=c.includePrerelease?"-0":"";return f.replace(g,($,E,R,N,y)=>{i("caret",f,$,E,R,N,y);let S;return w(E)?S="":w(R)?S=`>=${E}.0.0${v} <${+E+1}.0.0-0`:w(N)?E==="0"?S=`>=${E}.${R}.0${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.0${v} <${+E+1}.0.0-0`:y?(i("replaceCaret pr",y),E==="0"?R==="0"?S=`>=${E}.${R}.${N}-${y} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}-${y} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N}-${y} <${+E+1}.0.0-0`):(i("no pr"),E==="0"?R==="0"?S=`>=${E}.${R}.${N}${v} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N} <${+E+1}.0.0-0`),i("caret return",S),S})},Bt=(f,c)=>(i("replaceXRanges",f,c),f.split(/\s+/).map(g=>Kt(g,c)).join(" ")),Kt=(f,c)=>{f=f.trim();const g=c.loose?u[a.XRANGELOOSE]:u[a.XRANGE];return f.replace(g,(v,$,E,R,N,y)=>{i("xRange",f,v,$,E,R,N,y);const S=w(E),D=S||w(R),T=D||w(N),te=T;return $==="="&&te&&($=""),y=c.includePrerelease?"-0":"",S?$===">"||$==="<"?v="<0.0.0-0":v="*":$&&te?(D&&(R=0),N=0,$===">"?($=">=",D?(E=+E+1,R=0,N=0):(R=+R+1,N=0)):$==="<="&&($="<",D?E=+E+1:R=+R+1),$==="<"&&(y="-0"),v=`${$+E}.${R}.${N}${y}`):D?v=`>=${E}.0.0${y} <${+E+1}.0.0-0`:T&&(v=`>=${E}.${R}.0${y} <${E}.${+R+1}.0-0`),i("xRange return",v),v})},zt=(f,c)=>(i("replaceStars",f,c),f.trim().replace(u[a.STAR],"")),Zt=(f,c)=>(i("replaceGTE0",f,c),f.trim().replace(u[c.includePrerelease?a.GTE0PRE:a.GTE0],"")),Jt=f=>(c,g,v,$,E,R,N,y,S,D,T,te,Hi)=>(w(v)?g="":w($)?g=`>=${v}.0.0${f?"-0":""}`:w(E)?g=`>=${v}.${$}.0${f?"-0":""}`:R?g=`>=${g}`:g=`>=${g}${f?"-0":""}`,w(S)?y="":w(D)?y=`<${+S+1}.0.0-0`:w(T)?y=`<${S}.${+D+1}.0-0`:te?y=`<=${S}.${D}.${T}-${te}`:f?y=`<${S}.${D}.${+T+1}-0`:y=`<=${y}`,`${g} ${y}`.trim()),Qt=(f,c,g)=>{for(let v=0;v0){const $=f[v].semver;if($.major===c.major&&$.minor===c.minor&&$.patch===c.patch)return!0}return!1}return!0};return _e}var De,pt;function Ie(){if(pt)return De;pt=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(h,p){if(p=r(p),h instanceof t){if(h.loose===!!p.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),l("comparator",h,p),this.options=p,this.loose=!!p.loose,this.parse(h),this.semver===e?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(h){const p=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],L=h.match(p);if(!L)throw new TypeError(`Invalid comparator: ${h}`);this.operator=L[1]!==void 0?L[1]:"",this.operator==="="&&(this.operator=""),L[2]?this.semver=new u(L[2],this.options.loose):this.semver=e}toString(){return this.value}test(h){if(l("Comparator.test",h,this.options.loose),this.semver===e||h===e)return!0;if(typeof h=="string")try{h=new u(h,this.options)}catch{return!1}return i(h,this.operator,this.semver,this.options)}intersects(h,p){if(!(h instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(h.value,p).test(this.value):h.operator===""?h.value===""?!0:new a(this.value,p).test(h.semver):(p=r(p),p.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||i(this.semver,"<",h.semver,p)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||i(this.semver,">",h.semver,p)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}De=t;const r=Ve,{safeRe:n,t:s}=le,i=bt,l=Re,u=C,a=F();return De}const Dn=F(),Pn=(e,t,r)=>{try{t=new Dn(t,r)}catch{return!1}return t.test(e)};var Le=Pn;const bn=F(),xn=(e,t)=>new bn(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Un=xn;const Fn=C,Gn=F(),jn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Gn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===-1)&&(n=l,s=new Fn(n,r))}),n};var Mn=jn;const Xn=C,Vn=F(),Yn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Vn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===1)&&(n=l,s=new Xn(n,r))}),n};var Wn=Yn;const Pe=C,Hn=F(),Et=ye,kn=(e,t)=>{e=new Hn(e,t);let r=new Pe("0.0.0");if(e.test(r)||(r=new Pe("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n{const u=new Pe(l.semver.version);switch(l.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||Et(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),i&&(!r||Et(r,i))&&(r=i)}return r&&e.test(r)?r:null};var qn=kn;const Bn=F(),Kn=(e,t)=>{try{return new Bn(e,t).range||"*"}catch{return null}};var zn=Kn;const Zn=C,Ut=Ie(),{ANY:Jn}=Ut,Qn=F(),es=Le,mt=ye,dt=We,ts=ke,rs=He,ns=(e,t,r,n)=>{e=new Zn(e,n),t=new Qn(t,n);let s,i,l,u,a;switch(r){case">":s=mt,i=ts,l=dt,u=">",a=">=";break;case"<":s=dt,i=rs,l=mt,u="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(es(e,t,n))return!1;for(let o=0;o{m.semver===Jn&&(m=new Ut(">=0.0.0")),p=p||m,L=L||m,s(m.semver,p.semver,n)?p=m:l(m.semver,L.semver,n)&&(L=m)}),p.operator===u||p.operator===a||(!L.operator||L.operator===u)&&i(e,L.semver))return!1;if(L.operator===a&&l(e,L.semver))return!1}return!0};var qe=ns;const ss=qe,is=(e,t,r)=>ss(e,t,">",r);var as=is;const os=qe,ls=(e,t,r)=>os(e,t,"<",r);var us=ls;const vt=F(),cs=(e,t,r)=>(e=new vt(e,r),t=new vt(t,r),e.intersects(t,r));var hs=cs;const fs=Le,ps=U;var Es=(e,t,r)=>{const n=[];let s=null,i=null;const l=e.sort((h,p)=>ps(h,p,r));for(const h of l)fs(h,t,r)?(i=h,s||(s=h)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);const u=[];for(const[h,p]of n)h===p?u.push(h):!p&&h===l[0]?u.push("*"):p?h===l[0]?u.push(`<=${p}`):u.push(`${h} - ${p}`):u.push(`>=${h}`);const a=u.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return a.length{if(e===t)return!0;e=new $t(e,r),t=new $t(t,r);let n=!1;e:for(const s of e.set){for(const i of t.set){const l=vs(s,i,r);if(n=n||l!==null,l)continue e}if(n)return!1}return!0},ds=[new Be(">=0.0.0-0")],gt=[new Be(">=0.0.0")],vs=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===be){if(t.length===1&&t[0].semver===be)return!0;r.includePrerelease?e=ds:e=gt}if(t.length===1&&t[0].semver===be){if(r.includePrerelease)return!0;t=gt}const n=new Set;let s,i;for(const m of e)m.operator===">"||m.operator===">="?s=Rt(s,m,r):m.operator==="<"||m.operator==="<="?i=yt(i,m,r):n.add(m.semver);if(n.size>1)return null;let l;if(s&&i){if(l=Ke(s.semver,i.semver,r),l>0)return null;if(l===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const m of n){if(s&&!ne(m,String(s),r)||i&&!ne(m,String(i),r))return null;for(const d of t)if(!ne(m,String(d),r))return!1;return!0}let u,a,o,h,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&i.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const m of t){if(h=h||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(L&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===L.major&&m.semver.minor===L.minor&&m.semver.patch===L.patch&&(L=!1),m.operator===">"||m.operator===">="){if(u=Rt(s,m,r),u===m&&u!==s)return!1}else if(s.operator===">="&&!ne(s.semver,String(m),r))return!1}if(i){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(a=yt(i,m,r),a===m&&a!==i)return!1}else if(i.operator==="<="&&!ne(i.semver,String(m),r))return!1}if(!m.operator&&(i||s)&&l!==0)return!1}return!(s&&o&&!i&&l!==0||i&&h&&!s&&l!==0||L||p)},Rt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},yt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var $s=ms;const xe=le,It=ge,gs=C,Lt=_t,Rs=J,ys=gr,Is=Ir,Ls=Nr,Ns=Tr,Ss=wr,Ts=Dr,Os=xr,As=Gr,ws=U,Cs=Vr,_s=Hr,Ds=Ye,Ps=Kr,bs=Jr,xs=ye,Us=We,Fs=Dt,Gs=Pt,js=He,Ms=ke,Xs=bt,Vs=In,Ys=Ie(),Ws=F(),Hs=Le,ks=Un,qs=Mn,Bs=Wn,Ks=qn,zs=zn,Zs=qe,Js=as,Qs=us,ei=hs,ti=Es,ri=$s;var ni={parse:Rs,valid:ys,clean:Is,inc:Ls,diff:Ns,major:Ss,minor:Ts,patch:Os,prerelease:As,compare:ws,rcompare:Cs,compareLoose:_s,compareBuild:Ds,sort:Ps,rsort:bs,gt:xs,lt:Us,eq:Fs,neq:Gs,gte:js,lte:Ms,cmp:Xs,coerce:Vs,Comparator:Ys,Range:Ws,satisfies:Hs,toComparators:ks,maxSatisfying:qs,minSatisfying:Bs,minVersion:Ks,validRange:zs,outside:Zs,gtr:Js,ltr:Qs,intersects:ei,simplifyRange:ti,subset:ri,SemVer:gs,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:It.SEMVER_SPEC_VERSION,RELEASE_TYPES:It.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const Nt=rr(ni);var O={};/** * @license React * react-dom-test-utils.production.min.js * diff --git a/assets/featured-tag.stories-Du1zMPkV.js b/assets/featured-tag.stories-BDKkO3eR.js similarity index 68% rename from assets/featured-tag.stories-Du1zMPkV.js rename to assets/featured-tag.stories-BDKkO3eR.js index 49d9fb4d..af25d875 100644 --- a/assets/featured-tag.stories-Du1zMPkV.js +++ b/assets/featured-tag.stories-BDKkO3eR.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as x}from"./index-0d5eMwbi.js";import{F as a}from"./featured-tag-DLvaNKCm.js";import{P as h}from"./panel-BTNit_je.js";import{F as r}from"./form-field-2xLK_lYH.js";import"./class-names-DnY5YZNL.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const K={title:"Input/FeaturedTag",component:a},j=()=>{const[c,l]=x.useState("value_1");return e.jsx("div",{className:"w-96",children:e.jsx(r,{children:e.jsxs(r.RadioBox,{value:c,onChange:u=>{l(u)},id:"value",children:[e.jsxs(r.RadioBox.Option,{value:"option_1",children:["Option 1",e.jsx(a,{children:"Recommended!"})]}),e.jsx(r.RadioBox.Option,{value:"option_2",children:"Option 2"}),e.jsx(r.RadioBox.Option,{value:"option_3",children:"Option 3"})]})})})},o={render:()=>e.jsx(j,{})},t={render:()=>e.jsx("div",{className:"w-96",children:e.jsxs(h,{className:"relative",children:[e.jsx("p",{children:"This example uses a Panel component"}),e.jsx(a,{children:"Recommended!"})]})})};var i,n,m;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as x}from"./index-0d5eMwbi.js";import{F as a}from"./featured-tag-DLvaNKCm.js";import{P as h}from"./panel-BTNit_je.js";import{F as r}from"./form-field-MCn42VmW.js";import"./class-names-DnY5YZNL.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./use-resolve-button-type-HzzQKYtS.js";import"./keyboard-D0BTZntQ.js";import"./use-sync-refs-DhZgiOVe.js";import"./form-fields-HWr4pxRQ.js";import"./index-BoyHNU0R.js";import"./hidden-DfUyyskI.js";import"./description-CaDbXm72.js";import"./label-fWs8-lsP.js";import"./bugs-DpEN4NTH.js";import"./focus-management-CKkqTXfi.js";import"./use-text-value-D3ZnWpLS.js";import"./floating-Bhi-vCn9.js";import"./use-inert-others-D4nVU6H_.js";import"./portal-BQQr4JoD.js";import"./use-server-handoff-complete-UouYGEcd.js";import"./open-closed-FM4Rfwkx.js";import"./badge-Da1HxQE-.js";import"./index-BgfbgFhO.js";import"./use-event-listener-EaZKqAMH.js";import"./active-element-history-DjNnwGR_.js";import"./tag-C9CGXtt3.js";const K={title:"Input/FeaturedTag",component:a},j=()=>{const[c,l]=x.useState("value_1");return e.jsx("div",{className:"w-96",children:e.jsx(r,{children:e.jsxs(r.RadioBox,{value:c,onChange:u=>{l(u)},id:"value",children:[e.jsxs(r.RadioBox.Option,{value:"option_1",children:["Option 1",e.jsx(a,{children:"Recommended!"})]}),e.jsx(r.RadioBox.Option,{value:"option_2",children:"Option 2"}),e.jsx(r.RadioBox.Option,{value:"option_3",children:"Option 3"})]})})})},o={render:()=>e.jsx(j,{})},t={render:()=>e.jsx("div",{className:"w-96",children:e.jsxs(h,{className:"relative",children:[e.jsx("p",{children:"This example uses a Panel component"}),e.jsx(a,{children:"Recommended!"})]})})};var i,n,m;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{ render: () => { return ; } diff --git a/assets/floating-ERp4LevH.js b/assets/floating-Bhi-vCn9.js similarity index 99% rename from assets/floating-ERp4LevH.js rename to assets/floating-Bhi-vCn9.js index 71fa94f0..1b9aa79f 100644 --- a/assets/floating-ERp4LevH.js +++ b/assets/floating-Bhi-vCn9.js @@ -1 +1 @@ -import{r as d,t as ie}from"./index-0d5eMwbi.js";import{n as ot,o as _t,p as re}from"./use-sync-refs-DqQDZvJ6.js";import{r as et}from"./index-BoyHNU0R.js";function se(t){if(t===null)return{width:0,height:0};let{width:e,height:o}=t.getBoundingClientRect();return{width:e,height:o}}function xn(t,e=!1){let[o,n]=d.useReducer(()=>({}),{}),i=d.useMemo(()=>se(t),[t,o]);return ot(()=>{if(!t)return;let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect()}},[t]),e?{width:`${i.width}px`,height:`${i.height}px`}:i}function Q(t){return zt(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _(t){var e;return(e=(zt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zt(t){return t instanceof Node||t instanceof k(t).Node}function T(t){return t instanceof Element||t instanceof k(t).Element}function V(t){return t instanceof HTMLElement||t instanceof k(t).HTMLElement}function Mt(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof k(t).ShadowRoot}function it(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=W(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function le(t){return["table","td","th"].includes(Q(t))}function dt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Rt(t){const e=Ct(),o=T(t)?W(t):t;return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function ce(t){let e=Y(t);for(;V(e)&&!J(e);){if(Rt(e))return e;if(dt(e))return null;e=Y(e)}return null}function Ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function J(t){return["html","body","#document"].includes(Q(t))}function W(t){return k(t).getComputedStyle(t)}function mt(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Y(t){if(Q(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Mt(t)&&t.host||_(t);return Mt(e)?e.host:e}function jt(t){const e=Y(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&it(e)?e:jt(e)}function nt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=jt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=k(i);return r?e.concat(s,s.visualViewport||[],it(i)?i:[],s.frameElement&&o?nt(s.frameElement):[]):e.concat(i,nt(i,[],o))}function fe(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:o,version:n}=e;return o+"/"+n}).join(" "):navigator.userAgent}const j=Math.min,$=Math.max,ct=Math.round,st=Math.floor,q=t=>({x:t,y:t}),ue={left:"right",right:"left",bottom:"top",top:"bottom"},ae={start:"end",end:"start"};function Tt(t,e,o){return $(t,j(e,o))}function Z(t,e){return typeof t=="function"?t(e):t}function X(t){return t.split("-")[0]}function rt(t){return t.split("-")[1]}function Yt(t){return t==="x"?"y":"x"}function qt(t){return t==="y"?"height":"width"}function U(t){return["top","bottom"].includes(X(t))?"y":"x"}function Xt(t){return Yt(U(t))}function de(t,e,o){o===void 0&&(o=!1);const n=rt(t),i=Xt(t),r=qt(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function me(t){const e=ft(t);return[yt(t),e,yt(e)]}function yt(t){return t.replace(/start|end/g,e=>ae[e])}function ge(t,e,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?r:s;default:return[]}}function he(t,e,o,n){const i=rt(t);let r=ge(X(t),o==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(yt)))),r}function ft(t){return t.replace(/left|right|bottom|top/g,e=>ue[e])}function pe(t){return{top:0,right:0,bottom:0,left:0,...t}}function xe(t){return typeof t!="number"?pe(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Ft(t,e,o){let{reference:n,floating:i}=t;const r=U(e),s=Xt(e),l=qt(s),c=X(e),f=r==="y",a=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,x=n[l]/2-i[l]/2;let u;switch(c){case"top":u={x:a,y:n.y-i.height};break;case"bottom":u={x:a,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:h};break;case"left":u={x:n.x-i.width,y:h};break;default:u={x:n.x,y:n.y}}switch(rt(e)){case"start":u[s]-=x*(o&&f?-1:1);break;case"end":u[s]+=x*(o&&f?-1:1);break}return u}const we=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:h}=Ft(f,n,c),x=n,u={},m=0;for(let g=0;gO<=0)){var S,L;const O=(((S=r.flip)==null?void 0:S.index)||0)+1,H=P[O];if(H)return{data:{index:O,overflows:F},reset:{placement:H}};let I=(L=F.filter(C=>C.overflows[0]<=0).sort((C,M)=>C.overflows[1]-M.overflows[1])[0])==null?void 0:L.placement;if(!I)switch(u){case"bestFit":{var B;const C=(B=F.filter(M=>{if(A){const E=U(M.placement);return E===y||E==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(E=>E>0).reduce((E,z)=>E+z,0)]).sort((M,E)=>M[1]-E[1])[0])==null?void 0:B[0];C&&(I=C);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};async function ye(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=X(o),l=rt(o),c=U(o)==="y",f=["left","top"].includes(s)?-1:1,a=r&&c?-1:1,h=Z(e,t);let{mainAxis:x,crossAxis:u,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof m=="number"&&(u=l==="end"?m*-1:m),c?{x:u*a,y:x*f}:{x:x*f,y:u*a}}const be=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:s,middlewareData:l}=e,c=await ye(e,t);return s===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Re=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:p=>{let{x:v,y}=p;return{x:v,y}}},...c}=Z(t,e),f={x:o,y:n},a=await gt(e,c),h=U(X(i)),x=Yt(h);let u=f[x],m=f[h];if(r){const p=x==="y"?"top":"left",v=x==="y"?"bottom":"right",y=u+a[p],w=u-a[v];u=Tt(y,u,w)}if(s){const p=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=m+a[p],w=m-a[v];m=Tt(y,m,w)}const g=l.fn({...e,[x]:u,[h]:m});return{...g,data:{x:g.x-o,y:g.y-n}}}}},Ce=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:n,platform:i,elements:r}=e,{apply:s=()=>{},...l}=Z(t,e),c=await gt(e,l),f=X(o),a=rt(o),h=U(o)==="y",{width:x,height:u}=n.floating;let m,g;f==="top"||f==="bottom"?(m=f,g=a===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=f,m=a==="end"?"top":"bottom");const p=u-c.top-c.bottom,v=x-c.left-c.right,y=j(u-c[m],p),w=j(x-c[g],v),b=!e.middlewareData.shift;let R=y,A=w;if(h?A=a||b?j(w,v):v:R=a||b?j(y,p):p,b&&!a){const D=$(c.left,0),N=$(c.right,0),F=$(c.top,0),S=$(c.bottom,0);h?A=x-2*(D!==0||N!==0?D+N:$(c.left,c.right)):R=u-2*(F!==0||S!==0?F+S:$(c.top,c.bottom))}await s({...e,availableWidth:A,availableHeight:R});const P=await i.getDimensions(r.floating);return x!==P.width||u!==P.height?{reset:{rects:!0}}:{}}}};function Ut(t){const e=W(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=V(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,l=ct(o)!==r||ct(n)!==s;return l&&(o=r,n=s),{width:o,height:n,$:l}}function Et(t){return T(t)?t:t.contextElement}function G(t){const e=Et(t);if(!V(e))return q(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Ut(e);let s=(r?ct(o.width):o.width)/n,l=(r?ct(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Ee=q(0);function Kt(t){const e=k(t);return!Ct()||!e.visualViewport?Ee:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ae(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==k(t)?!1:e}function K(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=Et(t);let s=q(1);e&&(n?T(n)&&(s=G(n)):s=G(t));const l=Ae(r,o,n)?Kt(r):q(0);let c=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,a=i.width/s.x,h=i.height/s.y;if(r){const x=k(r),u=n&&T(n)?k(n):n;let m=x,g=m.frameElement;for(;g&&n&&u!==m;){const p=G(g),v=g.getBoundingClientRect(),y=W(g),w=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*p.x,b=v.top+(g.clientTop+parseFloat(y.paddingTop))*p.y;c*=p.x,f*=p.y,a*=p.x,h*=p.y,c+=w,f+=b,m=k(g),g=m.frameElement}}return ut({width:a,height:h,x:c,y:f})}function Se(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=_(n),l=e?dt(e.floating):!1;if(n===s||l&&r)return o;let c={scrollLeft:0,scrollTop:0},f=q(1);const a=q(0),h=V(n);if((h||!h&&!r)&&((Q(n)!=="body"||it(s))&&(c=mt(n)),V(n))){const x=K(n);f=G(n),a.x=x.x+n.clientLeft,a.y=x.y+n.clientTop}return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-c.scrollLeft*f.x+a.x,y:o.y*f.y-c.scrollTop*f.y+a.y}}function Oe(t){return Array.from(t.getClientRects())}function Gt(t){return K(_(t)).left+mt(t).scrollLeft}function Me(t){const e=_(t),o=mt(t),n=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=$(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+Gt(t);const l=-o.scrollTop;return W(n).direction==="rtl"&&(s+=$(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:l}}function Te(t,e){const o=k(t),n=_(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const f=Ct();(!f||f&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:l,y:c}}function Fe(t,e){const o=K(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=V(t)?G(t):q(1),s=t.clientWidth*r.x,l=t.clientHeight*r.y,c=i*r.x,f=n*r.y;return{width:s,height:l,x:c,y:f}}function Pt(t,e,o){let n;if(e==="viewport")n=Te(t,o);else if(e==="document")n=Me(_(t));else if(T(e))n=Fe(e,o);else{const i=Kt(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return ut(n)}function Jt(t,e){const o=Y(t);return o===e||!T(o)||J(o)?!1:W(o).position==="fixed"||Jt(o,e)}function Pe(t,e){const o=e.get(t);if(o)return o;let n=nt(t,[],!1).filter(l=>T(l)&&Q(l)!=="body"),i=null;const r=W(t).position==="fixed";let s=r?Y(t):t;for(;T(s)&&!J(s);){const l=W(s),c=Rt(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||it(s)&&!c&&Jt(t,s))?n=n.filter(a=>a!==s):i=l,s=Y(s)}return e.set(t,n),n}function De(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?dt(e)?[]:Pe(e,this._c):[].concat(o),n],l=s[0],c=s.reduce((f,a)=>{const h=Pt(e,a,i);return f.top=$(h.top,f.top),f.right=j(h.right,f.right),f.bottom=j(h.bottom,f.bottom),f.left=$(h.left,f.left),f},Pt(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Le(t){const{width:e,height:o}=Ut(t);return{width:e,height:o}}function He(t,e,o){const n=V(e),i=_(e),r=o==="fixed",s=K(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const c=q(0);if(n||!n&&!r)if((Q(e)!=="body"||it(i))&&(l=mt(e)),n){const h=K(e,!0,r,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else i&&(c.x=Gt(i));const f=s.left+l.scrollLeft-c.x,a=s.top+l.scrollTop-c.y;return{x:f,y:a,width:s.width,height:s.height}}function pt(t){return W(t).position==="static"}function Dt(t,e){return!V(t)||W(t).position==="fixed"?null:e?e(t):t.offsetParent}function Qt(t,e){const o=k(t);if(dt(t))return o;if(!V(t)){let i=Y(t);for(;i&&!J(i);){if(T(i)&&!pt(i))return i;i=Y(i)}return o}let n=Dt(t,e);for(;n&&le(n)&&pt(n);)n=Dt(n,e);return n&&J(n)&&pt(n)&&!Rt(n)?o:n||ce(t)||o}const $e=async function(t){const e=this.getOffsetParent||Qt,o=this.getDimensions,n=await o(t.floating);return{reference:He(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ke(t){return W(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Se,getDocumentElement:_,getClippingRect:De,getOffsetParent:Qt,getElementRects:$e,getClientRects:Oe,getDimensions:Le,getScale:G,isElement:T,isRTL:ke};function Ne(t,e){let o=null,n;const i=_(t);function r(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const{left:f,top:a,width:h,height:x}=t.getBoundingClientRect();if(l||e(),!h||!x)return;const u=st(a),m=st(i.clientWidth-(f+h)),g=st(i.clientHeight-(a+x)),p=st(f),y={rootMargin:-u+"px "+-m+"px "+-g+"px "+-p+"px",threshold:$(0,j(1,c))||1};let w=!0;function b(R){const A=R[0].intersectionRatio;if(A!==c){if(!w)return s();A?s(!1,A):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(b,{...y,root:i.ownerDocument})}catch{o=new IntersectionObserver(b,y)}o.observe(t)}return s(!0),r}function Be(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,f=Et(t),a=i||r?[...f?nt(f):[],...nt(e)]:[];a.forEach(v=>{i&&v.addEventListener("scroll",o,{passive:!0}),r&&v.addEventListener("resize",o)});const h=f&&l?Ne(f,o):null;let x=-1,u=null;s&&(u=new ResizeObserver(v=>{let[y]=v;y&&y.target===f&&u&&(u.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var w;(w=u)==null||w.observe(e)})),o()}),f&&!c&&u.observe(f),u.observe(e));let m,g=c?K(t):null;c&&p();function p(){const v=K(t);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&o(),g=v,m=requestAnimationFrame(p)}return o(),()=>{var v;a.forEach(y=>{i&&y.removeEventListener("scroll",o),r&&y.removeEventListener("resize",o)}),h==null||h(),(v=u)==null||v.disconnect(),u=null,c&&cancelAnimationFrame(m)}}const xt=gt,We=be,Ve=Re,_e=ve,ze=Ce,je=(t,e,o)=>{const n=new Map,i={platform:Ie,...o},r={...i.platform,_c:n};return we(t,e,{...i,platform:r})};var lt=typeof document<"u"?d.useLayoutEffect:d.useEffect;function at(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let o,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==e.length)return!1;for(n=o;n--!==0;)if(!at(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){const r=i[n];if(!(r==="_owner"&&t.$$typeof)&&!at(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function Zt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(t,e){const o=Zt(t);return Math.round(e*o)/o}function Ht(t){const e=d.useRef(t);return lt(()=>{e.current=t}),e}function Ye(t){t===void 0&&(t={});const{placement:e="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:r,floating:s}={},transform:l=!0,whileElementsMounted:c,open:f}=t,[a,h]=d.useState({x:0,y:0,strategy:o,placement:e,middlewareData:{},isPositioned:!1}),[x,u]=d.useState(n);at(x,n)||u(n);const[m,g]=d.useState(null),[p,v]=d.useState(null),y=d.useCallback(C=>{C!==A.current&&(A.current=C,g(C))},[]),w=d.useCallback(C=>{C!==P.current&&(P.current=C,v(C))},[]),b=r||m,R=s||p,A=d.useRef(null),P=d.useRef(null),D=d.useRef(a),N=c!=null,F=Ht(c),S=Ht(i),L=d.useCallback(()=>{if(!A.current||!P.current)return;const C={placement:e,strategy:o,middleware:x};S.current&&(C.platform=S.current),je(A.current,P.current,C).then(M=>{const E={...M,isPositioned:!0};B.current&&!at(D.current,E)&&(D.current=E,et.flushSync(()=>{h(E)}))})},[x,e,o,S]);lt(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[f]);const B=d.useRef(!1);lt(()=>(B.current=!0,()=>{B.current=!1}),[]),lt(()=>{if(b&&(A.current=b),R&&(P.current=R),b&&R){if(F.current)return F.current(b,R,L);L()}},[b,R,L,F,N]);const O=d.useMemo(()=>({reference:A,floating:P,setReference:y,setFloating:w}),[y,w]),H=d.useMemo(()=>({reference:b,floating:R}),[b,R]),I=d.useMemo(()=>{const C={position:o,left:0,top:0};if(!H.floating)return C;const M=Lt(H.floating,a.x),E=Lt(H.floating,a.y);return l?{...C,transform:"translate("+M+"px, "+E+"px)",...Zt(H.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:M,top:E}},[o,l,H.floating,a.x,a.y]);return d.useMemo(()=>({...a,update:L,refs:O,elements:H,floatingStyles:I}),[a,L,O,H,I])}const te=(t,e)=>({...We(t),options:[t,e]}),qe=(t,e)=>({...Ve(t),options:[t,e]}),Xe=(t,e)=>({..._e(t),options:[t,e]}),Ue=(t,e)=>({...ze(t),options:[t,e]}),ee={...ie},Ke=ee.useInsertionEffect,Ge=Ke||(t=>t());function ne(t){const e=d.useRef(()=>{});return Ge(()=>{e.current=t}),d.useCallback(function(){for(var o=arguments.length,n=new Array(o),i=0;i"floating-ui-"+Math.random().toString(36).slice(2,6)+Je++;function Qe(){const[t,e]=d.useState(()=>$t?kt():void 0);return bt(()=>{t==null&&e(kt())},[]),d.useEffect(()=>{$t=!0},[]),t}const Ze=ee.useId,tn=Ze||Qe;function en(){const t=new Map;return{emit(e,o){var n;(n=t.get(e))==null||n.forEach(i=>i(o))},on(e,o){t.set(e,[...t.get(e)||[],o])},off(e,o){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(i=>i!==o))||[])}}}const nn=d.createContext(null),on=d.createContext(null),rn=()=>{var t;return((t=d.useContext(nn))==null?void 0:t.id)||null},sn=()=>d.useContext(on);function ln(t){const{open:e=!1,onOpenChange:o,elements:n}=t,i=tn(),r=d.useRef({}),[s]=d.useState(()=>en()),l=rn()!=null,[c,f]=d.useState(n.reference),a=ne((u,m,g)=>{r.current.openEvent=u?m:void 0,s.emit("openchange",{open:u,event:m,reason:g,nested:l}),o==null||o(u,m,g)}),h=d.useMemo(()=>({setPositionReference:f}),[]),x=d.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return d.useMemo(()=>({dataRef:r,open:e,onOpenChange:a,elements:x,events:s,floatingId:i,refs:h}),[e,a,x,s,i,h])}function cn(t){t===void 0&&(t={});const{nodeId:e}=t,o=ln({...t,elements:{reference:null,floating:null,...t.elements}}),n=t.rootContext||o,i=n.elements,[r,s]=d.useState(null),[l,c]=d.useState(null),a=(i==null?void 0:i.reference)||r,h=d.useRef(null),x=sn();bt(()=>{a&&(h.current=a)},[a]);const u=Ye({...t,elements:{...i,...l&&{reference:l}}}),m=d.useCallback(w=>{const b=T(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;c(b),u.refs.setReference(b)},[u.refs]),g=d.useCallback(w=>{(T(w)||w===null)&&(h.current=w,s(w)),(T(u.refs.reference.current)||u.refs.reference.current===null||w!==null&&!T(w))&&u.refs.setReference(w)},[u.refs]),p=d.useMemo(()=>({...u.refs,setReference:g,setPositionReference:m,domReference:h}),[u.refs,g,m]),v=d.useMemo(()=>({...u.elements,domReference:a}),[u.elements,a]),y=d.useMemo(()=>({...u,...n,refs:p,elements:v,nodeId:e}),[u,p,v,e,n]);return bt(()=>{n.dataRef.current.floatingContext=y;const w=x==null?void 0:x.nodesRef.current.find(b=>b.id===e);w&&(w.context=y)}),d.useMemo(()=>({...u,context:y,refs:p,elements:v}),[u,p,v,y])}const It="active",Nt="selected";function wt(t,e,o){const n=new Map,i=o==="item";let r=t;if(i&&t){const{[It]:s,[Nt]:l,...c}=t;r=c}return{...o==="floating"&&{tabIndex:-1},...r,...e.map(s=>{const l=s?s[o]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((s,l)=>(l&&Object.entries(l).forEach(c=>{let[f,a]=c;if(!(i&&[It,Nt].includes(f)))if(f.indexOf("on")===0){if(n.has(f)||n.set(f,[]),typeof a=="function"){var h;(h=n.get(f))==null||h.push(a),s[f]=function(){for(var x,u=arguments.length,m=new Array(u),g=0;gp(...m)).find(p=>p!==void 0)}}}else s[f]=a}),s),{})}}function fn(t){t===void 0&&(t=[]);const e=t.map(l=>l==null?void 0:l.reference),o=t.map(l=>l==null?void 0:l.floating),n=t.map(l=>l==null?void 0:l.item),i=d.useCallback(l=>wt(l,t,"reference"),e),r=d.useCallback(l=>wt(l,t,"floating"),o),s=d.useCallback(l=>wt(l,t,"item"),n);return d.useMemo(()=>({getReferenceProps:i,getFloatingProps:r,getItemProps:s}),[i,r,s])}function Bt(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const un=t=>({name:"inner",options:t,async fn(e){const{listRef:o,overflowRef:n,onFallbackChange:i,offset:r=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:f,...a}=Z(t,e),{rects:h,elements:{floating:x}}=e,u=o.current[s];if(!u)return{};const m={...e,...await te(-u.offsetTop-x.clientTop-h.reference.height/2-u.offsetHeight/2-r).fn(e)},g=(f==null?void 0:f.current)||x,p=await xt(Bt(m,g.scrollHeight),a),v=await xt(m,{...a,elementContext:"reference"}),y=Math.max(0,p.top),w=m.y+y,b=Math.max(0,g.scrollHeight-y-Math.max(0,p.bottom));return g.style.maxHeight=b+"px",g.scrollTop=y,i&&(g.offsetHeight=-c||v.bottom>=-c?et.flushSync(()=>i(!0)):et.flushSync(()=>i(!1))),n&&(n.current=await xt(Bt({...m,y:w},g.offsetHeight),a)),{y:w}}});function an(t,e){const{open:o,elements:n}=t,{enabled:i=!0,overflowRef:r,scrollRef:s,onChange:l}=e,c=ne(l),f=d.useRef(!1),a=d.useRef(null),h=d.useRef(null);d.useEffect(()=>{if(!i)return;function u(g){if(g.ctrlKey||!m||r.current==null)return;const p=g.deltaY,v=r.current.top>=-.5,y=r.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,b=p<0?-1:1,R=p<0?"max":"min";m.scrollHeight<=m.clientHeight||(!v&&p>0||!y&&p<0?(g.preventDefault(),et.flushSync(()=>{c(A=>A+Math[R](p,w*b))})):/firefox/i.test(fe())&&(m.scrollTop+=p))}const m=(s==null?void 0:s.current)||n.floating;if(o&&m)return m.addEventListener("wheel",u),requestAnimationFrame(()=>{a.current=m.scrollTop,r.current!=null&&(h.current={...r.current})}),()=>{a.current=null,h.current=null,m.removeEventListener("wheel",u)}},[i,o,n.floating,r,s,c]);const x=d.useMemo(()=>({onKeyDown(){f.current=!0},onWheel(){f.current=!1},onPointerMove(){f.current=!1},onScroll(){const u=(s==null?void 0:s.current)||n.floating;if(!(!r.current||!u||!f.current)){if(a.current!==null){const m=u.scrollTop-a.current;(r.current.bottom<-.5&&m<-1||r.current.top<-.5&&m>1)&&et.flushSync(()=>c(g=>g+m))}requestAnimationFrame(()=>{a.current=u.scrollTop})}}}),[n.floating,c,r,s]);return d.useMemo(()=>i?{floating:x}:{},[i,x])}let tt=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});tt.displayName="FloatingContext";let At=d.createContext(null);At.displayName="PlacementContext";function wn(t){return d.useMemo(()=>t?typeof t=="string"?{to:t}:t:null,[t])}function vn(){return d.useContext(tt).setReference}function yn(){return d.useContext(tt).getReferenceProps}function bn(){let{getFloatingProps:t,slot:e}=d.useContext(tt);return d.useCallback((...o)=>Object.assign({},t(...o),{"data-anchor":e.anchor}),[t,e])}function Rn(t=null){t===!1&&(t=null),typeof t=="string"&&(t={to:t});let e=d.useContext(At),o=d.useMemo(()=>t,[JSON.stringify(t,(i,r)=>{var s;return(s=r==null?void 0:r.outerHTML)!=null?s:r})]);ot(()=>{e==null||e(o??null)},[e,o]);let n=d.useContext(tt);return d.useMemo(()=>[n.setFloating,t?n.styles:{}],[n.setFloating,t,n.styles])}let Wt=4;function Cn({children:t,enabled:e=!0}){let[o,n]=d.useState(null),[i,r]=d.useState(0),s=d.useRef(null),[l,c]=d.useState(null);dn(l);let f=e&&o!==null&&l!==null,{to:a="bottom",gap:h=0,offset:x=0,padding:u=0,inner:m}=mn(o,l),[g,p="center"]=a.split(" ");ot(()=>{f&&r(0)},[f]);let{refs:v,floatingStyles:y,context:w}=cn({open:f,placement:g==="selection"?p==="center"?"bottom":`bottom-${p}`:p==="center"?`${g}`:`${g}-${p}`,strategy:"absolute",transform:!1,middleware:[te({mainAxis:g==="selection"?0:h,crossAxis:x}),qe({padding:u}),g!=="selection"&&Xe({padding:u}),g==="selection"&&m?un({...m,padding:u,overflowRef:s,offset:i,minItemsVisible:Wt,referenceOverflowThreshold:u,onFallbackChange(S){var L,B;if(!S)return;let O=w.elements.floating;if(!O)return;let H=parseFloat(getComputedStyle(O).scrollPaddingBottom)||0,I=Math.min(Wt,O.childElementCount),C=0,M=0;for(let E of(B=(L=w.elements.floating)==null?void 0:L.childNodes)!=null?B:[])if(E instanceof HTMLElement){let z=E.offsetTop,St=z+E.clientHeight+H,ht=O.scrollTop,Ot=ht+O.clientHeight;if(z>=ht&&St<=Ot)I--;else{M=Math.max(0,Math.min(St,Ot)-Math.max(z,ht)),C=E.clientHeight;break}}I>=1&&r(E=>{let z=C*I-M+H;return E>=z?E:z})}}):null,Ue({padding:u,apply({availableWidth:S,availableHeight:L,elements:B}){Object.assign(B.floating.style,{overflow:"auto",maxWidth:`${S}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${L}px)`})}})].filter(Boolean),whileElementsMounted:Be}),[b=g,R=p]=w.placement.split("-");g==="selection"&&(b="selection");let A=d.useMemo(()=>({anchor:[b,R].filter(Boolean).join(" ")}),[b,R]),P=an(w,{overflowRef:s,onChange:r}),{getReferenceProps:D,getFloatingProps:N}=fn([P]),F=_t(S=>{c(S),v.setFloating(S)});return d.createElement(At.Provider,{value:n},d.createElement(tt.Provider,{value:{setFloating:F,setReference:v.setReference,styles:y,getReferenceProps:D,getFloatingProps:N,slot:A}},t))}function dn(t){ot(()=>{if(!t)return;let e=new MutationObserver(()=>{let o=window.getComputedStyle(t).maxHeight,n=parseFloat(o);if(isNaN(n))return;let i=parseInt(o);isNaN(i)||n!==i&&(t.style.maxHeight=`${Math.ceil(n)}px`)});return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[t])}function mn(t,e){var o,n,i;let r=vt((o=t==null?void 0:t.gap)!=null?o:"var(--anchor-gap, 0)",e),s=vt((n=t==null?void 0:t.offset)!=null?n:"var(--anchor-offset, 0)",e),l=vt((i=t==null?void 0:t.padding)!=null?i:"var(--anchor-padding, 0)",e);return{...t,gap:r,offset:s,padding:l}}function vt(t,e,o=void 0){let n=re(),i=_t((c,f)=>{if(c==null)return[o,null];if(typeof c=="number")return[c,null];if(typeof c=="string"){if(!f)return[o,null];let a=Vt(c,f);return[a,h=>{let x=oe(c);{let u=x.map(m=>window.getComputedStyle(f).getPropertyValue(m));n.requestAnimationFrame(function m(){n.nextFrame(m);let g=!1;for(let[v,y]of x.entries()){let w=window.getComputedStyle(f).getPropertyValue(y);if(u[v]!==w){u[v]=w,g=!0;break}}if(!g)return;let p=Vt(c,f);a!==p&&(h(p),a=p)})}return n.dispose}]}return[o,null]}),r=d.useMemo(()=>i(t,e)[0],[t,e]),[s=r,l]=d.useState();return ot(()=>{let[c,f]=i(t,e);if(l(c),!!f)return f(l)},[t,e]),s}function oe(t){let e=/var\((.*)\)/.exec(t);if(e){let o=e[1].indexOf(",");if(o===-1)return[e[1]];let n=e[1].slice(0,o).trim(),i=e[1].slice(o+1).trim();return i?[n,...oe(i)]:[n]}return[]}function Vt(t,e){let o=document.createElement("div");e.appendChild(o),o.style.setProperty("margin-top","0px","important"),o.style.setProperty("margin-top",t,"important");let n=parseFloat(window.getComputedStyle(o).marginTop)||0;return e.removeChild(o),n}export{yn as F,Cn as M,Rn as R,bn as b,xn as d,wn as x,vn as y}; +import{r as d,t as ie}from"./index-0d5eMwbi.js";import{n as ot,o as _t,p as re}from"./use-sync-refs-DhZgiOVe.js";import{r as et}from"./index-BoyHNU0R.js";function se(t){if(t===null)return{width:0,height:0};let{width:e,height:o}=t.getBoundingClientRect();return{width:e,height:o}}function xn(t,e=!1){let[o,n]=d.useReducer(()=>({}),{}),i=d.useMemo(()=>se(t),[t,o]);return ot(()=>{if(!t)return;let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect()}},[t]),e?{width:`${i.width}px`,height:`${i.height}px`}:i}function Q(t){return zt(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _(t){var e;return(e=(zt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zt(t){return t instanceof Node||t instanceof k(t).Node}function T(t){return t instanceof Element||t instanceof k(t).Element}function V(t){return t instanceof HTMLElement||t instanceof k(t).HTMLElement}function Mt(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof k(t).ShadowRoot}function it(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=W(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function le(t){return["table","td","th"].includes(Q(t))}function dt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Rt(t){const e=Ct(),o=T(t)?W(t):t;return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function ce(t){let e=Y(t);for(;V(e)&&!J(e);){if(Rt(e))return e;if(dt(e))return null;e=Y(e)}return null}function Ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function J(t){return["html","body","#document"].includes(Q(t))}function W(t){return k(t).getComputedStyle(t)}function mt(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Y(t){if(Q(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Mt(t)&&t.host||_(t);return Mt(e)?e.host:e}function jt(t){const e=Y(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&it(e)?e:jt(e)}function nt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=jt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=k(i);return r?e.concat(s,s.visualViewport||[],it(i)?i:[],s.frameElement&&o?nt(s.frameElement):[]):e.concat(i,nt(i,[],o))}function fe(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:o,version:n}=e;return o+"/"+n}).join(" "):navigator.userAgent}const j=Math.min,$=Math.max,ct=Math.round,st=Math.floor,q=t=>({x:t,y:t}),ue={left:"right",right:"left",bottom:"top",top:"bottom"},ae={start:"end",end:"start"};function Tt(t,e,o){return $(t,j(e,o))}function Z(t,e){return typeof t=="function"?t(e):t}function X(t){return t.split("-")[0]}function rt(t){return t.split("-")[1]}function Yt(t){return t==="x"?"y":"x"}function qt(t){return t==="y"?"height":"width"}function U(t){return["top","bottom"].includes(X(t))?"y":"x"}function Xt(t){return Yt(U(t))}function de(t,e,o){o===void 0&&(o=!1);const n=rt(t),i=Xt(t),r=qt(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ft(s)),[s,ft(s)]}function me(t){const e=ft(t);return[yt(t),e,yt(e)]}function yt(t){return t.replace(/start|end/g,e=>ae[e])}function ge(t,e,o){const n=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?r:s;default:return[]}}function he(t,e,o,n){const i=rt(t);let r=ge(X(t),o==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(yt)))),r}function ft(t){return t.replace(/left|right|bottom|top/g,e=>ue[e])}function pe(t){return{top:0,right:0,bottom:0,left:0,...t}}function xe(t){return typeof t!="number"?pe(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Ft(t,e,o){let{reference:n,floating:i}=t;const r=U(e),s=Xt(e),l=qt(s),c=X(e),f=r==="y",a=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,x=n[l]/2-i[l]/2;let u;switch(c){case"top":u={x:a,y:n.y-i.height};break;case"bottom":u={x:a,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:h};break;case"left":u={x:n.x-i.width,y:h};break;default:u={x:n.x,y:n.y}}switch(rt(e)){case"start":u[s]-=x*(o&&f?-1:1);break;case"end":u[s]+=x*(o&&f?-1:1);break}return u}const we=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:h}=Ft(f,n,c),x=n,u={},m=0;for(let g=0;gO<=0)){var S,L;const O=(((S=r.flip)==null?void 0:S.index)||0)+1,H=P[O];if(H)return{data:{index:O,overflows:F},reset:{placement:H}};let I=(L=F.filter(C=>C.overflows[0]<=0).sort((C,M)=>C.overflows[1]-M.overflows[1])[0])==null?void 0:L.placement;if(!I)switch(u){case"bestFit":{var B;const C=(B=F.filter(M=>{if(A){const E=U(M.placement);return E===y||E==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(E=>E>0).reduce((E,z)=>E+z,0)]).sort((M,E)=>M[1]-E[1])[0])==null?void 0:B[0];C&&(I=C);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};async function ye(t,e){const{placement:o,platform:n,elements:i}=t,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=X(o),l=rt(o),c=U(o)==="y",f=["left","top"].includes(s)?-1:1,a=r&&c?-1:1,h=Z(e,t);let{mainAxis:x,crossAxis:u,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof m=="number"&&(u=l==="end"?m*-1:m),c?{x:u*a,y:x*f}:{x:x*f,y:u*a}}const be=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:r,placement:s,middlewareData:l}=e,c=await ye(e,t);return s===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Re=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:p=>{let{x:v,y}=p;return{x:v,y}}},...c}=Z(t,e),f={x:o,y:n},a=await gt(e,c),h=U(X(i)),x=Yt(h);let u=f[x],m=f[h];if(r){const p=x==="y"?"top":"left",v=x==="y"?"bottom":"right",y=u+a[p],w=u-a[v];u=Tt(y,u,w)}if(s){const p=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=m+a[p],w=m-a[v];m=Tt(y,m,w)}const g=l.fn({...e,[x]:u,[h]:m});return{...g,data:{x:g.x-o,y:g.y-n}}}}},Ce=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:n,platform:i,elements:r}=e,{apply:s=()=>{},...l}=Z(t,e),c=await gt(e,l),f=X(o),a=rt(o),h=U(o)==="y",{width:x,height:u}=n.floating;let m,g;f==="top"||f==="bottom"?(m=f,g=a===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=f,m=a==="end"?"top":"bottom");const p=u-c.top-c.bottom,v=x-c.left-c.right,y=j(u-c[m],p),w=j(x-c[g],v),b=!e.middlewareData.shift;let R=y,A=w;if(h?A=a||b?j(w,v):v:R=a||b?j(y,p):p,b&&!a){const D=$(c.left,0),N=$(c.right,0),F=$(c.top,0),S=$(c.bottom,0);h?A=x-2*(D!==0||N!==0?D+N:$(c.left,c.right)):R=u-2*(F!==0||S!==0?F+S:$(c.top,c.bottom))}await s({...e,availableWidth:A,availableHeight:R});const P=await i.getDimensions(r.floating);return x!==P.width||u!==P.height?{reset:{rects:!0}}:{}}}};function Ut(t){const e=W(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=V(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,l=ct(o)!==r||ct(n)!==s;return l&&(o=r,n=s),{width:o,height:n,$:l}}function Et(t){return T(t)?t:t.contextElement}function G(t){const e=Et(t);if(!V(e))return q(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Ut(e);let s=(r?ct(o.width):o.width)/n,l=(r?ct(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Ee=q(0);function Kt(t){const e=k(t);return!Ct()||!e.visualViewport?Ee:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ae(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==k(t)?!1:e}function K(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=Et(t);let s=q(1);e&&(n?T(n)&&(s=G(n)):s=G(t));const l=Ae(r,o,n)?Kt(r):q(0);let c=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,a=i.width/s.x,h=i.height/s.y;if(r){const x=k(r),u=n&&T(n)?k(n):n;let m=x,g=m.frameElement;for(;g&&n&&u!==m;){const p=G(g),v=g.getBoundingClientRect(),y=W(g),w=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*p.x,b=v.top+(g.clientTop+parseFloat(y.paddingTop))*p.y;c*=p.x,f*=p.y,a*=p.x,h*=p.y,c+=w,f+=b,m=k(g),g=m.frameElement}}return ut({width:a,height:h,x:c,y:f})}function Se(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=_(n),l=e?dt(e.floating):!1;if(n===s||l&&r)return o;let c={scrollLeft:0,scrollTop:0},f=q(1);const a=q(0),h=V(n);if((h||!h&&!r)&&((Q(n)!=="body"||it(s))&&(c=mt(n)),V(n))){const x=K(n);f=G(n),a.x=x.x+n.clientLeft,a.y=x.y+n.clientTop}return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-c.scrollLeft*f.x+a.x,y:o.y*f.y-c.scrollTop*f.y+a.y}}function Oe(t){return Array.from(t.getClientRects())}function Gt(t){return K(_(t)).left+mt(t).scrollLeft}function Me(t){const e=_(t),o=mt(t),n=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=$(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+Gt(t);const l=-o.scrollTop;return W(n).direction==="rtl"&&(s+=$(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:l}}function Te(t,e){const o=k(t),n=_(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const f=Ct();(!f||f&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:l,y:c}}function Fe(t,e){const o=K(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=V(t)?G(t):q(1),s=t.clientWidth*r.x,l=t.clientHeight*r.y,c=i*r.x,f=n*r.y;return{width:s,height:l,x:c,y:f}}function Pt(t,e,o){let n;if(e==="viewport")n=Te(t,o);else if(e==="document")n=Me(_(t));else if(T(e))n=Fe(e,o);else{const i=Kt(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return ut(n)}function Jt(t,e){const o=Y(t);return o===e||!T(o)||J(o)?!1:W(o).position==="fixed"||Jt(o,e)}function Pe(t,e){const o=e.get(t);if(o)return o;let n=nt(t,[],!1).filter(l=>T(l)&&Q(l)!=="body"),i=null;const r=W(t).position==="fixed";let s=r?Y(t):t;for(;T(s)&&!J(s);){const l=W(s),c=Rt(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||it(s)&&!c&&Jt(t,s))?n=n.filter(a=>a!==s):i=l,s=Y(s)}return e.set(t,n),n}function De(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?dt(e)?[]:Pe(e,this._c):[].concat(o),n],l=s[0],c=s.reduce((f,a)=>{const h=Pt(e,a,i);return f.top=$(h.top,f.top),f.right=j(h.right,f.right),f.bottom=j(h.bottom,f.bottom),f.left=$(h.left,f.left),f},Pt(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Le(t){const{width:e,height:o}=Ut(t);return{width:e,height:o}}function He(t,e,o){const n=V(e),i=_(e),r=o==="fixed",s=K(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const c=q(0);if(n||!n&&!r)if((Q(e)!=="body"||it(i))&&(l=mt(e)),n){const h=K(e,!0,r,e);c.x=h.x+e.clientLeft,c.y=h.y+e.clientTop}else i&&(c.x=Gt(i));const f=s.left+l.scrollLeft-c.x,a=s.top+l.scrollTop-c.y;return{x:f,y:a,width:s.width,height:s.height}}function pt(t){return W(t).position==="static"}function Dt(t,e){return!V(t)||W(t).position==="fixed"?null:e?e(t):t.offsetParent}function Qt(t,e){const o=k(t);if(dt(t))return o;if(!V(t)){let i=Y(t);for(;i&&!J(i);){if(T(i)&&!pt(i))return i;i=Y(i)}return o}let n=Dt(t,e);for(;n&&le(n)&&pt(n);)n=Dt(n,e);return n&&J(n)&&pt(n)&&!Rt(n)?o:n||ce(t)||o}const $e=async function(t){const e=this.getOffsetParent||Qt,o=this.getDimensions,n=await o(t.floating);return{reference:He(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ke(t){return W(t).direction==="rtl"}const Ie={convertOffsetParentRelativeRectToViewportRelativeRect:Se,getDocumentElement:_,getClippingRect:De,getOffsetParent:Qt,getElementRects:$e,getClientRects:Oe,getDimensions:Le,getScale:G,isElement:T,isRTL:ke};function Ne(t,e){let o=null,n;const i=_(t);function r(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const{left:f,top:a,width:h,height:x}=t.getBoundingClientRect();if(l||e(),!h||!x)return;const u=st(a),m=st(i.clientWidth-(f+h)),g=st(i.clientHeight-(a+x)),p=st(f),y={rootMargin:-u+"px "+-m+"px "+-g+"px "+-p+"px",threshold:$(0,j(1,c))||1};let w=!0;function b(R){const A=R[0].intersectionRatio;if(A!==c){if(!w)return s();A?s(!1,A):n=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{o=new IntersectionObserver(b,{...y,root:i.ownerDocument})}catch{o=new IntersectionObserver(b,y)}o.observe(t)}return s(!0),r}function Be(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,f=Et(t),a=i||r?[...f?nt(f):[],...nt(e)]:[];a.forEach(v=>{i&&v.addEventListener("scroll",o,{passive:!0}),r&&v.addEventListener("resize",o)});const h=f&&l?Ne(f,o):null;let x=-1,u=null;s&&(u=new ResizeObserver(v=>{let[y]=v;y&&y.target===f&&u&&(u.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var w;(w=u)==null||w.observe(e)})),o()}),f&&!c&&u.observe(f),u.observe(e));let m,g=c?K(t):null;c&&p();function p(){const v=K(t);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&o(),g=v,m=requestAnimationFrame(p)}return o(),()=>{var v;a.forEach(y=>{i&&y.removeEventListener("scroll",o),r&&y.removeEventListener("resize",o)}),h==null||h(),(v=u)==null||v.disconnect(),u=null,c&&cancelAnimationFrame(m)}}const xt=gt,We=be,Ve=Re,_e=ve,ze=Ce,je=(t,e,o)=>{const n=new Map,i={platform:Ie,...o},r={...i.platform,_c:n};return we(t,e,{...i,platform:r})};var lt=typeof document<"u"?d.useLayoutEffect:d.useEffect;function at(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let o,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==e.length)return!1;for(n=o;n--!==0;)if(!at(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){const r=i[n];if(!(r==="_owner"&&t.$$typeof)&&!at(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function Zt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(t,e){const o=Zt(t);return Math.round(e*o)/o}function Ht(t){const e=d.useRef(t);return lt(()=>{e.current=t}),e}function Ye(t){t===void 0&&(t={});const{placement:e="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:r,floating:s}={},transform:l=!0,whileElementsMounted:c,open:f}=t,[a,h]=d.useState({x:0,y:0,strategy:o,placement:e,middlewareData:{},isPositioned:!1}),[x,u]=d.useState(n);at(x,n)||u(n);const[m,g]=d.useState(null),[p,v]=d.useState(null),y=d.useCallback(C=>{C!==A.current&&(A.current=C,g(C))},[]),w=d.useCallback(C=>{C!==P.current&&(P.current=C,v(C))},[]),b=r||m,R=s||p,A=d.useRef(null),P=d.useRef(null),D=d.useRef(a),N=c!=null,F=Ht(c),S=Ht(i),L=d.useCallback(()=>{if(!A.current||!P.current)return;const C={placement:e,strategy:o,middleware:x};S.current&&(C.platform=S.current),je(A.current,P.current,C).then(M=>{const E={...M,isPositioned:!0};B.current&&!at(D.current,E)&&(D.current=E,et.flushSync(()=>{h(E)}))})},[x,e,o,S]);lt(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[f]);const B=d.useRef(!1);lt(()=>(B.current=!0,()=>{B.current=!1}),[]),lt(()=>{if(b&&(A.current=b),R&&(P.current=R),b&&R){if(F.current)return F.current(b,R,L);L()}},[b,R,L,F,N]);const O=d.useMemo(()=>({reference:A,floating:P,setReference:y,setFloating:w}),[y,w]),H=d.useMemo(()=>({reference:b,floating:R}),[b,R]),I=d.useMemo(()=>{const C={position:o,left:0,top:0};if(!H.floating)return C;const M=Lt(H.floating,a.x),E=Lt(H.floating,a.y);return l?{...C,transform:"translate("+M+"px, "+E+"px)",...Zt(H.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:M,top:E}},[o,l,H.floating,a.x,a.y]);return d.useMemo(()=>({...a,update:L,refs:O,elements:H,floatingStyles:I}),[a,L,O,H,I])}const te=(t,e)=>({...We(t),options:[t,e]}),qe=(t,e)=>({...Ve(t),options:[t,e]}),Xe=(t,e)=>({..._e(t),options:[t,e]}),Ue=(t,e)=>({...ze(t),options:[t,e]}),ee={...ie},Ke=ee.useInsertionEffect,Ge=Ke||(t=>t());function ne(t){const e=d.useRef(()=>{});return Ge(()=>{e.current=t}),d.useCallback(function(){for(var o=arguments.length,n=new Array(o),i=0;i"floating-ui-"+Math.random().toString(36).slice(2,6)+Je++;function Qe(){const[t,e]=d.useState(()=>$t?kt():void 0);return bt(()=>{t==null&&e(kt())},[]),d.useEffect(()=>{$t=!0},[]),t}const Ze=ee.useId,tn=Ze||Qe;function en(){const t=new Map;return{emit(e,o){var n;(n=t.get(e))==null||n.forEach(i=>i(o))},on(e,o){t.set(e,[...t.get(e)||[],o])},off(e,o){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(i=>i!==o))||[])}}}const nn=d.createContext(null),on=d.createContext(null),rn=()=>{var t;return((t=d.useContext(nn))==null?void 0:t.id)||null},sn=()=>d.useContext(on);function ln(t){const{open:e=!1,onOpenChange:o,elements:n}=t,i=tn(),r=d.useRef({}),[s]=d.useState(()=>en()),l=rn()!=null,[c,f]=d.useState(n.reference),a=ne((u,m,g)=>{r.current.openEvent=u?m:void 0,s.emit("openchange",{open:u,event:m,reason:g,nested:l}),o==null||o(u,m,g)}),h=d.useMemo(()=>({setPositionReference:f}),[]),x=d.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return d.useMemo(()=>({dataRef:r,open:e,onOpenChange:a,elements:x,events:s,floatingId:i,refs:h}),[e,a,x,s,i,h])}function cn(t){t===void 0&&(t={});const{nodeId:e}=t,o=ln({...t,elements:{reference:null,floating:null,...t.elements}}),n=t.rootContext||o,i=n.elements,[r,s]=d.useState(null),[l,c]=d.useState(null),a=(i==null?void 0:i.reference)||r,h=d.useRef(null),x=sn();bt(()=>{a&&(h.current=a)},[a]);const u=Ye({...t,elements:{...i,...l&&{reference:l}}}),m=d.useCallback(w=>{const b=T(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;c(b),u.refs.setReference(b)},[u.refs]),g=d.useCallback(w=>{(T(w)||w===null)&&(h.current=w,s(w)),(T(u.refs.reference.current)||u.refs.reference.current===null||w!==null&&!T(w))&&u.refs.setReference(w)},[u.refs]),p=d.useMemo(()=>({...u.refs,setReference:g,setPositionReference:m,domReference:h}),[u.refs,g,m]),v=d.useMemo(()=>({...u.elements,domReference:a}),[u.elements,a]),y=d.useMemo(()=>({...u,...n,refs:p,elements:v,nodeId:e}),[u,p,v,e,n]);return bt(()=>{n.dataRef.current.floatingContext=y;const w=x==null?void 0:x.nodesRef.current.find(b=>b.id===e);w&&(w.context=y)}),d.useMemo(()=>({...u,context:y,refs:p,elements:v}),[u,p,v,y])}const It="active",Nt="selected";function wt(t,e,o){const n=new Map,i=o==="item";let r=t;if(i&&t){const{[It]:s,[Nt]:l,...c}=t;r=c}return{...o==="floating"&&{tabIndex:-1},...r,...e.map(s=>{const l=s?s[o]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((s,l)=>(l&&Object.entries(l).forEach(c=>{let[f,a]=c;if(!(i&&[It,Nt].includes(f)))if(f.indexOf("on")===0){if(n.has(f)||n.set(f,[]),typeof a=="function"){var h;(h=n.get(f))==null||h.push(a),s[f]=function(){for(var x,u=arguments.length,m=new Array(u),g=0;gp(...m)).find(p=>p!==void 0)}}}else s[f]=a}),s),{})}}function fn(t){t===void 0&&(t=[]);const e=t.map(l=>l==null?void 0:l.reference),o=t.map(l=>l==null?void 0:l.floating),n=t.map(l=>l==null?void 0:l.item),i=d.useCallback(l=>wt(l,t,"reference"),e),r=d.useCallback(l=>wt(l,t,"floating"),o),s=d.useCallback(l=>wt(l,t,"item"),n);return d.useMemo(()=>({getReferenceProps:i,getFloatingProps:r,getItemProps:s}),[i,r,s])}function Bt(t,e){return{...t,rects:{...t.rects,floating:{...t.rects.floating,height:e}}}}const un=t=>({name:"inner",options:t,async fn(e){const{listRef:o,overflowRef:n,onFallbackChange:i,offset:r=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:f,...a}=Z(t,e),{rects:h,elements:{floating:x}}=e,u=o.current[s];if(!u)return{};const m={...e,...await te(-u.offsetTop-x.clientTop-h.reference.height/2-u.offsetHeight/2-r).fn(e)},g=(f==null?void 0:f.current)||x,p=await xt(Bt(m,g.scrollHeight),a),v=await xt(m,{...a,elementContext:"reference"}),y=Math.max(0,p.top),w=m.y+y,b=Math.max(0,g.scrollHeight-y-Math.max(0,p.bottom));return g.style.maxHeight=b+"px",g.scrollTop=y,i&&(g.offsetHeight=-c||v.bottom>=-c?et.flushSync(()=>i(!0)):et.flushSync(()=>i(!1))),n&&(n.current=await xt(Bt({...m,y:w},g.offsetHeight),a)),{y:w}}});function an(t,e){const{open:o,elements:n}=t,{enabled:i=!0,overflowRef:r,scrollRef:s,onChange:l}=e,c=ne(l),f=d.useRef(!1),a=d.useRef(null),h=d.useRef(null);d.useEffect(()=>{if(!i)return;function u(g){if(g.ctrlKey||!m||r.current==null)return;const p=g.deltaY,v=r.current.top>=-.5,y=r.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,b=p<0?-1:1,R=p<0?"max":"min";m.scrollHeight<=m.clientHeight||(!v&&p>0||!y&&p<0?(g.preventDefault(),et.flushSync(()=>{c(A=>A+Math[R](p,w*b))})):/firefox/i.test(fe())&&(m.scrollTop+=p))}const m=(s==null?void 0:s.current)||n.floating;if(o&&m)return m.addEventListener("wheel",u),requestAnimationFrame(()=>{a.current=m.scrollTop,r.current!=null&&(h.current={...r.current})}),()=>{a.current=null,h.current=null,m.removeEventListener("wheel",u)}},[i,o,n.floating,r,s,c]);const x=d.useMemo(()=>({onKeyDown(){f.current=!0},onWheel(){f.current=!1},onPointerMove(){f.current=!1},onScroll(){const u=(s==null?void 0:s.current)||n.floating;if(!(!r.current||!u||!f.current)){if(a.current!==null){const m=u.scrollTop-a.current;(r.current.bottom<-.5&&m<-1||r.current.top<-.5&&m>1)&&et.flushSync(()=>c(g=>g+m))}requestAnimationFrame(()=>{a.current=u.scrollTop})}}}),[n.floating,c,r,s]);return d.useMemo(()=>i?{floating:x}:{},[i,x])}let tt=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});tt.displayName="FloatingContext";let At=d.createContext(null);At.displayName="PlacementContext";function wn(t){return d.useMemo(()=>t?typeof t=="string"?{to:t}:t:null,[t])}function vn(){return d.useContext(tt).setReference}function yn(){return d.useContext(tt).getReferenceProps}function bn(){let{getFloatingProps:t,slot:e}=d.useContext(tt);return d.useCallback((...o)=>Object.assign({},t(...o),{"data-anchor":e.anchor}),[t,e])}function Rn(t=null){t===!1&&(t=null),typeof t=="string"&&(t={to:t});let e=d.useContext(At),o=d.useMemo(()=>t,[JSON.stringify(t,(i,r)=>{var s;return(s=r==null?void 0:r.outerHTML)!=null?s:r})]);ot(()=>{e==null||e(o??null)},[e,o]);let n=d.useContext(tt);return d.useMemo(()=>[n.setFloating,t?n.styles:{}],[n.setFloating,t,n.styles])}let Wt=4;function Cn({children:t,enabled:e=!0}){let[o,n]=d.useState(null),[i,r]=d.useState(0),s=d.useRef(null),[l,c]=d.useState(null);dn(l);let f=e&&o!==null&&l!==null,{to:a="bottom",gap:h=0,offset:x=0,padding:u=0,inner:m}=mn(o,l),[g,p="center"]=a.split(" ");ot(()=>{f&&r(0)},[f]);let{refs:v,floatingStyles:y,context:w}=cn({open:f,placement:g==="selection"?p==="center"?"bottom":`bottom-${p}`:p==="center"?`${g}`:`${g}-${p}`,strategy:"absolute",transform:!1,middleware:[te({mainAxis:g==="selection"?0:h,crossAxis:x}),qe({padding:u}),g!=="selection"&&Xe({padding:u}),g==="selection"&&m?un({...m,padding:u,overflowRef:s,offset:i,minItemsVisible:Wt,referenceOverflowThreshold:u,onFallbackChange(S){var L,B;if(!S)return;let O=w.elements.floating;if(!O)return;let H=parseFloat(getComputedStyle(O).scrollPaddingBottom)||0,I=Math.min(Wt,O.childElementCount),C=0,M=0;for(let E of(B=(L=w.elements.floating)==null?void 0:L.childNodes)!=null?B:[])if(E instanceof HTMLElement){let z=E.offsetTop,St=z+E.clientHeight+H,ht=O.scrollTop,Ot=ht+O.clientHeight;if(z>=ht&&St<=Ot)I--;else{M=Math.max(0,Math.min(St,Ot)-Math.max(z,ht)),C=E.clientHeight;break}}I>=1&&r(E=>{let z=C*I-M+H;return E>=z?E:z})}}):null,Ue({padding:u,apply({availableWidth:S,availableHeight:L,elements:B}){Object.assign(B.floating.style,{overflow:"auto",maxWidth:`${S}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${L}px)`})}})].filter(Boolean),whileElementsMounted:Be}),[b=g,R=p]=w.placement.split("-");g==="selection"&&(b="selection");let A=d.useMemo(()=>({anchor:[b,R].filter(Boolean).join(" ")}),[b,R]),P=an(w,{overflowRef:s,onChange:r}),{getReferenceProps:D,getFloatingProps:N}=fn([P]),F=_t(S=>{c(S),v.setFloating(S)});return d.createElement(At.Provider,{value:n},d.createElement(tt.Provider,{value:{setFloating:F,setReference:v.setReference,styles:y,getReferenceProps:D,getFloatingProps:N,slot:A}},t))}function dn(t){ot(()=>{if(!t)return;let e=new MutationObserver(()=>{let o=window.getComputedStyle(t).maxHeight,n=parseFloat(o);if(isNaN(n))return;let i=parseInt(o);isNaN(i)||n!==i&&(t.style.maxHeight=`${Math.ceil(n)}px`)});return e.observe(t,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[t])}function mn(t,e){var o,n,i;let r=vt((o=t==null?void 0:t.gap)!=null?o:"var(--anchor-gap, 0)",e),s=vt((n=t==null?void 0:t.offset)!=null?n:"var(--anchor-offset, 0)",e),l=vt((i=t==null?void 0:t.padding)!=null?i:"var(--anchor-padding, 0)",e);return{...t,gap:r,offset:s,padding:l}}function vt(t,e,o=void 0){let n=re(),i=_t((c,f)=>{if(c==null)return[o,null];if(typeof c=="number")return[c,null];if(typeof c=="string"){if(!f)return[o,null];let a=Vt(c,f);return[a,h=>{let x=oe(c);{let u=x.map(m=>window.getComputedStyle(f).getPropertyValue(m));n.requestAnimationFrame(function m(){n.nextFrame(m);let g=!1;for(let[v,y]of x.entries()){let w=window.getComputedStyle(f).getPropertyValue(y);if(u[v]!==w){u[v]=w,g=!0;break}}if(!g)return;let p=Vt(c,f);a!==p&&(h(p),a=p)})}return n.dispose}]}return[o,null]}),r=d.useMemo(()=>i(t,e)[0],[t,e]),[s=r,l]=d.useState();return ot(()=>{let[c,f]=i(t,e);if(l(c),!!f)return f(l)},[t,e]),s}function oe(t){let e=/var\((.*)\)/.exec(t);if(e){let o=e[1].indexOf(",");if(o===-1)return[e[1]];let n=e[1].slice(0,o).trim(),i=e[1].slice(o+1).trim();return i?[n,...oe(i)]:[n]}return[]}function Vt(t,e){let o=document.createElement("div");e.appendChild(o),o.style.setProperty("margin-top","0px","important"),o.style.setProperty("margin-top",t,"important");let n=parseFloat(window.getComputedStyle(o).marginTop)||0;return e.removeChild(o),n}export{yn as F,Cn as M,Rn as R,bn as b,xn as d,wn as x,vn as y}; diff --git a/assets/focus-management-DaVlPEX1.js b/assets/focus-management-CKkqTXfi.js similarity index 96% rename from assets/focus-management-DaVlPEX1.js rename to assets/focus-management-CKkqTXfi.js index 66bd20ed..86384983 100644 --- a/assets/focus-management-DaVlPEX1.js +++ b/assets/focus-management-CKkqTXfi.js @@ -1 +1 @@ -import{u as N,a as x}from"./use-sync-refs-DqQDZvJ6.js";import{u as f}from"./keyboard-C2Ifhsxt.js";let m=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),h=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var A=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(A||{}),y=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(y||{}),p=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(p||{});function E(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(m)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function S(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(h)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var w=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(w||{});function I(e,t=0){var r;return e===((r=f(e))==null?void 0:r.body)?!1:N(t,{0(){return e.matches(m)},1(){let n=e;for(;n!==null;){if(n.matches(m))return!0;n=n.parentElement}return!1}})}function D(e){let t=f(e);x().nextFrame(()=>{t&&!I(t.activeElement,0)&&O(e)})}var M=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(M||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function O(e){e==null||e.focus({preventScroll:!0})}let _=["textarea","input"].join(",");function P(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,_))!=null?r:!1}function T(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),s=t(n);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function K(e,t){return L(E(),t,{relativeTo:e})}function L(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?r?T(e):e:t&64?S(e):E(e);i.length>0&&o.length>1&&(o=o.filter(u=>!i.some(c=>c!=null&&"current"in c?(c==null?void 0:c.current)===u:c===u))),n=n??s.activeElement;let b=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(n))-1;if(t&4)return Math.max(0,o.indexOf(n))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),F=t&32?{preventScroll:!0}:{},d=0,a=o.length,l;do{if(d>=a||d+a<=0)return 0;let u=v+d;if(t&16)u=(u+a)%a;else{if(u<0)return 3;if(u>=a)return 1}l=o[u],l==null||l.focus(F),d+=b}while(l!==s.activeElement);return t&6&&P(l)&&l.select(),2}export{I as A,A as F,D as G,O as I,L as P,y as T,T as _,E as b,m as f,w as h,K as j}; +import{u as N,a as x}from"./use-sync-refs-DhZgiOVe.js";import{u as f}from"./keyboard-D0BTZntQ.js";let m=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),h=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var A=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(A||{}),y=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(y||{}),p=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(p||{});function E(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(m)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function S(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(h)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var w=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(w||{});function I(e,t=0){var r;return e===((r=f(e))==null?void 0:r.body)?!1:N(t,{0(){return e.matches(m)},1(){let n=e;for(;n!==null;){if(n.matches(m))return!0;n=n.parentElement}return!1}})}function D(e){let t=f(e);x().nextFrame(()=>{t&&!I(t.activeElement,0)&&O(e)})}var M=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(M||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function O(e){e==null||e.focus({preventScroll:!0})}let _=["textarea","input"].join(",");function P(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,_))!=null?r:!1}function T(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),s=t(n);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function K(e,t){return L(E(),t,{relativeTo:e})}function L(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?r?T(e):e:t&64?S(e):E(e);i.length>0&&o.length>1&&(o=o.filter(u=>!i.some(c=>c!=null&&"current"in c?(c==null?void 0:c.current)===u:c===u))),n=n??s.activeElement;let b=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(n))-1;if(t&4)return Math.max(0,o.indexOf(n))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),F=t&32?{preventScroll:!0}:{},d=0,a=o.length,l;do{if(d>=a||d+a<=0)return 0;let u=v+d;if(t&16)u=(u+a)%a;else{if(u<0)return 3;if(u>=a)return 1}l=o[u],l==null||l.focus(F),d+=b}while(l!==s.activeElement);return t&6&&P(l)&&l.select(),2}export{I as A,A as F,D as G,O as I,L as P,y as T,T as _,E as b,m as f,w as h,K as j}; diff --git a/assets/form-field-2xLK_lYH.js b/assets/form-field-MCn42VmW.js similarity index 93% rename from assets/form-field-2xLK_lYH.js rename to assets/form-field-MCn42VmW.js index c0250948..2f4f2d0e 100644 --- a/assets/form-field-2xLK_lYH.js +++ b/assets/form-field-MCn42VmW.js @@ -1 +1 @@ -import{j as u}from"./jsx-runtime-C798UXYj.js";import{e as To,as as ke,gz as $o,g as wo,j as Vo}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as H}from"./class-names-DnY5YZNL.js";import{$ as Ee,a as Ce,w as Zt,e as eo}from"./use-resolve-button-type-D_6M6Au0.js";import{r as d,R as P}from"./index-0d5eMwbi.js";import{l as Rt,T as Tt,j as $t,p as to}from"./form-fields-B2NmhAAW.js";import{o as g,M as Pe,L as ne,u as oe,n as re,D as ae,y as ie,p as wt,W as ve,s as Le,a as We}from"./use-sync-refs-DqQDZvJ6.js";import{a as De,U as Vt,H as Mo,w as oo}from"./description-D9Ee5mtv.js";import{Q as Mt,K as qe,u as Pt,I as Ne}from"./label-BBnH-iCi.js";import{r as Be}from"./bugs-DpEN4NTH.js";import{_ as jt,A as Po,h as jo,j as Fo,F as ge,P as Jt,T as Wt}from"./focus-management-DaVlPEX1.js";import{o as w,u as ro}from"./keyboard-C2Ifhsxt.js";import{r as te}from"./index-BoyHNU0R.js";import{F as ko,u as no,c as V,f as _e,s as Lo,a as Do}from"./use-text-value-ehRDfXkw.js";import{M as ao,y as lo,x as io,R as so,b as uo,d as Xe,F as qo}from"./floating-ERp4LevH.js";import{y as co}from"./use-inert-others-CzqV763I.js";import{R as po,n as Ft,m as mo,f as bo,r as fo,a as Bo}from"./portal-CLj4HHuk.js";import{c as vo,i as be,u as go,x as xo,R as yo}from"./open-closed-DC3t9YEZ.js";import{B as ho}from"./badge-BIezdMmM.js";import{u as Ao}from"./index-BgfbgFhO.js";import{E as Go}from"./use-event-listener-CochUv0b.js";import{m as Xt,r as Yt}from"./active-element-history-DI7yoVCB.js";import{T as Uo}from"./tag-C9CGXtt3.js";function Ho(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function kt(e=Ho){return d.useCallback((t,r)=>{if(typeof e=="string"){let o=e;return(t==null?void 0:t[o])===(r==null?void 0:r[o])}return e(t,r)},[e])}function _o(e){let t=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Go(e,"blur",r=>{let o=r.target;o instanceof HTMLInputElement&&(t.current={value:o.value,selectionStart:o.selectionStart,selectionEnd:o.selectionEnd})}),g(()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:r,selectionEnd:o}=t.current;r!==null&&o!==null&&e.setSelectionRange(r,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}function Ko({children:e,freeze:t}){let r=je(t,e);return P.createElement(P.Fragment,null,r)}function je(e,t){let[r,o]=d.useState(t);return!e&&r!==t&&o(t),e?r:t}var Lt=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Lt||{}),zo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zo||{}),Qo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Qo||{}),Jo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Jo||{}),Wo=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e[e.SetInputElement=8]="SetInputElement",e[e.SetButtonElement=9]="SetButtonElement",e[e.SetOptionsElement=10]="SetOptionsElement",e))(Wo||{});function ze(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),a=o.length>0&&o[0].dataRef.current.order!==null?o.sort((l,n)=>l.dataRef.current.order-n.dataRef.current.order):jt(o,l=>l.dataRef.current.domRef.current),f=r?a.indexOf(r):null;return f===-1&&(f=null),{options:a,activeOptionIndex:f}}let Xo={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,r;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let o=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(o!==-1)return{...e,activeOptionIndex:o,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var r,o,a,f;if((r=e.dataRef.current)!=null&&r.disabled||e.optionsElement&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:p,disabled:m}=e.virtual,v=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>p,resolveActiveIndex:()=>{var s,b;return(b=(s=e.activeOptionIndex)!=null?s:p.findIndex(h=>!m(h)))!=null?b:null},resolveDisabled:m,resolveId(){throw new Error("Function not implemented.")}}),I=(a=t.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===I?e:{...e,activeOptionIndex:v,activationTrigger:I,isTyping:!1,__demoMode:!1}}let l=ze(e);if(l.activeOptionIndex===null){let p=l.options.findIndex(m=>!m.dataRef.current.disabled);p!==-1&&(l.activeOptionIndex=p)}let n=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled}),i=(f=t.trigger)!=null?f:2;return e.activeOptionIndex===n&&e.activationTrigger===i?e:{...e,...l,isTyping:!1,activeOptionIndex:n,activationTrigger:i,__demoMode:!1}},4:(e,t)=>{var r,o,a;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,t.payload]};let f=t.payload,l=ze(e,i=>(i.push(f),i));e.activeOptionIndex===null&&(o=e.dataRef.current)!=null&&o.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(f));let n={...e,...l,activationTrigger:2};return(a=e.dataRef.current)!=null&&a.__demoMode&&e.dataRef.current.value===void 0&&(n.activeOptionIndex=0),n},5:(e,t)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(a=>a.id!==t.id)};let o=ze(e,a=>{let f=a.findIndex(l=>l.id===t.id);return f!==-1&&a.splice(f,1),a});return{...e,...o,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var r,o;if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:(r=t.disabled)!=null?r:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let a=e.activeOptionIndex;if(e.activeOptionIndex!==null){let f=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);f!==-1?a=f:a=null}return{...e,activeOptionIndex:a,virtual:{options:t.options,disabled:(o=t.disabled)!=null?o:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Dt=d.createContext(null);Dt.displayName="ComboboxActionsContext";function Re(e){let t=d.useContext(Dt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Re),r}return t}let Oo=d.createContext(null);function Yo(e){let t=he("VirtualProvider"),{options:r}=t.virtual,[o,a]=d.useMemo(()=>{let p=t.optionsElement;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[t.optionsElement]),f=Ao({enabled:r.length!==0,scrollPaddingStart:o,scrollPaddingEnd:a,count:r.length,estimateSize(){return 40},getScrollElement(){return t.optionsElement},overscan:12}),[l,n]=d.useState(0);re(()=>{n(p=>p+1)},[r]);let i=f.getVirtualItems();return i.length===0?null:P.createElement(Oo.Provider,{value:f},P.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:p=>{p&&t.activationTrigger!==0&&t.activeOptionIndex!==null&&r.length>t.activeOptionIndex&&f.scrollToIndex(t.activeOptionIndex)}},i.map(p=>{var m;return P.createElement(d.Fragment,{key:p.key},P.cloneElement((m=e.children)==null?void 0:m.call(e,{...e.slot,option:r[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":r.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let Oe=d.createContext(null);Oe.displayName="ComboboxDataContext";function he(e){let t=d.useContext(Oe);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,he),r}return t}function Zo(e,t){return oe(t.type,Xo,e,t)}let er=d.Fragment;function tr(e,t){var r,o;let a=De(),{value:f,defaultValue:l,onChange:n,form:i,name:p,by:m,disabled:v=a||!1,onClose:I,__demoMode:s=!1,multiple:b=!1,immediate:h=!1,virtual:x=null,nullable:D,...j}=e,R=Rt(l),[N=b?[]:void 0,M]=Tt(f,n,R),[S,_]=d.useReducer(Zo,{dataRef:d.createRef(),comboboxState:s?0:1,isTyping:!1,options:[],virtual:x?{options:x.options,disabled:(r=x.disabled)!=null?r:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:s}),E=d.useRef(!1),T=d.useRef({static:!1,hold:!1}),F=kt(m),y=g(O=>x?m===null?x.options.indexOf(O):x.options.findIndex(U=>F(U,O)):S.options.findIndex(U=>F(U.dataRef.current.value,O))),q=d.useCallback(O=>oe(C.mode,{1:()=>N.some(U=>F(U,O)),0:()=>F(N,O)}),[N]),J=g(O=>S.activeOptionIndex===y(O)),C=d.useMemo(()=>({...S,immediate:h,optionsPropsRef:T,value:N,defaultValue:R,disabled:v,mode:b?1:0,virtual:x?S.virtual:null,get activeOptionIndex(){if(E.current&&S.activeOptionIndex===null&&(x?x.options.length>0:S.options.length>0)){if(x){let U=x.options.findIndex(ue=>{var we,Qt;return!((Qt=(we=x.disabled)==null?void 0:we.call(x,ue))!=null&&Qt)});if(U!==-1)return U}let O=S.options.findIndex(U=>!U.dataRef.current.disabled);if(O!==-1)return O}return S.activeOptionIndex},calculateIndex:y,compare:F,isSelected:q,isActive:J}),[N,R,v,b,s,S,x]);re(()=>{var O;x&&_({type:7,options:x.options,disabled:(O=x.disabled)!=null?O:null})},[x,x==null?void 0:x.options,x==null?void 0:x.disabled]),re(()=>{S.dataRef.current=C},[C]);let B=C.comboboxState===0;po(B,[C.buttonElement,C.inputElement,C.optionsElement],()=>W.closeCombobox());let X=d.useMemo(()=>{var O,U,ue;return{open:C.comboboxState===0,disabled:v,activeIndex:C.activeOptionIndex,activeOption:C.activeOptionIndex===null?null:C.virtual?C.virtual.options[(O=C.activeOptionIndex)!=null?O:0]:(ue=(U=C.options[C.activeOptionIndex])==null?void 0:U.dataRef.current.value)!=null?ue:null,value:N}},[C,v,N]),Z=g(()=>{if(C.activeOptionIndex!==null){if(W.setIsTyping(!1),C.virtual)c(C.virtual.options[C.activeOptionIndex]);else{let{dataRef:O}=C.options[C.activeOptionIndex];c(O.current.value)}W.goToOption(V.Specific,C.activeOptionIndex)}}),ee=g(()=>{_({type:0}),E.current=!0}),le=g(()=>{_({type:1}),E.current=!1,I==null||I()}),se=g(O=>{_({type:3,isTyping:O})}),k=g((O,U,ue)=>(E.current=!1,O===V.Specific?_({type:2,focus:V.Specific,idx:U,trigger:ue}):_({type:2,focus:O,trigger:ue}))),G=g((O,U)=>(_({type:4,payload:{id:O,dataRef:U}}),()=>{C.isActive(U.current.value)&&(E.current=!0),_({type:5,id:O})})),c=g(O=>oe(C.mode,{0(){return M==null?void 0:M(O)},1(){let U=C.value.slice(),ue=U.findIndex(we=>F(we,O));return ue===-1?U.push(O):U.splice(ue,1),M==null?void 0:M(U)}})),L=g(O=>{_({type:6,trigger:O})}),$=g(O=>{_({type:8,element:O})}),K=g(O=>{_({type:9,element:O})}),z=g(O=>{_({type:10,element:O})}),W=d.useMemo(()=>({onChange:c,registerOption:G,goToOption:k,setIsTyping:se,closeCombobox:le,openCombobox:ee,setActivationTrigger:L,selectActiveOption:Z,setInputElement:$,setButtonElement:K,setOptionsElement:z}),[]),[de,He]=qe(),Ke=t===null?{}:{ref:t},A=d.useCallback(()=>{if(R!==void 0)return M==null?void 0:M(R)},[M,R]),Q=ae();return P.createElement(He,{value:de,props:{htmlFor:(o=C.inputElement)==null?void 0:o.id},slot:{open:C.comboboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(Dt.Provider,{value:W},P.createElement(Oe.Provider,{value:C},P.createElement(vo,{value:oe(C.comboboxState,{0:be.Open,1:be.Closed})},p!=null&&P.createElement($t,{disabled:v,data:N!=null?{[p]:N}:{},form:i,onReset:A}),Q({ourProps:Ke,theirProps:j,slot:X,defaultTag:er,name:"Combobox"}))))))}let or="input";function rr(e,t){var r,o,a,f,l;let n=he("Combobox.Input"),i=Re("Combobox.Input"),p=d.useId(),m=Pt(),{id:v=m||`headlessui-combobox-input-${p}`,onChange:I,displayValue:s,disabled:b=n.disabled||!1,autoFocus:h=!1,type:x="text",...D}=e,j=d.useRef(null),R=ie(j,t,lo(),i.setInputElement),N=Ft(n.inputElement),M=wt(),S=g(()=>{i.onChange(null),n.optionsElement&&(n.optionsElement.scrollTop=0),i.goToOption(V.Nothing)}),_=d.useMemo(()=>{var c;return typeof s=="function"&&n.value!==void 0?(c=s(n.value))!=null?c:"":typeof n.value=="string"?n.value:""},[n.value,s]);Xt(([c,L],[$,K])=>{if(n.isTyping)return;let z=j.current;z&&((K===0&&L===1||c!==$)&&(z.value=c),requestAnimationFrame(()=>{if(n.isTyping||!z||(N==null?void 0:N.activeElement)!==z)return;let{selectionStart:W,selectionEnd:de}=z;Math.abs((de??0)-(W??0))===0&&W===0&&z.setSelectionRange(z.value.length,z.value.length)}))},[_,n.comboboxState,N,n.isTyping]),Xt(([c],[L])=>{if(c===0&&L===1){if(n.isTyping)return;let $=j.current;if(!$)return;let K=$.value,{selectionStart:z,selectionEnd:W,selectionDirection:de}=$;$.value="",$.value=K,de!==null?$.setSelectionRange(z,W,de):$.setSelectionRange(z,W)}},[n.comboboxState]);let E=d.useRef(!1),T=g(()=>{E.current=!0}),F=g(()=>{M.nextFrame(()=>{E.current=!1})}),y=g(c=>{switch(i.setIsTyping(!0),c.key){case w.Enter:if(n.comboboxState!==0||E.current)return;if(c.preventDefault(),c.stopPropagation(),n.activeOptionIndex===null){i.closeCombobox();return}i.selectActiveOption(),n.mode===0&&i.closeCombobox();break;case w.ArrowDown:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Next),1:()=>i.openCombobox()});case w.ArrowUp:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Previous),1:()=>{te.flushSync(()=>i.openCombobox()),n.value||i.goToOption(V.Last)}});case w.Home:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.End:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.Escape:return n.comboboxState!==0?void 0:(c.preventDefault(),n.optionsElement&&!n.optionsPropsRef.current.static&&c.stopPropagation(),n.mode===0&&n.value===null&&S(),i.closeCombobox());case w.Tab:if(n.comboboxState!==0)return;n.mode===0&&n.activationTrigger!==1&&i.selectActiveOption(),i.closeCombobox();break}}),q=g(c=>{I==null||I(c),n.mode===0&&c.target.value===""&&S(),i.openCombobox()}),J=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(W=>W!==c.currentTarget);if(!(($=n.optionsElement)!=null&&$.contains(z))&&!((K=n.buttonElement)!=null&&K.contains(z))&&n.comboboxState===0)return c.preventDefault(),n.mode===0&&n.value===null&&S(),i.closeCombobox()}),C=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(W=>W!==c.currentTarget);($=n.buttonElement)!=null&&$.contains(z)||(K=n.optionsElement)!=null&&K.contains(z)||n.disabled||n.immediate&&n.comboboxState!==0&&M.microTask(()=>{te.flushSync(()=>i.openCombobox()),i.setActivationTrigger(1)})}),B=Ne(),X=Vt(),{isFocused:Z,focusProps:ee}=Ee({autoFocus:h}),{isHovered:le,hoverProps:se}=Ce({isDisabled:b}),k=d.useMemo(()=>({open:n.comboboxState===0,disabled:b,hover:le,focus:Z,autofocus:h}),[n,le,Z,h,b]),G=ve({ref:R,id:v,role:"combobox",type:x,"aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-activedescendant":n.activeOptionIndex===null?void 0:n.virtual?(o=n.options.find(c=>!c.dataRef.current.disabled&&n.compare(c.dataRef.current.value,n.virtual.options[n.activeOptionIndex])))==null?void 0:o.id:(a=n.options[n.activeOptionIndex])==null?void 0:a.id,"aria-labelledby":B,"aria-describedby":X,"aria-autocomplete":"list",defaultValue:(l=(f=e.defaultValue)!=null?f:n.defaultValue!==void 0?s==null?void 0:s(n.defaultValue):null)!=null?l:n.defaultValue,disabled:b||void 0,autoFocus:h,onCompositionStart:T,onCompositionEnd:F,onKeyDown:y,onChange:q,onFocus:C,onBlur:J},ee,se);return ae()({ourProps:G,theirProps:D,slot:k,defaultTag:or,name:"Combobox.Input"})}let nr="button";function ar(e,t){var r;let o=he("Combobox.Button"),a=Re("Combobox.Button"),f=ie(t,a.setButtonElement),l=d.useId(),{id:n=`headlessui-combobox-button-${l}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=_o(o.inputElement),I=g(_=>{switch(_.key){case w.Space:case w.Enter:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&te.flushSync(()=>a.openCombobox()),v();return;case w.ArrowDown:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.First)),v();return;case w.ArrowUp:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.Last)),v();return;case w.Escape:if(o.comboboxState!==0)return;_.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&_.stopPropagation(),te.flushSync(()=>a.closeCombobox()),v();return;default:return}}),s=g(_=>{_.preventDefault(),!Be(_.currentTarget)&&(_.button===Lt.Left&&(o.comboboxState===0?a.closeCombobox():a.openCombobox()),v())}),b=Ne([n]),{isFocusVisible:h,focusProps:x}=Ee({autoFocus:p}),{isHovered:D,hoverProps:j}=Ce({isDisabled:i}),{pressed:R,pressProps:N}=Zt({disabled:i}),M=d.useMemo(()=>({open:o.comboboxState===0,active:R||o.comboboxState===0,disabled:i,value:o.value,hover:D,focus:h}),[o,D,h,R,i]),S=ve({ref:f,id:n,type:eo(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.comboboxState===0,"aria-labelledby":b,disabled:i||void 0,autoFocus:p,onMouseDown:s,onKeyDown:I},x,j,N);return ae()({ourProps:S,theirProps:m,slot:M,defaultTag:nr,name:"Combobox.Button"})}let lr="div",ir=Pe.RenderStrategy|Pe.Static;function sr(e,t){var r,o,a;let f=d.useId(),{id:l=`headlessui-combobox-options-${f}`,hold:n=!1,anchor:i,portal:p=!1,modal:m=!0,transition:v=!1,...I}=e,s=he("Combobox.Options"),b=Re("Combobox.Options"),h=io(i);h&&(p=!0);let[x,D]=so(h),[j,R]=d.useState(null),N=uo(),M=ie(t,h?x:null,b.setOptionsElement,R),S=Ft(s.optionsElement),_=go(),[E,T]=xo(v,j,_!==null?(_&be.Open)===be.Open:s.comboboxState===0);mo(E,s.inputElement,b.closeCombobox);let F=s.__demoMode?!1:m&&s.comboboxState===0;bo(F,S);let y=s.__demoMode?!1:m&&s.comboboxState===0;co(y,{allowed:d.useCallback(()=>[s.inputElement,s.buttonElement,s.optionsElement],[s.inputElement,s.buttonElement,s.optionsElement])}),re(()=>{var G;s.optionsPropsRef.current.static=(G=e.static)!=null?G:!1},[s.optionsPropsRef,e.static]),re(()=>{s.optionsPropsRef.current.hold=n},[s.optionsPropsRef,n]),ko(s.comboboxState===0,{container:s.optionsElement,accept(G){return G.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:G.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(G){G.setAttribute("role","none")}});let q=Ne([(r=s.buttonElement)==null?void 0:r.id]),J=d.useMemo(()=>({open:s.comboboxState===0,option:void 0}),[s.comboboxState]),C=g(()=>{b.setActivationTrigger(0)}),B=g(G=>{G.preventDefault(),b.setActivationTrigger(0)}),X=ve(h?N():{},{"aria-labelledby":q,role:"listbox","aria-multiselectable":s.mode===1?!0:void 0,id:l,ref:M,style:{...I.style,...D,"--input-width":Xe(s.inputElement,!0).width,"--button-width":Xe(s.buttonElement,!0).width},onWheel:s.activationTrigger===0?void 0:C,onMouseDown:B,...yo(T)}),Z=E&&s.comboboxState===1,ee=je(Z,(o=s.virtual)==null?void 0:o.options),le=je(Z,s.value),se=g(G=>s.compare(le,G));if(s.virtual){if(ee===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(I,{children:P.createElement(Oe.Provider,{value:ee!==s.virtual.options?{...s,virtual:{...s.virtual,options:ee}}:s},P.createElement(Yo,{slot:J},I.children))})}let k=ae();return P.createElement(fo,{enabled:p?e.static||E:!1},P.createElement(Oe.Provider,{value:s.mode===1?s:{...s,isSelected:se}},k({ourProps:X,theirProps:{...I,children:P.createElement(Ko,{freeze:Z},typeof I.children=="function"?(a=I.children)==null?void 0:a.call(I,J):I.children)},slot:J,defaultTag:lr,features:ir,visible:E,name:"Combobox.Options"})))}let ur="div";function dr(e,t){var r,o,a,f;let l=he("Combobox.Option"),n=Re("Combobox.Option"),i=d.useId(),{id:p=`headlessui-combobox-option-${i}`,value:m,disabled:v=(a=(o=(r=l.virtual)==null?void 0:r.disabled)==null?void 0:o.call(r,m))!=null?a:!1,order:I=null,...s}=e,b=_o(l.inputElement),h=l.virtual?l.activeOptionIndex===l.calculateIndex(m):l.activeOptionIndex===null?!1:((f=l.options[l.activeOptionIndex])==null?void 0:f.id)===p,x=l.isSelected(m),D=d.useRef(null),j=Le({disabled:v,value:m,domRef:D,order:I}),R=d.useContext(Oo),N=ie(t,D,R?R.measureElement:null),M=g(()=>{n.setIsTyping(!1),n.onChange(m)});re(()=>n.registerOption(p,j),[j,p]);let S=d.useRef(!(l.virtual||l.__demoMode));re(()=>{if(!l.virtual&&!l.__demoMode)return We().requestAnimationFrame(()=>{S.current=!0})},[l.virtual,l.__demoMode]),re(()=>{if(S.current&&l.comboboxState===0&&h&&l.activationTrigger!==0)return We().requestAnimationFrame(()=>{var B,X;(X=(B=D.current)==null?void 0:B.scrollIntoView)==null||X.call(B,{block:"nearest"})})},[D,h,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let _=g(B=>{B.preventDefault(),B.button===Lt.Left&&(v||(M(),Bo()||requestAnimationFrame(()=>b()),l.mode===0&&n.closeCombobox()))}),E=g(()=>{if(v)return n.goToOption(V.Nothing);let B=l.calculateIndex(m);n.goToOption(V.Specific,B)}),T=no(),F=g(B=>T.update(B)),y=g(B=>{if(!T.wasMoved(B)||v||h)return;let X=l.calculateIndex(m);n.goToOption(V.Specific,X,0)}),q=g(B=>{T.wasMoved(B)&&(v||h&&(l.optionsPropsRef.current.hold||n.goToOption(V.Nothing)))}),J=d.useMemo(()=>({active:h,focus:h,selected:x,disabled:v}),[h,x,v]),C={id:p,ref:N,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":x,disabled:void 0,onMouseDown:_,onFocus:E,onPointerEnter:F,onMouseEnter:F,onPointerMove:y,onMouseMove:y,onPointerLeave:q,onMouseLeave:q};return ae()({ourProps:C,theirProps:s,slot:J,defaultTag:ur,name:"Combobox.Option"})}let cr=ne(tr),Ae=ne(ar),qt=ne(rr),pr=Mt,Bt=ne(sr),Te=ne(dr),Io=Object.assign(cr,{Input:qt,Button:Ae,Label:pr,Options:Bt,Option:Te});var mr=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mr||{}),br=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(br||{}),fr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(fr||{}),vr=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(vr||{});function Qe(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=jt(t(e.options.slice()),f=>f.dataRef.current.domRef.current),a=r?o.indexOf(r):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let gr={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(a=>r(a.dataRef.current.value));return o!==-1&&(t=o),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,o,a,f,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===V.Nothing)return{...n,activeOptionIndex:null};if(t.focus===V.Specific)return{...n,activeOptionIndex:e.options.findIndex(m=>m.id===t.id)};if(t.focus===V.Previous){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((o=v.current)==null?void 0:o.previousElementSibling)===s.current||((a=s.current)==null?void 0:a.previousElementSibling)===null)return{...n,activeOptionIndex:I}}}}else if(t.focus===V.Next){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((f=v.current)==null?void 0:f.nextElementSibling)===s.current||((l=s.current)==null?void 0:l.nextElementSibling)===null)return{...n,activeOptionIndex:I}}}}let i=Qe(e),p=_e(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});return{...n,...i,activeOptionIndex:p}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,o=e.searchQuery+t.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(l=>{var n;return!l.dataRef.current.disabled&&((n=l.dataRef.current.textValue)==null?void 0:n.startsWith(o))}),f=a?e.options.indexOf(a):-1;return f===-1||f===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:f,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},o=Qe(e,a=>[...a,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(r)),{...e,...o}},6:(e,t)=>{let r=Qe(e,o=>{let a=o.findIndex(f=>f.id===t.id);return a!==-1&&o.splice(a,1),o});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},At=d.createContext(null);At.displayName="ListboxActionsContext";function Ge(e){let t=d.useContext(At);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ge),r}return t}let Ue=d.createContext(null);Ue.displayName="ListboxDataContext";function $e(e){let t=d.useContext(Ue);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$e),r}return t}function xr(e,t){return oe(t.type,gr,e,t)}let yr=d.Fragment;function hr(e,t){var r;let o=De(),{value:a,defaultValue:f,form:l,name:n,onChange:i,by:p,invalid:m=!1,disabled:v=o||!1,horizontal:I=!1,multiple:s=!1,__demoMode:b=!1,...h}=e;const x=I?"horizontal":"vertical";let D=ie(t),j=Rt(f),[R=s?[]:void 0,N]=Tt(a,i,j),[M,S]=d.useReducer(xr,{dataRef:d.createRef(),listboxState:b?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:b}),_=d.useRef({static:!1,hold:!1}),E=d.useRef(new Map),T=kt(p),F=d.useCallback(A=>oe(y.mode,{1:()=>R.some(Q=>T(Q,A)),0:()=>T(R,A)}),[R]),y=d.useMemo(()=>({...M,value:R,disabled:v,invalid:m,mode:s?1:0,orientation:x,compare:T,isSelected:F,optionsPropsRef:_,listRef:E}),[R,v,m,s,M,E]);re(()=>{M.dataRef.current=y},[y]);let q=y.listboxState===0;po(q,[y.buttonElement,y.optionsElement],(A,Q)=>{var O;S({type:1}),Po(Q,jo.Loose)||(A.preventDefault(),(O=y.buttonElement)==null||O.focus())});let J=d.useMemo(()=>({open:y.listboxState===0,disabled:v,invalid:m,value:R}),[y,v,R,m]),C=g(A=>{let Q=y.options.find(O=>O.id===A);Q&&k(Q.dataRef.current.value)}),B=g(()=>{if(y.activeOptionIndex!==null){let{dataRef:A,id:Q}=y.options[y.activeOptionIndex];k(A.current.value),S({type:2,focus:V.Specific,id:Q})}}),X=g(()=>S({type:0})),Z=g(()=>S({type:1})),ee=wt(),le=g((A,Q,O)=>{ee.dispose(),ee.microTask(()=>A===V.Specific?S({type:2,focus:V.Specific,id:Q,trigger:O}):S({type:2,focus:A,trigger:O}))}),se=g((A,Q)=>(S({type:5,id:A,dataRef:Q}),()=>S({type:6,id:A}))),k=g(A=>oe(y.mode,{0(){return N==null?void 0:N(A)},1(){let Q=y.value.slice(),O=Q.findIndex(U=>T(U,A));return O===-1?Q.push(A):Q.splice(O,1),N==null?void 0:N(Q)}})),G=g(A=>S({type:3,value:A})),c=g(()=>S({type:4})),L=g(A=>{S({type:7,element:A})}),$=g(A=>{S({type:8,element:A})}),K=d.useMemo(()=>({onChange:k,registerOption:se,goToOption:le,closeListbox:Z,openListbox:X,selectActiveOption:B,selectOption:C,search:G,clearSearch:c,setButtonElement:L,setOptionsElement:$}),[]),[z,W]=qe({inherit:!0}),de={ref:D},He=d.useCallback(()=>{if(j!==void 0)return N==null?void 0:N(j)},[N,j]),Ke=ae();return P.createElement(W,{value:z,props:{htmlFor:(r=y.buttonElement)==null?void 0:r.id},slot:{open:y.listboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(At.Provider,{value:K},P.createElement(Ue.Provider,{value:y},P.createElement(vo,{value:oe(y.listboxState,{0:be.Open,1:be.Closed})},n!=null&&R!=null&&P.createElement($t,{disabled:v,data:{[n]:R},form:l,onReset:He}),Ke({ourProps:de,theirProps:h,slot:J,defaultTag:yr,name:"Listbox"}))))))}let _r="button";function Or(e,t){var r;let o=$e("Listbox.Button"),a=Ge("Listbox.Button"),f=d.useId(),l=Pt(),{id:n=l||`headlessui-listbox-button-${f}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=ie(t,lo(),a.setButtonElement),I=qo(),s=g(y=>{switch(y.key){case w.Enter:to(y.currentTarget);break;case w.Space:case w.ArrowDown:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.First);break;case w.ArrowUp:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.Last);break}}),b=g(y=>{switch(y.key){case w.Space:y.preventDefault();break}}),h=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();o.listboxState===0?(te.flushSync(()=>a.closeListbox()),(q=o.buttonElement)==null||q.focus({preventScroll:!0})):(y.preventDefault(),a.openListbox())}),x=g(y=>y.preventDefault()),D=Ne([n]),j=Vt(),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:p}),{isHovered:M,hoverProps:S}=Ce({isDisabled:i}),{pressed:_,pressProps:E}=Zt({disabled:i}),T=d.useMemo(()=>({open:o.listboxState===0,active:_||o.listboxState===0,disabled:i,invalid:o.invalid,value:o.value,hover:M,focus:R,autofocus:p}),[o.listboxState,o.value,i,M,R,_,o.invalid,p]),F=ve(I(),{ref:v,id:n,type:eo(e,o.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.listboxState===0,"aria-labelledby":D,"aria-describedby":j,disabled:i||void 0,autoFocus:p,onKeyDown:s,onKeyUp:b,onKeyPress:x,onClick:h},N,S,E);return ae()({ourProps:F,theirProps:m,slot:T,defaultTag:_r,name:"Listbox.Button"})}let So=d.createContext(!1),Ir="div",Sr=Pe.RenderStrategy|Pe.Static;function Er(e,t){var r,o;let a=d.useId(),{id:f=`headlessui-listbox-options-${a}`,anchor:l,portal:n=!1,modal:i=!0,transition:p=!1,...m}=e,v=io(l),[I,s]=d.useState(null);v&&(n=!0);let b=$e("Listbox.Options"),h=Ge("Listbox.Options"),x=Ft(b.optionsElement),D=go(),[j,R]=xo(p,I,D!==null?(D&be.Open)===be.Open:b.listboxState===0);mo(j,b.buttonElement,h.closeListbox);let N=b.__demoMode?!1:i&&b.listboxState===0;bo(N,x);let M=b.__demoMode?!1:i&&b.listboxState===0;co(M,{allowed:d.useCallback(()=>[b.buttonElement,b.optionsElement],[b.buttonElement,b.optionsElement])});let S=b.listboxState!==0,_=Lo(S,b.buttonElement)?!1:j,E=j&&b.listboxState===1,T=je(E,b.value),F=g(c=>b.compare(T,c)),y=d.useMemo(()=>{var c;if(v==null||!((c=v==null?void 0:v.to)!=null&&c.includes("selection")))return null;let L=b.options.findIndex($=>F($.dataRef.current.value));return L===-1&&(L=0),L},[v,b.options]),q=(()=>{if(v==null)return;if(y===null)return{...v,inner:void 0};let c=Array.from(b.listRef.current.values());return{...v,inner:{listRef:{current:c},index:y}}})(),[J,C]=so(q),B=uo(),X=ie(t,v?J:null,h.setOptionsElement,s),Z=wt();d.useEffect(()=>{var c;let L=b.optionsElement;L&&b.listboxState===0&&L!==((c=ro(L))==null?void 0:c.activeElement)&&(L==null||L.focus({preventScroll:!0}))},[b.listboxState,b.optionsElement]);let ee=g(c=>{var L,$;switch(Z.dispose(),c.key){case w.Space:if(b.searchQuery!=="")return c.preventDefault(),c.stopPropagation(),h.search(c.key);case w.Enter:if(c.preventDefault(),c.stopPropagation(),b.activeOptionIndex!==null){let{dataRef:K}=b.options[b.activeOptionIndex];h.onChange(K.current.value)}b.mode===0&&(te.flushSync(()=>h.closeListbox()),(L=b.buttonElement)==null||L.focus({preventScroll:!0}));break;case oe(b.orientation,{vertical:w.ArrowDown,horizontal:w.ArrowRight}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Next);case oe(b.orientation,{vertical:w.ArrowUp,horizontal:w.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Previous);case w.Home:case w.PageUp:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.First);case w.End:case w.PageDown:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Last);case w.Escape:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),($=b.buttonElement)==null||$.focus({preventScroll:!0});return;case w.Tab:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),Fo(b.buttonElement,c.shiftKey?ge.Previous:ge.Next);break;default:c.key.length===1&&(h.search(c.key),Z.setTimeout(()=>h.clearSearch(),350));break}}),le=(r=b.buttonElement)==null?void 0:r.id,se=d.useMemo(()=>({open:b.listboxState===0}),[b.listboxState]),k=ve(v?B():{},{id:f,ref:X,"aria-activedescendant":b.activeOptionIndex===null||(o=b.options[b.activeOptionIndex])==null?void 0:o.id,"aria-multiselectable":b.mode===1?!0:void 0,"aria-labelledby":le,"aria-orientation":b.orientation,onKeyDown:ee,role:"listbox",tabIndex:b.listboxState===0?0:void 0,style:{...m.style,...C,"--button-width":Xe(b.buttonElement,!0).width},...yo(R)}),G=ae();return P.createElement(fo,{enabled:n?e.static||j:!1},P.createElement(Ue.Provider,{value:b.mode===1?b:{...b,isSelected:F}},G({ourProps:k,theirProps:m,slot:se,defaultTag:Ir,features:Sr,visible:_,name:"Listbox.Options"})))}let Cr="div";function Nr(e,t){let r=d.useId(),{id:o=`headlessui-listbox-option-${r}`,disabled:a=!1,value:f,...l}=e,n=d.useContext(So)===!0,i=$e("Listbox.Option"),p=Ge("Listbox.Option"),m=i.activeOptionIndex!==null?i.options[i.activeOptionIndex].id===o:!1,v=i.isSelected(f),I=d.useRef(null),s=Do(I),b=Le({disabled:a,value:f,domRef:I,get textValue(){return s()}}),h=ie(t,I,T=>{T?i.listRef.current.set(o,T):i.listRef.current.delete(o)});re(()=>{if(!i.__demoMode&&i.listboxState===0&&m&&i.activationTrigger!==0)return We().requestAnimationFrame(()=>{var T,F;(F=(T=I.current)==null?void 0:T.scrollIntoView)==null||F.call(T,{block:"nearest"})})},[I,m,i.__demoMode,i.listboxState,i.activationTrigger,i.activeOptionIndex]),re(()=>{if(!n)return p.registerOption(o,b)},[b,o,n]);let x=g(T=>{var F;if(a)return T.preventDefault();p.onChange(f),i.mode===0&&(te.flushSync(()=>p.closeListbox()),(F=i.buttonElement)==null||F.focus({preventScroll:!0}))}),D=g(()=>{if(a)return p.goToOption(V.Nothing);p.goToOption(V.Specific,o)}),j=no(),R=g(T=>{j.update(T),!a&&(m||p.goToOption(V.Specific,o,0))}),N=g(T=>{j.wasMoved(T)&&(a||m||p.goToOption(V.Specific,o,0))}),M=g(T=>{j.wasMoved(T)&&(a||m&&p.goToOption(V.Nothing))}),S=d.useMemo(()=>({active:m,focus:m,selected:v,disabled:a,selectedOption:v&&n}),[m,v,a,n]),_=n?{}:{id:o,ref:h,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":v,disabled:void 0,onClick:x,onFocus:D,onPointerEnter:R,onMouseEnter:R,onPointerMove:N,onMouseMove:N,onPointerLeave:M,onMouseLeave:M},E=ae();return!v&&n?null:E({ourProps:_,theirProps:l,slot:S,defaultTag:Cr,name:"Listbox.Option"})}let Rr=d.Fragment;function Tr(e,t){let{options:r,placeholder:o,...a}=e,f={ref:ie(t)},l=$e("ListboxSelectedOption"),n=d.useMemo(()=>({}),[]),i=l.value===void 0||l.value===null||l.mode===1&&Array.isArray(l.value)&&l.value.length===0,p=ae();return P.createElement(So.Provider,{value:!0},p({ourProps:f,theirProps:{...a,children:P.createElement(P.Fragment,null,o&&i?o:r)},slot:n,defaultTag:Rr,name:"ListboxSelectedOption"}))}let $r=ne(hr),Eo=ne(Or),wr=Mt,Co=ne(Er),No=ne(Nr),Vr=ne(Tr),Mr=Object.assign($r,{Button:Eo,Label:wr,Options:Co,Option:No,SelectedOption:Vr});var Pr=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Pr||{});let jr={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:jt(r,o=>o.element.current)}},1(e,t){let r=e.options.slice(),o=e.options.findIndex(a=>a.id===t.id);return o===-1?e:(r.splice(o,1),{...e,options:r})}},Gt=d.createContext(null);Gt.displayName="RadioGroupDataContext";function Ut(e){let t=d.useContext(Gt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ut),r}return t}let Ht=d.createContext(null);Ht.displayName="RadioGroupActionsContext";function Kt(e){let t=d.useContext(Ht);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kt),r}return t}function Fr(e,t){return oe(t.type,jr,e,t)}let kr="div";function Lr(e,t){let r=d.useId(),o=De(),{id:a=`headlessui-radiogroup-${r}`,value:f,form:l,name:n,onChange:i,by:p,disabled:m=o||!1,defaultValue:v,...I}=e,s=kt(p),[b,h]=d.useReducer(Fr,{options:[]}),x=b.options,[D,j]=qe(),[R,N]=oo(),M=d.useRef(null),S=ie(M,t),_=Rt(v),[E,T]=Tt(f,i,_),F=d.useMemo(()=>x.find(k=>!k.propsRef.current.disabled),[x]),y=d.useMemo(()=>x.some(k=>s(k.propsRef.current.value,E)),[x,E]),q=g(k=>{var G;if(m||s(k,E))return!1;let c=(G=x.find(L=>s(L.propsRef.current.value,k)))==null?void 0:G.propsRef.current;return c!=null&&c.disabled?!1:(T==null||T(k),!0)}),J=g(k=>{let G=M.current;if(!G)return;let c=ro(G),L=x.filter($=>$.propsRef.current.disabled===!1).map($=>$.element.current);switch(k.key){case w.Enter:to(k.currentTarget);break;case w.ArrowLeft:case w.ArrowUp:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Previous|ge.WrapAround)===Wt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.ArrowRight:case w.ArrowDown:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Next|ge.WrapAround)===Wt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.Space:{k.preventDefault(),k.stopPropagation();let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break}}),C=g(k=>(h({type:0,...k}),()=>h({type:1,id:k.id}))),B=d.useMemo(()=>({value:E,firstOption:F,containsCheckedOption:y,disabled:m,compare:s,...b}),[E,F,y,m,s,b]),X=d.useMemo(()=>({registerOption:C,change:q}),[C,q]),Z={ref:S,id:a,role:"radiogroup","aria-labelledby":D,"aria-describedby":R,onKeyDown:J},ee=d.useMemo(()=>({value:E}),[E]),le=d.useCallback(()=>{if(_!==void 0)return q(_)},[q,_]),se=ae();return P.createElement(N,{name:"RadioGroup.Description"},P.createElement(j,{name:"RadioGroup.Label"},P.createElement(Ht.Provider,{value:X},P.createElement(Gt.Provider,{value:B},n!=null&&P.createElement($t,{disabled:m,data:{[n]:E||"on"},overrides:{type:"radio",checked:E!=null},form:l,onReset:le}),se({ourProps:Z,theirProps:I,slot:ee,defaultTag:kr,name:"RadioGroup"})))))}let Dr="div";function qr(e,t){var r;let o=Ut("RadioGroup.Option"),a=Kt("RadioGroup.Option"),f=d.useId(),{id:l=`headlessui-radiogroup-option-${f}`,value:n,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=d.useRef(null),I=ie(v,t),[s,b]=qe(),[h,x]=oo(),D=Le({value:n,disabled:i});re(()=>a.registerOption({id:l,element:v,propsRef:D}),[l,a,v,D]);let j=g(q=>{var J;if(Be(q.currentTarget))return q.preventDefault();a.change(n)&&((J=v.current)==null||J.focus())}),R=((r=o.firstOption)==null?void 0:r.id)===l,{isFocusVisible:N,focusProps:M}=Ee({autoFocus:p}),{isHovered:S,hoverProps:_}=Ce({isDisabled:i}),E=o.compare(o.value,n),T=ve({ref:I,id:l,role:"radio","aria-checked":E?"true":"false","aria-labelledby":s,"aria-describedby":h,"aria-disabled":i?!0:void 0,tabIndex:i?-1:E||!o.containsCheckedOption&&R?0:-1,onClick:i?void 0:j,autoFocus:p},M,_),F=d.useMemo(()=>({checked:E,disabled:i,active:N,hover:S,focus:N,autofocus:p}),[E,i,S,N,p]),y=ae();return P.createElement(x,{name:"RadioGroup.Description"},P.createElement(b,{name:"RadioGroup.Label"},y({ourProps:T,theirProps:m,slot:F,defaultTag:Dr,name:"RadioGroup.Option"})))}let Br="span";function Ar(e,t){var r;let o=Ut("Radio"),a=Kt("Radio"),f=d.useId(),l=Pt(),n=De(),{id:i=l||`headlessui-radio-${f}`,value:p,disabled:m=o.disabled||n||!1,autoFocus:v=!1,...I}=e,s=d.useRef(null),b=ie(s,t),h=Ne(),x=Vt(),D=Le({value:p,disabled:m});re(()=>a.registerOption({id:i,element:s,propsRef:D}),[i,a,s,D]);let j=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();a.change(p)&&((q=s.current)==null||q.focus())}),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:v}),{isHovered:M,hoverProps:S}=Ce({isDisabled:m}),_=((r=o.firstOption)==null?void 0:r.id)===i,E=o.compare(o.value,p),T=ve({ref:b,id:i,role:"radio","aria-checked":E?"true":"false","aria-labelledby":h,"aria-describedby":x,"aria-disabled":m?!0:void 0,tabIndex:m?-1:E||!o.containsCheckedOption&&_?0:-1,autoFocus:v,onClick:m?void 0:j},N,S),F=d.useMemo(()=>({checked:E,disabled:m,hover:M,focus:R,autofocus:v}),[E,m,M,R,v]);return ae()({ourProps:T,theirProps:I,slot:F,defaultTag:Br,name:"Radio"})}let Gr=ne(Lr),Ur=ne(qr),zt=ne(Ar),Hr=Mt,Kr=Mo,Ro=Object.assign(Gr,{Option:Ur,Radio:zt,Label:Hr,Description:Kr});const Ye=({id:e,children:t})=>u.jsx("p",{id:`${e}-description`,className:"paragraph-100 text-neutral-700",children:t});try{Ye.displayName="FormFieldDescription",Ye.__docgenInfo={description:"",displayName:"FormFieldDescription",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}}}catch{}const Ze=({children:e})=>u.jsxs("div",{className:"mt-0.5 flex items-center gap-1",children:[u.jsx(To,{className:"h-3 w-3 fill-danger-500"}),u.jsx("p",{className:"paragraph-100 text-danger-500",children:e})]});try{Ze.displayName="FormFieldErrorMessage",Ze.__docgenInfo={description:"",displayName:"FormFieldErrorMessage",props:{}}}catch{}const et=({htmlFor:e,children:t,optional:r})=>u.jsxs("div",{className:"flex items-baseline gap-1 text-neutral-800",children:[u.jsx("label",{htmlFor:e,className:"headline-400",children:t}),r?u.jsx("div",{className:"paragraph-100",children:"(Optional)"}):null]});try{et.displayName="FormFieldLabel",et.__docgenInfo={description:"",displayName:"FormFieldLabel",props:{htmlFor:{defaultValue:null,description:"",name:"htmlFor",required:!0,type:{name:"string"}},optional:{defaultValue:null,description:"",name:"optional",required:!1,type:{name:"boolean"}}}}}catch{}const tt=({children:e})=>u.jsx("div",{className:"mb-2 flex flex-col gap-1",children:e});try{tt.displayName="FormFieldLabelGroup",tt.__docgenInfo={description:"",displayName:"FormFieldLabelGroup",props:{}}}catch{}const ot=({children:e,value:t,disabled:r})=>u.jsx(zt,{value:t,className:"max-w-fit cursor-pointer focus:outline-none",disabled:r,children:({checked:o,disabled:a})=>u.jsxs("div",{className:"flex items-center gap-3",children:[o?u.jsx("span",{className:H("relative inline-block h-4 w-4 rounded-full bg-primary-400 hover:bg-primary-500 active:bg-primary-600",a&&"bg-neutral-100 hover:bg-neutral-100 active:bg-neutral-100"),children:u.jsx("span",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-neutral-0",a&&"bg-neutral-500")})}):u.jsx("span",{className:H("inline-block h-4 w-4 rounded-full border border-neutral-400 hover:border-neutral-600 active:border-neutral-500 active:bg-neutral-100",a&&"border-0 bg-neutral-100")}),u.jsx("p",{className:H("paragraph-200",a&&"text-neutral-600"),children:e})]})});try{ot.displayName="RadioInputOption",ot.__docgenInfo={description:"",displayName:"RadioInputOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Fe=({id:e,children:t,value:r,onChange:o})=>u.jsx(Ro,{id:e,value:r,onChange:o,children:t});Fe.Option=ot;try{Fe.displayName="RadioInput",Fe.__docgenInfo={description:"",displayName:"RadioInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}}}catch{}const zr="target-field",Qr=H("[.group.form-field-group_&:first-child_.target-field]:rounded-r-none [.group.form-field-group_&:first-child_.target-field]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:border-r-0","[.group.form-field-group_&:last-child_.target-field]:border-l-1 [.group.form-field-group_&:last-child_.target-field]:rounded-l-none"),rt=({ariaDescribedBy:e,type:t="text",LeftIcon:r,readOnly:o,autoSelect:a,error:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=()=>{a&&p.current&&p.current.select()};return u.jsxs("div",{className:H("relative w-full",Qr),children:[r?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(r,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}):null,u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:m,onFocus:m,onClick:m,type:t,className:H(zr,"paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",r&&"pl-9",o&&"bg-primary-50",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",n),readOnly:o,disabled:l,...i})]})};try{rt.displayName="TextInput",rt.__docgenInfo={description:"",displayName:"TextInput",props:{type:{defaultValue:{value:"text"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"text"'},{value:'"email"'},{value:'"date"'},{value:'"password"'}]}},autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}}}}}catch{}const nt=({id:e,value:t,onChange:r,placeholder:o,ariaDescribedBy:a,error:f,disabled:l,rows:n,cols:i,className:p})=>u.jsx("textarea",{id:e,name:e,value:t,onChange:r,placeholder:o,"aria-describedby":a,className:H("paragraph-100 block min-h-[2rem] w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",p),disabled:l,rows:n,cols:i});try{nt.displayName="Textarea",nt.__docgenInfo={description:"",displayName:"Textarea",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"number"}},cols:{defaultValue:null,description:"",name:"cols",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Jr={left:"text-left",center:"text-center",right:"text-right"},at=({id:e,placeholder:t,value:r,min:o,max:a,onChange:f,ariaDescribedBy:l,LeftIcon:n,textAlign:i="left",readOnly:p,error:m,disabled:v})=>u.jsxs("div",{className:"relative w-full",children:[n?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3","aria-hidden":"true",children:u.jsx(n,{className:"text-gray-400 h-4 w-4 fill-neutral-600"})}):null,u.jsx("input",{id:e,name:e,value:r,readOnly:p,onChange:f,placeholder:t,"aria-describedby":l,type:"number",min:o,max:a,className:H("paragraph-100 block w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",Jr[i],n&&"pl-9",p&&"bg-neutral-100",v&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!m&&!v&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",m&&!v&&"border-danger-500"),disabled:v})]});try{at.displayName="NumberInput",at.__docgenInfo={description:"",displayName:"NumberInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},textAlign:{defaultValue:{value:"left"},description:"",name:"textAlign",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"left"'},{value:'"right"'}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((event: ChangeEvent) => void)"}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!0,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"number"}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"number"}}}}}catch{}const lt=({children:e})=>u.jsx(Co,{className:"absolute mt-1 max-h-60 w-full list-none overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{lt.displayName="ListboxOptions",lt.__docgenInfo={description:"",displayName:"ListboxOptions",props:{}}}catch{}const it=({children:e,badgeType:t="neutral"})=>u.jsx("div",{className:"flex items-center",children:u.jsx(ho,{type:t,children:e})});try{it.displayName="ListboxBadgeOption",it.__docgenInfo={description:"",displayName:"ListboxBadgeOption",props:{badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"violet"'},{value:'"green"'},{value:'"neutral"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const st=({children:e,LeftIcon:t})=>u.jsxs("div",{className:"flex items-center gap-2",children:[t?u.jsx(t,{className:"h-3 w-3 fill-neutral-500 ui-selected:fill-primary-500"}):null,u.jsx("div",{className:"paragraph-100",children:e})]});try{st.displayName="ListboxTextOption",st.__docgenInfo={description:"",displayName:"ListboxTextOption",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}}}}}catch{}const Ve={base:"relative cursor-pointer px-3 py-2 ",selected:"bg-primary-100 text-primary-500 before:absolute before:bottom-0 before:left-0 before:top-0 before:block before:w-[2px] before:rounded-r-md before:bg-primary-400",active:"bg-neutral-50 bg-primary-100",disabled:"cursor-not-allowed bg-neutral-50 text-neutral-400"},Ie=({value:e,disabled:t,children:r})=>u.jsx(No,{value:e,as:d.Fragment,disabled:t,children:({active:o,selected:a})=>u.jsx("li",{className:H(Ve.base,o&&Ve.active,a&&Ve.selected,t&&Ve.disabled),children:r})});Ie.BadgeOption=it;Ie.TextOption=st;try{Ie.displayName="ListboxOption",Ie.__docgenInfo={description:"",displayName:"ListboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const ut=({placeholder:e,value:t,badgeType:r="neutral"})=>t?u.jsx(ho,{type:r,children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600",children:e});try{ut.displayName="ListboxButtonBadgeValue",ut.__docgenInfo={description:"",displayName:"ListboxButtonBadgeValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}},badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"violet"'},{value:'"green"'},{value:'"neutral"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const dt=({placeholder:e,value:t})=>t?u.jsx("div",{className:"paragraph-100",children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600 group-hover:text-neutral-700",children:e});try{dt.displayName="ListboxButtonTextValue",dt.__docgenInfo={description:"",displayName:"ListboxButtonTextValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}}}}}catch{}const Se=({children:e,disabled:t})=>u.jsxs(Eo,{disabled:t,className:H("group flex h-8 w-full cursor-pointer items-center rounded border border-neutral-400 bg-neutral-0 py-2 pl-3 pr-8 outline-none hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",t&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),children:[e,u.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100 focus:outline-none",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]});Se.BadgeValue=ut;Se.TextValue=dt;try{Se.displayName="ListboxButton",Se.__docgenInfo={description:"",displayName:"ListboxButton",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Wr=H("[.group.form-field-group_&:first-child_button]:rounded-r-none [.group.form-field-group_&:first-child_button]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_button]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_button]:border-r-0","[.group.form-field-group_&:last-child_button]:rounded-l-none"),xe=({children:e,value:t,onChange:r,className:o})=>u.jsx(Mr,{value:t,onChange:r,children:u.jsx("div",{className:H("relative w-full",Wr,o),children:e})});xe.Button=Se;xe.Options=lt;xe.Option=Ie;try{xe.displayName="Listbox",xe.__docgenInfo={description:"",displayName:"Listbox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const ct=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ct.displayName="MultiComboboxCustomOption",ct.__docgenInfo={description:"",displayName:"MultiComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pt=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{pt.displayName="MultiComboboxEmptyOption",pt.__docgenInfo={description:"",displayName:"MultiComboboxEmptyOption",props:{}}}catch{}const mt=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0,disabled:f=!1,...l})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:()=>t,onChange:o,className:H("paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",f&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),...l}),a&&!f?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{mt.displayName="MultiComboboxInput",mt.__docgenInfo={description:"",displayName:"MultiComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"string"}},autoFocus:{defaultValue:null,description:"",name:"autoFocus",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | ((bag: InputRenderPropArg) => string)"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:"enum",value:[{value:'"input"'}]}},refName:{defaultValue:null,description:"",name:"refName",required:!1,type:{name:"string"}}}}}catch{}const bt=({value:e,children:t})=>u.jsxs(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:[t,u.jsx("div",{className:"absolute inset-y-0 right-3 hidden items-center fill-primary-500 ui-selected:flex",children:u.jsx($o,{})})]});try{bt.displayName="MultiComboboxOption",bt.__docgenInfo={description:"",displayName:"MultiComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const ft=({children:e,className:t})=>u.jsx(Bt,{hold:!0,className:H("absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",t),children:e});try{ft.displayName="MultiComboboxOptions",ft.__docgenInfo={description:"",displayName:"MultiComboboxOptions",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const vt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{vt.displayName="MultiComboboxResultsBadges",vt.__docgenInfo={description:"",displayName:"MultiComboboxResultsBadges",props:{}}}catch{}const gt=({children:e})=>u.jsx("div",{className:"paragraph-100 mt-2 text-neutral-900",children:e});try{gt.displayName="MultiComboboxResultsLabel",gt.__docgenInfo={description:"",displayName:"MultiComboboxResultsLabel",props:{}}}catch{}const xt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{xt.displayName="MultiComboboxResultsTags",xt.__docgenInfo={description:"",displayName:"MultiComboboxResultsTags",props:{}}}catch{}const yt=({children:e})=>u.jsx("div",{className:"paragraph-100",children:e});try{yt.displayName="MultiComboboxResultsText",yt.__docgenInfo={description:"",displayName:"MultiComboboxResultsText",props:{}}}catch{}const fe=({children:e})=>u.jsx("div",{className:"flex flex-col gap-2",children:e});fe.Label=gt;fe.Text=yt;fe.Badges=vt;fe.Tags=xt;try{fe.displayName="MultiComboboxResults",fe.__docgenInfo={description:"",displayName:"MultiComboboxResults",props:{}}}catch{}const ce=({value:e,onChange:t,children:r})=>u.jsx(Io,{multiple:!0,value:e,onChange:t,children:u.jsx("div",{className:"relative",children:r})});ce.Input=mt;ce.Options=ft;ce.Option=bt;ce.CustomOption=ct;ce.EmptyOption=pt;ce.Results=fe;try{ce.displayName="MultiCombobox",ce.__docgenInfo={description:"",displayName:"MultiCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue[]"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue[]) => void"}}}}}catch{}const ht=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ht.displayName="SingleComboboxCustomOption",ht.__docgenInfo={description:"",displayName:"SingleComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const _t=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{_t.displayName="SingleComboboxEmptyOption",_t.__docgenInfo={description:"",displayName:"SingleComboboxEmptyOption",props:{}}}catch{}const Ot=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:t,onChange:o,className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200 disabled:border-neutral-300 disabled:bg-neutral-100 disabled:text-neutral-600"}),a?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{Ot.displayName="SingleComboboxInput",Ot.__docgenInfo={description:"",displayName:"SingleComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!1,type:{name:"((item: TValue) => string)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}}}}}catch{}const It=({children:e})=>u.jsx(Bt,{hold:!0,className:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{It.displayName="SingleComboboxOptions",It.__docgenInfo={description:"",displayName:"SingleComboboxOptions",props:{}}}catch{}const St=({onUnselect:e,children:t})=>u.jsx("div",{className:"relative",children:u.jsxs("div",{className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",children:[u.jsx(Uo,{onClick:e,children:t}),u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]})});try{St.displayName="SingleComboboxResultInput",St.__docgenInfo={description:"",displayName:"SingleComboboxResultInput",props:{onUnselect:{defaultValue:null,description:"",name:"onUnselect",required:!0,type:{name:"() => void"}}}}}catch{}const Et=({value:e,children:t})=>u.jsx(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{Et.displayName="SingleComboboxOption",Et.__docgenInfo={description:"",displayName:"SingleComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pe=({value:e,onChange:t,children:r,disabled:o})=>u.jsx(Io,{value:e,onChange:t,disabled:o,children:u.jsx("div",{className:"relative",children:r})});pe.Input=Ot;pe.ResultInput=St;pe.Options=It;pe.Option=Et;pe.EmptyOption=_t;pe.CustomOption=ht;try{pe.displayName="SingleCombobox",pe.__docgenInfo={description:"",displayName:"SingleCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Ct=({children:e})=>u.jsx("div",{className:"form-field-group group flex w-full flex-row",children:e});try{Ct.displayName="FormFieldGroup",Ct.__docgenInfo={description:"",displayName:"FormFieldGroup",props:{}}}catch{}const Nt=({ariaDescribedBy:e,readOnly:t,autoSelect:r,onClear:o,error:a,value:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=!t&&!l&&f!==void 0&&f!=="",v=d.useCallback(()=>{r&&p.current&&p.current.select()},[r]),I=d.useCallback(s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),s.stopPropagation(),o())},[o]);return u.jsxs("div",{className:H("relative w-full"),children:[u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(wo,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}),u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:v,onFocus:v,onClick:v,type:"search",className:H("paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-9 pr-8 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",t&&"bg-neutral-100",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!a&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",a&&!l&&"border-danger-500",n),readOnly:t,disabled:l,value:f,...i}),m?u.jsx("div",{className:"absolute inset-y-0 right-0 z-10 flex items-center justify-center pr-2",children:u.jsx("button",{type:"button","aria-label":"Clear search input",tabIndex:0,onClick:o,onKeyDown:I,className:"rounded bg-neutral-100 p-0.5 hover:bg-neutral-200",children:u.jsx(Vo,{className:"h-3 w-3 fill-neutral-600"})})}):null]})};try{Nt.displayName="SearchInput",Nt.__docgenInfo={description:"",displayName:"SearchInput",props:{autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},onClear:{defaultValue:null,description:"",name:"onClear",required:!0,type:{name:"() => void"}}}}}catch{}const Je={base:"group relative flex items-center gap-3 rounded-lg bg-neutral-0 border p-4 border-neutral-300 hover:border-primary-600 hover:bg-primary-50 cursor-pointer focus:outline-none data-[focus]:outline-2 data-[focus]:outline-primary-200",checked:"border-primary-600 bg-primary-600 hover:bg-primary-600 hover:text-neutral-0",disabled:"bg-neutral-100 group-hover:border-neutral-300 group-hover:bg-neutral-100 hover:border-neutral-300 hover:bg-neutral-100 cursor-not-allowed"},Me={base:"relative inline-block h-4 w-4 shrink-0 rounded-full bg-neutral-0 border border-neutral-300",unchecked:"group-hover:border-primary-600 group-hover:bg-neutral-0",checked:"border-transparent",disabled:"bg-neutral-200 border-neutral-200 group-hover:border-neutral-200 group-hover:bg-neutral-200"},Xr=({children:e})=>u.jsx("h2",{className:"headline-500 text-neutral-900 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),Yr=({children:e})=>u.jsx("p",{className:"paragraph-200 text-neutral-800 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),me=({children:e,value:t,disabled:r,className:o})=>u.jsx(zt,{value:t,disabled:r,as:d.Fragment,children:({checked:a,disabled:f})=>u.jsxs("div",{className:H(Je.base,a&&H("is-checked",Je.checked),f&&H("is-disabled",Je.disabled)),children:[u.jsx("div",{className:H(Me.base,!a&&Me.unchecked,a&&Me.checked,f&&Me.disabled),children:a&&u.jsx("div",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-primary-600",f&&"bg-neutral-500")})}),u.jsx("div",{className:H("flex flex-col",o),children:e})]})});me.Title=Xr;me.Description=Yr;try{me.displayName="RadioBoxOption",me.__docgenInfo={description:"",displayName:"RadioBoxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{me.Title.displayName="RadioBoxOption.Title",me.Title.__docgenInfo={description:"",displayName:"RadioBoxOption.Title",props:{}}}catch{}try{me.Description.displayName="RadioBoxOption.Description",me.Description.__docgenInfo={description:"",displayName:"RadioBoxOption.Description",props:{}}}catch{}const ye=({id:e,value:t,children:r,onChange:o,className:a})=>u.jsx(Ro,{id:e,value:t,onChange:o,className:a,children:r});ye.Option=me;try{ye.displayName="RadioBox",ye.__docgenInfo={description:"",displayName:"RadioBox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{ye.Option.displayName="RadioBox.Option",ye.Option.__docgenInfo={description:"",displayName:"RadioBox.Option",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Y=({children:e})=>u.jsx("div",{className:"w-full",children:e});Y.LabelGroup=tt;Y.Label=et;Y.Description=Ye;Y.ErrorMessage=Ze;Y.TextInput=rt;Y.Textarea=nt;Y.RadioInput=Fe;Y.NumberInput=at;Y.Listbox=xe;Y.MultiCombobox=ce;Y.SingleCombobox=pe;Y.Group=Ct;Y.SearchInput=Nt;Y.RadioBox=ye;try{Y.displayName="FormField",Y.__docgenInfo={description:"",displayName:"FormField",props:{}}}catch{}export{Y as F,ye as R,pe as S,Ct as a}; +import{j as u}from"./jsx-runtime-C798UXYj.js";import{e as To,as as ke,gz as $o,g as wo,j as Vo}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as H}from"./class-names-DnY5YZNL.js";import{$ as Ee,a as Ce,w as Zt,e as eo}from"./use-resolve-button-type-HzzQKYtS.js";import{r as d,R as P}from"./index-0d5eMwbi.js";import{l as Rt,T as Tt,j as $t,p as to}from"./form-fields-HWr4pxRQ.js";import{o as g,O as Pe,K as ne,u as oe,n as re,L as ae,y as ie,p as wt,_ as ve,s as Le,a as Xe}from"./use-sync-refs-DhZgiOVe.js";import{a as De,U as Vt,H as Mo,w as oo}from"./description-CaDbXm72.js";import{Q as Mt,K as qe,u as Pt,I as Ne}from"./label-fWs8-lsP.js";import{r as Be}from"./bugs-DpEN4NTH.js";import{_ as jt,A as Po,h as jo,j as Fo,F as ge,P as Jt,T as Xt}from"./focus-management-CKkqTXfi.js";import{o as w,u as ro}from"./keyboard-D0BTZntQ.js";import{r as te}from"./index-BoyHNU0R.js";import{F as ko,u as no,c as V,f as _e,s as Lo,a as Do}from"./use-text-value-D3ZnWpLS.js";import{M as ao,y as lo,x as io,R as so,b as uo,d as We,F as qo}from"./floating-Bhi-vCn9.js";import{y as co}from"./use-inert-others-D4nVU6H_.js";import{R as po,n as Ft,m as mo,f as bo,r as fo,a as Bo}from"./portal-BQQr4JoD.js";import{c as vo,i as be,u as go,x as xo,R as yo}from"./open-closed-FM4Rfwkx.js";import{B as ho}from"./badge-Da1HxQE-.js";import{u as Ao}from"./index-BgfbgFhO.js";import{E as Go}from"./use-event-listener-EaZKqAMH.js";import{m as Wt,r as Yt}from"./active-element-history-DjNnwGR_.js";import{T as Uo}from"./tag-C9CGXtt3.js";function Ho(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function kt(e=Ho){return d.useCallback((t,r)=>{if(typeof e=="string"){let o=e;return(t==null?void 0:t[o])===(r==null?void 0:r[o])}return e(t,r)},[e])}function _o(e){let t=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Go(e,"blur",r=>{let o=r.target;o instanceof HTMLInputElement&&(t.current={value:o.value,selectionStart:o.selectionStart,selectionEnd:o.selectionEnd})}),g(()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:r,selectionEnd:o}=t.current;r!==null&&o!==null&&e.setSelectionRange(r,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}function Ko({children:e,freeze:t}){let r=je(t,e);return P.createElement(P.Fragment,null,r)}function je(e,t){let[r,o]=d.useState(t);return!e&&r!==t&&o(t),e?r:t}var Lt=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Lt||{}),zo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zo||{}),Qo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Qo||{}),Jo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Jo||{}),Xo=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e[e.SetInputElement=8]="SetInputElement",e[e.SetButtonElement=9]="SetButtonElement",e[e.SetOptionsElement=10]="SetOptionsElement",e))(Xo||{});function ze(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),a=o.length>0&&o[0].dataRef.current.order!==null?o.sort((l,n)=>l.dataRef.current.order-n.dataRef.current.order):jt(o,l=>l.dataRef.current.domRef.current),f=r?a.indexOf(r):null;return f===-1&&(f=null),{options:a,activeOptionIndex:f}}let Wo={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,r;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let o=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(o!==-1)return{...e,activeOptionIndex:o,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var r,o,a,f;if((r=e.dataRef.current)!=null&&r.disabled||e.optionsElement&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:p,disabled:m}=e.virtual,v=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>p,resolveActiveIndex:()=>{var s,b;return(b=(s=e.activeOptionIndex)!=null?s:p.findIndex(h=>!m(h)))!=null?b:null},resolveDisabled:m,resolveId(){throw new Error("Function not implemented.")}}),I=(a=t.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===I?e:{...e,activeOptionIndex:v,activationTrigger:I,isTyping:!1,__demoMode:!1}}let l=ze(e);if(l.activeOptionIndex===null){let p=l.options.findIndex(m=>!m.dataRef.current.disabled);p!==-1&&(l.activeOptionIndex=p)}let n=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled}),i=(f=t.trigger)!=null?f:2;return e.activeOptionIndex===n&&e.activationTrigger===i?e:{...e,...l,isTyping:!1,activeOptionIndex:n,activationTrigger:i,__demoMode:!1}},4:(e,t)=>{var r,o,a;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,t.payload]};let f=t.payload,l=ze(e,i=>(i.push(f),i));e.activeOptionIndex===null&&(o=e.dataRef.current)!=null&&o.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(f));let n={...e,...l,activationTrigger:2};return(a=e.dataRef.current)!=null&&a.__demoMode&&e.dataRef.current.value===void 0&&(n.activeOptionIndex=0),n},5:(e,t)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(a=>a.id!==t.id)};let o=ze(e,a=>{let f=a.findIndex(l=>l.id===t.id);return f!==-1&&a.splice(f,1),a});return{...e,...o,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var r,o;if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:(r=t.disabled)!=null?r:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let a=e.activeOptionIndex;if(e.activeOptionIndex!==null){let f=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);f!==-1?a=f:a=null}return{...e,activeOptionIndex:a,virtual:{options:t.options,disabled:(o=t.disabled)!=null?o:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Dt=d.createContext(null);Dt.displayName="ComboboxActionsContext";function Re(e){let t=d.useContext(Dt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Re),r}return t}let Oo=d.createContext(null);function Yo(e){let t=he("VirtualProvider"),{options:r}=t.virtual,[o,a]=d.useMemo(()=>{let p=t.optionsElement;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[t.optionsElement]),f=Ao({enabled:r.length!==0,scrollPaddingStart:o,scrollPaddingEnd:a,count:r.length,estimateSize(){return 40},getScrollElement(){return t.optionsElement},overscan:12}),[l,n]=d.useState(0);re(()=>{n(p=>p+1)},[r]);let i=f.getVirtualItems();return i.length===0?null:P.createElement(Oo.Provider,{value:f},P.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:p=>{p&&t.activationTrigger!==0&&t.activeOptionIndex!==null&&r.length>t.activeOptionIndex&&f.scrollToIndex(t.activeOptionIndex)}},i.map(p=>{var m;return P.createElement(d.Fragment,{key:p.key},P.cloneElement((m=e.children)==null?void 0:m.call(e,{...e.slot,option:r[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":r.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let Oe=d.createContext(null);Oe.displayName="ComboboxDataContext";function he(e){let t=d.useContext(Oe);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,he),r}return t}function Zo(e,t){return oe(t.type,Wo,e,t)}let er=d.Fragment;function tr(e,t){var r,o;let a=De(),{value:f,defaultValue:l,onChange:n,form:i,name:p,by:m,disabled:v=a||!1,onClose:I,__demoMode:s=!1,multiple:b=!1,immediate:h=!1,virtual:x=null,nullable:D,...j}=e,R=Rt(l),[N=b?[]:void 0,M]=Tt(f,n,R),[S,_]=d.useReducer(Zo,{dataRef:d.createRef(),comboboxState:s?0:1,isTyping:!1,options:[],virtual:x?{options:x.options,disabled:(r=x.disabled)!=null?r:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:s}),E=d.useRef(!1),T=d.useRef({static:!1,hold:!1}),F=kt(m),y=g(O=>x?m===null?x.options.indexOf(O):x.options.findIndex(U=>F(U,O)):S.options.findIndex(U=>F(U.dataRef.current.value,O))),q=d.useCallback(O=>oe(C.mode,{1:()=>N.some(U=>F(U,O)),0:()=>F(N,O)}),[N]),J=g(O=>S.activeOptionIndex===y(O)),C=d.useMemo(()=>({...S,immediate:h,optionsPropsRef:T,value:N,defaultValue:R,disabled:v,mode:b?1:0,virtual:x?S.virtual:null,get activeOptionIndex(){if(E.current&&S.activeOptionIndex===null&&(x?x.options.length>0:S.options.length>0)){if(x){let U=x.options.findIndex(ue=>{var we,Qt;return!((Qt=(we=x.disabled)==null?void 0:we.call(x,ue))!=null&&Qt)});if(U!==-1)return U}let O=S.options.findIndex(U=>!U.dataRef.current.disabled);if(O!==-1)return O}return S.activeOptionIndex},calculateIndex:y,compare:F,isSelected:q,isActive:J}),[N,R,v,b,s,S,x]);re(()=>{var O;x&&_({type:7,options:x.options,disabled:(O=x.disabled)!=null?O:null})},[x,x==null?void 0:x.options,x==null?void 0:x.disabled]),re(()=>{S.dataRef.current=C},[C]);let B=C.comboboxState===0;po(B,[C.buttonElement,C.inputElement,C.optionsElement],()=>X.closeCombobox());let W=d.useMemo(()=>{var O,U,ue;return{open:C.comboboxState===0,disabled:v,activeIndex:C.activeOptionIndex,activeOption:C.activeOptionIndex===null?null:C.virtual?C.virtual.options[(O=C.activeOptionIndex)!=null?O:0]:(ue=(U=C.options[C.activeOptionIndex])==null?void 0:U.dataRef.current.value)!=null?ue:null,value:N}},[C,v,N]),Z=g(()=>{if(C.activeOptionIndex!==null){if(X.setIsTyping(!1),C.virtual)c(C.virtual.options[C.activeOptionIndex]);else{let{dataRef:O}=C.options[C.activeOptionIndex];c(O.current.value)}X.goToOption(V.Specific,C.activeOptionIndex)}}),ee=g(()=>{_({type:0}),E.current=!0}),le=g(()=>{_({type:1}),E.current=!1,I==null||I()}),se=g(O=>{_({type:3,isTyping:O})}),k=g((O,U,ue)=>(E.current=!1,O===V.Specific?_({type:2,focus:V.Specific,idx:U,trigger:ue}):_({type:2,focus:O,trigger:ue}))),G=g((O,U)=>(_({type:4,payload:{id:O,dataRef:U}}),()=>{C.isActive(U.current.value)&&(E.current=!0),_({type:5,id:O})})),c=g(O=>oe(C.mode,{0(){return M==null?void 0:M(O)},1(){let U=C.value.slice(),ue=U.findIndex(we=>F(we,O));return ue===-1?U.push(O):U.splice(ue,1),M==null?void 0:M(U)}})),L=g(O=>{_({type:6,trigger:O})}),$=g(O=>{_({type:8,element:O})}),K=g(O=>{_({type:9,element:O})}),z=g(O=>{_({type:10,element:O})}),X=d.useMemo(()=>({onChange:c,registerOption:G,goToOption:k,setIsTyping:se,closeCombobox:le,openCombobox:ee,setActivationTrigger:L,selectActiveOption:Z,setInputElement:$,setButtonElement:K,setOptionsElement:z}),[]),[de,He]=qe(),Ke=t===null?{}:{ref:t},A=d.useCallback(()=>{if(R!==void 0)return M==null?void 0:M(R)},[M,R]),Q=ae();return P.createElement(He,{value:de,props:{htmlFor:(o=C.inputElement)==null?void 0:o.id},slot:{open:C.comboboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(Dt.Provider,{value:X},P.createElement(Oe.Provider,{value:C},P.createElement(vo,{value:oe(C.comboboxState,{0:be.Open,1:be.Closed})},p!=null&&P.createElement($t,{disabled:v,data:N!=null?{[p]:N}:{},form:i,onReset:A}),Q({ourProps:Ke,theirProps:j,slot:W,defaultTag:er,name:"Combobox"}))))))}let or="input";function rr(e,t){var r,o,a,f,l;let n=he("Combobox.Input"),i=Re("Combobox.Input"),p=d.useId(),m=Pt(),{id:v=m||`headlessui-combobox-input-${p}`,onChange:I,displayValue:s,disabled:b=n.disabled||!1,autoFocus:h=!1,type:x="text",...D}=e,j=d.useRef(null),R=ie(j,t,lo(),i.setInputElement),N=Ft(n.inputElement),M=wt(),S=g(()=>{i.onChange(null),n.optionsElement&&(n.optionsElement.scrollTop=0),i.goToOption(V.Nothing)}),_=d.useMemo(()=>{var c;return typeof s=="function"&&n.value!==void 0?(c=s(n.value))!=null?c:"":typeof n.value=="string"?n.value:""},[n.value,s]);Wt(([c,L],[$,K])=>{if(n.isTyping)return;let z=j.current;z&&((K===0&&L===1||c!==$)&&(z.value=c),requestAnimationFrame(()=>{if(n.isTyping||!z||(N==null?void 0:N.activeElement)!==z)return;let{selectionStart:X,selectionEnd:de}=z;Math.abs((de??0)-(X??0))===0&&X===0&&z.setSelectionRange(z.value.length,z.value.length)}))},[_,n.comboboxState,N,n.isTyping]),Wt(([c],[L])=>{if(c===0&&L===1){if(n.isTyping)return;let $=j.current;if(!$)return;let K=$.value,{selectionStart:z,selectionEnd:X,selectionDirection:de}=$;$.value="",$.value=K,de!==null?$.setSelectionRange(z,X,de):$.setSelectionRange(z,X)}},[n.comboboxState]);let E=d.useRef(!1),T=g(()=>{E.current=!0}),F=g(()=>{M.nextFrame(()=>{E.current=!1})}),y=g(c=>{switch(i.setIsTyping(!0),c.key){case w.Enter:if(n.comboboxState!==0||E.current)return;if(c.preventDefault(),c.stopPropagation(),n.activeOptionIndex===null){i.closeCombobox();return}i.selectActiveOption(),n.mode===0&&i.closeCombobox();break;case w.ArrowDown:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Next),1:()=>i.openCombobox()});case w.ArrowUp:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Previous),1:()=>{te.flushSync(()=>i.openCombobox()),n.value||i.goToOption(V.Last)}});case w.Home:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.End:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.Escape:return n.comboboxState!==0?void 0:(c.preventDefault(),n.optionsElement&&!n.optionsPropsRef.current.static&&c.stopPropagation(),n.mode===0&&n.value===null&&S(),i.closeCombobox());case w.Tab:if(n.comboboxState!==0)return;n.mode===0&&n.activationTrigger!==1&&i.selectActiveOption(),i.closeCombobox();break}}),q=g(c=>{I==null||I(c),n.mode===0&&c.target.value===""&&S(),i.openCombobox()}),J=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(X=>X!==c.currentTarget);if(!(($=n.optionsElement)!=null&&$.contains(z))&&!((K=n.buttonElement)!=null&&K.contains(z))&&n.comboboxState===0)return c.preventDefault(),n.mode===0&&n.value===null&&S(),i.closeCombobox()}),C=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(X=>X!==c.currentTarget);($=n.buttonElement)!=null&&$.contains(z)||(K=n.optionsElement)!=null&&K.contains(z)||n.disabled||n.immediate&&n.comboboxState!==0&&M.microTask(()=>{te.flushSync(()=>i.openCombobox()),i.setActivationTrigger(1)})}),B=Ne(),W=Vt(),{isFocused:Z,focusProps:ee}=Ee({autoFocus:h}),{isHovered:le,hoverProps:se}=Ce({isDisabled:b}),k=d.useMemo(()=>({open:n.comboboxState===0,disabled:b,hover:le,focus:Z,autofocus:h}),[n,le,Z,h,b]),G=ve({ref:R,id:v,role:"combobox",type:x,"aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-activedescendant":n.activeOptionIndex===null?void 0:n.virtual?(o=n.options.find(c=>!c.dataRef.current.disabled&&n.compare(c.dataRef.current.value,n.virtual.options[n.activeOptionIndex])))==null?void 0:o.id:(a=n.options[n.activeOptionIndex])==null?void 0:a.id,"aria-labelledby":B,"aria-describedby":W,"aria-autocomplete":"list",defaultValue:(l=(f=e.defaultValue)!=null?f:n.defaultValue!==void 0?s==null?void 0:s(n.defaultValue):null)!=null?l:n.defaultValue,disabled:b||void 0,autoFocus:h,onCompositionStart:T,onCompositionEnd:F,onKeyDown:y,onChange:q,onFocus:C,onBlur:J},ee,se);return ae()({ourProps:G,theirProps:D,slot:k,defaultTag:or,name:"Combobox.Input"})}let nr="button";function ar(e,t){var r;let o=he("Combobox.Button"),a=Re("Combobox.Button"),f=ie(t,a.setButtonElement),l=d.useId(),{id:n=`headlessui-combobox-button-${l}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=_o(o.inputElement),I=g(_=>{switch(_.key){case w.Space:case w.Enter:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&te.flushSync(()=>a.openCombobox()),v();return;case w.ArrowDown:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.First)),v();return;case w.ArrowUp:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.Last)),v();return;case w.Escape:if(o.comboboxState!==0)return;_.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&_.stopPropagation(),te.flushSync(()=>a.closeCombobox()),v();return;default:return}}),s=g(_=>{_.preventDefault(),!Be(_.currentTarget)&&(_.button===Lt.Left&&(o.comboboxState===0?a.closeCombobox():a.openCombobox()),v())}),b=Ne([n]),{isFocusVisible:h,focusProps:x}=Ee({autoFocus:p}),{isHovered:D,hoverProps:j}=Ce({isDisabled:i}),{pressed:R,pressProps:N}=Zt({disabled:i}),M=d.useMemo(()=>({open:o.comboboxState===0,active:R||o.comboboxState===0,disabled:i,value:o.value,hover:D,focus:h}),[o,D,h,R,i]),S=ve({ref:f,id:n,type:eo(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.comboboxState===0,"aria-labelledby":b,disabled:i||void 0,autoFocus:p,onMouseDown:s,onKeyDown:I},x,j,N);return ae()({ourProps:S,theirProps:m,slot:M,defaultTag:nr,name:"Combobox.Button"})}let lr="div",ir=Pe.RenderStrategy|Pe.Static;function sr(e,t){var r,o,a;let f=d.useId(),{id:l=`headlessui-combobox-options-${f}`,hold:n=!1,anchor:i,portal:p=!1,modal:m=!0,transition:v=!1,...I}=e,s=he("Combobox.Options"),b=Re("Combobox.Options"),h=io(i);h&&(p=!0);let[x,D]=so(h),[j,R]=d.useState(null),N=uo(),M=ie(t,h?x:null,b.setOptionsElement,R),S=Ft(s.optionsElement),_=go(),[E,T]=xo(v,j,_!==null?(_&be.Open)===be.Open:s.comboboxState===0);mo(E,s.inputElement,b.closeCombobox);let F=s.__demoMode?!1:m&&s.comboboxState===0;bo(F,S);let y=s.__demoMode?!1:m&&s.comboboxState===0;co(y,{allowed:d.useCallback(()=>[s.inputElement,s.buttonElement,s.optionsElement],[s.inputElement,s.buttonElement,s.optionsElement])}),re(()=>{var G;s.optionsPropsRef.current.static=(G=e.static)!=null?G:!1},[s.optionsPropsRef,e.static]),re(()=>{s.optionsPropsRef.current.hold=n},[s.optionsPropsRef,n]),ko(s.comboboxState===0,{container:s.optionsElement,accept(G){return G.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:G.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(G){G.setAttribute("role","none")}});let q=Ne([(r=s.buttonElement)==null?void 0:r.id]),J=d.useMemo(()=>({open:s.comboboxState===0,option:void 0}),[s.comboboxState]),C=g(()=>{b.setActivationTrigger(0)}),B=g(G=>{G.preventDefault(),b.setActivationTrigger(0)}),W=ve(h?N():{},{"aria-labelledby":q,role:"listbox","aria-multiselectable":s.mode===1?!0:void 0,id:l,ref:M,style:{...I.style,...D,"--input-width":We(s.inputElement,!0).width,"--button-width":We(s.buttonElement,!0).width},onWheel:s.activationTrigger===0?void 0:C,onMouseDown:B,...yo(T)}),Z=E&&s.comboboxState===1,ee=je(Z,(o=s.virtual)==null?void 0:o.options),le=je(Z,s.value),se=g(G=>s.compare(le,G));if(s.virtual){if(ee===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(I,{children:P.createElement(Oe.Provider,{value:ee!==s.virtual.options?{...s,virtual:{...s.virtual,options:ee}}:s},P.createElement(Yo,{slot:J},I.children))})}let k=ae();return P.createElement(fo,{enabled:p?e.static||E:!1},P.createElement(Oe.Provider,{value:s.mode===1?s:{...s,isSelected:se}},k({ourProps:W,theirProps:{...I,children:P.createElement(Ko,{freeze:Z},typeof I.children=="function"?(a=I.children)==null?void 0:a.call(I,J):I.children)},slot:J,defaultTag:lr,features:ir,visible:E,name:"Combobox.Options"})))}let ur="div";function dr(e,t){var r,o,a,f;let l=he("Combobox.Option"),n=Re("Combobox.Option"),i=d.useId(),{id:p=`headlessui-combobox-option-${i}`,value:m,disabled:v=(a=(o=(r=l.virtual)==null?void 0:r.disabled)==null?void 0:o.call(r,m))!=null?a:!1,order:I=null,...s}=e,b=_o(l.inputElement),h=l.virtual?l.activeOptionIndex===l.calculateIndex(m):l.activeOptionIndex===null?!1:((f=l.options[l.activeOptionIndex])==null?void 0:f.id)===p,x=l.isSelected(m),D=d.useRef(null),j=Le({disabled:v,value:m,domRef:D,order:I}),R=d.useContext(Oo),N=ie(t,D,R?R.measureElement:null),M=g(()=>{n.setIsTyping(!1),n.onChange(m)});re(()=>n.registerOption(p,j),[j,p]);let S=d.useRef(!(l.virtual||l.__demoMode));re(()=>{if(!l.virtual&&!l.__demoMode)return Xe().requestAnimationFrame(()=>{S.current=!0})},[l.virtual,l.__demoMode]),re(()=>{if(S.current&&l.comboboxState===0&&h&&l.activationTrigger!==0)return Xe().requestAnimationFrame(()=>{var B,W;(W=(B=D.current)==null?void 0:B.scrollIntoView)==null||W.call(B,{block:"nearest"})})},[D,h,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let _=g(B=>{B.preventDefault(),B.button===Lt.Left&&(v||(M(),Bo()||requestAnimationFrame(()=>b()),l.mode===0&&n.closeCombobox()))}),E=g(()=>{if(v)return n.goToOption(V.Nothing);let B=l.calculateIndex(m);n.goToOption(V.Specific,B)}),T=no(),F=g(B=>T.update(B)),y=g(B=>{if(!T.wasMoved(B)||v||h)return;let W=l.calculateIndex(m);n.goToOption(V.Specific,W,0)}),q=g(B=>{T.wasMoved(B)&&(v||h&&(l.optionsPropsRef.current.hold||n.goToOption(V.Nothing)))}),J=d.useMemo(()=>({active:h,focus:h,selected:x,disabled:v}),[h,x,v]),C={id:p,ref:N,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":x,disabled:void 0,onMouseDown:_,onFocus:E,onPointerEnter:F,onMouseEnter:F,onPointerMove:y,onMouseMove:y,onPointerLeave:q,onMouseLeave:q};return ae()({ourProps:C,theirProps:s,slot:J,defaultTag:ur,name:"Combobox.Option"})}let cr=ne(tr),Ae=ne(ar),qt=ne(rr),pr=Mt,Bt=ne(sr),Te=ne(dr),Io=Object.assign(cr,{Input:qt,Button:Ae,Label:pr,Options:Bt,Option:Te});var mr=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mr||{}),br=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(br||{}),fr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(fr||{}),vr=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(vr||{});function Qe(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=jt(t(e.options.slice()),f=>f.dataRef.current.domRef.current),a=r?o.indexOf(r):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let gr={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(a=>r(a.dataRef.current.value));return o!==-1&&(t=o),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,o,a,f,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===V.Nothing)return{...n,activeOptionIndex:null};if(t.focus===V.Specific)return{...n,activeOptionIndex:e.options.findIndex(m=>m.id===t.id)};if(t.focus===V.Previous){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((o=v.current)==null?void 0:o.previousElementSibling)===s.current||((a=s.current)==null?void 0:a.previousElementSibling)===null)return{...n,activeOptionIndex:I}}}}else if(t.focus===V.Next){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((f=v.current)==null?void 0:f.nextElementSibling)===s.current||((l=s.current)==null?void 0:l.nextElementSibling)===null)return{...n,activeOptionIndex:I}}}}let i=Qe(e),p=_e(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});return{...n,...i,activeOptionIndex:p}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,o=e.searchQuery+t.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(l=>{var n;return!l.dataRef.current.disabled&&((n=l.dataRef.current.textValue)==null?void 0:n.startsWith(o))}),f=a?e.options.indexOf(a):-1;return f===-1||f===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:f,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},o=Qe(e,a=>[...a,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(r)),{...e,...o}},6:(e,t)=>{let r=Qe(e,o=>{let a=o.findIndex(f=>f.id===t.id);return a!==-1&&o.splice(a,1),o});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},At=d.createContext(null);At.displayName="ListboxActionsContext";function Ge(e){let t=d.useContext(At);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ge),r}return t}let Ue=d.createContext(null);Ue.displayName="ListboxDataContext";function $e(e){let t=d.useContext(Ue);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$e),r}return t}function xr(e,t){return oe(t.type,gr,e,t)}let yr=d.Fragment;function hr(e,t){var r;let o=De(),{value:a,defaultValue:f,form:l,name:n,onChange:i,by:p,invalid:m=!1,disabled:v=o||!1,horizontal:I=!1,multiple:s=!1,__demoMode:b=!1,...h}=e;const x=I?"horizontal":"vertical";let D=ie(t),j=Rt(f),[R=s?[]:void 0,N]=Tt(a,i,j),[M,S]=d.useReducer(xr,{dataRef:d.createRef(),listboxState:b?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:b}),_=d.useRef({static:!1,hold:!1}),E=d.useRef(new Map),T=kt(p),F=d.useCallback(A=>oe(y.mode,{1:()=>R.some(Q=>T(Q,A)),0:()=>T(R,A)}),[R]),y=d.useMemo(()=>({...M,value:R,disabled:v,invalid:m,mode:s?1:0,orientation:x,compare:T,isSelected:F,optionsPropsRef:_,listRef:E}),[R,v,m,s,M,E]);re(()=>{M.dataRef.current=y},[y]);let q=y.listboxState===0;po(q,[y.buttonElement,y.optionsElement],(A,Q)=>{var O;S({type:1}),Po(Q,jo.Loose)||(A.preventDefault(),(O=y.buttonElement)==null||O.focus())});let J=d.useMemo(()=>({open:y.listboxState===0,disabled:v,invalid:m,value:R}),[y,v,R,m]),C=g(A=>{let Q=y.options.find(O=>O.id===A);Q&&k(Q.dataRef.current.value)}),B=g(()=>{if(y.activeOptionIndex!==null){let{dataRef:A,id:Q}=y.options[y.activeOptionIndex];k(A.current.value),S({type:2,focus:V.Specific,id:Q})}}),W=g(()=>S({type:0})),Z=g(()=>S({type:1})),ee=wt(),le=g((A,Q,O)=>{ee.dispose(),ee.microTask(()=>A===V.Specific?S({type:2,focus:V.Specific,id:Q,trigger:O}):S({type:2,focus:A,trigger:O}))}),se=g((A,Q)=>(S({type:5,id:A,dataRef:Q}),()=>S({type:6,id:A}))),k=g(A=>oe(y.mode,{0(){return N==null?void 0:N(A)},1(){let Q=y.value.slice(),O=Q.findIndex(U=>T(U,A));return O===-1?Q.push(A):Q.splice(O,1),N==null?void 0:N(Q)}})),G=g(A=>S({type:3,value:A})),c=g(()=>S({type:4})),L=g(A=>{S({type:7,element:A})}),$=g(A=>{S({type:8,element:A})}),K=d.useMemo(()=>({onChange:k,registerOption:se,goToOption:le,closeListbox:Z,openListbox:W,selectActiveOption:B,selectOption:C,search:G,clearSearch:c,setButtonElement:L,setOptionsElement:$}),[]),[z,X]=qe({inherit:!0}),de={ref:D},He=d.useCallback(()=>{if(j!==void 0)return N==null?void 0:N(j)},[N,j]),Ke=ae();return P.createElement(X,{value:z,props:{htmlFor:(r=y.buttonElement)==null?void 0:r.id},slot:{open:y.listboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(At.Provider,{value:K},P.createElement(Ue.Provider,{value:y},P.createElement(vo,{value:oe(y.listboxState,{0:be.Open,1:be.Closed})},n!=null&&R!=null&&P.createElement($t,{disabled:v,data:{[n]:R},form:l,onReset:He}),Ke({ourProps:de,theirProps:h,slot:J,defaultTag:yr,name:"Listbox"}))))))}let _r="button";function Or(e,t){var r;let o=$e("Listbox.Button"),a=Ge("Listbox.Button"),f=d.useId(),l=Pt(),{id:n=l||`headlessui-listbox-button-${f}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=ie(t,lo(),a.setButtonElement),I=qo(),s=g(y=>{switch(y.key){case w.Enter:to(y.currentTarget);break;case w.Space:case w.ArrowDown:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.First);break;case w.ArrowUp:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.Last);break}}),b=g(y=>{switch(y.key){case w.Space:y.preventDefault();break}}),h=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();o.listboxState===0?(te.flushSync(()=>a.closeListbox()),(q=o.buttonElement)==null||q.focus({preventScroll:!0})):(y.preventDefault(),a.openListbox())}),x=g(y=>y.preventDefault()),D=Ne([n]),j=Vt(),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:p}),{isHovered:M,hoverProps:S}=Ce({isDisabled:i}),{pressed:_,pressProps:E}=Zt({disabled:i}),T=d.useMemo(()=>({open:o.listboxState===0,active:_||o.listboxState===0,disabled:i,invalid:o.invalid,value:o.value,hover:M,focus:R,autofocus:p}),[o.listboxState,o.value,i,M,R,_,o.invalid,p]),F=ve(I(),{ref:v,id:n,type:eo(e,o.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.listboxState===0,"aria-labelledby":D,"aria-describedby":j,disabled:i||void 0,autoFocus:p,onKeyDown:s,onKeyUp:b,onKeyPress:x,onClick:h},N,S,E);return ae()({ourProps:F,theirProps:m,slot:T,defaultTag:_r,name:"Listbox.Button"})}let So=d.createContext(!1),Ir="div",Sr=Pe.RenderStrategy|Pe.Static;function Er(e,t){var r,o;let a=d.useId(),{id:f=`headlessui-listbox-options-${a}`,anchor:l,portal:n=!1,modal:i=!0,transition:p=!1,...m}=e,v=io(l),[I,s]=d.useState(null);v&&(n=!0);let b=$e("Listbox.Options"),h=Ge("Listbox.Options"),x=Ft(b.optionsElement),D=go(),[j,R]=xo(p,I,D!==null?(D&be.Open)===be.Open:b.listboxState===0);mo(j,b.buttonElement,h.closeListbox);let N=b.__demoMode?!1:i&&b.listboxState===0;bo(N,x);let M=b.__demoMode?!1:i&&b.listboxState===0;co(M,{allowed:d.useCallback(()=>[b.buttonElement,b.optionsElement],[b.buttonElement,b.optionsElement])});let S=b.listboxState!==0,_=Lo(S,b.buttonElement)?!1:j,E=j&&b.listboxState===1,T=je(E,b.value),F=g(c=>b.compare(T,c)),y=d.useMemo(()=>{var c;if(v==null||!((c=v==null?void 0:v.to)!=null&&c.includes("selection")))return null;let L=b.options.findIndex($=>F($.dataRef.current.value));return L===-1&&(L=0),L},[v,b.options]),q=(()=>{if(v==null)return;if(y===null)return{...v,inner:void 0};let c=Array.from(b.listRef.current.values());return{...v,inner:{listRef:{current:c},index:y}}})(),[J,C]=so(q),B=uo(),W=ie(t,v?J:null,h.setOptionsElement,s),Z=wt();d.useEffect(()=>{var c;let L=b.optionsElement;L&&b.listboxState===0&&L!==((c=ro(L))==null?void 0:c.activeElement)&&(L==null||L.focus({preventScroll:!0}))},[b.listboxState,b.optionsElement]);let ee=g(c=>{var L,$;switch(Z.dispose(),c.key){case w.Space:if(b.searchQuery!=="")return c.preventDefault(),c.stopPropagation(),h.search(c.key);case w.Enter:if(c.preventDefault(),c.stopPropagation(),b.activeOptionIndex!==null){let{dataRef:K}=b.options[b.activeOptionIndex];h.onChange(K.current.value)}b.mode===0&&(te.flushSync(()=>h.closeListbox()),(L=b.buttonElement)==null||L.focus({preventScroll:!0}));break;case oe(b.orientation,{vertical:w.ArrowDown,horizontal:w.ArrowRight}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Next);case oe(b.orientation,{vertical:w.ArrowUp,horizontal:w.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Previous);case w.Home:case w.PageUp:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.First);case w.End:case w.PageDown:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Last);case w.Escape:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),($=b.buttonElement)==null||$.focus({preventScroll:!0});return;case w.Tab:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),Fo(b.buttonElement,c.shiftKey?ge.Previous:ge.Next);break;default:c.key.length===1&&(h.search(c.key),Z.setTimeout(()=>h.clearSearch(),350));break}}),le=(r=b.buttonElement)==null?void 0:r.id,se=d.useMemo(()=>({open:b.listboxState===0}),[b.listboxState]),k=ve(v?B():{},{id:f,ref:W,"aria-activedescendant":b.activeOptionIndex===null||(o=b.options[b.activeOptionIndex])==null?void 0:o.id,"aria-multiselectable":b.mode===1?!0:void 0,"aria-labelledby":le,"aria-orientation":b.orientation,onKeyDown:ee,role:"listbox",tabIndex:b.listboxState===0?0:void 0,style:{...m.style,...C,"--button-width":We(b.buttonElement,!0).width},...yo(R)}),G=ae();return P.createElement(fo,{enabled:n?e.static||j:!1},P.createElement(Ue.Provider,{value:b.mode===1?b:{...b,isSelected:F}},G({ourProps:k,theirProps:m,slot:se,defaultTag:Ir,features:Sr,visible:_,name:"Listbox.Options"})))}let Cr="div";function Nr(e,t){let r=d.useId(),{id:o=`headlessui-listbox-option-${r}`,disabled:a=!1,value:f,...l}=e,n=d.useContext(So)===!0,i=$e("Listbox.Option"),p=Ge("Listbox.Option"),m=i.activeOptionIndex!==null?i.options[i.activeOptionIndex].id===o:!1,v=i.isSelected(f),I=d.useRef(null),s=Do(I),b=Le({disabled:a,value:f,domRef:I,get textValue(){return s()}}),h=ie(t,I,T=>{T?i.listRef.current.set(o,T):i.listRef.current.delete(o)});re(()=>{if(!i.__demoMode&&i.listboxState===0&&m&&i.activationTrigger!==0)return Xe().requestAnimationFrame(()=>{var T,F;(F=(T=I.current)==null?void 0:T.scrollIntoView)==null||F.call(T,{block:"nearest"})})},[I,m,i.__demoMode,i.listboxState,i.activationTrigger,i.activeOptionIndex]),re(()=>{if(!n)return p.registerOption(o,b)},[b,o,n]);let x=g(T=>{var F;if(a)return T.preventDefault();p.onChange(f),i.mode===0&&(te.flushSync(()=>p.closeListbox()),(F=i.buttonElement)==null||F.focus({preventScroll:!0}))}),D=g(()=>{if(a)return p.goToOption(V.Nothing);p.goToOption(V.Specific,o)}),j=no(),R=g(T=>{j.update(T),!a&&(m||p.goToOption(V.Specific,o,0))}),N=g(T=>{j.wasMoved(T)&&(a||m||p.goToOption(V.Specific,o,0))}),M=g(T=>{j.wasMoved(T)&&(a||m&&p.goToOption(V.Nothing))}),S=d.useMemo(()=>({active:m,focus:m,selected:v,disabled:a,selectedOption:v&&n}),[m,v,a,n]),_=n?{}:{id:o,ref:h,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":v,disabled:void 0,onClick:x,onFocus:D,onPointerEnter:R,onMouseEnter:R,onPointerMove:N,onMouseMove:N,onPointerLeave:M,onMouseLeave:M},E=ae();return!v&&n?null:E({ourProps:_,theirProps:l,slot:S,defaultTag:Cr,name:"Listbox.Option"})}let Rr=d.Fragment;function Tr(e,t){let{options:r,placeholder:o,...a}=e,f={ref:ie(t)},l=$e("ListboxSelectedOption"),n=d.useMemo(()=>({}),[]),i=l.value===void 0||l.value===null||l.mode===1&&Array.isArray(l.value)&&l.value.length===0,p=ae();return P.createElement(So.Provider,{value:!0},p({ourProps:f,theirProps:{...a,children:P.createElement(P.Fragment,null,o&&i?o:r)},slot:n,defaultTag:Rr,name:"ListboxSelectedOption"}))}let $r=ne(hr),Eo=ne(Or),wr=Mt,Co=ne(Er),No=ne(Nr),Vr=ne(Tr),Mr=Object.assign($r,{Button:Eo,Label:wr,Options:Co,Option:No,SelectedOption:Vr});var Pr=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Pr||{});let jr={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:jt(r,o=>o.element.current)}},1(e,t){let r=e.options.slice(),o=e.options.findIndex(a=>a.id===t.id);return o===-1?e:(r.splice(o,1),{...e,options:r})}},Gt=d.createContext(null);Gt.displayName="RadioGroupDataContext";function Ut(e){let t=d.useContext(Gt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ut),r}return t}let Ht=d.createContext(null);Ht.displayName="RadioGroupActionsContext";function Kt(e){let t=d.useContext(Ht);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kt),r}return t}function Fr(e,t){return oe(t.type,jr,e,t)}let kr="div";function Lr(e,t){let r=d.useId(),o=De(),{id:a=`headlessui-radiogroup-${r}`,value:f,form:l,name:n,onChange:i,by:p,disabled:m=o||!1,defaultValue:v,...I}=e,s=kt(p),[b,h]=d.useReducer(Fr,{options:[]}),x=b.options,[D,j]=qe(),[R,N]=oo(),M=d.useRef(null),S=ie(M,t),_=Rt(v),[E,T]=Tt(f,i,_),F=d.useMemo(()=>x.find(k=>!k.propsRef.current.disabled),[x]),y=d.useMemo(()=>x.some(k=>s(k.propsRef.current.value,E)),[x,E]),q=g(k=>{var G;if(m||s(k,E))return!1;let c=(G=x.find(L=>s(L.propsRef.current.value,k)))==null?void 0:G.propsRef.current;return c!=null&&c.disabled?!1:(T==null||T(k),!0)}),J=g(k=>{let G=M.current;if(!G)return;let c=ro(G),L=x.filter($=>$.propsRef.current.disabled===!1).map($=>$.element.current);switch(k.key){case w.Enter:to(k.currentTarget);break;case w.ArrowLeft:case w.ArrowUp:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Previous|ge.WrapAround)===Xt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.ArrowRight:case w.ArrowDown:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Next|ge.WrapAround)===Xt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.Space:{k.preventDefault(),k.stopPropagation();let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break}}),C=g(k=>(h({type:0,...k}),()=>h({type:1,id:k.id}))),B=d.useMemo(()=>({value:E,firstOption:F,containsCheckedOption:y,disabled:m,compare:s,...b}),[E,F,y,m,s,b]),W=d.useMemo(()=>({registerOption:C,change:q}),[C,q]),Z={ref:S,id:a,role:"radiogroup","aria-labelledby":D,"aria-describedby":R,onKeyDown:J},ee=d.useMemo(()=>({value:E}),[E]),le=d.useCallback(()=>{if(_!==void 0)return q(_)},[q,_]),se=ae();return P.createElement(N,{name:"RadioGroup.Description"},P.createElement(j,{name:"RadioGroup.Label"},P.createElement(Ht.Provider,{value:W},P.createElement(Gt.Provider,{value:B},n!=null&&P.createElement($t,{disabled:m,data:{[n]:E||"on"},overrides:{type:"radio",checked:E!=null},form:l,onReset:le}),se({ourProps:Z,theirProps:I,slot:ee,defaultTag:kr,name:"RadioGroup"})))))}let Dr="div";function qr(e,t){var r;let o=Ut("RadioGroup.Option"),a=Kt("RadioGroup.Option"),f=d.useId(),{id:l=`headlessui-radiogroup-option-${f}`,value:n,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=d.useRef(null),I=ie(v,t),[s,b]=qe(),[h,x]=oo(),D=Le({value:n,disabled:i});re(()=>a.registerOption({id:l,element:v,propsRef:D}),[l,a,v,D]);let j=g(q=>{var J;if(Be(q.currentTarget))return q.preventDefault();a.change(n)&&((J=v.current)==null||J.focus())}),R=((r=o.firstOption)==null?void 0:r.id)===l,{isFocusVisible:N,focusProps:M}=Ee({autoFocus:p}),{isHovered:S,hoverProps:_}=Ce({isDisabled:i}),E=o.compare(o.value,n),T=ve({ref:I,id:l,role:"radio","aria-checked":E?"true":"false","aria-labelledby":s,"aria-describedby":h,"aria-disabled":i?!0:void 0,tabIndex:i?-1:E||!o.containsCheckedOption&&R?0:-1,onClick:i?void 0:j,autoFocus:p},M,_),F=d.useMemo(()=>({checked:E,disabled:i,active:N,hover:S,focus:N,autofocus:p}),[E,i,S,N,p]),y=ae();return P.createElement(x,{name:"RadioGroup.Description"},P.createElement(b,{name:"RadioGroup.Label"},y({ourProps:T,theirProps:m,slot:F,defaultTag:Dr,name:"RadioGroup.Option"})))}let Br="span";function Ar(e,t){var r;let o=Ut("Radio"),a=Kt("Radio"),f=d.useId(),l=Pt(),n=De(),{id:i=l||`headlessui-radio-${f}`,value:p,disabled:m=o.disabled||n||!1,autoFocus:v=!1,...I}=e,s=d.useRef(null),b=ie(s,t),h=Ne(),x=Vt(),D=Le({value:p,disabled:m});re(()=>a.registerOption({id:i,element:s,propsRef:D}),[i,a,s,D]);let j=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();a.change(p)&&((q=s.current)==null||q.focus())}),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:v}),{isHovered:M,hoverProps:S}=Ce({isDisabled:m}),_=((r=o.firstOption)==null?void 0:r.id)===i,E=o.compare(o.value,p),T=ve({ref:b,id:i,role:"radio","aria-checked":E?"true":"false","aria-labelledby":h,"aria-describedby":x,"aria-disabled":m?!0:void 0,tabIndex:m?-1:E||!o.containsCheckedOption&&_?0:-1,autoFocus:v,onClick:m?void 0:j},N,S),F=d.useMemo(()=>({checked:E,disabled:m,hover:M,focus:R,autofocus:v}),[E,m,M,R,v]);return ae()({ourProps:T,theirProps:I,slot:F,defaultTag:Br,name:"Radio"})}let Gr=ne(Lr),Ur=ne(qr),zt=ne(Ar),Hr=Mt,Kr=Mo,Ro=Object.assign(Gr,{Option:Ur,Radio:zt,Label:Hr,Description:Kr});const Ye=({id:e,children:t})=>u.jsx("p",{id:`${e}-description`,className:"paragraph-100 text-neutral-700",children:t});try{Ye.displayName="FormFieldDescription",Ye.__docgenInfo={description:"",displayName:"FormFieldDescription",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}}}catch{}const Ze=({children:e})=>u.jsxs("div",{className:"mt-0.5 flex items-center gap-1",children:[u.jsx(To,{className:"h-3 w-3 fill-danger-500"}),u.jsx("p",{className:"paragraph-100 text-danger-500",children:e})]});try{Ze.displayName="FormFieldErrorMessage",Ze.__docgenInfo={description:"",displayName:"FormFieldErrorMessage",props:{}}}catch{}const et=({htmlFor:e,children:t,optional:r})=>u.jsxs("div",{className:"flex items-baseline gap-1 text-neutral-800",children:[u.jsx("label",{htmlFor:e,className:"headline-400",children:t}),r?u.jsx("div",{className:"paragraph-100",children:"(Optional)"}):null]});try{et.displayName="FormFieldLabel",et.__docgenInfo={description:"",displayName:"FormFieldLabel",props:{htmlFor:{defaultValue:null,description:"",name:"htmlFor",required:!0,type:{name:"string"}},optional:{defaultValue:null,description:"",name:"optional",required:!1,type:{name:"boolean"}}}}}catch{}const tt=({children:e})=>u.jsx("div",{className:"mb-2 flex flex-col gap-1",children:e});try{tt.displayName="FormFieldLabelGroup",tt.__docgenInfo={description:"",displayName:"FormFieldLabelGroup",props:{}}}catch{}const ot=({children:e,value:t,disabled:r})=>u.jsx(zt,{value:t,className:"max-w-fit cursor-pointer focus:outline-none",disabled:r,children:({checked:o,disabled:a})=>u.jsxs("div",{className:"flex items-center gap-3",children:[o?u.jsx("span",{className:H("relative inline-block h-4 w-4 rounded-full bg-primary-400 hover:bg-primary-500 active:bg-primary-600",a&&"bg-neutral-100 hover:bg-neutral-100 active:bg-neutral-100"),children:u.jsx("span",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-neutral-0",a&&"bg-neutral-500")})}):u.jsx("span",{className:H("inline-block h-4 w-4 rounded-full border border-neutral-400 hover:border-neutral-600 active:border-neutral-500 active:bg-neutral-100",a&&"border-0 bg-neutral-100")}),u.jsx("p",{className:H("paragraph-200",a&&"text-neutral-600"),children:e})]})});try{ot.displayName="RadioInputOption",ot.__docgenInfo={description:"",displayName:"RadioInputOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Fe=({id:e,children:t,value:r,onChange:o})=>u.jsx(Ro,{id:e,value:r,onChange:o,children:t});Fe.Option=ot;try{Fe.displayName="RadioInput",Fe.__docgenInfo={description:"",displayName:"RadioInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}}}catch{}const zr="target-field",Qr=H("[.group.form-field-group_&:first-child_.target-field]:rounded-r-none [.group.form-field-group_&:first-child_.target-field]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:border-r-0","[.group.form-field-group_&:last-child_.target-field]:border-l-1 [.group.form-field-group_&:last-child_.target-field]:rounded-l-none"),rt=({ariaDescribedBy:e,type:t="text",LeftIcon:r,readOnly:o,autoSelect:a,error:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=()=>{a&&p.current&&p.current.select()};return u.jsxs("div",{className:H("relative w-full",Qr),children:[r?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(r,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}):null,u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:m,onFocus:m,onClick:m,type:t,className:H(zr,"paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",r&&"pl-9",o&&"bg-primary-50",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",n),readOnly:o,disabled:l,...i})]})};try{rt.displayName="TextInput",rt.__docgenInfo={description:"",displayName:"TextInput",props:{type:{defaultValue:{value:"text"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"text"'},{value:'"email"'},{value:'"date"'},{value:'"password"'}]}},autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}}}}}catch{}const nt=({id:e,value:t,onChange:r,placeholder:o,ariaDescribedBy:a,error:f,disabled:l,rows:n,cols:i,className:p})=>u.jsx("textarea",{id:e,name:e,value:t,onChange:r,placeholder:o,"aria-describedby":a,className:H("paragraph-100 block min-h-[2rem] w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",p),disabled:l,rows:n,cols:i});try{nt.displayName="Textarea",nt.__docgenInfo={description:"",displayName:"Textarea",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"number"}},cols:{defaultValue:null,description:"",name:"cols",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Jr={left:"text-left",center:"text-center",right:"text-right"},at=({id:e,placeholder:t,value:r,min:o,max:a,onChange:f,ariaDescribedBy:l,LeftIcon:n,textAlign:i="left",readOnly:p,error:m,disabled:v})=>u.jsxs("div",{className:"relative w-full",children:[n?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3","aria-hidden":"true",children:u.jsx(n,{className:"text-gray-400 h-4 w-4 fill-neutral-600"})}):null,u.jsx("input",{id:e,name:e,value:r,readOnly:p,onChange:f,placeholder:t,"aria-describedby":l,type:"number",min:o,max:a,className:H("paragraph-100 block w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",Jr[i],n&&"pl-9",p&&"bg-neutral-100",v&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!m&&!v&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",m&&!v&&"border-danger-500"),disabled:v})]});try{at.displayName="NumberInput",at.__docgenInfo={description:"",displayName:"NumberInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},textAlign:{defaultValue:{value:"left"},description:"",name:"textAlign",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"left"'},{value:'"right"'}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((event: ChangeEvent) => void)"}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!0,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"number"}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"number"}}}}}catch{}const lt=({children:e})=>u.jsx(Co,{className:"absolute mt-1 max-h-60 w-full list-none overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{lt.displayName="ListboxOptions",lt.__docgenInfo={description:"",displayName:"ListboxOptions",props:{}}}catch{}const it=({children:e,badgeType:t="neutral"})=>u.jsx("div",{className:"flex items-center",children:u.jsx(ho,{type:t,children:e})});try{it.displayName="ListboxBadgeOption",it.__docgenInfo={description:"",displayName:"ListboxBadgeOption",props:{badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"neutral"'},{value:'"violet"'},{value:'"green"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const st=({children:e,LeftIcon:t})=>u.jsxs("div",{className:"flex items-center gap-2",children:[t?u.jsx(t,{className:"h-3 w-3 fill-neutral-500 ui-selected:fill-primary-500"}):null,u.jsx("div",{className:"paragraph-100",children:e})]});try{st.displayName="ListboxTextOption",st.__docgenInfo={description:"",displayName:"ListboxTextOption",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}}}}}catch{}const Ve={base:"relative cursor-pointer px-3 py-2 ",selected:"bg-primary-100 text-primary-500 before:absolute before:bottom-0 before:left-0 before:top-0 before:block before:w-[2px] before:rounded-r-md before:bg-primary-400",active:"bg-neutral-50 bg-primary-100",disabled:"cursor-not-allowed bg-neutral-50 text-neutral-400"},Ie=({value:e,disabled:t,children:r})=>u.jsx(No,{value:e,as:d.Fragment,disabled:t,children:({active:o,selected:a})=>u.jsx("li",{className:H(Ve.base,o&&Ve.active,a&&Ve.selected,t&&Ve.disabled),children:r})});Ie.BadgeOption=it;Ie.TextOption=st;try{Ie.displayName="ListboxOption",Ie.__docgenInfo={description:"",displayName:"ListboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const ut=({placeholder:e,value:t,badgeType:r="neutral"})=>t?u.jsx(ho,{type:r,children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600",children:e});try{ut.displayName="ListboxButtonBadgeValue",ut.__docgenInfo={description:"",displayName:"ListboxButtonBadgeValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}},badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"neutral"'},{value:'"violet"'},{value:'"green"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const dt=({placeholder:e,value:t})=>t?u.jsx("div",{className:"paragraph-100",children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600 group-hover:text-neutral-700",children:e});try{dt.displayName="ListboxButtonTextValue",dt.__docgenInfo={description:"",displayName:"ListboxButtonTextValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}}}}}catch{}const Se=({children:e,disabled:t})=>u.jsxs(Eo,{disabled:t,className:H("group flex h-8 w-full cursor-pointer items-center rounded border border-neutral-400 bg-neutral-0 py-2 pl-3 pr-8 outline-none hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",t&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),children:[e,u.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100 focus:outline-none",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]});Se.BadgeValue=ut;Se.TextValue=dt;try{Se.displayName="ListboxButton",Se.__docgenInfo={description:"",displayName:"ListboxButton",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Xr=H("[.group.form-field-group_&:first-child_button]:rounded-r-none [.group.form-field-group_&:first-child_button]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_button]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_button]:border-r-0","[.group.form-field-group_&:last-child_button]:rounded-l-none"),xe=({children:e,value:t,onChange:r,className:o})=>u.jsx(Mr,{value:t,onChange:r,children:u.jsx("div",{className:H("relative w-full",Xr,o),children:e})});xe.Button=Se;xe.Options=lt;xe.Option=Ie;try{xe.displayName="Listbox",xe.__docgenInfo={description:"",displayName:"Listbox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const ct=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ct.displayName="MultiComboboxCustomOption",ct.__docgenInfo={description:"",displayName:"MultiComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pt=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{pt.displayName="MultiComboboxEmptyOption",pt.__docgenInfo={description:"",displayName:"MultiComboboxEmptyOption",props:{}}}catch{}const mt=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0,disabled:f=!1,...l})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:()=>t,onChange:o,className:H("paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",f&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),...l}),a&&!f?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{mt.displayName="MultiComboboxInput",mt.__docgenInfo={description:"",displayName:"MultiComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"string"}},autoFocus:{defaultValue:null,description:"",name:"autoFocus",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | ((bag: InputRenderPropArg) => string)"}},as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:"enum",value:[{value:'"input"'}]}},refName:{defaultValue:null,description:"",name:"refName",required:!1,type:{name:"string"}}}}}catch{}const bt=({value:e,children:t})=>u.jsxs(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:[t,u.jsx("div",{className:"absolute inset-y-0 right-3 hidden items-center fill-primary-500 ui-selected:flex",children:u.jsx($o,{})})]});try{bt.displayName="MultiComboboxOption",bt.__docgenInfo={description:"",displayName:"MultiComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const ft=({children:e,className:t})=>u.jsx(Bt,{hold:!0,className:H("absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",t),children:e});try{ft.displayName="MultiComboboxOptions",ft.__docgenInfo={description:"",displayName:"MultiComboboxOptions",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const vt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{vt.displayName="MultiComboboxResultsBadges",vt.__docgenInfo={description:"",displayName:"MultiComboboxResultsBadges",props:{}}}catch{}const gt=({children:e})=>u.jsx("div",{className:"paragraph-100 mt-2 text-neutral-900",children:e});try{gt.displayName="MultiComboboxResultsLabel",gt.__docgenInfo={description:"",displayName:"MultiComboboxResultsLabel",props:{}}}catch{}const xt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{xt.displayName="MultiComboboxResultsTags",xt.__docgenInfo={description:"",displayName:"MultiComboboxResultsTags",props:{}}}catch{}const yt=({children:e})=>u.jsx("div",{className:"paragraph-100",children:e});try{yt.displayName="MultiComboboxResultsText",yt.__docgenInfo={description:"",displayName:"MultiComboboxResultsText",props:{}}}catch{}const fe=({children:e})=>u.jsx("div",{className:"flex flex-col gap-2",children:e});fe.Label=gt;fe.Text=yt;fe.Badges=vt;fe.Tags=xt;try{fe.displayName="MultiComboboxResults",fe.__docgenInfo={description:"",displayName:"MultiComboboxResults",props:{}}}catch{}const ce=({value:e,onChange:t,children:r})=>u.jsx(Io,{multiple:!0,value:e,onChange:t,children:u.jsx("div",{className:"relative",children:r})});ce.Input=mt;ce.Options=ft;ce.Option=bt;ce.CustomOption=ct;ce.EmptyOption=pt;ce.Results=fe;try{ce.displayName="MultiCombobox",ce.__docgenInfo={description:"",displayName:"MultiCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue[]"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue[]) => void"}}}}}catch{}const ht=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ht.displayName="SingleComboboxCustomOption",ht.__docgenInfo={description:"",displayName:"SingleComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const _t=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{_t.displayName="SingleComboboxEmptyOption",_t.__docgenInfo={description:"",displayName:"SingleComboboxEmptyOption",props:{}}}catch{}const Ot=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:t,onChange:o,className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200 disabled:border-neutral-300 disabled:bg-neutral-100 disabled:text-neutral-600"}),a?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{Ot.displayName="SingleComboboxInput",Ot.__docgenInfo={description:"",displayName:"SingleComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!1,type:{name:"((item: TValue) => string)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}}}}}catch{}const It=({children:e})=>u.jsx(Bt,{hold:!0,className:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{It.displayName="SingleComboboxOptions",It.__docgenInfo={description:"",displayName:"SingleComboboxOptions",props:{}}}catch{}const St=({onUnselect:e,children:t})=>u.jsx("div",{className:"relative",children:u.jsxs("div",{className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",children:[u.jsx(Uo,{onClick:e,children:t}),u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]})});try{St.displayName="SingleComboboxResultInput",St.__docgenInfo={description:"",displayName:"SingleComboboxResultInput",props:{onUnselect:{defaultValue:null,description:"",name:"onUnselect",required:!0,type:{name:"() => void"}}}}}catch{}const Et=({value:e,children:t})=>u.jsx(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{Et.displayName="SingleComboboxOption",Et.__docgenInfo={description:"",displayName:"SingleComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pe=({value:e,onChange:t,children:r,disabled:o})=>u.jsx(Io,{value:e,onChange:t,disabled:o,children:u.jsx("div",{className:"relative",children:r})});pe.Input=Ot;pe.ResultInput=St;pe.Options=It;pe.Option=Et;pe.EmptyOption=_t;pe.CustomOption=ht;try{pe.displayName="SingleCombobox",pe.__docgenInfo={description:"",displayName:"SingleCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Ct=({children:e})=>u.jsx("div",{className:"form-field-group group flex w-full flex-row",children:e});try{Ct.displayName="FormFieldGroup",Ct.__docgenInfo={description:"",displayName:"FormFieldGroup",props:{}}}catch{}const Nt=({ariaDescribedBy:e,readOnly:t,autoSelect:r,onClear:o,error:a,value:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=!t&&!l&&f!==void 0&&f!=="",v=d.useCallback(()=>{r&&p.current&&p.current.select()},[r]),I=d.useCallback(s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),s.stopPropagation(),o())},[o]);return u.jsxs("div",{className:H("relative w-full"),children:[u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(wo,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}),u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:v,onFocus:v,onClick:v,type:"search",className:H("paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-9 pr-8 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",t&&"bg-neutral-100",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!a&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",a&&!l&&"border-danger-500",n),readOnly:t,disabled:l,value:f,...i}),m?u.jsx("div",{className:"absolute inset-y-0 right-0 z-10 flex items-center justify-center pr-2",children:u.jsx("button",{type:"button","aria-label":"Clear search input",tabIndex:0,onClick:o,onKeyDown:I,className:"rounded bg-neutral-100 p-0.5 hover:bg-neutral-200",children:u.jsx(Vo,{className:"h-3 w-3 fill-neutral-600"})})}):null]})};try{Nt.displayName="SearchInput",Nt.__docgenInfo={description:"",displayName:"SearchInput",props:{autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},onClear:{defaultValue:null,description:"",name:"onClear",required:!0,type:{name:"() => void"}}}}}catch{}const Je={base:"group relative flex items-center gap-3 rounded-lg bg-neutral-0 border p-4 border-neutral-300 hover:border-primary-600 hover:bg-primary-50 cursor-pointer focus:outline-none data-[focus]:outline-2 data-[focus]:outline-primary-200",checked:"border-primary-600 bg-primary-600 hover:bg-primary-600 hover:text-neutral-0",disabled:"bg-neutral-100 group-hover:border-neutral-300 group-hover:bg-neutral-100 hover:border-neutral-300 hover:bg-neutral-100 cursor-not-allowed"},Me={base:"relative inline-block h-4 w-4 shrink-0 rounded-full bg-neutral-0 border border-neutral-300",unchecked:"group-hover:border-primary-600 group-hover:bg-neutral-0",checked:"border-transparent",disabled:"bg-neutral-200 border-neutral-200 group-hover:border-neutral-200 group-hover:bg-neutral-200"},Wr=({children:e})=>u.jsx("h2",{className:"headline-500 text-neutral-900 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),Yr=({children:e})=>u.jsx("p",{className:"paragraph-200 text-neutral-800 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),me=({children:e,value:t,disabled:r,className:o})=>u.jsx(zt,{value:t,disabled:r,as:d.Fragment,children:({checked:a,disabled:f})=>u.jsxs("div",{className:H(Je.base,a&&H("is-checked",Je.checked),f&&H("is-disabled",Je.disabled)),children:[u.jsx("div",{className:H(Me.base,!a&&Me.unchecked,a&&Me.checked,f&&Me.disabled),children:a&&u.jsx("div",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-primary-600",f&&"bg-neutral-500")})}),u.jsx("div",{className:H("flex flex-col",o),children:e})]})});me.Title=Wr;me.Description=Yr;try{me.displayName="RadioBoxOption",me.__docgenInfo={description:"",displayName:"RadioBoxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{me.Title.displayName="RadioBoxOption.Title",me.Title.__docgenInfo={description:"",displayName:"RadioBoxOption.Title",props:{}}}catch{}try{me.Description.displayName="RadioBoxOption.Description",me.Description.__docgenInfo={description:"",displayName:"RadioBoxOption.Description",props:{}}}catch{}const ye=({id:e,value:t,children:r,onChange:o,className:a})=>u.jsx(Ro,{id:e,value:t,onChange:o,className:a,children:r});ye.Option=me;try{ye.displayName="RadioBox",ye.__docgenInfo={description:"",displayName:"RadioBox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{ye.Option.displayName="RadioBox.Option",ye.Option.__docgenInfo={description:"",displayName:"RadioBox.Option",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Y=({children:e})=>u.jsx("div",{className:"w-full",children:e});Y.LabelGroup=tt;Y.Label=et;Y.Description=Ye;Y.ErrorMessage=Ze;Y.TextInput=rt;Y.Textarea=nt;Y.RadioInput=Fe;Y.NumberInput=at;Y.Listbox=xe;Y.MultiCombobox=ce;Y.SingleCombobox=pe;Y.Group=Ct;Y.SearchInput=Nt;Y.RadioBox=ye;try{Y.displayName="FormField",Y.__docgenInfo={description:"",displayName:"FormField",props:{}}}catch{}export{Y as F,ye as R,pe as S,Ct as a}; diff --git a/assets/form-field-group.stories-CNEhqW5L.js b/assets/form-field-group.stories-2Sz2Q6YT.js similarity index 81% rename from assets/form-field-group.stories-CNEhqW5L.js rename to assets/form-field-group.stories-2Sz2Q6YT.js index f9df9925..c979434f 100644 --- a/assets/form-field-group.stories-CNEhqW5L.js +++ b/assets/form-field-group.stories-2Sz2Q6YT.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{a as j,F as r}from"./form-field-2xLK_lYH.js";import"./index-0d5eMwbi.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const q={title:"Input / Combined Fields",component:j},l=({error:i=!1,disabled:s=!1})=>e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Textfields Only"}),e.jsx(r.Description,{id:"value-description",children:"A group with only textfields"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s})]})]}),e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Mixed Fields"}),e.jsx(r.Description,{id:"value-description",children:"A group with mixed fields (textfields and listboxes)"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsxs(r.Listbox,{value:"",onChange:()=>{},children:[e.jsx(r.Listbox.Button,{children:e.jsx(r.Listbox.Button.TextValue,{value:"",placeholder:"Listbox"})}),e.jsx("div",{className:"relative z-10",children:e.jsxs(r.Listbox.Options,{children:[e.jsx(r.Listbox.Option,{value:"Option 1",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 1"})}),e.jsx(r.Listbox.Option,{value:"Option 2",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 2"})})]})})]})]})]})]}),t={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{})})},o={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{error:!0})})},a={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{disabled:!0})})};var n,d,p;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{a as j,F as r}from"./form-field-MCn42VmW.js";import"./index-0d5eMwbi.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-HzzQKYtS.js";import"./keyboard-D0BTZntQ.js";import"./use-sync-refs-DhZgiOVe.js";import"./form-fields-HWr4pxRQ.js";import"./index-BoyHNU0R.js";import"./hidden-DfUyyskI.js";import"./description-CaDbXm72.js";import"./label-fWs8-lsP.js";import"./bugs-DpEN4NTH.js";import"./focus-management-CKkqTXfi.js";import"./use-text-value-D3ZnWpLS.js";import"./floating-Bhi-vCn9.js";import"./use-inert-others-D4nVU6H_.js";import"./portal-BQQr4JoD.js";import"./use-server-handoff-complete-UouYGEcd.js";import"./open-closed-FM4Rfwkx.js";import"./badge-Da1HxQE-.js";import"./index-BgfbgFhO.js";import"./use-event-listener-EaZKqAMH.js";import"./active-element-history-DjNnwGR_.js";import"./tag-C9CGXtt3.js";const q={title:"Input / Combined Fields",component:j},l=({error:i=!1,disabled:s=!1})=>e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Textfields Only"}),e.jsx(r.Description,{id:"value-description",children:"A group with only textfields"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s})]})]}),e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Mixed Fields"}),e.jsx(r.Description,{id:"value-description",children:"A group with mixed fields (textfields and listboxes)"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsxs(r.Listbox,{value:"",onChange:()=>{},children:[e.jsx(r.Listbox.Button,{children:e.jsx(r.Listbox.Button.TextValue,{value:"",placeholder:"Listbox"})}),e.jsx("div",{className:"relative z-10",children:e.jsxs(r.Listbox.Options,{children:[e.jsx(r.Listbox.Option,{value:"Option 1",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 1"})}),e.jsx(r.Listbox.Option,{value:"Option 2",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 2"})})]})})]})]})]})]}),t={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{})})},o={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{error:!0})})},a={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{disabled:!0})})};var n,d,p;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{ render: () =>
diff --git a/assets/form-fields-B2NmhAAW.js b/assets/form-fields-HWr4pxRQ.js similarity index 95% rename from assets/form-fields-B2NmhAAW.js rename to assets/form-fields-HWr4pxRQ.js index a4b73ba8..458cbebb 100644 --- a/assets/form-fields-B2NmhAAW.js +++ b/assets/form-fields-HWr4pxRQ.js @@ -1 +1 @@ -import{r as l,R as a}from"./index-0d5eMwbi.js";import{o as E,p as v,m as b}from"./use-sync-refs-DqQDZvJ6.js";import{r as S}from"./index-BoyHNU0R.js";import{f as d,s as m}from"./hidden-BrNieFV6.js";function A(t,e,n){let[r,o]=l.useState(n),u=t!==void 0,f=l.useRef(u),i=l.useRef(!1),c=l.useRef(!1);return u&&!f.current&&!i.current?(i.current=!0,f.current=u,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!u&&f.current&&!c.current&&(c.current=!0,f.current=u,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[u?t:r,E(s=>(u||o(s),e==null?void 0:e(s)))]}function F(t){let[e]=l.useState(t);return e}function p(t={},e=null,n=[]){for(let[r,o]of Object.entries(t))g(n,h(e,r),o);return n}function h(t,e){return t?t+"["+e+"]":e}function g(t,e,n){if(Array.isArray(n))for(let[r,o]of n.entries())g(t,h(e,r.toString()),o);else n instanceof Date?t.push([e,n.toISOString()]):typeof n=="boolean"?t.push([e,n?"1":"0"]):typeof n=="string"?t.push([e,n]):typeof n=="number"?t.push([e,`${n}`]):n==null?t.push([e,""]):p(n,e,t)}function P(t){var e,n;let r=(e=t==null?void 0:t.form)!=null?e:t.closest("form");if(r){for(let o of r.elements)if(o!==t&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}let y=l.createContext(null);function C(t){let[e,n]=l.useState(null);return a.createElement(y.Provider,{value:{target:e}},t.children,a.createElement(d,{features:m.Hidden,ref:n}))}function T({children:t}){let e=l.useContext(y);if(!e)return a.createElement(a.Fragment,null,t);let{target:n}=e;return n?S.createPortal(a.createElement(a.Fragment,null,t),n):null}function H({data:t,form:e,disabled:n,onReset:r,overrides:o}){let[u,f]=l.useState(null),i=v();return l.useEffect(()=>{if(r&&u)return i.addEventListener(u,"reset",r)},[u,e,r]),a.createElement(T,null,a.createElement(I,{setForm:f,formId:e}),p(t).map(([c,s])=>a.createElement(d,{features:m.Hidden,...b({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:n,name:c,value:s,...o})})))}function I({setForm:t,formId:e}){return l.useEffect(()=>{if(e){let n=document.getElementById(e);n&&t(n)}},[t,e]),e?null:a.createElement(d,{features:m.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&t(r)}})}export{A as T,C as W,H as j,F as l,P as p}; +import{r as l,R as a}from"./index-0d5eMwbi.js";import{o as E,p as v,m as b}from"./use-sync-refs-DhZgiOVe.js";import{r as S}from"./index-BoyHNU0R.js";import{f as d,s as m}from"./hidden-DfUyyskI.js";function A(t,e,n){let[r,o]=l.useState(n),u=t!==void 0,f=l.useRef(u),i=l.useRef(!1),c=l.useRef(!1);return u&&!f.current&&!i.current?(i.current=!0,f.current=u,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!u&&f.current&&!c.current&&(c.current=!0,f.current=u,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[u?t:r,E(s=>(u||o(s),e==null?void 0:e(s)))]}function F(t){let[e]=l.useState(t);return e}function p(t={},e=null,n=[]){for(let[r,o]of Object.entries(t))g(n,h(e,r),o);return n}function h(t,e){return t?t+"["+e+"]":e}function g(t,e,n){if(Array.isArray(n))for(let[r,o]of n.entries())g(t,h(e,r.toString()),o);else n instanceof Date?t.push([e,n.toISOString()]):typeof n=="boolean"?t.push([e,n?"1":"0"]):typeof n=="string"?t.push([e,n]):typeof n=="number"?t.push([e,`${n}`]):n==null?t.push([e,""]):p(n,e,t)}function P(t){var e,n;let r=(e=t==null?void 0:t.form)!=null?e:t.closest("form");if(r){for(let o of r.elements)if(o!==t&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}let y=l.createContext(null);function C(t){let[e,n]=l.useState(null);return a.createElement(y.Provider,{value:{target:e}},t.children,a.createElement(d,{features:m.Hidden,ref:n}))}function T({children:t}){let e=l.useContext(y);if(!e)return a.createElement(a.Fragment,null,t);let{target:n}=e;return n?S.createPortal(a.createElement(a.Fragment,null,t),n):null}function H({data:t,form:e,disabled:n,onReset:r,overrides:o}){let[u,f]=l.useState(null),i=v();return l.useEffect(()=>{if(r&&u)return i.addEventListener(u,"reset",r)},[u,e,r]),a.createElement(T,null,a.createElement(I,{setForm:f,formId:e}),p(t).map(([c,s])=>a.createElement(d,{features:m.Hidden,...b({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:e,disabled:n,name:c,value:s,...o})})))}function I({setForm:t,formId:e}){return l.useEffect(()=>{if(e){let n=document.getElementById(e);n&&t(n)}},[t,e]),e?null:a.createElement(d,{features:m.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&t(r)}})}export{A as T,C as W,H as j,F as l,P as p}; diff --git a/assets/hidden-BrNieFV6.js b/assets/hidden-DfUyyskI.js similarity index 89% rename from assets/hidden-BrNieFV6.js rename to assets/hidden-DfUyyskI.js index f8445a36..141fa7c5 100644 --- a/assets/hidden-BrNieFV6.js +++ b/assets/hidden-DfUyyskI.js @@ -1 +1 @@ -import{L as t,D as a}from"./use-sync-refs-DqQDZvJ6.js";let l="span";var p=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(p||{});function s(e,n){var i;let{features:d=1,...o}=e,r={ref:n,"aria-hidden":(d&2)===2?!0:(i=o["aria-hidden"])!=null?i:void 0,hidden:(d&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(d&4)===4&&(d&2)!==2&&{display:"none"}}};return a()({ourProps:r,theirProps:o,slot:{},defaultTag:l,name:"Hidden"})}let f=t(s);export{f,p as s}; +import{K as t,L as a}from"./use-sync-refs-DhZgiOVe.js";let l="span";var p=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(p||{});function s(e,n){var i;let{features:d=1,...o}=e,r={ref:n,"aria-hidden":(d&2)===2?!0:(i=o["aria-hidden"])!=null?i:void 0,hidden:(d&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(d&4)===4&&(d&2)!==2&&{display:"none"}}};return a()({ourProps:r,theirProps:o,slot:{},defaultTag:l,name:"Hidden"})}let f=t(s);export{f,p as s}; diff --git a/assets/icon-button-k2wtPfcV.js b/assets/icon-button-BGxZn9fU.js similarity index 96% rename from assets/icon-button-k2wtPfcV.js rename to assets/icon-button-BGxZn9fU.js index d9b7e93e..e03caf88 100644 --- a/assets/icon-button-k2wtPfcV.js +++ b/assets/icon-button-BGxZn9fU.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as l}from"./class-names-DnY5YZNL.js";const d={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"bg-neutral-0 text-neutral-600 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-700 active:bg-neutral-100 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 disabled:border-neutral-300 disabled:text-neutral-400 disabled:bg-neutral-0 fill-neutral-600",minimal:"text-neutral-600 hover:text-neutral-700 hover:bg-neutral-100 active:bg-neutral-200 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 focus:bg-neutral-50 disabled:text-neutral-400 disabled:bg-transparent fill-neutral-600",danger:"bg-danger-500 text-neutral-0 hover:bg-danger-600 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-500 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600"},a=({Icon:e,variant:n="primary",className:t,...i})=>r.jsx("button",{type:"button",className:l("inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded focus:outline-none",d[n],t),...i,children:r.jsx(e,{className:"h-3 w-3"})});try{a.displayName="IconButton",a.__docgenInfo={description:"",displayName:"IconButton",props:{Icon:{defaultValue:null,description:"",name:"Icon",required:!0,type:{name:"ElementType"}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}}}}}catch{}export{a as I}; +import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as l}from"./class-names-DnY5YZNL.js";const d={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"bg-neutral-0 text-neutral-600 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-700 active:bg-neutral-100 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 disabled:border-neutral-300 disabled:text-neutral-400 disabled:bg-neutral-0 fill-neutral-600",minimal:"text-neutral-600 hover:text-neutral-700 hover:bg-neutral-100 active:bg-neutral-200 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 focus:bg-neutral-50 disabled:text-neutral-400 disabled:bg-transparent fill-neutral-600",danger:"bg-danger-500 text-neutral-0 hover:bg-danger-600 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-500 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600"},a=({Icon:e,variant:n="primary",className:t,...i})=>r.jsx("button",{type:"button",className:l("inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded focus:outline-none",d[n],t),...i,children:r.jsx(e,{className:"h-3 w-3"})});try{a.displayName="IconButton",a.__docgenInfo={description:"",displayName:"IconButton",props:{Icon:{defaultValue:null,description:"",name:"Icon",required:!0,type:{name:"ElementType"}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"danger"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}}}}}catch{}export{a as I}; diff --git a/assets/icon-button.stories-0-APhIQ1.js b/assets/icon-button.stories-C0v6QEPM.js similarity index 90% rename from assets/icon-button.stories-0-APhIQ1.js rename to assets/icon-button.stories-C0v6QEPM.js index 7fa51d78..ece22532 100644 --- a/assets/icon-button.stories-0-APhIQ1.js +++ b/assets/icon-button.stories-C0v6QEPM.js @@ -1 +1 @@ -import{I as e}from"./icon-button-k2wtPfcV.js";import{i as s}from"./zoom-to-fit-icon-DdsCB6de.js";import"./jsx-runtime-C798UXYj.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const n=["primary","secondary","minimal","danger","danger-secondary"],l={title:"IconButton",component:e,args:{variant:"primary",disabled:!1,Icon:s},argTypes:{variant:{options:n}}},r={};var a,o,t;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(t=(o=r.parameters)==null?void 0:o.docs)==null?void 0:t.source}}};const u=["Default"];export{r as Default,u as __namedExportsOrder,l as default}; +import{I as e}from"./icon-button-BGxZn9fU.js";import{i as s}from"./zoom-to-fit-icon-DdsCB6de.js";import"./jsx-runtime-C798UXYj.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const n=["primary","secondary","minimal","danger","danger-secondary"],l={title:"IconButton",component:e,args:{variant:"primary",disabled:!1,Icon:s},argTypes:{variant:{options:n}}},r={};var a,o,t;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(t=(o=r.parameters)==null?void 0:o.docs)==null?void 0:t.source}}};const u=["Default"];export{r as Default,u as __namedExportsOrder,l as default}; diff --git a/assets/icons-BtgjIq6b.js b/assets/icons-DhUkiSUP.js similarity index 98% rename from assets/icons-BtgjIq6b.js rename to assets/icons-DhUkiSUP.js index f926e8d0..7112da8e 100644 --- a/assets/icons-BtgjIq6b.js +++ b/assets/icons-DhUkiSUP.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as I}from"./index-CFK-oMtb.js";import{ae as g,aj as r,ak as t}from"./index-D_yKE35a.js";import{m as S,n as i,o as v,p as l,q as d,r as h,s as u,t as m,u as C,v as p,w as b,x as w,y as f,z as T,A,B as y,C as D,D as L,E as R,F,G as P,H as B,I as k,J as H,K as M,L as G,M as O,N as E,O as N,P as U,Q as x,R as V,T as j,U as z,V as K,W,X as q,Y as J,Z,_,$ as X,a0 as Q,a1 as Y,a2 as $,a3 as oo,a4 as no,a5 as co,a6 as ao,a7 as eo,a8 as Io,a9 as so,aa as go,ab as ro,ac as to,ad as So,ae as io,af as vo,ag as lo,ah as ho,ai as uo,aj as mo,ak as Co,al as po,am as bo,an as wo,ao as fo,ap as To,aq as Ao,ar as yo,as as Do,at as Lo,au as Ro,av as Fo,aw as Po,ax as Bo,ay as ko,az as Ho,S as Mo,aA as Go,l as Oo,aB as Eo,aC as No,aD as Uo,aE as xo,aF as Vo,aG as jo,aH as zo,aI as Ko,aJ as Wo,aK as qo,aL as Jo,aM as Zo,aN as _o,aO as Xo,aP as Qo,aQ as Yo,aR as $o,aS as on,aT as nn,aU as cn,aV as an,aW as en,aX as In,aY as sn,aZ as gn,a_ as rn,a$ as tn,b0 as Sn,b1 as vn,b2 as ln,b3 as dn,b4 as hn,j as un,b5 as mn,b6 as Cn,b7 as pn,b8 as bn,b9 as wn,ba as fn,bb as Tn,bc as An,bd as yn,be as Dn,bf as Ln,bg as Rn,bh as Fn,bi as Pn,bj as Bn,bk as kn,a as Hn,bl as Mn,bm as Gn,bn as On,bo as En,bp as Nn,bq as Un,br as xn,bs as Vn,bt as jn,bu as zn,bv as Kn,bw as Wn,bx as qn,by as Jn,bz as Zn,bA as _n,bB as Xn,bC as Qn,bD as Yn,bE as $n,bF as oc,bG as nc,bH as cc,bI as ac,bJ as ec,bK as Ic,bL as sc,bM as gc,bN as rc,bO as tc,bP as Sc,bQ as ic,bR as vc,f as lc,bS as dc,bT as hc,bU as uc,bV as mc,bW as Cc,bX as pc,bY as bc,bZ as wc,b_ as fc,b$ as Tc,c0 as Ac,c1 as yc,c2 as Dc,c3 as Lc,c4 as Rc,c5 as Fc,c6 as Pc,c7 as Bc,c8 as kc,c9 as Hc,ca as Mc,cb as Gc,cc as Oc,cd as Ec,ce as Nc,cf as Uc,cg as xc,ch as Vc,ci as jc,cj as zc,ck as Kc,cl as Wc,cm as qc,cn as Jc,co as Zc,cp as _c,cq as Xc,cr as Qc,cs as Yc,ct as $c,cu as oa,cv as na,cw as ca,cx as aa,cy as ea,cz as Ia,cA as sa,cB as ga,cC as ra,cD as ta,cE as Sa,cF as ia,cG as va,cH as la,cI as da,cJ as ha,cK as ua,cL as ma,cM as Ca,cN as pa,cO as ba,cP as wa,cQ as fa,cR as Ta,cS as Aa,cT as ya,cU as Da,cV as La,cW as Ra,cX as Fa,cY as Pa,cZ as Ba,c_ as ka,c$ as Ha,d0 as Ma,d1 as Ga,d2 as Oa,d3 as Ea,d4 as Na,d5 as Ua,d6 as xa,d7 as Va,d8 as ja,d9 as za,da as Ka,db as Wa,dc as qa,dd as Ja,de as Za,df as _a,dg as Xa,dh as Qa,di as Ya,dj as $a,dk as oe,dl as ne,dm as ce,dn as ae,dp as ee,dq as Ie,dr as se,ds as ge,dt as re,du as te,dv as Se,c as ie,dw as ve,dx as le,dy as de,dz as he,dA as ue,dB as me,dC as Ce,dD as pe,dE as be,dF as we,dG as fe,dH as Te,dI as Ae,dJ as ye,dK as De,dL as Le,dM as Re,dN as Fe,dO as Pe,dP as Be,dQ as ke,dR as He,dS as Me,dT as Ge,dU as Oe,dV as Ee,dW as Ne,dX as Ue,dY as xe,dZ as Ve,d_ as je,d$ as ze,e0 as Ke,e1 as We,e2 as qe,e3 as Je,e4 as Ze,e5 as _e,e6 as Xe,e7 as Qe,e8 as Ye,e9 as $e,ea as oI,eb as nI,ec as cI,ed as aI,ee as eI,ef as II,eg as sI,b as gI,eh as rI,ei as tI,ej as SI,ek as iI,el as vI,em as lI,en as dI,eo as hI,ep as uI,eq as mI,er as CI,es as pI,et as bI,eu as wI,ev as fI,ew as TI,ex as AI,ey as yI,ez as DI,eA as LI,eB as RI,eC as FI,eD as PI,eE as BI,eF as kI,eG as HI,eH as MI,eI as GI,eJ as OI,eK as EI,eL as NI,eM as UI,eN as xI,eO as VI,eP as jI,eQ as zI,eR as KI,eS as WI,eT as qI,eU as JI,eV as ZI,eW as _I,eX as XI,eY as QI,eZ as YI,e_ as $I,e$ as os,f0 as ns,f1 as cs,f2 as as,f3 as es,f4 as Is,f5 as ss,f6 as gs,f7 as rs,f8 as ts,f9 as Ss,fa as is,fb as vs,fc as ls,fd as ds,fe as hs,ff as us,fg as ms,fh as Cs,fi as ps,fj as bs,fk as ws,fl as fs,fm as Ts,fn as As,fo as ys,fp as Ds,fq as Ls,fr as Rs,fs as Fs,ft as Ps,fu as Bs,fv as ks,fw as Hs,fx as Ms,fy as Gs,fz as Os,fA as Es,fB as Ns,fC as Us,fD as xs,fE as Vs,fF as js,fG as zs,fH as Ks,fI as Ws,fJ as qs,fK as Js,fL as Zs,fM as _s,fN as Xs,fO as Qs,fP as Ys,fQ as $s,fR as og,fS as ng,fT as cg,fU as ag,fV as eg,fW as Ig,fX as sg,fY as gg,fZ as rg,f_ as tg,f$ as Sg,g0 as ig,g1 as vg,g2 as lg,g3 as dg,g4 as hg,g as ug,g5 as mg,g6 as Cg,g7 as pg,g8 as bg,g9 as wg,ga as fg,gb as Tg,gc as Ag,gd as yg,ge as Dg,gf as Lg,gg as Rg,gh as Fg,gi as Pg,gj as Bg,gk as kg,gl as Hg,gm as Mg,gn as Gg,go as Og,gp as Eg,gq as Ng,gr as Ug,gs as xg,gt as Vg,gu as jg,h as zg,gv as Kg,gw as Wg,gx as qg,gy as Jg,gz as Zg,gA as _g,gB as Xg,gC as Qg,gD as Yg,gE as $g,gF as or,gG as nr,gH as cr,gI as ar,gJ as er,gK as Ir,gL as sr,gM as gr,gN as rr,gO as tr,gP as Sr,gQ as ir,gR as vr,gS as lr,gT as dr,gU as hr,gV as ur,gW as mr,gX as Cr,gY as pr,gZ as br,g_ as wr,g$ as fr,h0 as Tr,h1 as Ar,h2 as yr,h3 as Dr,h4 as Lr,h5 as Rr,h6 as Fr,h7 as Pr,h8 as Br,h9 as kr,ha as Hr,hb as Mr,hc as Gr,hd as Or,he as Er,hf as Nr,hg as Ur,hh as xr,hi as Vr,hj as jr,d as zr,k as Kr,hk as Wr,hl as qr,hm as Jr,hn as Zr,ho as _r,hp as Xr,hq as Qr,hr as Yr,hs as $r,ht as ot,hu as nt,hv as ct,hw as at,hx as et,hy as It,hz as st,hA as gt,hB as rt,hC as tt,hD as St,hE as it,hF as vt,hG as lt,hH as dt,hI as ht,hJ as ut,hK as mt,hL as Ct,hM as pt,hN as bt,hO as wt,hP as ft,hQ as Tt,hR as At,hS as yt,hT as Dt,hU as Lt,i as Rt,e as Ft,hV as Pt,hW as Bt,hX as kt,hY as Ht,hZ as Mt,h_ as Gt,h$ as Ot,i0 as Et,i1 as Nt,i2 as Ut,i3 as xt}from"./zoom-to-fit-icon-DdsCB6de.js";import"./index-0d5eMwbi.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";const Vt=Object.freeze(Object.defineProperty({__proto__:null,AddClipIcon:S,AddColumnLeftIcon:i,AddColumnRightIcon:v,AddIcon:l,AddLocationIcon:d,AddRowBottomIcon:h,AddRowTopIcon:u,AddToArtifactIcon:m,AddToFolderIcon:C,AimpointsTargetIcon:p,AirplaneIcon:b,AlignCenterIcon:w,AlignJustifyIcon:f,AlignLeftIcon:T,AlignRightIcon:A,AlignmentBottomIcon:y,AlignmentHorizontalCenterIcon:D,AlignmentLeftIcon:L,AlignmentRightIcon:R,AlignmentTopIcon:F,AlignmentVerticalCenterIcon:P,AnchorIcon:B,AnnotationIcon:k,AntennaIcon:H,AppHeaderIcon:M,ApplicationIcon:G,ApplicationsIcon:O,ArchiveIcon:E,AreaOfInterestIcon:N,ArrayBooleanIcon:U,ArrayDateIcon:x,ArrayFloatingPointIcon:V,ArrayIcon:j,ArrayNumericIcon:z,ArrayStringIcon:K,ArrayTimestampIcon:W,ArrowBottomLeftIcon:q,ArrowBottomRightIcon:J,ArrowDownIcon:Z,ArrowLeftIcon:_,ArrowRightIcon:X,ArrowTopLeftIcon:Q,ArrowTopRightIcon:Y,ArrowUpIcon:$,ArrowsHorizontalIcon:oo,ArrowsVerticalIcon:no,AskIcon:co,AsteriskIcon:ao,AtIcon:eo,AutomaticUpdatesIcon:Io,BacklinkIcon:so,BadgeIcon:go,BanCircleIcon:ro,BankAccountIcon:to,BarcodeIcon:So,BlankIcon:io,BlockedPersonIcon:vo,BoldIcon:lo,BookIcon:ho,BookmarkIcon:uo,BoxIcon:mo,BriefcaseIcon:Co,BringDataIcon:po,BugIcon:bo,BuggyIcon:wo,BuildIcon:fo,CalculatorIcon:To,CalendarIcon:Ao,CameraIcon:yo,CaretDownIcon:Do,CaretLeftIcon:Lo,CaretRightIcon:Ro,CaretUpIcon:Fo,CargoShipIcon:Po,CellTowerIcon:Bo,ChangesIcon:ko,ChartIcon:Ho,ChatIcon:Mo,ChevronBackwardIcon:Go,ChevronDownIcon:Oo,ChevronForwardIcon:Eo,ChevronLeftIcon:No,ChevronRightIcon:Uo,ChevronUpIcon:xo,CircleArrowDownIcon:Vo,CircleArrowLeftIcon:jo,CircleArrowRightIcon:zo,CircleArrowUpIcon:Ko,CircleIcon:Wo,CitationIcon:qo,CleanIcon:Jo,ClipIcon:Zo,ClipboardIcon:_o,CloudDownloadIcon:Xo,CloudIcon:Qo,CloudUploadIcon:Yo,CodeBlockIcon:$o,CodeIcon:on,CogIcon:nn,CollapseAllIcon:cn,ColorFillIcon:an,ColumnLayoutIcon:en,CommentIcon:In,ComparisonIcon:sn,CompassIcon:gn,CompressedIcon:rn,ConfirmIcon:tn,ConsoleIcon:Sn,ContrastIcon:vn,ControlIcon:ln,CreditCardIcon:dn,CrossCircleIcon:hn,CrossIcon:un,CrownIcon:mn,CubeAddIcon:Cn,CubeIcon:pn,CubeRemoveIcon:bn,CurvedRangeChartIcon:wn,CutIcon:fn,CycleIcon:Tn,DashboardIcon:An,DataConnectionIcon:yn,DataLineageIcon:Dn,DatabaseIcon:Ln,DeleteIcon:Rn,DeltaIcon:Fn,DeriveColumnIcon:Pn,DesktopIcon:Bn,DiagnosisIcon:kn,DiagramTreeIcon:Hn,DirectionLeftIcon:Mn,DirectionRightIcon:Gn,DisableIcon:On,DivideIcon:En,DocumentIcon:Nn,DocumentOpenIcon:Un,DocumentShareIcon:xn,DollarIcon:Vn,DotIcon:jn,DoubleCaretHorizontalIcon:zn,DoubleCaretVerticalIcon:Kn,DoubleChevronDownIcon:Wn,DoubleChevronLeftIcon:qn,DoubleChevronRightIcon:Jn,DoubleChevronUpIcon:Zn,DoughnutChartIcon:_n,DownloadIcon:Xn,DragHandleHorizontalIcon:Qn,DragHandleVerticalIcon:Yn,DrawIcon:$n,DrawerLeftFilledIcon:oc,DrawerLeftIcon:nc,DrawerRightFilledIcon:cc,DrawerRightIcon:ac,DriveTimeIcon:ec,DuplicateIcon:Ic,EditIcon:sc,EjectIcon:gc,EmojiIcon:rc,EndorsedIcon:tc,EnvelopeIcon:Sc,EqualsIcon:ic,EraserIcon:vc,ErrorIcon:lc,EuroIcon:dc,ExchangeIcon:hc,ExcludeRowIcon:uc,ExpandAllIcon:mc,ExportIcon:Cc,EyeOffIcon:pc,EyeOnIcon:bc,EyeOpenIcon:wc,FastBackwardIcon:fc,FastForwardIcon:Tc,FeedIcon:Ac,FeedSubscribedIcon:yc,FilmIcon:Dc,FilterIcon:Lc,FilterKeepIcon:Rc,FilterListIcon:Fc,FilterOpenIcon:Pc,FilterRemoveIcon:Bc,FlagIcon:kc,FlameIcon:Hc,FlashIcon:Mc,FloatingPointIcon:Gc,FloppyDiskIcon:Oc,FlowBranchIcon:Ec,FlowEndIcon:Nc,FlowLinearIcon:Uc,FlowReviewBranchIcon:xc,FlowReviewIcon:Vc,FlowsIcon:jc,FolderCloseIcon:zc,FolderNewIcon:Kc,FolderOpenIcon:Wc,FolderSharedIcon:qc,FolderSharedOpenIcon:Jc,FollowerIcon:Zc,FollowingIcon:_c,FontIcon:Xc,ForkIcon:Qc,FormIcon:Yc,FuelIcon:$c,FullCircleIcon:oa,FullStackedChartIcon:na,FullscreenIcon:ca,FunctionIcon:aa,GanttChartIcon:ea,GeofenceIcon:Ia,GeolocationIcon:sa,GeosearchIcon:ga,GitBranchIcon:ra,GitCommitIcon:ta,GitMergeIcon:Sa,GitNewBranchIcon:ia,GitPullIcon:va,GitPushIcon:la,GitRepoIcon:da,GlassIcon:ha,GlobeIcon:ua,GlobeNetworkIcon:ma,GraphIcon:Ca,GraphRemoveIcon:pa,GreaterThanIcon:ba,GreaterThanOrEqualToIcon:wa,GridIcon:fa,GridViewIcon:Ta,GroupObjectsIcon:Aa,GroupedBarChartIcon:ya,HandDownIcon:Da,HandIcon:La,HandLeftIcon:Ra,HandRightIcon:Fa,HandUpIcon:Pa,HatIcon:Ba,HeaderIcon:ka,HeaderOneIcon:Ha,HeaderThreeIcon:Ma,HeaderTwoIcon:Ga,HeadsetIcon:Oa,HeartBrokenIcon:Ea,HeartIcon:Na,HeatGridIcon:Ua,HeatmapIcon:xa,HelicopterIcon:Va,HelpIcon:ja,HelperManagementIcon:za,HighPriorityIcon:Ka,HighVoltagePoleIcon:Wa,HighlightIcon:qa,HistoryIcon:Ja,HomeIcon:Za,HorizontalBarChartAscIcon:_a,HorizontalBarChartDescIcon:Xa,HorizontalBarChartIcon:Qa,HorizontalDistributionIcon:Ya,HorizontalInbetweenIcon:$a,HurricaneIcon:oe,IdNumberIcon:ne,ImageRotateLeftIcon:ce,ImageRotateRightIcon:ae,ImportIcon:ee,InboxFilteredIcon:Ie,InboxGeoIcon:se,InboxIcon:ge,InboxSearchIcon:re,InboxUpdateIcon:te,InfoIcon:Se,InfoSignIcon:ie,InheritanceIcon:ve,InheritedGroupIcon:le,InnerJoinIcon:de,InsertIcon:he,IntersectionIcon:ue,IpAddressIcon:me,IssueClosedIcon:Ce,IssueIcon:pe,IssueNewIcon:be,ItalicIcon:we,JoinTableIcon:fe,KeyBackspaceIcon:Te,KeyCommandIcon:Ae,KeyControlIcon:ye,KeyDeleteIcon:De,KeyEnterIcon:Le,KeyEscapeIcon:Re,KeyIcon:Fe,KeyOptionIcon:Pe,KeyShiftIcon:Be,KeyTabIcon:ke,KnownVehicleIcon:He,LabTestIcon:Me,LabelIcon:Ge,LayerIcon:Oe,LayerOutlineIcon:Ee,LayersIcon:Ne,LayoutAutoIcon:Ue,LayoutBalloonIcon:xe,LayoutCircleIcon:Ve,LayoutGridIcon:je,LayoutGroupByIcon:ze,LayoutHierarchyIcon:Ke,LayoutIcon:We,LayoutLinearIcon:qe,LayoutSkewGridIcon:Je,LayoutSortedClustersIcon:Ze,LearningIcon:_e,LeftJoinIcon:Xe,LessThanIcon:Qe,LessThanOrEqualToIcon:Ye,LifesaverIcon:$e,LightbulbIcon:oI,LightningIcon:nI,LinkIcon:cI,ListColumnsIcon:aI,ListDetailViewIcon:eI,ListIcon:II,LocateIcon:sI,LockIcon:gI,LogInIcon:rI,LogOutIcon:tI,LowVoltagePoleIcon:SI,ManualIcon:iI,ManuallyEnteredDataIcon:vI,ManyToManyIcon:lI,ManyToOneIcon:dI,MapCreateIcon:hI,MapIcon:uI,MapMarkerIcon:mI,MaximizeIcon:CI,MediaIcon:pI,MenuClosedIcon:bI,MenuIcon:wI,MenuOpenIcon:fI,MergeColumnsIcon:TI,MergeLinksIcon:AI,MinimizeIcon:yI,MinusIcon:DI,MobilePhoneIcon:LI,MobileVideoIcon:RI,ModalFilledIcon:FI,ModalIcon:PI,MoonIcon:BI,MoreIcon:kI,MountainIcon:HI,MoveIcon:MI,MugshotIcon:GI,MultiSelectIcon:OI,MusicIcon:EI,NestIcon:NI,NewDrawingIcon:UI,NewGridItemIcon:xI,NewLayerIcon:VI,NewLayersIcon:jI,NewLinkIcon:zI,NewObjectIcon:KI,NewPersonIcon:WI,NewPrescriptionIcon:qI,NewTextBoxIcon:JI,NinjaIcon:ZI,NotEqualToIcon:_I,NotificationsIcon:XI,NotificationsSnoozeIcon:QI,NotificationsUpdatedIcon:YI,NumberedListIcon:$I,NumericalIcon:os,OfficeIcon:ns,OfflineIcon:cs,OilFieldIcon:as,OneColumnIcon:es,OneToManyIcon:Is,OneToOneIcon:ss,OpenApplicationIcon:gs,OutdatedIcon:rs,PageLayoutIcon:ts,PanelStatsIcon:Ss,PanelTableIcon:is,PaperclipIcon:vs,ParagraphIcon:ls,PathIcon:ds,PathSearchIcon:hs,PauseIcon:us,PeopleIcon:ms,PercentageIcon:Cs,PersonIcon:ps,PhoneIcon:bs,PieChartIcon:ws,PinIcon:fs,PivotIcon:Ts,PivotTableIcon:As,PlayIcon:ys,PlaybookIcon:Ds,PlusIcon:Ls,PolygonFilterIcon:Rs,PowerIcon:Fs,PredictiveAnalysisIcon:Ps,PrescriptionIcon:Bs,PresentationIcon:ks,PrintIcon:Hs,ProjectsIcon:Ms,PropertiesIcon:Gs,PropertyIcon:Os,PublishFunctionIcon:Es,PulseIcon:Ns,RainIcon:Us,RandomIcon:xs,RecordIcon:Vs,RectHeightIcon:js,RectWidthIcon:zs,RectangleIcon:Ks,RedoIcon:Ws,RefreshIcon:qs,RegexIcon:Js,RegressionChartIcon:Zs,RemoveColumnIcon:_s,RemoveColumnLeftIcon:Xs,RemoveColumnRightIcon:Qs,RemoveIcon:Ys,RemoveRowBottomIcon:$s,RemoveRowTopIcon:og,RepeatIcon:ng,ResetIcon:cg,ResolveIcon:ag,RigIcon:eg,RightJoinIcon:Ig,RingIcon:sg,RocketIcon:gg,RocketSlantIcon:rg,RotateDocumentIcon:tg,RotatePageIcon:Sg,RouteIcon:ig,SatelliteIcon:vg,SavedIcon:lg,ScatterPlotIcon:dg,SearchAroundIcon:hg,SearchIcon:ug,SearchTemplateIcon:mg,SearchTextIcon:Cg,SegmentedControlIcon:pg,SelectIcon:bg,SelectionIcon:wg,SendMessageIcon:fg,SendToGraphIcon:Tg,SendToIcon:Ag,SendToMapIcon:yg,SeriesAddIcon:Dg,SeriesConfigurationIcon:Lg,SeriesDerivedIcon:Rg,SeriesFilteredIcon:Fg,SeriesSearchIcon:Pg,SettingsBigIcon:Bg,SettingsIcon:kg,ShapesIcon:Hg,ShareIcon:Mg,SharedFilterIcon:Gg,ShieldIcon:Og,ShipIcon:Eg,ShopIcon:Ng,ShoppingCartIcon:Ug,SignalSearchIcon:xg,SimCardIcon:Vg,SlashIcon:jg,SmallCrossIcon:zg,SmallInfoSignIcon:Kg,SmallMinusIcon:Wg,SmallPlusIcon:qg,SmallSquareIcon:Jg,SmallTickIcon:Zg,SnowflakeIcon:_g,SocialMediaIcon:Xg,SortAlphabeticalDescIcon:Qg,SortAlphabeticalIcon:Yg,SortAscIcon:$g,SortDescIcon:or,SortIcon:nr,SortNumericalDescIcon:cr,SortNumericalIcon:ar,SplitColumnsIcon:er,SquareIcon:Ir,StackedChartIcon:sr,StadiumGeometryIcon:gr,StarEmptyIcon:rr,StarIcon:tr,StepBackwardIcon:Sr,StepChartIcon:ir,StepForwardIcon:vr,StopIcon:lr,StopwatchIcon:dr,StrikethroughIcon:hr,StyleIcon:ur,SwapHorizontalIcon:mr,SwapVerticalIcon:Cr,SwitchIcon:pr,SymbolCircleIcon:br,SymbolCrossIcon:wr,SymbolDiamondIcon:fr,SymbolRectangleIcon:Tr,SymbolSquareIcon:Ar,SymbolTriangleDownIcon:yr,SymbolTriangleUpIcon:Dr,SyringeIcon:Lr,TagIcon:Rr,TakeActionIcon:Fr,TankIcon:Pr,TargetIcon:Br,TaxiIcon:kr,TemperatureIcon:Hr,TextHighlightIcon:Mr,ThDerivedIcon:Gr,ThDisconnectIcon:Or,ThFilteredIcon:Er,ThIcon:Nr,ThListIcon:Ur,ThirdPartyIcon:xr,ThumbsDownIcon:Vr,ThumbsUpIcon:jr,TickCircleIcon:zr,TickIcon:Kr,TimeIcon:Wr,TimelineAreaChartIcon:qr,TimelineBarChartIcon:Jr,TimelineEventsIcon:Zr,TimelineLineChartIcon:_r,TintIcon:Xr,TorchIcon:Qr,TractorIcon:Yr,TrainIcon:$r,TranslateIcon:ot,TrashIcon:nt,TreeIcon:ct,TrendingDownIcon:at,TrendingUpIcon:et,TruckIcon:It,TwoColumnsIcon:st,UnarchiveIcon:gt,UnderlineIcon:rt,UndoIcon:tt,UngroupObjectsIcon:St,UnknownVehicleIcon:it,UnlockIcon:vt,UnpinIcon:lt,UnresolveIcon:dt,UpdatedIcon:ht,UploadIcon:ut,UserIcon:mt,VariableIcon:Ct,VerticalBarChartAscIcon:pt,VerticalBarChartDescIcon:bt,VerticalDistributionIcon:wt,VerticalInbetweenIcon:ft,VideoIcon:Tt,VirusIcon:At,VolumeDownIcon:yt,VolumeOffIcon:Dt,VolumeUpIcon:Lt,WalkIcon:Rt,WarningSignIcon:Ft,WaterfallChartIcon:Pt,WavesIcon:Bt,WidgetButtonIcon:kt,WidgetFooterIcon:Ht,WidgetHeaderIcon:Mt,WidgetIcon:Gt,WindIcon:Ot,WrenchIcon:Et,ZoomInIcon:Nt,ZoomOutIcon:Ut,ZoomToFitIcon:xt},Symbol.toStringTag,{value:"Module"}));function e(n){const c={h1:"h1",p:"p",...I(),...n.components};return o.jsxs(o.Fragment,{children:[o.jsx(g,{title:"Icons gallery"}),` +import{j as o}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as I}from"./index-CFK-oMtb.js";import{ae as g,aj as r,ak as t}from"./index-CMsN8z4D.js";import{m as S,n as i,o as v,p as l,q as d,r as h,s as u,t as m,u as C,v as p,w as b,x as w,y as f,z as T,A,B as y,C as D,D as L,E as R,F,G as P,H as B,I as k,J as H,K as M,L as G,M as O,N as E,O as N,P as U,Q as x,R as V,T as j,U as z,V as K,W,X as q,Y as J,Z,_,$ as X,a0 as Q,a1 as Y,a2 as $,a3 as oo,a4 as no,a5 as co,a6 as ao,a7 as eo,a8 as Io,a9 as so,aa as go,ab as ro,ac as to,ad as So,ae as io,af as vo,ag as lo,ah as ho,ai as uo,aj as mo,ak as Co,al as po,am as bo,an as wo,ao as fo,ap as To,aq as Ao,ar as yo,as as Do,at as Lo,au as Ro,av as Fo,aw as Po,ax as Bo,ay as ko,az as Ho,S as Mo,aA as Go,l as Oo,aB as Eo,aC as No,aD as Uo,aE as xo,aF as Vo,aG as jo,aH as zo,aI as Ko,aJ as Wo,aK as qo,aL as Jo,aM as Zo,aN as _o,aO as Xo,aP as Qo,aQ as Yo,aR as $o,aS as on,aT as nn,aU as cn,aV as an,aW as en,aX as In,aY as sn,aZ as gn,a_ as rn,a$ as tn,b0 as Sn,b1 as vn,b2 as ln,b3 as dn,b4 as hn,j as un,b5 as mn,b6 as Cn,b7 as pn,b8 as bn,b9 as wn,ba as fn,bb as Tn,bc as An,bd as yn,be as Dn,bf as Ln,bg as Rn,bh as Fn,bi as Pn,bj as Bn,bk as kn,a as Hn,bl as Mn,bm as Gn,bn as On,bo as En,bp as Nn,bq as Un,br as xn,bs as Vn,bt as jn,bu as zn,bv as Kn,bw as Wn,bx as qn,by as Jn,bz as Zn,bA as _n,bB as Xn,bC as Qn,bD as Yn,bE as $n,bF as oc,bG as nc,bH as cc,bI as ac,bJ as ec,bK as Ic,bL as sc,bM as gc,bN as rc,bO as tc,bP as Sc,bQ as ic,bR as vc,f as lc,bS as dc,bT as hc,bU as uc,bV as mc,bW as Cc,bX as pc,bY as bc,bZ as wc,b_ as fc,b$ as Tc,c0 as Ac,c1 as yc,c2 as Dc,c3 as Lc,c4 as Rc,c5 as Fc,c6 as Pc,c7 as Bc,c8 as kc,c9 as Hc,ca as Mc,cb as Gc,cc as Oc,cd as Ec,ce as Nc,cf as Uc,cg as xc,ch as Vc,ci as jc,cj as zc,ck as Kc,cl as Wc,cm as qc,cn as Jc,co as Zc,cp as _c,cq as Xc,cr as Qc,cs as Yc,ct as $c,cu as oa,cv as na,cw as ca,cx as aa,cy as ea,cz as Ia,cA as sa,cB as ga,cC as ra,cD as ta,cE as Sa,cF as ia,cG as va,cH as la,cI as da,cJ as ha,cK as ua,cL as ma,cM as Ca,cN as pa,cO as ba,cP as wa,cQ as fa,cR as Ta,cS as Aa,cT as ya,cU as Da,cV as La,cW as Ra,cX as Fa,cY as Pa,cZ as Ba,c_ as ka,c$ as Ha,d0 as Ma,d1 as Ga,d2 as Oa,d3 as Ea,d4 as Na,d5 as Ua,d6 as xa,d7 as Va,d8 as ja,d9 as za,da as Ka,db as Wa,dc as qa,dd as Ja,de as Za,df as _a,dg as Xa,dh as Qa,di as Ya,dj as $a,dk as oe,dl as ne,dm as ce,dn as ae,dp as ee,dq as Ie,dr as se,ds as ge,dt as re,du as te,dv as Se,c as ie,dw as ve,dx as le,dy as de,dz as he,dA as ue,dB as me,dC as Ce,dD as pe,dE as be,dF as we,dG as fe,dH as Te,dI as Ae,dJ as ye,dK as De,dL as Le,dM as Re,dN as Fe,dO as Pe,dP as Be,dQ as ke,dR as He,dS as Me,dT as Ge,dU as Oe,dV as Ee,dW as Ne,dX as Ue,dY as xe,dZ as Ve,d_ as je,d$ as ze,e0 as Ke,e1 as We,e2 as qe,e3 as Je,e4 as Ze,e5 as _e,e6 as Xe,e7 as Qe,e8 as Ye,e9 as $e,ea as oI,eb as nI,ec as cI,ed as aI,ee as eI,ef as II,eg as sI,b as gI,eh as rI,ei as tI,ej as SI,ek as iI,el as vI,em as lI,en as dI,eo as hI,ep as uI,eq as mI,er as CI,es as pI,et as bI,eu as wI,ev as fI,ew as TI,ex as AI,ey as yI,ez as DI,eA as LI,eB as RI,eC as FI,eD as PI,eE as BI,eF as kI,eG as HI,eH as MI,eI as GI,eJ as OI,eK as EI,eL as NI,eM as UI,eN as xI,eO as VI,eP as jI,eQ as zI,eR as KI,eS as WI,eT as qI,eU as JI,eV as ZI,eW as _I,eX as XI,eY as QI,eZ as YI,e_ as $I,e$ as os,f0 as ns,f1 as cs,f2 as as,f3 as es,f4 as Is,f5 as ss,f6 as gs,f7 as rs,f8 as ts,f9 as Ss,fa as is,fb as vs,fc as ls,fd as ds,fe as hs,ff as us,fg as ms,fh as Cs,fi as ps,fj as bs,fk as ws,fl as fs,fm as Ts,fn as As,fo as ys,fp as Ds,fq as Ls,fr as Rs,fs as Fs,ft as Ps,fu as Bs,fv as ks,fw as Hs,fx as Ms,fy as Gs,fz as Os,fA as Es,fB as Ns,fC as Us,fD as xs,fE as Vs,fF as js,fG as zs,fH as Ks,fI as Ws,fJ as qs,fK as Js,fL as Zs,fM as _s,fN as Xs,fO as Qs,fP as Ys,fQ as $s,fR as og,fS as ng,fT as cg,fU as ag,fV as eg,fW as Ig,fX as sg,fY as gg,fZ as rg,f_ as tg,f$ as Sg,g0 as ig,g1 as vg,g2 as lg,g3 as dg,g4 as hg,g as ug,g5 as mg,g6 as Cg,g7 as pg,g8 as bg,g9 as wg,ga as fg,gb as Tg,gc as Ag,gd as yg,ge as Dg,gf as Lg,gg as Rg,gh as Fg,gi as Pg,gj as Bg,gk as kg,gl as Hg,gm as Mg,gn as Gg,go as Og,gp as Eg,gq as Ng,gr as Ug,gs as xg,gt as Vg,gu as jg,h as zg,gv as Kg,gw as Wg,gx as qg,gy as Jg,gz as Zg,gA as _g,gB as Xg,gC as Qg,gD as Yg,gE as $g,gF as or,gG as nr,gH as cr,gI as ar,gJ as er,gK as Ir,gL as sr,gM as gr,gN as rr,gO as tr,gP as Sr,gQ as ir,gR as vr,gS as lr,gT as dr,gU as hr,gV as ur,gW as mr,gX as Cr,gY as pr,gZ as br,g_ as wr,g$ as fr,h0 as Tr,h1 as Ar,h2 as yr,h3 as Dr,h4 as Lr,h5 as Rr,h6 as Fr,h7 as Pr,h8 as Br,h9 as kr,ha as Hr,hb as Mr,hc as Gr,hd as Or,he as Er,hf as Nr,hg as Ur,hh as xr,hi as Vr,hj as jr,d as zr,k as Kr,hk as Wr,hl as qr,hm as Jr,hn as Zr,ho as _r,hp as Xr,hq as Qr,hr as Yr,hs as $r,ht as ot,hu as nt,hv as ct,hw as at,hx as et,hy as It,hz as st,hA as gt,hB as rt,hC as tt,hD as St,hE as it,hF as vt,hG as lt,hH as dt,hI as ht,hJ as ut,hK as mt,hL as Ct,hM as pt,hN as bt,hO as wt,hP as ft,hQ as Tt,hR as At,hS as yt,hT as Dt,hU as Lt,i as Rt,e as Ft,hV as Pt,hW as Bt,hX as kt,hY as Ht,hZ as Mt,h_ as Gt,h$ as Ot,i0 as Et,i1 as Nt,i2 as Ut,i3 as xt}from"./zoom-to-fit-icon-DdsCB6de.js";import"./index-0d5eMwbi.js";import"./iframe-CUIcjkDA.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";const Vt=Object.freeze(Object.defineProperty({__proto__:null,AddClipIcon:S,AddColumnLeftIcon:i,AddColumnRightIcon:v,AddIcon:l,AddLocationIcon:d,AddRowBottomIcon:h,AddRowTopIcon:u,AddToArtifactIcon:m,AddToFolderIcon:C,AimpointsTargetIcon:p,AirplaneIcon:b,AlignCenterIcon:w,AlignJustifyIcon:f,AlignLeftIcon:T,AlignRightIcon:A,AlignmentBottomIcon:y,AlignmentHorizontalCenterIcon:D,AlignmentLeftIcon:L,AlignmentRightIcon:R,AlignmentTopIcon:F,AlignmentVerticalCenterIcon:P,AnchorIcon:B,AnnotationIcon:k,AntennaIcon:H,AppHeaderIcon:M,ApplicationIcon:G,ApplicationsIcon:O,ArchiveIcon:E,AreaOfInterestIcon:N,ArrayBooleanIcon:U,ArrayDateIcon:x,ArrayFloatingPointIcon:V,ArrayIcon:j,ArrayNumericIcon:z,ArrayStringIcon:K,ArrayTimestampIcon:W,ArrowBottomLeftIcon:q,ArrowBottomRightIcon:J,ArrowDownIcon:Z,ArrowLeftIcon:_,ArrowRightIcon:X,ArrowTopLeftIcon:Q,ArrowTopRightIcon:Y,ArrowUpIcon:$,ArrowsHorizontalIcon:oo,ArrowsVerticalIcon:no,AskIcon:co,AsteriskIcon:ao,AtIcon:eo,AutomaticUpdatesIcon:Io,BacklinkIcon:so,BadgeIcon:go,BanCircleIcon:ro,BankAccountIcon:to,BarcodeIcon:So,BlankIcon:io,BlockedPersonIcon:vo,BoldIcon:lo,BookIcon:ho,BookmarkIcon:uo,BoxIcon:mo,BriefcaseIcon:Co,BringDataIcon:po,BugIcon:bo,BuggyIcon:wo,BuildIcon:fo,CalculatorIcon:To,CalendarIcon:Ao,CameraIcon:yo,CaretDownIcon:Do,CaretLeftIcon:Lo,CaretRightIcon:Ro,CaretUpIcon:Fo,CargoShipIcon:Po,CellTowerIcon:Bo,ChangesIcon:ko,ChartIcon:Ho,ChatIcon:Mo,ChevronBackwardIcon:Go,ChevronDownIcon:Oo,ChevronForwardIcon:Eo,ChevronLeftIcon:No,ChevronRightIcon:Uo,ChevronUpIcon:xo,CircleArrowDownIcon:Vo,CircleArrowLeftIcon:jo,CircleArrowRightIcon:zo,CircleArrowUpIcon:Ko,CircleIcon:Wo,CitationIcon:qo,CleanIcon:Jo,ClipIcon:Zo,ClipboardIcon:_o,CloudDownloadIcon:Xo,CloudIcon:Qo,CloudUploadIcon:Yo,CodeBlockIcon:$o,CodeIcon:on,CogIcon:nn,CollapseAllIcon:cn,ColorFillIcon:an,ColumnLayoutIcon:en,CommentIcon:In,ComparisonIcon:sn,CompassIcon:gn,CompressedIcon:rn,ConfirmIcon:tn,ConsoleIcon:Sn,ContrastIcon:vn,ControlIcon:ln,CreditCardIcon:dn,CrossCircleIcon:hn,CrossIcon:un,CrownIcon:mn,CubeAddIcon:Cn,CubeIcon:pn,CubeRemoveIcon:bn,CurvedRangeChartIcon:wn,CutIcon:fn,CycleIcon:Tn,DashboardIcon:An,DataConnectionIcon:yn,DataLineageIcon:Dn,DatabaseIcon:Ln,DeleteIcon:Rn,DeltaIcon:Fn,DeriveColumnIcon:Pn,DesktopIcon:Bn,DiagnosisIcon:kn,DiagramTreeIcon:Hn,DirectionLeftIcon:Mn,DirectionRightIcon:Gn,DisableIcon:On,DivideIcon:En,DocumentIcon:Nn,DocumentOpenIcon:Un,DocumentShareIcon:xn,DollarIcon:Vn,DotIcon:jn,DoubleCaretHorizontalIcon:zn,DoubleCaretVerticalIcon:Kn,DoubleChevronDownIcon:Wn,DoubleChevronLeftIcon:qn,DoubleChevronRightIcon:Jn,DoubleChevronUpIcon:Zn,DoughnutChartIcon:_n,DownloadIcon:Xn,DragHandleHorizontalIcon:Qn,DragHandleVerticalIcon:Yn,DrawIcon:$n,DrawerLeftFilledIcon:oc,DrawerLeftIcon:nc,DrawerRightFilledIcon:cc,DrawerRightIcon:ac,DriveTimeIcon:ec,DuplicateIcon:Ic,EditIcon:sc,EjectIcon:gc,EmojiIcon:rc,EndorsedIcon:tc,EnvelopeIcon:Sc,EqualsIcon:ic,EraserIcon:vc,ErrorIcon:lc,EuroIcon:dc,ExchangeIcon:hc,ExcludeRowIcon:uc,ExpandAllIcon:mc,ExportIcon:Cc,EyeOffIcon:pc,EyeOnIcon:bc,EyeOpenIcon:wc,FastBackwardIcon:fc,FastForwardIcon:Tc,FeedIcon:Ac,FeedSubscribedIcon:yc,FilmIcon:Dc,FilterIcon:Lc,FilterKeepIcon:Rc,FilterListIcon:Fc,FilterOpenIcon:Pc,FilterRemoveIcon:Bc,FlagIcon:kc,FlameIcon:Hc,FlashIcon:Mc,FloatingPointIcon:Gc,FloppyDiskIcon:Oc,FlowBranchIcon:Ec,FlowEndIcon:Nc,FlowLinearIcon:Uc,FlowReviewBranchIcon:xc,FlowReviewIcon:Vc,FlowsIcon:jc,FolderCloseIcon:zc,FolderNewIcon:Kc,FolderOpenIcon:Wc,FolderSharedIcon:qc,FolderSharedOpenIcon:Jc,FollowerIcon:Zc,FollowingIcon:_c,FontIcon:Xc,ForkIcon:Qc,FormIcon:Yc,FuelIcon:$c,FullCircleIcon:oa,FullStackedChartIcon:na,FullscreenIcon:ca,FunctionIcon:aa,GanttChartIcon:ea,GeofenceIcon:Ia,GeolocationIcon:sa,GeosearchIcon:ga,GitBranchIcon:ra,GitCommitIcon:ta,GitMergeIcon:Sa,GitNewBranchIcon:ia,GitPullIcon:va,GitPushIcon:la,GitRepoIcon:da,GlassIcon:ha,GlobeIcon:ua,GlobeNetworkIcon:ma,GraphIcon:Ca,GraphRemoveIcon:pa,GreaterThanIcon:ba,GreaterThanOrEqualToIcon:wa,GridIcon:fa,GridViewIcon:Ta,GroupObjectsIcon:Aa,GroupedBarChartIcon:ya,HandDownIcon:Da,HandIcon:La,HandLeftIcon:Ra,HandRightIcon:Fa,HandUpIcon:Pa,HatIcon:Ba,HeaderIcon:ka,HeaderOneIcon:Ha,HeaderThreeIcon:Ma,HeaderTwoIcon:Ga,HeadsetIcon:Oa,HeartBrokenIcon:Ea,HeartIcon:Na,HeatGridIcon:Ua,HeatmapIcon:xa,HelicopterIcon:Va,HelpIcon:ja,HelperManagementIcon:za,HighPriorityIcon:Ka,HighVoltagePoleIcon:Wa,HighlightIcon:qa,HistoryIcon:Ja,HomeIcon:Za,HorizontalBarChartAscIcon:_a,HorizontalBarChartDescIcon:Xa,HorizontalBarChartIcon:Qa,HorizontalDistributionIcon:Ya,HorizontalInbetweenIcon:$a,HurricaneIcon:oe,IdNumberIcon:ne,ImageRotateLeftIcon:ce,ImageRotateRightIcon:ae,ImportIcon:ee,InboxFilteredIcon:Ie,InboxGeoIcon:se,InboxIcon:ge,InboxSearchIcon:re,InboxUpdateIcon:te,InfoIcon:Se,InfoSignIcon:ie,InheritanceIcon:ve,InheritedGroupIcon:le,InnerJoinIcon:de,InsertIcon:he,IntersectionIcon:ue,IpAddressIcon:me,IssueClosedIcon:Ce,IssueIcon:pe,IssueNewIcon:be,ItalicIcon:we,JoinTableIcon:fe,KeyBackspaceIcon:Te,KeyCommandIcon:Ae,KeyControlIcon:ye,KeyDeleteIcon:De,KeyEnterIcon:Le,KeyEscapeIcon:Re,KeyIcon:Fe,KeyOptionIcon:Pe,KeyShiftIcon:Be,KeyTabIcon:ke,KnownVehicleIcon:He,LabTestIcon:Me,LabelIcon:Ge,LayerIcon:Oe,LayerOutlineIcon:Ee,LayersIcon:Ne,LayoutAutoIcon:Ue,LayoutBalloonIcon:xe,LayoutCircleIcon:Ve,LayoutGridIcon:je,LayoutGroupByIcon:ze,LayoutHierarchyIcon:Ke,LayoutIcon:We,LayoutLinearIcon:qe,LayoutSkewGridIcon:Je,LayoutSortedClustersIcon:Ze,LearningIcon:_e,LeftJoinIcon:Xe,LessThanIcon:Qe,LessThanOrEqualToIcon:Ye,LifesaverIcon:$e,LightbulbIcon:oI,LightningIcon:nI,LinkIcon:cI,ListColumnsIcon:aI,ListDetailViewIcon:eI,ListIcon:II,LocateIcon:sI,LockIcon:gI,LogInIcon:rI,LogOutIcon:tI,LowVoltagePoleIcon:SI,ManualIcon:iI,ManuallyEnteredDataIcon:vI,ManyToManyIcon:lI,ManyToOneIcon:dI,MapCreateIcon:hI,MapIcon:uI,MapMarkerIcon:mI,MaximizeIcon:CI,MediaIcon:pI,MenuClosedIcon:bI,MenuIcon:wI,MenuOpenIcon:fI,MergeColumnsIcon:TI,MergeLinksIcon:AI,MinimizeIcon:yI,MinusIcon:DI,MobilePhoneIcon:LI,MobileVideoIcon:RI,ModalFilledIcon:FI,ModalIcon:PI,MoonIcon:BI,MoreIcon:kI,MountainIcon:HI,MoveIcon:MI,MugshotIcon:GI,MultiSelectIcon:OI,MusicIcon:EI,NestIcon:NI,NewDrawingIcon:UI,NewGridItemIcon:xI,NewLayerIcon:VI,NewLayersIcon:jI,NewLinkIcon:zI,NewObjectIcon:KI,NewPersonIcon:WI,NewPrescriptionIcon:qI,NewTextBoxIcon:JI,NinjaIcon:ZI,NotEqualToIcon:_I,NotificationsIcon:XI,NotificationsSnoozeIcon:QI,NotificationsUpdatedIcon:YI,NumberedListIcon:$I,NumericalIcon:os,OfficeIcon:ns,OfflineIcon:cs,OilFieldIcon:as,OneColumnIcon:es,OneToManyIcon:Is,OneToOneIcon:ss,OpenApplicationIcon:gs,OutdatedIcon:rs,PageLayoutIcon:ts,PanelStatsIcon:Ss,PanelTableIcon:is,PaperclipIcon:vs,ParagraphIcon:ls,PathIcon:ds,PathSearchIcon:hs,PauseIcon:us,PeopleIcon:ms,PercentageIcon:Cs,PersonIcon:ps,PhoneIcon:bs,PieChartIcon:ws,PinIcon:fs,PivotIcon:Ts,PivotTableIcon:As,PlayIcon:ys,PlaybookIcon:Ds,PlusIcon:Ls,PolygonFilterIcon:Rs,PowerIcon:Fs,PredictiveAnalysisIcon:Ps,PrescriptionIcon:Bs,PresentationIcon:ks,PrintIcon:Hs,ProjectsIcon:Ms,PropertiesIcon:Gs,PropertyIcon:Os,PublishFunctionIcon:Es,PulseIcon:Ns,RainIcon:Us,RandomIcon:xs,RecordIcon:Vs,RectHeightIcon:js,RectWidthIcon:zs,RectangleIcon:Ks,RedoIcon:Ws,RefreshIcon:qs,RegexIcon:Js,RegressionChartIcon:Zs,RemoveColumnIcon:_s,RemoveColumnLeftIcon:Xs,RemoveColumnRightIcon:Qs,RemoveIcon:Ys,RemoveRowBottomIcon:$s,RemoveRowTopIcon:og,RepeatIcon:ng,ResetIcon:cg,ResolveIcon:ag,RigIcon:eg,RightJoinIcon:Ig,RingIcon:sg,RocketIcon:gg,RocketSlantIcon:rg,RotateDocumentIcon:tg,RotatePageIcon:Sg,RouteIcon:ig,SatelliteIcon:vg,SavedIcon:lg,ScatterPlotIcon:dg,SearchAroundIcon:hg,SearchIcon:ug,SearchTemplateIcon:mg,SearchTextIcon:Cg,SegmentedControlIcon:pg,SelectIcon:bg,SelectionIcon:wg,SendMessageIcon:fg,SendToGraphIcon:Tg,SendToIcon:Ag,SendToMapIcon:yg,SeriesAddIcon:Dg,SeriesConfigurationIcon:Lg,SeriesDerivedIcon:Rg,SeriesFilteredIcon:Fg,SeriesSearchIcon:Pg,SettingsBigIcon:Bg,SettingsIcon:kg,ShapesIcon:Hg,ShareIcon:Mg,SharedFilterIcon:Gg,ShieldIcon:Og,ShipIcon:Eg,ShopIcon:Ng,ShoppingCartIcon:Ug,SignalSearchIcon:xg,SimCardIcon:Vg,SlashIcon:jg,SmallCrossIcon:zg,SmallInfoSignIcon:Kg,SmallMinusIcon:Wg,SmallPlusIcon:qg,SmallSquareIcon:Jg,SmallTickIcon:Zg,SnowflakeIcon:_g,SocialMediaIcon:Xg,SortAlphabeticalDescIcon:Qg,SortAlphabeticalIcon:Yg,SortAscIcon:$g,SortDescIcon:or,SortIcon:nr,SortNumericalDescIcon:cr,SortNumericalIcon:ar,SplitColumnsIcon:er,SquareIcon:Ir,StackedChartIcon:sr,StadiumGeometryIcon:gr,StarEmptyIcon:rr,StarIcon:tr,StepBackwardIcon:Sr,StepChartIcon:ir,StepForwardIcon:vr,StopIcon:lr,StopwatchIcon:dr,StrikethroughIcon:hr,StyleIcon:ur,SwapHorizontalIcon:mr,SwapVerticalIcon:Cr,SwitchIcon:pr,SymbolCircleIcon:br,SymbolCrossIcon:wr,SymbolDiamondIcon:fr,SymbolRectangleIcon:Tr,SymbolSquareIcon:Ar,SymbolTriangleDownIcon:yr,SymbolTriangleUpIcon:Dr,SyringeIcon:Lr,TagIcon:Rr,TakeActionIcon:Fr,TankIcon:Pr,TargetIcon:Br,TaxiIcon:kr,TemperatureIcon:Hr,TextHighlightIcon:Mr,ThDerivedIcon:Gr,ThDisconnectIcon:Or,ThFilteredIcon:Er,ThIcon:Nr,ThListIcon:Ur,ThirdPartyIcon:xr,ThumbsDownIcon:Vr,ThumbsUpIcon:jr,TickCircleIcon:zr,TickIcon:Kr,TimeIcon:Wr,TimelineAreaChartIcon:qr,TimelineBarChartIcon:Jr,TimelineEventsIcon:Zr,TimelineLineChartIcon:_r,TintIcon:Xr,TorchIcon:Qr,TractorIcon:Yr,TrainIcon:$r,TranslateIcon:ot,TrashIcon:nt,TreeIcon:ct,TrendingDownIcon:at,TrendingUpIcon:et,TruckIcon:It,TwoColumnsIcon:st,UnarchiveIcon:gt,UnderlineIcon:rt,UndoIcon:tt,UngroupObjectsIcon:St,UnknownVehicleIcon:it,UnlockIcon:vt,UnpinIcon:lt,UnresolveIcon:dt,UpdatedIcon:ht,UploadIcon:ut,UserIcon:mt,VariableIcon:Ct,VerticalBarChartAscIcon:pt,VerticalBarChartDescIcon:bt,VerticalDistributionIcon:wt,VerticalInbetweenIcon:ft,VideoIcon:Tt,VirusIcon:At,VolumeDownIcon:yt,VolumeOffIcon:Dt,VolumeUpIcon:Lt,WalkIcon:Rt,WarningSignIcon:Ft,WaterfallChartIcon:Pt,WavesIcon:Bt,WidgetButtonIcon:kt,WidgetFooterIcon:Ht,WidgetHeaderIcon:Mt,WidgetIcon:Gt,WindIcon:Ot,WrenchIcon:Et,ZoomInIcon:Nt,ZoomOutIcon:Ut,ZoomToFitIcon:xt},Symbol.toStringTag,{value:"Module"}));function e(n){const c={h1:"h1",p:"p",...I(),...n.components};return o.jsxs(o.Fragment,{children:[o.jsx(g,{title:"Icons gallery"}),` `,o.jsx(c.h1,{id:"icons-gallery",children:"Icons Gallery"}),` `,o.jsx(c.p,{children:"List of available icons"}),` `,o.jsx(r,{children:Object.entries(Vt).map(([a,s])=>o.jsx(t,{name:a,children:o.jsx(s,{className:"h-6 w-6"})},a))})]})}function $t(n={}){const{wrapper:c}={...I(),...n.components};return c?o.jsx(c,{...n,children:o.jsx(e,{...n})}):e(n)}export{$t as default}; diff --git a/assets/iframe-9T-PF226.js b/assets/iframe-CUIcjkDA.js similarity index 66% rename from assets/iframe-9T-PF226.js rename to assets/iframe-CUIcjkDA.js index eb95373f..29859749 100644 --- a/assets/iframe-9T-PF226.js +++ b/assets/iframe-CUIcjkDA.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./alert.stories-DBAGVE4m.js","./jsx-runtime-C798UXYj.js","./index-0d5eMwbi.js","./alert-WFlrTABt.js","./class-names-DnY5YZNL.js","./zoom-to-fit-icon-DdsCB6de.js","./storybook-utils-C5xEhci0.js","./avatar.stories-HUeKQiUe.js","./avatar-Cxzsye4J.js","./badge.stories-DloSsjdd.js","./badge-BIezdMmM.js","./breadcrumb-navigation.stories-C-43rqs3.js","./slot-CyLCZbOE.js","./button-group.stories-COJQKQ4l.js","./button.stories-D9pdHdIx.js","./button-CNKqPViR.js","./spinner-CrXB3JgE.js","./checkbox.stories-BpAp46hW.js","./dialog.stories-BX6_XaCw.js","./description-D9Ee5mtv.js","./use-sync-refs-DqQDZvJ6.js","./dialog-CQKMlc6b.js","./keyboard-C2Ifhsxt.js","./use-event-listener-CochUv0b.js","./portal-CLj4HHuk.js","./focus-management-DaVlPEX1.js","./index-BoyHNU0R.js","./use-server-handoff-complete-JgOu4JLg.js","./use-inert-others-CzqV763I.js","./use-tab-direction-BMI6OSML.js","./hidden-BrNieFV6.js","./close-provider-CZp7Lqob.js","./open-closed-DC3t9YEZ.js","./use-is-mounted-DT-lZL-u.js","./active-element-history-DI7yoVCB.js","./transition-CZnz1fcq.js","./icon-button-k2wtPfcV.js","./form-field-2xLK_lYH.js","./use-resolve-button-type-D_6M6Au0.js","./form-fields-B2NmhAAW.js","./label-BBnH-iCi.js","./bugs-DpEN4NTH.js","./use-text-value-ehRDfXkw.js","./floating-ERp4LevH.js","./index-BgfbgFhO.js","./tag-C9CGXtt3.js","./toggle-Bp5D17gs.js","./disclosure.stories-DwfzQRRi.js","./disclosure-CNBAsrob.js","./divider-line.stories-lM2hRNkL.js","./divider-line-CzbklozI.js","./featured-tag.stories-Du1zMPkV.js","./featured-tag-DLvaNKCm.js","./panel-BTNit_je.js","./form-field-group.stories-CNEhqW5L.js","./listbox.stories-Buiq_fV8.js","./multi-combobox.stories-BDk-Xj5k.js","./radio-box.stories-CJwvD2av.js","./radio-input.stories-BrZdO4Rq.js","./search-input.stories-CTxLO1lU.js","./single-combobox.stories-DuoRfe_y.js","./text-input.stories-B1dwyupg.js","./textarea.stories-BxDua9o8.js","./icon-button.stories-0-APhIQ1.js","./inline-alert.stories-CHU6-QPb.js","./last-changed-info.stories-C86MXOjM.js","./link.stories-BsuBz4ei.js","./menu-info-item.stories-CGoXCqdp.js","./menu-info-item-CC1TeP-c.js","./menu-item.stories-BTxqC4cZ.js","./menu-6dEOZWfD.js","./menu-separator-yO-BIXMb.js","./menu-title-DpAy2147.js","./menu-separator.stories-D7MgxHW9.js","./menu-title.stories-BpGHFQrG.js","./menu.stories-xNzefD_l.js","./navigation.stories-DFpQPa8H.js","./usePopper-Cu2KpVtb.js","./popover-DJ9HIBXX.js","./page.stories-BfCGd43p.js","./panel.stories-B05jnSyq.js","./popover-menu.stories-C3Er2s3-.js","./section.stories-c2uXgnH6.js","./sidebar-container.stories-CD7erG3P.js","./sidebar.stories-CTIXw2h_.js","./sidesheet.stories-Iwuc9DOn.js","./skeleton.stories-DkC3bvFE.js","./spinner-overlay.stories-Ceh5rt6d.js","./spinner.stories-VlGwChGj.js","./tab.stories-BExfMg0Y.js","./table-unvirtualized.stories-D4Z2ULmw.js","./table-unvirtualized-B6-rFf74.js","./table-virtualized.stories-CZFEUGuD.js","./tag.stories-D4S3pQPY.js","./toast.stories-Bzmbls-5.js","./toggle.stories-DcNmYdAI.js","./tooltip.stories-DmTKg58f.js","./top-bar.stories-BeIujtwl.js","./icons-BtgjIq6b.js","./index-CFK-oMtb.js","./index-D_yKE35a.js","./index-D-8MO0q_.js","./index-CxJhtZoZ.js","./index-DrFu-skq.js","./index-B27qxNgk.js","./global-styles.stories-MeCc39-H.js","./entry-preview-Dr1n3Wdx.js","./chunk-H6MOWX77-DTQOW814.js","./entry-preview-docs-Blm_ViJ3.js","./preview-BhhEZcNS.js","./preview-D77C14du.js","./preview-BWzBA1C2.js","./preview-BbTc69zT.js","./preview-o0cxRMzs.css"])))=>i.map(i=>d[i]); -import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const e of o)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function c(o){const e={};return o.integrity&&(e.integrity=o.integrity),o.referrerPolicy&&(e.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?e.credentials="include":o.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function a(o){if(o.ep)return;o.ep=!0;const e=c(o);fetch(o.href,e)}})();const v="modulepreload",T=function(r,_){return new URL(r,_).href},O={},t=function(_,c,a){let o=Promise.resolve();if(c&&c.length>0){const i=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(c.map(n=>{if(n=T(n,a),n in O)return;O[n]=!0;const p=n.endsWith(".css"),R=p?'[rel="stylesheet"]':"";if(!!a)for(let u=i.length-1;u>=0;u--){const l=i[u];if(l.href===n&&(!p||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${R}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":v,p||(m.as="script"),m.crossOrigin="",m.href=n,d&&m.setAttribute("nonce",d),document.head.appendChild(m),p)return new Promise((u,l)=>{m.addEventListener("load",u),m.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${n}`)))})}))}function e(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&e(s.reason);return _().catch(e)})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,E=L({page:"preview"});f.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const y={"./src/components/alert/alert.stories.tsx":async()=>t(()=>import("./alert.stories-DBAGVE4m.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"./src/components/avatar/avatar.stories.tsx":async()=>t(()=>import("./avatar.stories-HUeKQiUe.js"),__vite__mapDeps([7,1,2,8,6]),import.meta.url),"./src/components/badge/badge.stories.tsx":async()=>t(()=>import("./badge.stories-DloSsjdd.js"),__vite__mapDeps([9,1,2,10,4,6]),import.meta.url),"./src/components/breadcrumb-navigation/breadcrumb-navigation.stories.tsx":async()=>t(()=>import("./breadcrumb-navigation.stories-C-43rqs3.js"),__vite__mapDeps([11,1,2,4,12,5]),import.meta.url),"./src/components/button-group/button-group.stories.tsx":async()=>t(()=>import("./button-group.stories-COJQKQ4l.js"),__vite__mapDeps([13,1,2,4]),import.meta.url),"./src/components/button/button.stories.tsx":async()=>t(()=>import("./button.stories-D9pdHdIx.js"),__vite__mapDeps([14,1,2,15,4,16,5,6]),import.meta.url),"./src/components/checkbox/checkbox.stories.tsx":async()=>t(()=>import("./checkbox.stories-BpAp46hW.js"),__vite__mapDeps([17,1,2,4,6]),import.meta.url),"./src/components/dialog/dialog.stories.tsx":async()=>t(()=>import("./dialog.stories-BX6_XaCw.js"),__vite__mapDeps([18,1,2,6,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,5,4,36,15,16,37,38,39,40,41,42,43,10,44,45,46,3]),import.meta.url),"./src/components/disclosure/disclosure.stories.tsx":async()=>t(()=>import("./disclosure.stories-DwfzQRRi.js"),__vite__mapDeps([47,1,2,5,4,48,38,22,20,32,31,41]),import.meta.url),"./src/components/divider-line/divider-line.stories.tsx":async()=>t(()=>import("./divider-line.stories-lM2hRNkL.js"),__vite__mapDeps([49,1,2,50]),import.meta.url),"./src/components/featured-tag/featured-tag.stories.tsx":async()=>t(()=>import("./featured-tag.stories-Du1zMPkV.js"),__vite__mapDeps([51,1,2,52,4,53,37,5,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/form-field-group.stories.tsx":async()=>t(()=>import("./form-field-group.stories-CNEhqW5L.js"),__vite__mapDeps([54,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/listbox/listbox.stories.tsx":async()=>t(()=>import("./listbox.stories-Buiq_fV8.js"),__vite__mapDeps([55,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/multi-combobox/multi-combobox.stories.tsx":async()=>t(()=>import("./multi-combobox.stories-BDk-Xj5k.js"),__vite__mapDeps([56,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/radio-box/radio-box.stories.tsx":async()=>t(()=>import("./radio-box.stories-CJwvD2av.js"),__vite__mapDeps([57,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45,52]),import.meta.url),"./src/components/form-field/radio-input/radio-input.stories.tsx":async()=>t(()=>import("./radio-input.stories-BrZdO4Rq.js"),__vite__mapDeps([58,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/search-input/search-input.stories.tsx":async()=>t(()=>import("./search-input.stories-CTxLO1lU.js"),__vite__mapDeps([59,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/single-combobox/single-combobox.stories.tsx":async()=>t(()=>import("./single-combobox.stories-DuoRfe_y.js"),__vite__mapDeps([60,1,2,45,4,5,37,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34]),import.meta.url),"./src/components/form-field/text-input/text-input.stories.tsx":async()=>t(()=>import("./text-input.stories-B1dwyupg.js"),__vite__mapDeps([61,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/textarea/textarea.stories.tsx":async()=>t(()=>import("./textarea.stories-BxDua9o8.js"),__vite__mapDeps([62,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/icon-button/icon-button.stories.tsx":async()=>t(()=>import("./icon-button.stories-0-APhIQ1.js"),__vite__mapDeps([63,36,1,2,4,5]),import.meta.url),"./src/components/inline-alert/inline-alert.stories.tsx":async()=>t(()=>import("./inline-alert.stories-CHU6-QPb.js"),__vite__mapDeps([64,1,2,4,5,6]),import.meta.url),"./src/components/last-changed-info/last-changed-info.stories.tsx":async()=>t(()=>import("./last-changed-info.stories-C86MXOjM.js"),__vite__mapDeps([65,1,2,4]),import.meta.url),"./src/components/link/link.stories.tsx":async()=>t(()=>import("./link.stories-BsuBz4ei.js"),__vite__mapDeps([66,1,2,12,4,5,6]),import.meta.url),"./src/components/menu/menu-info-item/menu-info-item.stories.tsx":async()=>t(()=>import("./menu-info-item.stories-CGoXCqdp.js"),__vite__mapDeps([67,1,2,68]),import.meta.url),"./src/components/menu/menu-item/menu-item.stories.tsx":async()=>t(()=>import("./menu-item.stories-BTxqC4cZ.js"),__vite__mapDeps([69,1,2,5,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/menu/menu-separator/menu-separator.stories.tsx":async()=>t(()=>import("./menu-separator.stories-D7MgxHW9.js"),__vite__mapDeps([73,1,2,71]),import.meta.url),"./src/components/menu/menu-title/menu-title.stories.tsx":async()=>t(()=>import("./menu-title.stories-BpGHFQrG.js"),__vite__mapDeps([74,1,2,72]),import.meta.url),"./src/components/menu/menu.stories.tsx":async()=>t(()=>import("./menu.stories-xNzefD_l.js"),__vite__mapDeps([75,1,2,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/navigation/navigation.stories.tsx":async()=>t(()=>import("./navigation.stories-DFpQPa8H.js"),__vite__mapDeps([76,1,2,5,4,48,38,22,20,32,31,41,77,26,78,43,23,24,25,27,29,30]),import.meta.url),"./src/components/page/page.stories.tsx":async()=>t(()=>import("./page.stories-BfCGd43p.js"),__vite__mapDeps([79,1,2]),import.meta.url),"./src/components/panel/panel.stories.tsx":async()=>t(()=>import("./panel.stories-B05jnSyq.js"),__vite__mapDeps([80,1,2,53,4,15,16,6,46,19,20,39,26,30,40,38,22,41]),import.meta.url),"./src/components/popover-menu/popover-menu.stories.tsx":async()=>t(()=>import("./popover-menu.stories-C3Er2s3-.js"),__vite__mapDeps([81,1,2,5,77,26,15,4,16,78,38,22,20,43,23,24,25,27,29,30,32,31,41]),import.meta.url),"./src/components/section/section.stories.tsx":async()=>t(()=>import("./section.stories-c2uXgnH6.js"),__vite__mapDeps([82,1,2,15,4,16]),import.meta.url),"./src/components/sidebar-container/sidebar-container.stories.tsx":async()=>t(()=>import("./sidebar-container.stories-CD7erG3P.js"),__vite__mapDeps([83,1,2]),import.meta.url),"./src/components/sidebar/sidebar.stories.tsx":async()=>t(()=>import("./sidebar.stories-CTIXw2h_.js"),__vite__mapDeps([84,1,2,4]),import.meta.url),"./src/components/sidesheet/sidesheet.stories.tsx":async()=>t(()=>import("./sidesheet.stories-Iwuc9DOn.js"),__vite__mapDeps([85,1,2,21,22,20,23,24,25,26,27,28,29,30,31,32,19,33,34,35,15,4,16]),import.meta.url),"./src/components/skeleton/skeleton.stories.tsx":async()=>t(()=>import("./skeleton.stories-DkC3bvFE.js"),__vite__mapDeps([86,1,2,4]),import.meta.url),"./src/components/spinner-overlay/spinner-overlay.stories.tsx":async()=>t(()=>import("./spinner-overlay.stories-Ceh5rt6d.js"),__vite__mapDeps([87,1,2,16,4]),import.meta.url),"./src/components/spinner/spinner.stories.tsx":async()=>t(()=>import("./spinner.stories-VlGwChGj.js"),__vite__mapDeps([88,1,2,16,4]),import.meta.url),"./src/components/tab/tab.stories.tsx":async()=>t(()=>import("./tab.stories-BExfMg0Y.js"),__vite__mapDeps([89,1,2,4,38,22,20,33,30,25,6]),import.meta.url),"./src/components/table-unvirtualized/table-unvirtualized.stories.tsx":async()=>t(()=>import("./table-unvirtualized.stories-D4Z2ULmw.js"),__vite__mapDeps([90,1,2,91,4,16,15]),import.meta.url),"./src/components/table-virtualized/table-virtualized.stories.tsx":async()=>t(()=>import("./table-virtualized.stories-CZFEUGuD.js"),__vite__mapDeps([92,1,2,44,26,4,91,16,5,15,36,50]),import.meta.url),"./src/components/tag/tag.stories.tsx":async()=>t(()=>import("./tag.stories-D4S3pQPY.js"),__vite__mapDeps([93,1,2,45,4,5]),import.meta.url),"./src/components/toast/toast.stories.tsx":async()=>t(()=>import("./toast.stories-Bzmbls-5.js"),__vite__mapDeps([94,1,2,5,4]),import.meta.url),"./src/components/toggle/toggle.stories.tsx":async()=>t(()=>import("./toggle.stories-DcNmYdAI.js"),__vite__mapDeps([95,1,2,46,19,20,39,26,30,40,38,22,41,4]),import.meta.url),"./src/components/tooltip/tooltip.stories.tsx":async()=>t(()=>import("./tooltip.stories-DmTKg58f.js"),__vite__mapDeps([96,1,2,6,77,26,4,35,20,33,27,32,15,16]),import.meta.url),"./src/components/top-bar/top-bar.stories.tsx":async()=>t(()=>import("./top-bar.stories-BeIujtwl.js"),__vite__mapDeps([97,1,2,4,5,8,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/icons/icons.mdx":async()=>t(()=>import("./icons-BtgjIq6b.js"),__vite__mapDeps([98,1,2,99,100,26,101,102,103,5]),import.meta.url),"./src/index.mdx":async()=>t(()=>import("./index-B27qxNgk.js"),__vite__mapDeps([104,1,2,99,100,26,101,102,103]),import.meta.url),"./src/styles/global-styles.stories.tsx":async()=>t(()=>import("./global-styles.stories-MeCc39-H.js"),__vite__mapDeps([105,1,2,91,4,16]),import.meta.url)};async function P(r){return y[r]()}const{composeConfigs:I,PreviewWeb:V,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(r=[])=>{const _=await Promise.all([r.at(0)??t(()=>import("./entry-preview-Dr1n3Wdx.js"),__vite__mapDeps([106,107,2,26]),import.meta.url),r.at(1)??t(()=>import("./entry-preview-docs-Blm_ViJ3.js"),__vite__mapDeps([108,107,102,2,103]),import.meta.url),r.at(2)??t(()=>import("./preview-BhhEZcNS.js"),__vite__mapDeps([109,101]),import.meta.url),r.at(3)??t(()=>import("./preview-BXpCwDS1.js"),[],import.meta.url),r.at(4)??t(()=>import("./preview-aVwhiz9X.js"),[],import.meta.url),r.at(5)??t(()=>import("./preview-D77C14du.js"),__vite__mapDeps([110,103]),import.meta.url),r.at(6)??t(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),r.at(7)??t(()=>import("./preview-CFgKly6U.js"),[],import.meta.url),r.at(8)??t(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([111,103]),import.meta.url),r.at(9)??t(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),r.at(10)??t(()=>import("./preview-DVI_gYQC.js"),[],import.meta.url),r.at(11)??t(()=>import("./preview-BbTc69zT.js"),__vite__mapDeps([112,113]),import.meta.url)]);return I(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new V(P,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./alert.stories-4-JUwPHE.js","./jsx-runtime-C798UXYj.js","./index-0d5eMwbi.js","./alert-sTfywL0-.js","./class-names-DnY5YZNL.js","./zoom-to-fit-icon-DdsCB6de.js","./storybook-utils-C5xEhci0.js","./avatar.stories-fIH0Z5HF.js","./avatar-D9Pz4PuL.js","./badge.stories-gP-6Aq3K.js","./badge-Da1HxQE-.js","./breadcrumb-navigation.stories-C-43rqs3.js","./slot-CyLCZbOE.js","./button-group.stories-COJQKQ4l.js","./button.stories-DBEWuQ19.js","./button-C58NXHn_.js","./spinner-CrXB3JgE.js","./checkbox.stories-BpAp46hW.js","./dialog.stories--vBXMhbN.js","./description-CaDbXm72.js","./use-sync-refs-DhZgiOVe.js","./dialog-E4vf5oPi.js","./keyboard-D0BTZntQ.js","./use-event-listener-EaZKqAMH.js","./portal-BQQr4JoD.js","./focus-management-CKkqTXfi.js","./index-BoyHNU0R.js","./use-server-handoff-complete-UouYGEcd.js","./use-inert-others-D4nVU6H_.js","./use-tab-direction-CvE89ORz.js","./hidden-DfUyyskI.js","./close-provider-CZp7Lqob.js","./open-closed-FM4Rfwkx.js","./use-is-mounted-DN0doZLi.js","./active-element-history-DjNnwGR_.js","./transition-BD9NB0Zn.js","./icon-button-BGxZn9fU.js","./form-field-MCn42VmW.js","./use-resolve-button-type-HzzQKYtS.js","./form-fields-HWr4pxRQ.js","./label-fWs8-lsP.js","./bugs-DpEN4NTH.js","./use-text-value-D3ZnWpLS.js","./floating-Bhi-vCn9.js","./index-BgfbgFhO.js","./tag-C9CGXtt3.js","./toggle-BFn01nbt.js","./disclosure.stories-WpDepkEn.js","./disclosure-D6QOZLzO.js","./divider-line.stories-lM2hRNkL.js","./divider-line-CzbklozI.js","./featured-tag.stories-BDKkO3eR.js","./featured-tag-DLvaNKCm.js","./panel-BTNit_je.js","./form-field-group.stories-2Sz2Q6YT.js","./listbox.stories-D3rnCqE-.js","./multi-combobox.stories-TV-SxZF7.js","./radio-box.stories-DU8Fvh1m.js","./radio-input.stories-BTtxN__v.js","./search-input.stories-D0n7gkHH.js","./single-combobox.stories-XhkUHsc-.js","./text-input.stories-BQDzGsVz.js","./textarea.stories-vzpdTwOr.js","./icon-button.stories-C0v6QEPM.js","./inline-alert.stories-wD9HlsAA.js","./last-changed-info.stories-C86MXOjM.js","./link.stories-CDOPEKTk.js","./menu-info-item.stories-CGoXCqdp.js","./menu-info-item-CC1TeP-c.js","./menu-item.stories-BHmfJUht.js","./menu-CrBWIwE1.js","./menu-separator-yO-BIXMb.js","./menu-title-DpAy2147.js","./menu-separator.stories-D7MgxHW9.js","./menu-title.stories-BpGHFQrG.js","./menu.stories-CeeRFgfo.js","./navigation.stories-DEWdTx1l.js","./usePopper-Cu2KpVtb.js","./popover-DWRml9qX.js","./page.stories-BfCGd43p.js","./panel.stories-C_vHY3yd.js","./popover-menu.stories-Cyd5OZDg.js","./section.stories-Cw5qbiem.js","./sidebar-container.stories-CD7erG3P.js","./sidebar.stories-CTIXw2h_.js","./sidesheet.stories-BycT9m_H.js","./skeleton.stories-DkC3bvFE.js","./spinner-overlay.stories-Ceh5rt6d.js","./spinner.stories-VlGwChGj.js","./tab.stories-BPSMZLol.js","./table-unvirtualized.stories-Pb6le84M.js","./table-unvirtualized-B6-rFf74.js","./table-virtualized.stories-NtXnlg34.js","./tag.stories-D4S3pQPY.js","./toast.stories-B8TZoGl5.js","./toggle.stories-Dz9UCPSS.js","./tooltip.stories-qTjNIbls.js","./top-bar.stories-CWz1TK1e.js","./icons-DhUkiSUP.js","./index-CFK-oMtb.js","./index-CMsN8z4D.js","./index-D-8MO0q_.js","./index-CxJhtZoZ.js","./index-DrFu-skq.js","./index-CRjmhI41.js","./global-styles.stories-MeCc39-H.js","./entry-preview-CaGNt_mb.js","./chunk-H6MOWX77-DTQOW814.js","./entry-preview-docs-Blm_ViJ3.js","./preview-BhhEZcNS.js","./preview-D77C14du.js","./preview-BWzBA1C2.js","./preview-BbTc69zT.js","./preview-o0cxRMzs.css"])))=>i.map(i=>d[i]); +import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const e of o)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function c(o){const e={};return o.integrity&&(e.integrity=o.integrity),o.referrerPolicy&&(e.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?e.credentials="include":o.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function a(o){if(o.ep)return;o.ep=!0;const e=c(o);fetch(o.href,e)}})();const v="modulepreload",T=function(r,_){return new URL(r,_).href},O={},t=function(_,c,a){let o=Promise.resolve();if(c&&c.length>0){const i=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(c.map(n=>{if(n=T(n,a),n in O)return;O[n]=!0;const p=n.endsWith(".css"),R=p?'[rel="stylesheet"]':"";if(!!a)for(let u=i.length-1;u>=0;u--){const l=i[u];if(l.href===n&&(!p||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${R}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":v,p||(m.as="script"),m.crossOrigin="",m.href=n,d&&m.setAttribute("nonce",d),document.head.appendChild(m),p)return new Promise((u,l)=>{m.addEventListener("load",u),m.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${n}`)))})}))}function e(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&e(s.reason);return _().catch(e)})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,E=L({page:"preview"});f.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const y={"./src/components/alert/alert.stories.tsx":async()=>t(()=>import("./alert.stories-4-JUwPHE.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"./src/components/avatar/avatar.stories.tsx":async()=>t(()=>import("./avatar.stories-fIH0Z5HF.js"),__vite__mapDeps([7,1,2,8,6]),import.meta.url),"./src/components/badge/badge.stories.tsx":async()=>t(()=>import("./badge.stories-gP-6Aq3K.js"),__vite__mapDeps([9,1,2,10,4,6]),import.meta.url),"./src/components/breadcrumb-navigation/breadcrumb-navigation.stories.tsx":async()=>t(()=>import("./breadcrumb-navigation.stories-C-43rqs3.js"),__vite__mapDeps([11,1,2,4,12,5]),import.meta.url),"./src/components/button-group/button-group.stories.tsx":async()=>t(()=>import("./button-group.stories-COJQKQ4l.js"),__vite__mapDeps([13,1,2,4]),import.meta.url),"./src/components/button/button.stories.tsx":async()=>t(()=>import("./button.stories-DBEWuQ19.js"),__vite__mapDeps([14,1,2,15,4,16,5,6]),import.meta.url),"./src/components/checkbox/checkbox.stories.tsx":async()=>t(()=>import("./checkbox.stories-BpAp46hW.js"),__vite__mapDeps([17,1,2,4,6]),import.meta.url),"./src/components/dialog/dialog.stories.tsx":async()=>t(()=>import("./dialog.stories--vBXMhbN.js"),__vite__mapDeps([18,1,2,6,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,5,4,36,15,16,37,38,39,40,41,42,43,10,44,45,46,3]),import.meta.url),"./src/components/disclosure/disclosure.stories.tsx":async()=>t(()=>import("./disclosure.stories-WpDepkEn.js"),__vite__mapDeps([47,1,2,5,4,48,38,22,20,32,31,41]),import.meta.url),"./src/components/divider-line/divider-line.stories.tsx":async()=>t(()=>import("./divider-line.stories-lM2hRNkL.js"),__vite__mapDeps([49,1,2,50]),import.meta.url),"./src/components/featured-tag/featured-tag.stories.tsx":async()=>t(()=>import("./featured-tag.stories-BDKkO3eR.js"),__vite__mapDeps([51,1,2,52,4,53,37,5,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/form-field-group.stories.tsx":async()=>t(()=>import("./form-field-group.stories-2Sz2Q6YT.js"),__vite__mapDeps([54,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/listbox/listbox.stories.tsx":async()=>t(()=>import("./listbox.stories-D3rnCqE-.js"),__vite__mapDeps([55,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/multi-combobox/multi-combobox.stories.tsx":async()=>t(()=>import("./multi-combobox.stories-TV-SxZF7.js"),__vite__mapDeps([56,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/radio-box/radio-box.stories.tsx":async()=>t(()=>import("./radio-box.stories-DU8Fvh1m.js"),__vite__mapDeps([57,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45,52]),import.meta.url),"./src/components/form-field/radio-input/radio-input.stories.tsx":async()=>t(()=>import("./radio-input.stories-BTtxN__v.js"),__vite__mapDeps([58,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/search-input/search-input.stories.tsx":async()=>t(()=>import("./search-input.stories-D0n7gkHH.js"),__vite__mapDeps([59,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/single-combobox/single-combobox.stories.tsx":async()=>t(()=>import("./single-combobox.stories-XhkUHsc-.js"),__vite__mapDeps([60,1,2,45,4,5,37,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34]),import.meta.url),"./src/components/form-field/text-input/text-input.stories.tsx":async()=>t(()=>import("./text-input.stories-BQDzGsVz.js"),__vite__mapDeps([61,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/textarea/textarea.stories.tsx":async()=>t(()=>import("./textarea.stories-vzpdTwOr.js"),__vite__mapDeps([62,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/icon-button/icon-button.stories.tsx":async()=>t(()=>import("./icon-button.stories-C0v6QEPM.js"),__vite__mapDeps([63,36,1,2,4,5]),import.meta.url),"./src/components/inline-alert/inline-alert.stories.tsx":async()=>t(()=>import("./inline-alert.stories-wD9HlsAA.js"),__vite__mapDeps([64,1,2,4,5,6]),import.meta.url),"./src/components/last-changed-info/last-changed-info.stories.tsx":async()=>t(()=>import("./last-changed-info.stories-C86MXOjM.js"),__vite__mapDeps([65,1,2,4]),import.meta.url),"./src/components/link/link.stories.tsx":async()=>t(()=>import("./link.stories-CDOPEKTk.js"),__vite__mapDeps([66,1,2,12,4,5,6]),import.meta.url),"./src/components/menu/menu-info-item/menu-info-item.stories.tsx":async()=>t(()=>import("./menu-info-item.stories-CGoXCqdp.js"),__vite__mapDeps([67,1,2,68]),import.meta.url),"./src/components/menu/menu-item/menu-item.stories.tsx":async()=>t(()=>import("./menu-item.stories-BHmfJUht.js"),__vite__mapDeps([69,1,2,5,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/menu/menu-separator/menu-separator.stories.tsx":async()=>t(()=>import("./menu-separator.stories-D7MgxHW9.js"),__vite__mapDeps([73,1,2,71]),import.meta.url),"./src/components/menu/menu-title/menu-title.stories.tsx":async()=>t(()=>import("./menu-title.stories-BpGHFQrG.js"),__vite__mapDeps([74,1,2,72]),import.meta.url),"./src/components/menu/menu.stories.tsx":async()=>t(()=>import("./menu.stories-CeeRFgfo.js"),__vite__mapDeps([75,1,2,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/navigation/navigation.stories.tsx":async()=>t(()=>import("./navigation.stories-DEWdTx1l.js"),__vite__mapDeps([76,1,2,5,4,48,38,22,20,32,31,41,77,26,78,43,23,24,25,27,29,30]),import.meta.url),"./src/components/page/page.stories.tsx":async()=>t(()=>import("./page.stories-BfCGd43p.js"),__vite__mapDeps([79,1,2]),import.meta.url),"./src/components/panel/panel.stories.tsx":async()=>t(()=>import("./panel.stories-C_vHY3yd.js"),__vite__mapDeps([80,1,2,53,4,15,16,6,46,19,20,39,26,30,40,38,22,41]),import.meta.url),"./src/components/popover-menu/popover-menu.stories.tsx":async()=>t(()=>import("./popover-menu.stories-Cyd5OZDg.js"),__vite__mapDeps([81,1,2,5,77,26,15,4,16,78,38,22,20,43,23,24,25,27,29,30,32,31,41]),import.meta.url),"./src/components/section/section.stories.tsx":async()=>t(()=>import("./section.stories-Cw5qbiem.js"),__vite__mapDeps([82,1,2,15,4,16]),import.meta.url),"./src/components/sidebar-container/sidebar-container.stories.tsx":async()=>t(()=>import("./sidebar-container.stories-CD7erG3P.js"),__vite__mapDeps([83,1,2]),import.meta.url),"./src/components/sidebar/sidebar.stories.tsx":async()=>t(()=>import("./sidebar.stories-CTIXw2h_.js"),__vite__mapDeps([84,1,2,4]),import.meta.url),"./src/components/sidesheet/sidesheet.stories.tsx":async()=>t(()=>import("./sidesheet.stories-BycT9m_H.js"),__vite__mapDeps([85,1,2,21,22,20,23,24,25,26,27,28,29,30,31,32,19,33,34,35,15,4,16]),import.meta.url),"./src/components/skeleton/skeleton.stories.tsx":async()=>t(()=>import("./skeleton.stories-DkC3bvFE.js"),__vite__mapDeps([86,1,2,4]),import.meta.url),"./src/components/spinner-overlay/spinner-overlay.stories.tsx":async()=>t(()=>import("./spinner-overlay.stories-Ceh5rt6d.js"),__vite__mapDeps([87,1,2,16,4]),import.meta.url),"./src/components/spinner/spinner.stories.tsx":async()=>t(()=>import("./spinner.stories-VlGwChGj.js"),__vite__mapDeps([88,1,2,16,4]),import.meta.url),"./src/components/tab/tab.stories.tsx":async()=>t(()=>import("./tab.stories-BPSMZLol.js"),__vite__mapDeps([89,1,2,4,38,22,20,33,30,25,6]),import.meta.url),"./src/components/table-unvirtualized/table-unvirtualized.stories.tsx":async()=>t(()=>import("./table-unvirtualized.stories-Pb6le84M.js"),__vite__mapDeps([90,1,2,91,4,16,15]),import.meta.url),"./src/components/table-virtualized/table-virtualized.stories.tsx":async()=>t(()=>import("./table-virtualized.stories-NtXnlg34.js"),__vite__mapDeps([92,1,2,44,26,4,91,16,5,15,36,50]),import.meta.url),"./src/components/tag/tag.stories.tsx":async()=>t(()=>import("./tag.stories-D4S3pQPY.js"),__vite__mapDeps([93,1,2,45,4,5]),import.meta.url),"./src/components/toast/toast.stories.tsx":async()=>t(()=>import("./toast.stories-B8TZoGl5.js"),__vite__mapDeps([94,1,2,5,4]),import.meta.url),"./src/components/toggle/toggle.stories.tsx":async()=>t(()=>import("./toggle.stories-Dz9UCPSS.js"),__vite__mapDeps([95,1,2,46,19,20,39,26,30,40,38,22,41,4]),import.meta.url),"./src/components/tooltip/tooltip.stories.tsx":async()=>t(()=>import("./tooltip.stories-qTjNIbls.js"),__vite__mapDeps([96,1,2,6,77,26,4,35,20,33,27,32,15,16]),import.meta.url),"./src/components/top-bar/top-bar.stories.tsx":async()=>t(()=>import("./top-bar.stories-CWz1TK1e.js"),__vite__mapDeps([97,1,2,4,5,8,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/icons/icons.mdx":async()=>t(()=>import("./icons-DhUkiSUP.js"),__vite__mapDeps([98,1,2,99,100,26,101,102,103,5]),import.meta.url),"./src/index.mdx":async()=>t(()=>import("./index-CRjmhI41.js"),__vite__mapDeps([104,1,2,99,100,26,101,102,103]),import.meta.url),"./src/styles/global-styles.stories.tsx":async()=>t(()=>import("./global-styles.stories-MeCc39-H.js"),__vite__mapDeps([105,1,2,91,4,16]),import.meta.url)};async function P(r){return y[r]()}const{composeConfigs:I,PreviewWeb:V,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(r=[])=>{const _=await Promise.all([r.at(0)??t(()=>import("./entry-preview-CaGNt_mb.js"),__vite__mapDeps([106,107,2,26]),import.meta.url),r.at(1)??t(()=>import("./entry-preview-docs-Blm_ViJ3.js"),__vite__mapDeps([108,107,102,2,103]),import.meta.url),r.at(2)??t(()=>import("./preview-BhhEZcNS.js"),__vite__mapDeps([109,101]),import.meta.url),r.at(3)??t(()=>import("./preview-B-UoTTO-.js"),[],import.meta.url),r.at(4)??t(()=>import("./preview-aVwhiz9X.js"),[],import.meta.url),r.at(5)??t(()=>import("./preview-D77C14du.js"),__vite__mapDeps([110,103]),import.meta.url),r.at(6)??t(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),r.at(7)??t(()=>import("./preview-CFgKly6U.js"),[],import.meta.url),r.at(8)??t(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([111,103]),import.meta.url),r.at(9)??t(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),r.at(10)??t(()=>import("./preview-DVI_gYQC.js"),[],import.meta.url),r.at(11)??t(()=>import("./preview-BbTc69zT.js"),__vite__mapDeps([112,113]),import.meta.url)]);return I(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new V(P,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _}; diff --git a/assets/index-VyeKKq5j.js b/assets/index-BlTEvAze.js similarity index 96% rename from assets/index-VyeKKq5j.js rename to assets/index-BlTEvAze.js index 67f5df61..63d1f230 100644 --- a/assets/index-VyeKKq5j.js +++ b/assets/index-BlTEvAze.js @@ -1 +1 @@ -import{m as l,a as c,V as T,K as b,P as d,g as S,L as B,b as L,v as C,w as H,c as u,y as g,$ as y,d as I,e as h,H as k,f as P,D as W,x as A,C as F,E as x,S as D,R,I as f,h as v,i as E,A as M,F as N,j as q,k as w,s as O,N as U,l as Z,T as j,Z as z,n as G,o as J,p as K,W as Q,U as V,q as X,Q as Y,J as _,r as $,t as aa,B as sa,u as oa,z as ta,M as ea,G as ra,O as pa,X as ia,Y as na,_ as ma,a0 as la,a1 as ca,a2 as Ta,a3 as ba,a4 as da,a5 as Sa,a6 as Ba,a7 as La,a8 as Ca,a9 as Ha,aa as ua,ab as ga,ac as ya,ad as Ia}from"./index-D_yKE35a.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./index-0d5eMwbi.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";export{l as A,c as ActionBar,T as AddonPanel,b as Badge,d as Bar,S as Blockquote,B as Button,L as ClipboardCode,C as Code,H as DL,u as Div,g as DocumentWrapper,y as EmptyTabContent,I as ErrorFormatter,h as FlexBar,k as Form,P as H1,W as H2,A as H3,F as H4,x as H5,D as H6,R as HR,f as IconButton,v as IconButtonSkeleton,E as Icons,M as Img,N as LI,q as Link,w as ListItem,O as Loader,U as Modal,Z as OL,j as P,z as Placeholder,G as Pre,J as ResetWrapper,K as ScrollArea,Q as Separator,V as Spaced,X as Span,Y as StorybookIcon,_ as StorybookLogo,$ as Symbols,aa as SyntaxHighlighter,sa as TT,oa as TabBar,ta as TabButton,ea as TabWrapper,ra as Table,pa as Tabs,ia as TabsState,na as TooltipLinkList,ma as TooltipMessage,la as TooltipNote,ca as UL,Ta as WithTooltip,ba as WithTooltipPure,da as Zoom,Sa as codeCommon,Ba as components,La as createCopyToClipboardFunction,Ca as getStoryHref,Ha as icons,ua as interleaveSeparators,ga as nameSpaceClassNames,ya as resetComponents,Ia as withReset}; +import{m as l,a as c,V as T,K as b,P as d,g as S,L as B,b as L,v as C,w as H,c as u,y as g,$ as y,d as I,e as h,H as k,f as P,D as W,x as A,C as F,E as x,S as D,R,I as f,h as v,i as E,A as M,F as N,j as q,k as w,s as O,N as U,l as Z,T as j,Z as z,n as G,o as J,p as K,W as Q,U as V,q as X,Q as Y,J as _,r as $,t as aa,B as sa,u as oa,z as ta,M as ea,G as ra,O as pa,X as ia,Y as na,_ as ma,a0 as la,a1 as ca,a2 as Ta,a3 as ba,a4 as da,a5 as Sa,a6 as Ba,a7 as La,a8 as Ca,a9 as Ha,aa as ua,ab as ga,ac as ya,ad as Ia}from"./index-CMsN8z4D.js";import"./iframe-CUIcjkDA.js";import"../sb-preview/runtime.js";import"./index-0d5eMwbi.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";export{l as A,c as ActionBar,T as AddonPanel,b as Badge,d as Bar,S as Blockquote,B as Button,L as ClipboardCode,C as Code,H as DL,u as Div,g as DocumentWrapper,y as EmptyTabContent,I as ErrorFormatter,h as FlexBar,k as Form,P as H1,W as H2,A as H3,F as H4,x as H5,D as H6,R as HR,f as IconButton,v as IconButtonSkeleton,E as Icons,M as Img,N as LI,q as Link,w as ListItem,O as Loader,U as Modal,Z as OL,j as P,z as Placeholder,G as Pre,J as ResetWrapper,K as ScrollArea,Q as Separator,V as Spaced,X as Span,Y as StorybookIcon,_ as StorybookLogo,$ as Symbols,aa as SyntaxHighlighter,sa as TT,oa as TabBar,ta as TabButton,ea as TabWrapper,ra as Table,pa as Tabs,ia as TabsState,na as TooltipLinkList,ma as TooltipMessage,la as TooltipNote,ca as UL,Ta as WithTooltip,ba as WithTooltipPure,da as Zoom,Sa as codeCommon,Ba as components,La as createCopyToClipboardFunction,Ca as getStoryHref,Ha as icons,ua as interleaveSeparators,ga as nameSpaceClassNames,ya as resetComponents,Ia as withReset}; diff --git a/assets/index-D_yKE35a.js b/assets/index-CMsN8z4D.js similarity index 99% rename from assets/index-D_yKE35a.js rename to assets/index-CMsN8z4D.js index e4facd02..95811410 100644 --- a/assets/index-D_yKE35a.js +++ b/assets/index-CMsN8z4D.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-VyeKKq5j.js","./iframe-9T-PF226.js","./index-0d5eMwbi.js","./jsx-runtime-C798UXYj.js","./index-BoyHNU0R.js","./index-D-8MO0q_.js","./index-CxJhtZoZ.js","./index-DrFu-skq.js","./Color-ERTF36HU-rlRgfIB0.js"])))=>i.map(i=>d[i]); -var dS=Object.defineProperty;var pS=(e,t,r)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $n=(e,t,r)=>pS(e,typeof t!="symbol"?t+"":t,r);import{_ as $3}from"./iframe-9T-PF226.js";import{r as l,R as y,c as $i,g as $s}from"./index-0d5eMwbi.js";import{j as X}from"./jsx-runtime-C798UXYj.js";import{r as Ps,E as P3}from"./index-BoyHNU0R.js";import{O as N3,P as fS}from"./index-D-8MO0q_.js";import{y as Em,D as tc}from"./index-CxJhtZoZ.js";import{d as hS}from"./index-DrFu-skq.js";var mS=Object.create,j3=Object.defineProperty,gS=Object.getOwnPropertyDescriptor,H3=Object.getOwnPropertyNames,vS=Object.getPrototypeOf,yS=Object.prototype.hasOwnProperty,Ra=(e,t)=>function(){return t||(0,e[H3(e)[0]])((t={exports:{}}).exports,t),t.exports},bS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of H3(t))!yS.call(e,a)&&a!==r&&j3(e,a,{get:()=>t[a],enumerable:!(n=gS(t,a))||n.enumerable});return e},wS=(e,t,r)=>(r=e!=null?mS(vS(e)):{},bS(!e||!e.__esModule?j3(r,"default",{value:e,enumerable:!0}):r,e)),Et=e=>`control-${e.replace(/\s+/g,"-")}`,Ns=e=>`set-${e.replace(/\s+/g,"-")}`,ES=Object.create,Mp=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,CS=Object.getOwnPropertyNames,DS=Object.getPrototypeOf,SS=Object.prototype.hasOwnProperty,I=(e,t)=>Mp(e,"name",{value:t,configurable:!0}),Pi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),js=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),AS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of CS(t))!SS.call(e,a)&&a!==r&&Mp(e,a,{get:()=>t[a],enumerable:!(n=xS(t,a))||n.enumerable});return e},$p=(e,t,r)=>(r=e!=null?ES(DS(e)):{},AS(t||!e||!e.__esModule?Mp(r,"default",{value:e,enumerable:!0}):r,e)),kS=js(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===f||P===i||P===o||P===p||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===g||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===x||P.$$typeof===E||P.$$typeof===C||P.$$typeof===b)}I(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var it=P.$$typeof;switch(it){case r:var kt=P.type;switch(kt){case d:case f:case a:case i:case o:case p:return kt;default:var Vr=kt&&kt.$$typeof;switch(Vr){case u:case h:case v:case g:case s:return Vr;default:return it}}case n:return it}}}I(D,"typeOf");var S=d,A=f,k=u,F=s,T=r,R=h,L=a,z=v,M=g,O=n,$=i,H=o,K=p,N=!1;function W(P){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(P)||D(P)===d}I(W,"isAsyncMode");function te(P){return D(P)===f}I(te,"isConcurrentMode");function ue(P){return D(P)===u}I(ue,"isContextConsumer");function re(P){return D(P)===s}I(re,"isContextProvider");function ae(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}I(ae,"isElement");function j(P){return D(P)===h}I(j,"isForwardRef");function Z(P){return D(P)===a}I(Z,"isFragment");function J(P){return D(P)===v}I(J,"isLazy");function ge(P){return D(P)===g}I(ge,"isMemo");function ke(P){return D(P)===n}I(ke,"isPortal");function At(P){return D(P)===i}I(At,"isProfiler");function Ue(P){return D(P)===o}I(Ue,"isStrictMode");function ot(P){return D(P)===p}I(ot,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=T,e.ForwardRef=R,e.Fragment=L,e.Lazy=z,e.Memo=M,e.Portal=O,e.Profiler=$,e.StrictMode=H,e.Suspense=K,e.isAsyncMode=W,e.isConcurrentMode=te,e.isContextConsumer=ue,e.isContextProvider=re,e.isElement=ae,e.isForwardRef=j,e.isFragment=Z,e.isLazy=J,e.isMemo=ge,e.isPortal=ke,e.isProfiler=At,e.isStrictMode=Ue,e.isSuspense=ot,e.isValidElementType=w,e.typeOf=D})()}),_S=js((e,t)=>{t.exports=kS()}),V3=js((e,t)=>{var r=_S(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function u(b){return r.isMemo(b)?i:s[b.$$typeof]||n}I(u,"getStatics");var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;function v(b,x,E){if(typeof x!="string"){if(g){var C=m(x);C&&C!==g&&v(b,C,E)}var w=f(x);h&&(w=w.concat(h(x)));for(var D=u(b),S=u(x),A=0;A{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return I(function r(n,a,o){function i(d,f){if(!a[d]){if(!n[d]){var h=typeof Pi=="function"&Πif(!f&&h)return h(d,!0);if(s)return s(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=a[d]={exports:{}};n[d][0].call(m.exports,function(g){var v=n[d][1][g];return i(v||g)},m,m.exports,r,n,a,o)}return a[d].exports}I(i,"s");for(var s=typeof Pi=="function"&&Pi,u=0;u=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var u;for(u=0;u0&&(E[x]={cacheItem:g,arg:arguments[x]},C?i(h,E):h.push(E),h.length>d&&s(h.shift())),m.wasMemoized=C,m.numArgs=x+1,b},"memoizerific");return m.limit=d,m.wasMemoized=!1,m.cache=f,m.lru=h,m}};function i(d,f){var h=d.length,p=f.length,m,g,v;for(g=0;g=0&&(h=d[m],p=h.cacheItem.get(h.arg),!p||!p.size);m--)h.cacheItem.delete(h.arg)}I(s,"removeCachedResult");function u(d,f){return d===f||d!==d&&f!==f}I(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.map(i=>d[i]); +var dS=Object.defineProperty;var pS=(e,t,r)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $n=(e,t,r)=>pS(e,typeof t!="symbol"?t+"":t,r);import{_ as $3}from"./iframe-CUIcjkDA.js";import{r as l,R as y,c as $i,g as $s}from"./index-0d5eMwbi.js";import{j as X}from"./jsx-runtime-C798UXYj.js";import{r as Ps,E as P3}from"./index-BoyHNU0R.js";import{O as N3,P as fS}from"./index-D-8MO0q_.js";import{y as Em,D as tc}from"./index-CxJhtZoZ.js";import{d as hS}from"./index-DrFu-skq.js";var mS=Object.create,j3=Object.defineProperty,gS=Object.getOwnPropertyDescriptor,H3=Object.getOwnPropertyNames,vS=Object.getPrototypeOf,yS=Object.prototype.hasOwnProperty,Ra=(e,t)=>function(){return t||(0,e[H3(e)[0]])((t={exports:{}}).exports,t),t.exports},bS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of H3(t))!yS.call(e,a)&&a!==r&&j3(e,a,{get:()=>t[a],enumerable:!(n=gS(t,a))||n.enumerable});return e},wS=(e,t,r)=>(r=e!=null?mS(vS(e)):{},bS(!e||!e.__esModule?j3(r,"default",{value:e,enumerable:!0}):r,e)),Et=e=>`control-${e.replace(/\s+/g,"-")}`,Ns=e=>`set-${e.replace(/\s+/g,"-")}`,ES=Object.create,Mp=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,CS=Object.getOwnPropertyNames,DS=Object.getPrototypeOf,SS=Object.prototype.hasOwnProperty,I=(e,t)=>Mp(e,"name",{value:t,configurable:!0}),Pi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),js=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),AS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of CS(t))!SS.call(e,a)&&a!==r&&Mp(e,a,{get:()=>t[a],enumerable:!(n=xS(t,a))||n.enumerable});return e},$p=(e,t,r)=>(r=e!=null?ES(DS(e)):{},AS(t||!e||!e.__esModule?Mp(r,"default",{value:e,enumerable:!0}):r,e)),kS=js(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===f||P===i||P===o||P===p||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===g||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===x||P.$$typeof===E||P.$$typeof===C||P.$$typeof===b)}I(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var it=P.$$typeof;switch(it){case r:var kt=P.type;switch(kt){case d:case f:case a:case i:case o:case p:return kt;default:var Vr=kt&&kt.$$typeof;switch(Vr){case u:case h:case v:case g:case s:return Vr;default:return it}}case n:return it}}}I(D,"typeOf");var S=d,A=f,k=u,F=s,T=r,R=h,L=a,z=v,M=g,O=n,$=i,H=o,K=p,N=!1;function W(P){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(P)||D(P)===d}I(W,"isAsyncMode");function te(P){return D(P)===f}I(te,"isConcurrentMode");function ue(P){return D(P)===u}I(ue,"isContextConsumer");function re(P){return D(P)===s}I(re,"isContextProvider");function ae(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}I(ae,"isElement");function j(P){return D(P)===h}I(j,"isForwardRef");function Z(P){return D(P)===a}I(Z,"isFragment");function J(P){return D(P)===v}I(J,"isLazy");function ge(P){return D(P)===g}I(ge,"isMemo");function ke(P){return D(P)===n}I(ke,"isPortal");function At(P){return D(P)===i}I(At,"isProfiler");function Ue(P){return D(P)===o}I(Ue,"isStrictMode");function ot(P){return D(P)===p}I(ot,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=T,e.ForwardRef=R,e.Fragment=L,e.Lazy=z,e.Memo=M,e.Portal=O,e.Profiler=$,e.StrictMode=H,e.Suspense=K,e.isAsyncMode=W,e.isConcurrentMode=te,e.isContextConsumer=ue,e.isContextProvider=re,e.isElement=ae,e.isForwardRef=j,e.isFragment=Z,e.isLazy=J,e.isMemo=ge,e.isPortal=ke,e.isProfiler=At,e.isStrictMode=Ue,e.isSuspense=ot,e.isValidElementType=w,e.typeOf=D})()}),_S=js((e,t)=>{t.exports=kS()}),V3=js((e,t)=>{var r=_S(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function u(b){return r.isMemo(b)?i:s[b.$$typeof]||n}I(u,"getStatics");var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;function v(b,x,E){if(typeof x!="string"){if(g){var C=m(x);C&&C!==g&&v(b,C,E)}var w=f(x);h&&(w=w.concat(h(x)));for(var D=u(b),S=u(x),A=0;A{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return I(function r(n,a,o){function i(d,f){if(!a[d]){if(!n[d]){var h=typeof Pi=="function"&Πif(!f&&h)return h(d,!0);if(s)return s(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=a[d]={exports:{}};n[d][0].call(m.exports,function(g){var v=n[d][1][g];return i(v||g)},m,m.exports,r,n,a,o)}return a[d].exports}I(i,"s");for(var s=typeof Pi=="function"&&Pi,u=0;u=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var u;for(u=0;u0&&(E[x]={cacheItem:g,arg:arguments[x]},C?i(h,E):h.push(E),h.length>d&&s(h.shift())),m.wasMemoized=C,m.numArgs=x+1,b},"memoizerific");return m.limit=d,m.wasMemoized=!1,m.cache=f,m.lru=h,m}};function i(d,f){var h=d.length,p=f.length,m,g,v;for(g=0;g=0&&(h=d[m],p=h.cacheItem.get(h.arg),!p||!p.size);m--)h.cacheItem.delete(h.arg)}I(s,"removeCachedResult");function u(d,f){return d===f||d!==d&&f!==f}I(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Ce(Ba,--He):0,fa--,he===10&&(fa=1,Us--),he}I(X3,"prev");function Pe(){return he=He2||ha(he)>3?"":" "}I(Q3,"whitespace");function eb(e,t){for(;--t&&Pe()&&!(he<48||he>102||he>57&&he<65||he>70&&he<97););return za(e,Ro()+(t<6&&mt()==32&&Pe()==32))}I(eb,"escaping");function ql(e){for(;Pe();)switch(he){case e:return He;case 34:case 39:e!==34&&e!==39&&ql(he);break;case 40:e===41&&ql(e);break;case 92:Pe();break}return He}I(ql,"delimiter");function tb(e,t){for(;Pe()&&e+he!==57&&!(e+he===84&&mt()===47););return"/*"+za(t,He-1)+"*"+Hs(e===47?e:Pe())}I(tb,"commenter");function rb(e){for(;!ha(mt());)Pe();return za(e,He)}I(rb,"identifier");function nb(e){return Wp(zo("",null,null,null,[""],e=qp(e),0,[0],e))}I(nb,"compile");function zo(e,t,r,n,a,o,i,s,u){for(var d=0,f=0,h=i,p=0,m=0,g=0,v=1,b=1,x=1,E=0,C="",w=a,D=o,S=n,A=C;b;)switch(g=E,E=Pe()){case 40:if(g!=108&&Ce(A,h-1)==58){Ul(A+=ee(Bo(E),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:A+=Bo(E);break;case 9:case 10:case 13:case 32:A+=Q3(g);break;case 92:A+=eb(Ro()-1,7);continue;case 47:switch(mt()){case 42:case 47:bo(ab(tb(Pe(),Ro()),t,r),u);break;default:A+="/"}break;case 123*v:s[d++]=dt(A)*x;case 125*v:case 59:case 0:switch(E){case 0:case 125:b=0;case 59+f:x==-1&&(A=ee(A,/\f/g,"")),m>0&&dt(A)-h&&bo(m>32?Md(A+";",n,r,h-1):Md(ee(A," ","")+";",n,r,h-2),u);break;case 59:A+=";";default:if(bo(S=Ld(A,t,r,d,f,a,s,C,w=[],D=[],h),o),E===123)if(f===0)zo(A,t,S,S,w,o,h,s,D);else switch(p===99&&Ce(A,3)===110?100:p){case 100:case 108:case 109:case 115:zo(e,S,S,n&&bo(Ld(e,S,S,0,0,a,s,C,a,w=[],h),D),a,D,h,s,n?w:D);break;default:zo(A,S,S,S,[""],D,0,s,D)}}d=f=m=0,v=x=1,C=A="",h=i;break;case 58:h=1+dt(A),m=g;default:if(v<1){if(E==123)--v;else if(E==125&&v++==0&&X3()==125)continue}switch(A+=Hs(E),E*v){case 38:x=f>0?1:(A+="\f",-1);break;case 44:s[d++]=(dt(A)-1)*x,x=1;break;case 64:mt()===45&&(A+=Bo(Pe())),p=mt(),f=h=dt(C=A+=rb(Ro())),E++;break;case 45:g===45&&dt(A)==2&&(v=0)}}return o}I(zo,"parse");function Ld(e,t,r,n,a,o,i,s,u,d,f){for(var h=a-1,p=a===0?o:[""],m=Vs(p),g=0,v=0,b=0;g0?p[x]+" "+E:ee(E,/&\f/g,p[x])))&&(u[b++]=C);return si(e,t,r,a===0?Hp:s,u,d,f)}I(Ld,"ruleset");function ab(e,t,r){return si(e,t,r,jp,Hs(J3()),pa(e,2,-2),0)}I(ab,"comment");function Md(e,t,r,n){return si(e,t,r,Vp,pa(e,0,n),pa(e,n+1,-1),n)}I(Md,"declaration");function dn(e,t){for(var r="",n=Vs(e),a=0;a-1},"isIgnoringComment"),VS=I(function(e){return function(t,r,n){if(!(t.type!=="rule"||e.compat)){var a=t.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var o=!!t.parent,i=o?t.parent.children:n,s=i.length-1;s>=0;s--){var u=i[s];if(u.line=0;r--)if(!lb(t[r]))return!0;return!1},"isPrependedWithRegularRules"),Dm=I(function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},"nullifyElement"),qS=I(function(e,t,r){lb(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Dm(e)):US(t,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Dm(e)))},"incorrectImportAlarm");function Gp(e,t){switch(G3(e,t)){case 5103:return ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ne+e+Vl+e+Re+e+e;case 6828:case 4268:return ne+e+Re+e+e;case 6165:return ne+e+Re+"flex-"+e+e;case 5187:return ne+e+ee(e,/(\w+).+(:[^]+)/,ne+"box-$1$2"+Re+"flex-$1$2")+e;case 5443:return ne+e+Re+"flex-item-"+ee(e,/flex-|-self/,"")+e;case 4675:return ne+e+Re+"flex-line-pack"+ee(e,/align-content|flex-|-self/,"")+e;case 5548:return ne+e+Re+ee(e,"shrink","negative")+e;case 5292:return ne+e+Re+ee(e,"basis","preferred-size")+e;case 6060:return ne+"box-"+ee(e,"-grow","")+ne+e+Re+ee(e,"grow","positive")+e;case 4554:return ne+ee(e,/([^-])(transform)/g,"$1"+ne+"$2")+e;case 6187:return ee(ee(ee(e,/(zoom-|grab)/,ne+"$1"),/(image-set)/,ne+"$1"),e,"")+e;case 5495:case 3959:return ee(e,/(image-set\([^]*)/,ne+"$1$`$1");case 4968:return ee(ee(e,/(.+:)(flex-)?(.*)/,ne+"box-pack:$3"+Re+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ne+e+e;case 4095:case 3583:case 4068:case 2532:return ee(e,/(.+)-inline(.+)/,ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dt(e)-1-t>6)switch(Ce(e,t+1)){case 109:if(Ce(e,t+4)!==45)break;case 102:return ee(e,/(.+:)(.+)-([^]+)/,"$1"+ne+"$2-$3$1"+Vl+(Ce(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ul(e,"stretch")?Gp(ee(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ce(e,t+1)!==115)break;case 6444:switch(Ce(e,dt(e)-3-(~Ul(e,"!important")&&10))){case 107:return ee(e,":",":"+ne)+e;case 101:return ee(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ne+(Ce(e,14)===45?"inline-":"")+"box$3$1"+ne+"$2$3$1"+Re+"$2box$3")+e}break;case 5936:switch(Ce(e,t+11)){case 114:return ne+e+Re+ee(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ne+e+Re+ee(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ne+e+Re+ee(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ne+e+Re+e+e}return e}I(Gp,"prefix");var WS=I(function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Vp:e.return=Gp(e.value,e.length);break;case W3:return dn([Wn(e,{value:ee(e.value,"@","@"+ne)})],n);case Hp:if(e.length)return Y3(e.props,function(a){switch(K3(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return dn([Wn(e,{props:[ee(a,/:(read-\w+)/,":"+Vl+"$1")]})],n);case"::placeholder":return dn([Wn(e,{props:[ee(a,/:(plac\w+)/,":"+ne+"input-$1")]}),Wn(e,{props:[ee(a,/:(plac\w+)/,":"+Vl+"$1")]}),Wn(e,{props:[ee(a,/:(plac\w+)/,Re+"input-$1")]})],n)}return""})}},"prefixer"),GS=[WS],KS=I(function(e){var t=e.key;if(!t)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements.`);if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var n=e.stylisPlugins||GS;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var a={},o,i=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}I(sb,"murmur2");var XS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Sm=`You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". @@ -558,7 +558,7 @@ ${t}`);let r=t.match(YO);if(!r)return y.createElement(l.Fragment,null,t);let[,n, * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */const{global:et}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:tee,once:ree,logger:dm}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:x3,composeConfigs:lae,Preview:sae,DocsContext:uae}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:C3,UPDATE_STORY_ARGS:nee,RESET_STORY_ARGS:aee,GLOBALS_UPDATED:D3,NAVIGATE_URL:oee}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var iee=Ra({"../../node_modules/tocbot/src/js/default-options.js"(e,t){t.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(r){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(r){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0}}}),lee=Ra({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,s=!0,u=" ";function d(w,D){var S=D.appendChild(h(w));if(w.children.length){var A=p(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function f(w,D){var S=!1,A=p(S);if(D.forEach(function(k){d(k,A)}),i=w||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(A)}function h(w){var D=document.createElement("li"),S=document.createElement("a");return r.listItemClass&&D.setAttribute("class",r.listItemClass),r.onClick&&(S.onclick=r.onClick),r.includeTitleTags&&S.setAttribute("title",w.textContent),r.includeHtml&&w.childNodes.length?n.call(w.childNodes,function(A){S.appendChild(A.cloneNode(!0))}):S.textContent=w.textContent,S.setAttribute("href",r.basePath+"#"+w.id),S.setAttribute("class",r.linkClass+u+"node-name--"+w.nodeName+u+r.extraLinkClasses),D.appendChild(S),D}function p(w){var D=r.orderedList?"ol":"ul",S=document.createElement(D),A=r.listClass+u+r.extraListClasses;return w&&(A=A+u+r.collapsibleClass,A=A+u+r.isCollapsedClass),S.setAttribute("class",A),S}function m(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var w;w=document.querySelector(r.scrollContainer).scrollTop}else w=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),w>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=u+r.positionFixedClass):D.className=D.className.replace(u+r.positionFixedClass,"")}function g(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=g(w.offsetParent))),D}function v(w,D){return w&&w.className!==D&&(w.className=D),w}function b(w){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&m();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(M,O){if(g(M)>D+r.headingsOffset+10){var $=O===0?O:O-1;return A=S[$],!0}else if(O===S.length-1)return A=S[S.length-1],!0});var k=i.querySelector("."+r.activeLinkClass),F=i.querySelector("."+r.linkClass+".node-name--"+A.nodeName+'[href="'+r.basePath+"#"+A.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(k===F)return;var T=i.querySelectorAll("."+r.linkClass);n.call(T,function(M){v(M,M.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(M){v(M,M.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var L=F&&F.parentNode;L&&L.className.indexOf(r.activeListItemClass)===-1&&(L.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(M){M.className.indexOf(r.isCollapsedClass)===-1&&(M.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&v(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),x(F&&F.parentNode.parentNode)}}function x(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(v(w,w.className.replace(u+r.isCollapsedClass,"")),x(w.parentNode.parentNode)):w}function E(w){var D=w.target||w.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(s=!1)}function C(){s=!0}return{enableTocAnimation:C,disableTocAnimation:E,render:f,updateToc:b}}}}),see=Ra({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(h){return h[h.length-1]}function o(h){return+h.nodeName.toUpperCase().replace("H","")}function i(h){try{return h instanceof window.HTMLElement||h instanceof window.parent.HTMLElement}catch{return h instanceof window.HTMLElement}}function s(h){if(!i(h))return h;if(r.ignoreHiddenElements&&(!h.offsetHeight||!h.offsetParent))return null;let p=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var m={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:p};return r.includeHtml&&(m.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(m,h):m}function u(h,p){for(var m=s(h),g=m.headingLevel,v=p,b=a(v),x=b?b.headingLevel:0,E=g-x;E>0&&(b=a(v),!(b&&g===b.headingLevel));)b&&b.children!==void 0&&(v=b.children),E--;return g>=r.collapseDepth&&(m.isCollapsed=!0),v.push(m),v}function d(h,p){var m=p;r.ignoreSelector&&(m=p.split(",").map(function(g){return g.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(m)}catch{return console.warn("Headers not found with selector: "+m),null}}function f(h){return n.call(h,function(p,m){var g=s(m);return g&&u(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:f,selectHeadings:d}}}}),uee=Ra({"../../node_modules/tocbot/src/js/update-toc-scroll.js"(e,t){t.exports=function(r){var n=r.tocElement||document.querySelector(r.tocSelector);if(n&&n.scrollHeight>n.clientHeight){var a=n.querySelector("."+r.activeListItemClass);a&&(n.scrollTop=a.offsetTop-r.tocScrollOffset)}}}}),cee=Ra({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(e){e.initSmoothScrolling=t;function t(n){var a=n.duration,o=n.offset,i=location.hash?d(location.href):location.href;s();function s(){document.body.addEventListener("click",h,!1);function h(p){!u(p.target)||p.target.className.indexOf("no-smooth-scroll")>-1||p.target.href.charAt(p.target.href.length-2)==="#"&&p.target.href.charAt(p.target.href.length-1)==="!"||p.target.className.indexOf(n.linkClass)===-1||r(p.target.hash,{duration:a,offset:o,callback:function(){f(p.target.hash)}})}}function u(h){return h.tagName.toLowerCase()==="a"&&(h.hash.length>0||h.href.charAt(h.href.length-1)==="#")&&(d(h.href)===i||d(h.href)+"#"===i)}function d(h){return h.slice(0,h.lastIndexOf("#"))}function f(h){var p=document.getElementById(h.substring(1));p&&(/^(?:a|select|input|button|textarea)$/i.test(p.tagName)||(p.tabIndex=-1),p.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||g},s=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),u=typeof n=="string"?i.offset+(n?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(u):i.duration,f,h;requestAnimationFrame(function(v){f=v,p(v)});function p(v){h=v-f,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var p,m=Object.prototype.hasOwnProperty;function g(){for(var E={},C=0;C({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:se(.3,e.color.defaultText),fontSize:e.typography.size.s2})),PD=e=>y.createElement(pee,{...e,className:"docblock-emptyblock sb-unstyled"}),fee=_(Ih)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),hee=_.div(({theme:e})=>({background:e.background.content,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),gl=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${jd}`]:{margin:0}})),mee=()=>y.createElement(hee,null,y.createElement(gl,null),y.createElement(gl,{style:{width:"80%"}}),y.createElement(gl,{style:{width:"30%"}}),y.createElement(gl,{style:{width:"80%"}})),ND=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=hb();if(e)return y.createElement(mee,null);if(t)return y.createElement(PD,null,t);let u=y.createElement(fee,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?Pd.dark:Pd.light;return y.createElement(mb,{theme:Nd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},ve=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,pm=600,gee=_.h1(de,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),vee=_.h2(de,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:se(.25,e.color.defaultText)})),yee=_.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?se(.1,e.color.defaultText):se(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[ve("a")]:{...t,fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[ve("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[ve("div")]:t,[ve("dl")]:{...t,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[ve("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[ve("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[ve("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[ve("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[ve("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[ve("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[ve("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[ve("img")]:{maxWidth:"100%"},[ve("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[ve("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[ve("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[ve("pre")]:{...t,fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[ve("span")]:{...t,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[ve("table")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[ve("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),bee=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${pm}px)`]:{}})),wee=({children:e,toc:t})=>y.createElement(bee,{className:"sbdocs sbdocs-wrapper"},y.createElement(yee,{className:"sbdocs sbdocs-content"},e),t),Ju=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:Eee}=et,xee=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=Eee.document.getElementById(e)}shouldComponentUpdate(e){let{scale:t}=e;return t!==this.props.scale&&this.setIframeBodyStyle({width:`${t*100}%`,height:`${t*100}%`,transform:`scale(${1/t})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(e){return Object.assign(this.iframe.contentDocument.body.style,e)}render(){let{id:e,title:t,src:r,allowFullScreen:n,scale:a,...o}=this.props;return y.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},jD=l.createContext({scale:1}),{PREVIEW_URL:Cee}=et,Dee=Cee||"iframe.html",Ip=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,See=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:f}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,p=f(i,h,{showMain:()=>{},showError:({title:m,description:g})=>o(new Error(`${m} - ${g}`)),showException:m=>o(m)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>p())}},[u,f,i]),a?y.createElement("pre",null,y.createElement(QO,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${Ip(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(HD,null),y.createElement("div",{ref:t,id:`${Ip(e)}-inner`,"data-name":i.name}))},Aee=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(jD.Consumer,null,({scale:r})=>y.createElement(xee,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:xM(Dee,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),kee=_.strong(({theme:e})=>({color:e.color.orange})),_ee=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(kee,null,"This story mounts inside of play. Set"," ",y.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):y.createElement("div",{id:Ip(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(See,{...e}):y.createElement(Aee,{...e}))},HD=()=>y.createElement(EM,null),Fee=_(Ph)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Iee=_.div({display:"flex",alignItems:"center",gap:4}),Tee=_.div(({theme:e})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),Ree=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(Fee,{...o},y.createElement(Iee,{key:"left"},e?[1,2,3].map(i=>y.createElement(Tee,{key:i})):y.createElement(y.Fragment,null,y.createElement(hn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(r$,null)),y.createElement(hn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(n$,null)),y.createElement(hn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(a$,null))))),Bee=_.div(({isColumn:e,columns:t,layout:r})=>({display:e||!t?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:e?"column":"row","& .innerZoomElementWrapper > *":e?{width:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout:e="padded"})=>e==="centered"||e==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout:e="padded"})=>e==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns:e})=>e&&e>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${e} - 20px)`}}:{}),S3=_(ND)(({theme:e})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:e.appBorderRadius,borderBottomRightRadius:e.appBorderRadius,border:"none",background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content)}})),zee=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Ju(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),Oee=(e,t,r)=>{switch(!0){case!!(e&&e.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>r(!1)}};case t:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function Lee(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var Mee=_(Ree)({position:"absolute",top:0,left:0,right:0,height:40}),$ee=_.div({overflow:"hidden",position:"relative"}),VD=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...f})=>{let[h,p]=l.useState(i),{source:m,actionItem:g}=Oee(a,h,p),[v,b]=l.useState(1),x=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[g]:[],[C,w]=l.useState(s?[...s]:[]),D=[...E,...C],{window:S}=et,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:T}=await $3(()=>import("./index-VyeKKq5j.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);T()},[]),k=F=>{let T=S.getSelection();T&&T.type==="Range"||(F.preventDefault(),C.filter(R=>R.title==="Copied").length===0&&A(m.props.code).then(()=>{w([...C,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(C.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(zee,{withSource:a,withToolbar:o,...f,className:x.join(" ")},o&&y.createElement(Mee,{isLoading:e,border:!0,zoom:F=>b(v*F),resetZoom:()=>b(1),storyId:Lee(n),baseUrl:"./iframe.html"}),y.createElement(jD.Provider,{value:{scale:v}},y.createElement($ee,{className:"docs-story",onCopyCapture:a&&k},y.createElement(Bee,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(qO.Element,{scale:v},Array.isArray(n)?n.map((F,T)=>y.createElement("div",{key:T},F)):y.createElement("div",null,n))),y.createElement(pf,{actionItems:D}))),a&&h&&m)};_(VD)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Pee=_.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:se(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${pl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${pl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:pl(1,e.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:e.boolean.selectedBackground,boxShadow:e.base==="light"?`${pl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),Nee=e=>e==="true",jee=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var f;let i=l.useCallback(()=>r(!1),[r]),s=!!((f=o==null?void 0:o.table)!=null&&f.readonly);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:i,disabled:s},"Set boolean");let u=Et(e),d=typeof t=="string"?Nee(t):t;return y.createElement(Pee,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:h=>r(h.target.checked),checked:d,role:"switch",disabled:s,name:e,onBlur:n,onFocus:a}),y.createElement("span",{"aria-hidden":"true"},"False"),y.createElement("span",{"aria-hidden":"true"},"True"))},Hee=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},Vee=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},Uee=e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),a=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${a}`},qee=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},A3=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Wee=_.div(({theme:e})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:e.base==="light"?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}})),Gee=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var g;let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),f=!!((g=o==null?void 0:o.table)!=null&&g.readonly);l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?Uee(t):""),d&&d.current&&(d.current.value=t?qee(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let b=Hee(v.target.value),x=new Date(t);x.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());let E=x.getTime();E&&r(E),s(!!E)},p=v=>{if(!v.target.value)return r();let b=Vee(v.target.value),x=new Date(t);x.setHours(b.getHours()),x.setMinutes(b.getMinutes());let E=x.getTime();E&&r(E),s(!!E)},m=Et(e);return y.createElement(Wee,null,y.createElement(A3,{type:"date",max:"9999-12-31",ref:u,id:`${m}-date`,name:`${m}-date`,readOnly:f,onChange:h,onFocus:n,onBlur:a}),y.createElement(A3,{type:"time",id:`${m}-time`,name:`${m}-time`,ref:d,onChange:p,readOnly:f,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},Kee=_.label({display:"flex"}),Yee=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},Zee=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Jee=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{var C;let[d,f]=l.useState(typeof t=="number"?t:""),[h,p]=l.useState(!1),[m,g]=l.useState(null),v=!!((C=u==null?void 0:u.table)!=null&&C.readonly),b=l.useCallback(w=>{f(w.target.value);let D=parseFloat(w.target.value);Number.isNaN(D)?g(new Error(`'${w.target.value}' is not a number`)):(r(D),g(null))},[r,g]),x=l.useCallback(()=>{f("0"),r(0),p(!0)},[p]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&f(t)},[t]),t===void 0?y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:x,disabled:v},"Set number"):y.createElement(Kee,null,y.createElement(Zee,{ref:E,id:Et(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:m?"error":null,autoFocus:h,readOnly:v,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},UD=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},Tp=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],qD=(e,t)=>e&&t&&e.map(r=>t[r]),Xee=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),Qee=_.span({"[aria-readonly=true] &":{opacity:.5}}),ete=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),k3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var p;if(!t)return dm.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=Tp(r,t),[s,u]=l.useState(i),d=!!((p=o==null?void 0:o.table)!=null&&p.readonly),f=m=>{let g=m.target.value,v=[...s];v.includes(g)?v.splice(v.indexOf(g),1):v.push(g),n(qD(v,t)),u(v)};l.useEffect(()=>{u(Tp(r,t))},[r]);let h=Et(e);return y.createElement(Xee,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,g)=>{let v=`${h}-${g}`;return y.createElement(ete,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:f,checked:s==null?void 0:s.includes(m)}),y.createElement(Qee,null,m))}))},tte=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),rte=_.span({"[aria-readonly=true] &":{opacity:.5}}),nte=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),_3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return dm.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=UD(r,t),s=Et(e),u=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return y.createElement(tte,{"aria-readonly":u,isInline:a},Object.keys(t).map((f,h)=>{let p=`${s}-${h}`;return y.createElement(nte,{key:p,htmlFor:p},y.createElement("input",{type:"radio",id:p,name:s,disabled:u,value:f,onChange:m=>n(t[m.currentTarget.value]),checked:f===i}),y.createElement(rte,null,f))}))},ate={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},WD=_.select(ate,({theme:e})=>({boxSizing:"border-box",position:"relative",padding:"6px 10px",width:"100%",color:e.input.color||"inherit",background:e.input.background,borderRadius:e.input.borderRadius,boxShadow:`${e.input.border} 0 0 0 1px inset`,fontSize:e.typography.size.s2-1,lineHeight:"20px","&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"::placeholder":{color:e.textMutedColor},"&[multiple]":{overflow:"auto",padding:0,option:{display:"block",padding:"6px 10px",marginLeft:1,marginRight:1}}})),GD=_.span(({theme:e})=>({display:"inline-block",lineHeight:"normal",overflow:"hidden",position:"relative",verticalAlign:"top",width:"100%",svg:{position:"absolute",zIndex:1,pointerEvents:"none",height:"12px",marginTop:"-6px",right:"12px",top:"50%",fill:e.textMutedColor,path:{fill:e.textMutedColor}}})),F3="Choose option...",ote=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{n(r[f.currentTarget.value])},i=UD(t,r)||F3,s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(AC,null),y.createElement(WD,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},F3),Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},ite=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{let h=Array.from(f.currentTarget.options).filter(p=>p.selected).map(p=>p.value);n(qD(h,r))},i=Tp(t,r),s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(WD,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},I3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(ite,{...e}):y.createElement(ote,{...e}):(dm.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},lte=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,ste={check:k3,"inline-check":k3,radio:_3,"inline-radio":_3,select:I3,"multi-select":I3},qn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?lte(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=ste[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},ute="Error",cte="Object",dte="Array",pte="String",fte="Number",hte="Boolean",mte="Date",gte="Null",vte="Undefined",yte="Function",bte="Symbol",KD="ADD_DELTA_TYPE",YD="REMOVE_DELTA_TYPE",ZD="UPDATE_DELTA_TYPE",fm="value",wte="key";function cn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e[Symbol.iterator]=="function"?"Iterable":Object.prototype.toString.call(e).slice(8,-1)}function JD(e,t){let r=cn(e),n=cn(t);return(r==="Function"||n==="Function")&&n!==r}var hm=class extends l.Component{constructor(e){super(e),this.state={inputRefKey:null,inputRefValue:null},this.refInputValue=this.refInputValue.bind(this),this.refInputKey=this.refInputKey.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onSubmit=this.onSubmit.bind(this)}componentDidMount(){let{inputRefKey:e,inputRefValue:t}=this.state,{onlyValue:r}=this.props;e&&typeof e.focus=="function"&&e.focus(),r&&t&&typeof t.focus=="function"&&t.focus(),document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.onSubmit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.props.handleCancel()))}onSubmit(){let{handleAdd:e,onlyValue:t,onSubmitValueParser:r,keyPath:n,deep:a}=this.props,{inputRefKey:o,inputRefValue:i}=this.state,s={};if(!t){if(!o.value)return;s.key=o.value}s.newValue=r(!1,n,a,s.key,i.value),e(s)}refInputKey(e){this.state.inputRefKey=e}refInputValue(e){this.state.inputRefValue=e}render(){let{handleCancel:e,onlyValue:t,addButtonElement:r,cancelButtonElement:n,inputElementGenerator:a,keyPath:o,deep:i}=this.props,s=l.cloneElement(r,{onClick:this.onSubmit}),u=l.cloneElement(n,{onClick:e}),d=a(fm,o,i),f=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let p=a(wte,o,i);h=l.cloneElement(p,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,f,u,s)}};hm.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var XD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={data:e.data,name:e.name,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveItem=this.handleRemoveItem.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleRemoveItem(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};n.splice(e,1),this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleAddValueAdd({newValue:e}){let{data:t,keyPath:r,nextDeep:n}=this.state,{beforeAddAction:a,logger:o}=this.props;a(t.length,r,n,e).then(()=>{let i=[...t,e];this.setState({data:i}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(r[r.length-1],i),u({type:KD,keyPath:r,deep:n,key:i.length-1,newValue:e})}).catch(o.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=i(e,t,r,n,s),h=o(e,t,r,n,s),p=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&p)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:T,ul:R,addForm:L}=f(e,t,r,n,h),z=d(e,t,r,n,h),M=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),O=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k});return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"["),!a&&M,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map(($,H)=>y.createElement(Xu,{key:H,name:H.toString(),data:$,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(H),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:L},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"]"),!z&&O)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{dataType:o,getStyle:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=i(e,r,n,a,o);return y.createElement("div",{className:"rejt-array-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};XD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var QD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,textareaElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=null,x=null,E=s(e,i,n,a,u);if(r&&!E){let C=p(fm,g,a,e,i,u),w=l.cloneElement(f,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(C,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:v.editForm},S," ",D,w),x=null}else{b=y.createElement("span",{className:"rejt-value",style:v.value,onClick:E?null:this.handleEditMode},t);let C=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});x=E?null:C}return y.createElement("li",{className:"rejt-function-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," :"," "),b,x)}};QD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Xu=class extends l.Component{constructor(e){super(e),this.state={data:e.data,name:e.name,keyPath:e.keyPath,deep:e.deep}}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}render(){let{data:e,name:t,keyPath:r,deep:n}=this.state,{isCollapsed:a,handleRemove:o,handleUpdateValue:i,onUpdate:s,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=cn(e);switch(k){case ute:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:A,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case cte:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case dte:return y.createElement(XD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case pte:return y.createElement(Er,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case fte:return y.createElement(Er,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case hte:return y.createElement(Er,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case mte:return y.createElement(Er,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case gte:return y.createElement(Er,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case vte:return y.createElement(Er,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case yte:return y.createElement(QD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,textareaElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case bte:return y.createElement(Er,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Xu.defaultProps={keyPath:[],deep:0};var Rp=class extends l.Component{constructor(e){super(e);let t=e.deep===-1?[]:[...e.keyPath,e.name];this.state={name:e.name,data:e.data,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveValue=this.handleRemoveValue.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleAddValueAdd({key:e,newValue:t}){let{data:r,keyPath:n,nextDeep:a}=this.state,{beforeAddAction:o,logger:i}=this.props;o(e,n,a,t).then(()=>{r[e]=t,this.setState({data:r}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(n[n.length-1],r),u({type:KD,keyPath:n,deep:a,key:e,newValue:t})}).catch(i.error)}handleRemoveValue(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};delete n[e],this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),p=o(e,n,t,r,i),m=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!p&&m)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:T,ul:R,delimiter:L}=f(e,t,r,n,h),z=Object.getOwnPropertyNames(t),M=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),$=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k}),H=z.map(K=>y.createElement(Xu,{key:K,name:K,data:t[K],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(K),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}));return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"{"),!M&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},H),!M&&o&&y.createElement("div",{className:"rejt-add-form",style:T},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"}"),!M&&$)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{getStyle:o,dataType:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=o(e,r,n,a,i);return y.createElement("div",{className:"rejt-object-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};Rp.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var Er=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,inputElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=s(e,i,n,a,u),x=r&&!b,E=p(fm,g,a,e,i,u),C=l.cloneElement(f,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});return y.createElement("li",{className:"rejt-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," : "),x?y.createElement("span",{className:"rejt-edit-form",style:v.editForm},D," ",w,C):y.createElement("span",{className:"rejt-value",style:v.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!x&&S)}};Er.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};function Ete(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var xte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Cte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Dte={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},eS=class extends l.Component{constructor(e){super(e),this.state={data:e.data,rootName:e.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data||e.rootName!==t.rootName?{data:e.data,rootName:e.rootName}:null}onUpdate(e,t){this.setState({data:t}),this.props.onFullyUpdate(t)}removeRoot(){this.onUpdate(null,null)}render(){let{data:e,rootName:t}=this.state,{isCollapsed:r,onDeltaUpdate:n,readOnly:a,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElement:d,textareaElement:f,minusMenuElement:h,plusMenuElement:p,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x,fallback:E=null}=this.props,C=cn(e),w=a;cn(a)==="Boolean"&&(w=()=>a);let D=d;d&&cn(d)!=="Function"&&(D=()=>d);let S=f;return f&&cn(f)!=="Function"&&(S=()=>f),C==="Object"||C==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Xu,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:w,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:h,plusMenuElement:p,handleRemove:this.removeRoot,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x})):E}};eS.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return xte;case"Array":return Cte;default:return Dte}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>Ete(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:Ste}=et,Ate=_.div(({theme:e})=>({position:"relative",display:"flex",'&[aria-readonly="true"]':{opacity:.5},".rejt-tree":{marginLeft:"1rem",fontSize:"13px"},".rejt-value-node, .rejt-object-node > .rejt-collapsed, .rejt-array-node > .rejt-collapsed, .rejt-object-node > .rejt-not-collapsed, .rejt-array-node > .rejt-not-collapsed":{"& > svg":{opacity:0,transition:"opacity 0.2s"}},".rejt-value-node:hover, .rejt-object-node:hover > .rejt-collapsed, .rejt-array-node:hover > .rejt-collapsed, .rejt-object-node:hover > .rejt-not-collapsed, .rejt-array-node:hover > .rejt-not-collapsed":{"& > svg":{opacity:1}},".rejt-edit-form button":{display:"none"},".rejt-add-form":{marginLeft:10},".rejt-add-value-node":{display:"inline-flex",alignItems:"center"},".rejt-name":{lineHeight:"22px"},".rejt-not-collapsed-delimiter":{lineHeight:"22px"},".rejt-plus-menu":{marginLeft:5},".rejt-object-node > span > *, .rejt-array-node > span > *":{position:"relative",zIndex:2},".rejt-object-node, .rejt-array-node":{position:"relative"},".rejt-object-node > span:first-of-type::after, .rejt-array-node > span:first-of-type::after, .rejt-collapsed::before, .rejt-not-collapsed::before":{content:'""',position:"absolute",top:0,display:"block",width:"100%",marginLeft:"-1rem",padding:"0 4px 0 1rem",height:22},".rejt-collapsed::before, .rejt-not-collapsed::before":{zIndex:1,background:"transparent",borderRadius:4,transition:"background 0.2s",pointerEvents:"none",opacity:.1},".rejt-object-node:hover, .rejt-array-node:hover":{"& > .rejt-collapsed::before, & > .rejt-not-collapsed::before":{background:e.color.secondary}},".rejt-collapsed::after, .rejt-not-collapsed::after":{content:'""',position:"absolute",display:"inline-block",pointerEvents:"none",width:0,height:0},".rejt-collapsed::after":{left:-8,top:8,borderTop:"3px solid transparent",borderBottom:"3px solid transparent",borderLeft:"3px solid rgba(153,153,153,0.6)"},".rejt-not-collapsed::after":{left:-10,top:10,borderTop:"3px solid rgba(153,153,153,0.6)",borderLeft:"3px solid transparent",borderRight:"3px solid transparent"},".rejt-value":{display:"inline-block",border:"1px solid transparent",borderRadius:4,margin:"1px 0",padding:"0 4px",cursor:"text",color:e.color.defaultText},".rejt-value-node:hover > .rejt-value":{background:e.color.lighter,borderColor:e.appBorderColor}})),Bd=_.button(({theme:e,primary:t})=>({border:0,height:20,margin:1,borderRadius:4,background:t?e.color.secondary:"transparent",color:t?e.color.lightest:e.color.dark,fontWeight:t?"bold":"normal",cursor:"pointer",order:t?"initial":9})),kte=_(s$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.ancillary},"svg + &":{marginLeft:0}})),_te=_(u$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.negative},"svg + &":{marginLeft:0}})),T3=_.input(({theme:e,placeholder:t})=>({outline:0,margin:t?1:"1px 0",padding:"3px 4px",color:e.color.defaultText,background:e.background.app,border:`1px solid ${e.appBorderColor}`,borderRadius:4,lineHeight:"14px",width:t==="Key"?80:120,"&:focus":{border:`1px solid ${e.color.secondary}`}})),Fte=_(hn)(({theme:e})=>({position:"absolute",zIndex:2,top:2,right:2,height:21,padding:"0 3px",background:e.background.bar,border:`1px solid ${e.appBorderColor}`,borderRadius:3,color:e.textMutedColor,fontSize:"9px",fontWeight:"bold",textDecoration:"none",span:{marginLeft:3,marginTop:1}})),Ite=_(Ti.Textarea)(({theme:e})=>({flex:1,padding:"7px 6px",fontFamily:e.typography.fonts.mono,fontSize:"12px",lineHeight:"18px","&::placeholder":{fontFamily:e.typography.fonts.base,fontSize:"13px"},"&:placeholder-shown":{padding:"7px 10px"}})),Tte={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},Rte=e=>{e.currentTarget.dispatchEvent(new Ste.KeyboardEvent("keydown",Tte))},Bte=e=>{e.currentTarget.select()},zte=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),R3=({name:e,value:t,onChange:r,argType:n})=>{var C;let a=hb(),o=l.useMemo(()=>t&&QZ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,f]=l.useState(null),h=!!((C=n==null?void 0:n.table)!=null&&C.readonly),p=l.useCallback(w=>{try{w&&r(JSON.parse(w)),f(void 0)}catch(D){f(D)}},[r]),[m,g]=l.useState(!1),v=l.useCallback(()=>{r({}),g(!0)},[g]),b=l.useRef(null);if(l.useEffect(()=>{m&&b.current&&b.current.select()},[m]),!i)return y.createElement(In,{disabled:h,id:Ns(e),onClick:v},"Set object");let x=y.createElement(Ite,{ref:b,id:Et(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:w=>p(w.target.value),placeholder:"Edit JSON string...",autoFocus:m,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return y.createElement(Ate,{"aria-readonly":h},E&&y.createElement(Fte,{onClick:w=>{w.preventDefault(),u(D=>!D)}},s?y.createElement(i$,null):y.createElement(o$,null),y.createElement("span",null,"RAW")),s?x:y.createElement(eS,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:zte(a),cancelButtonElement:y.createElement(Bd,{type:"button"},"Cancel"),editButtonElement:y.createElement(Bd,{type:"submit"},"Save"),addButtonElement:y.createElement(Bd,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement(kte,null),minusMenuElement:y.createElement(_te,null),inputElement:(w,D,S,A)=>A?y.createElement(T3,{onFocus:Bte,onBlur:Rte}):y.createElement(T3,null),fallback:x}))},Ote=_.input(({theme:e,min:t,max:r,value:n,disabled:a})=>({"&":{width:"100%",backgroundColor:"transparent",appearance:"none"},"&::-webkit-slider-runnable-track":{background:e.base==="light"?`linear-gradient(to right, + */const{global:et}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:tee,once:ree,logger:dm}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:x3,composeConfigs:lae,Preview:sae,DocsContext:uae}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:C3,UPDATE_STORY_ARGS:nee,RESET_STORY_ARGS:aee,GLOBALS_UPDATED:D3,NAVIGATE_URL:oee}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var iee=Ra({"../../node_modules/tocbot/src/js/default-options.js"(e,t){t.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(r){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(r){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0}}}),lee=Ra({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,s=!0,u=" ";function d(w,D){var S=D.appendChild(h(w));if(w.children.length){var A=p(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function f(w,D){var S=!1,A=p(S);if(D.forEach(function(k){d(k,A)}),i=w||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(A)}function h(w){var D=document.createElement("li"),S=document.createElement("a");return r.listItemClass&&D.setAttribute("class",r.listItemClass),r.onClick&&(S.onclick=r.onClick),r.includeTitleTags&&S.setAttribute("title",w.textContent),r.includeHtml&&w.childNodes.length?n.call(w.childNodes,function(A){S.appendChild(A.cloneNode(!0))}):S.textContent=w.textContent,S.setAttribute("href",r.basePath+"#"+w.id),S.setAttribute("class",r.linkClass+u+"node-name--"+w.nodeName+u+r.extraLinkClasses),D.appendChild(S),D}function p(w){var D=r.orderedList?"ol":"ul",S=document.createElement(D),A=r.listClass+u+r.extraListClasses;return w&&(A=A+u+r.collapsibleClass,A=A+u+r.isCollapsedClass),S.setAttribute("class",A),S}function m(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var w;w=document.querySelector(r.scrollContainer).scrollTop}else w=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),w>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=u+r.positionFixedClass):D.className=D.className.replace(u+r.positionFixedClass,"")}function g(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=g(w.offsetParent))),D}function v(w,D){return w&&w.className!==D&&(w.className=D),w}function b(w){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&m();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(M,O){if(g(M)>D+r.headingsOffset+10){var $=O===0?O:O-1;return A=S[$],!0}else if(O===S.length-1)return A=S[S.length-1],!0});var k=i.querySelector("."+r.activeLinkClass),F=i.querySelector("."+r.linkClass+".node-name--"+A.nodeName+'[href="'+r.basePath+"#"+A.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(k===F)return;var T=i.querySelectorAll("."+r.linkClass);n.call(T,function(M){v(M,M.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(M){v(M,M.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var L=F&&F.parentNode;L&&L.className.indexOf(r.activeListItemClass)===-1&&(L.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(M){M.className.indexOf(r.isCollapsedClass)===-1&&(M.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&v(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),x(F&&F.parentNode.parentNode)}}function x(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(v(w,w.className.replace(u+r.isCollapsedClass,"")),x(w.parentNode.parentNode)):w}function E(w){var D=w.target||w.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(s=!1)}function C(){s=!0}return{enableTocAnimation:C,disableTocAnimation:E,render:f,updateToc:b}}}}),see=Ra({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(h){return h[h.length-1]}function o(h){return+h.nodeName.toUpperCase().replace("H","")}function i(h){try{return h instanceof window.HTMLElement||h instanceof window.parent.HTMLElement}catch{return h instanceof window.HTMLElement}}function s(h){if(!i(h))return h;if(r.ignoreHiddenElements&&(!h.offsetHeight||!h.offsetParent))return null;let p=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var m={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:p};return r.includeHtml&&(m.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(m,h):m}function u(h,p){for(var m=s(h),g=m.headingLevel,v=p,b=a(v),x=b?b.headingLevel:0,E=g-x;E>0&&(b=a(v),!(b&&g===b.headingLevel));)b&&b.children!==void 0&&(v=b.children),E--;return g>=r.collapseDepth&&(m.isCollapsed=!0),v.push(m),v}function d(h,p){var m=p;r.ignoreSelector&&(m=p.split(",").map(function(g){return g.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(m)}catch{return console.warn("Headers not found with selector: "+m),null}}function f(h){return n.call(h,function(p,m){var g=s(m);return g&&u(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:f,selectHeadings:d}}}}),uee=Ra({"../../node_modules/tocbot/src/js/update-toc-scroll.js"(e,t){t.exports=function(r){var n=r.tocElement||document.querySelector(r.tocSelector);if(n&&n.scrollHeight>n.clientHeight){var a=n.querySelector("."+r.activeListItemClass);a&&(n.scrollTop=a.offsetTop-r.tocScrollOffset)}}}}),cee=Ra({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(e){e.initSmoothScrolling=t;function t(n){var a=n.duration,o=n.offset,i=location.hash?d(location.href):location.href;s();function s(){document.body.addEventListener("click",h,!1);function h(p){!u(p.target)||p.target.className.indexOf("no-smooth-scroll")>-1||p.target.href.charAt(p.target.href.length-2)==="#"&&p.target.href.charAt(p.target.href.length-1)==="!"||p.target.className.indexOf(n.linkClass)===-1||r(p.target.hash,{duration:a,offset:o,callback:function(){f(p.target.hash)}})}}function u(h){return h.tagName.toLowerCase()==="a"&&(h.hash.length>0||h.href.charAt(h.href.length-1)==="#")&&(d(h.href)===i||d(h.href)+"#"===i)}function d(h){return h.slice(0,h.lastIndexOf("#"))}function f(h){var p=document.getElementById(h.substring(1));p&&(/^(?:a|select|input|button|textarea)$/i.test(p.tagName)||(p.tabIndex=-1),p.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||g},s=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),u=typeof n=="string"?i.offset+(n?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(u):i.duration,f,h;requestAnimationFrame(function(v){f=v,p(v)});function p(v){h=v-f,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var p,m=Object.prototype.hasOwnProperty;function g(){for(var E={},C=0;C({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:se(.3,e.color.defaultText),fontSize:e.typography.size.s2})),PD=e=>y.createElement(pee,{...e,className:"docblock-emptyblock sb-unstyled"}),fee=_(Ih)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),hee=_.div(({theme:e})=>({background:e.background.content,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),gl=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${jd}`]:{margin:0}})),mee=()=>y.createElement(hee,null,y.createElement(gl,null),y.createElement(gl,{style:{width:"80%"}}),y.createElement(gl,{style:{width:"30%"}}),y.createElement(gl,{style:{width:"80%"}})),ND=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=hb();if(e)return y.createElement(mee,null);if(t)return y.createElement(PD,null,t);let u=y.createElement(fee,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?Pd.dark:Pd.light;return y.createElement(mb,{theme:Nd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},ve=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,pm=600,gee=_.h1(de,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),vee=_.h2(de,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:se(.25,e.color.defaultText)})),yee=_.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?se(.1,e.color.defaultText):se(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[ve("a")]:{...t,fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[ve("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[ve("div")]:t,[ve("dl")]:{...t,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[ve("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[ve("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[ve("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[ve("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[ve("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[ve("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[ve("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[ve("img")]:{maxWidth:"100%"},[ve("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[ve("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[ve("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[ve("pre")]:{...t,fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[ve("span")]:{...t,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[ve("table")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[ve("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),bee=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${pm}px)`]:{}})),wee=({children:e,toc:t})=>y.createElement(bee,{className:"sbdocs sbdocs-wrapper"},y.createElement(yee,{className:"sbdocs sbdocs-content"},e),t),Ju=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:Eee}=et,xee=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=Eee.document.getElementById(e)}shouldComponentUpdate(e){let{scale:t}=e;return t!==this.props.scale&&this.setIframeBodyStyle({width:`${t*100}%`,height:`${t*100}%`,transform:`scale(${1/t})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(e){return Object.assign(this.iframe.contentDocument.body.style,e)}render(){let{id:e,title:t,src:r,allowFullScreen:n,scale:a,...o}=this.props;return y.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},jD=l.createContext({scale:1}),{PREVIEW_URL:Cee}=et,Dee=Cee||"iframe.html",Ip=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,See=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:f}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,p=f(i,h,{showMain:()=>{},showError:({title:m,description:g})=>o(new Error(`${m} - ${g}`)),showException:m=>o(m)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>p())}},[u,f,i]),a?y.createElement("pre",null,y.createElement(QO,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${Ip(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(HD,null),y.createElement("div",{ref:t,id:`${Ip(e)}-inner`,"data-name":i.name}))},Aee=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(jD.Consumer,null,({scale:r})=>y.createElement(xee,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:xM(Dee,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),kee=_.strong(({theme:e})=>({color:e.color.orange})),_ee=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(kee,null,"This story mounts inside of play. Set"," ",y.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):y.createElement("div",{id:Ip(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(See,{...e}):y.createElement(Aee,{...e}))},HD=()=>y.createElement(EM,null),Fee=_(Ph)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Iee=_.div({display:"flex",alignItems:"center",gap:4}),Tee=_.div(({theme:e})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),Ree=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(Fee,{...o},y.createElement(Iee,{key:"left"},e?[1,2,3].map(i=>y.createElement(Tee,{key:i})):y.createElement(y.Fragment,null,y.createElement(hn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(r$,null)),y.createElement(hn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(n$,null)),y.createElement(hn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(a$,null))))),Bee=_.div(({isColumn:e,columns:t,layout:r})=>({display:e||!t?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:e?"column":"row","& .innerZoomElementWrapper > *":e?{width:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout:e="padded"})=>e==="centered"||e==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout:e="padded"})=>e==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns:e})=>e&&e>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${e} - 20px)`}}:{}),S3=_(ND)(({theme:e})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:e.appBorderRadius,borderBottomRightRadius:e.appBorderRadius,border:"none",background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content)}})),zee=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Ju(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),Oee=(e,t,r)=>{switch(!0){case!!(e&&e.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>r(!1)}};case t:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function Lee(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var Mee=_(Ree)({position:"absolute",top:0,left:0,right:0,height:40}),$ee=_.div({overflow:"hidden",position:"relative"}),VD=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...f})=>{let[h,p]=l.useState(i),{source:m,actionItem:g}=Oee(a,h,p),[v,b]=l.useState(1),x=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[g]:[],[C,w]=l.useState(s?[...s]:[]),D=[...E,...C],{window:S}=et,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:T}=await $3(()=>import("./index-BlTEvAze.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);T()},[]),k=F=>{let T=S.getSelection();T&&T.type==="Range"||(F.preventDefault(),C.filter(R=>R.title==="Copied").length===0&&A(m.props.code).then(()=>{w([...C,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(C.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(zee,{withSource:a,withToolbar:o,...f,className:x.join(" ")},o&&y.createElement(Mee,{isLoading:e,border:!0,zoom:F=>b(v*F),resetZoom:()=>b(1),storyId:Lee(n),baseUrl:"./iframe.html"}),y.createElement(jD.Provider,{value:{scale:v}},y.createElement($ee,{className:"docs-story",onCopyCapture:a&&k},y.createElement(Bee,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(qO.Element,{scale:v},Array.isArray(n)?n.map((F,T)=>y.createElement("div",{key:T},F)):y.createElement("div",null,n))),y.createElement(pf,{actionItems:D}))),a&&h&&m)};_(VD)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Pee=_.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:se(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${pl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${pl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:pl(1,e.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:e.boolean.selectedBackground,boxShadow:e.base==="light"?`${pl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),Nee=e=>e==="true",jee=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var f;let i=l.useCallback(()=>r(!1),[r]),s=!!((f=o==null?void 0:o.table)!=null&&f.readonly);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:i,disabled:s},"Set boolean");let u=Et(e),d=typeof t=="string"?Nee(t):t;return y.createElement(Pee,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:h=>r(h.target.checked),checked:d,role:"switch",disabled:s,name:e,onBlur:n,onFocus:a}),y.createElement("span",{"aria-hidden":"true"},"False"),y.createElement("span",{"aria-hidden":"true"},"True"))},Hee=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},Vee=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},Uee=e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),a=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${a}`},qee=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},A3=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Wee=_.div(({theme:e})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:e.base==="light"?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}})),Gee=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var g;let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),f=!!((g=o==null?void 0:o.table)!=null&&g.readonly);l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?Uee(t):""),d&&d.current&&(d.current.value=t?qee(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let b=Hee(v.target.value),x=new Date(t);x.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());let E=x.getTime();E&&r(E),s(!!E)},p=v=>{if(!v.target.value)return r();let b=Vee(v.target.value),x=new Date(t);x.setHours(b.getHours()),x.setMinutes(b.getMinutes());let E=x.getTime();E&&r(E),s(!!E)},m=Et(e);return y.createElement(Wee,null,y.createElement(A3,{type:"date",max:"9999-12-31",ref:u,id:`${m}-date`,name:`${m}-date`,readOnly:f,onChange:h,onFocus:n,onBlur:a}),y.createElement(A3,{type:"time",id:`${m}-time`,name:`${m}-time`,ref:d,onChange:p,readOnly:f,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},Kee=_.label({display:"flex"}),Yee=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},Zee=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Jee=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{var C;let[d,f]=l.useState(typeof t=="number"?t:""),[h,p]=l.useState(!1),[m,g]=l.useState(null),v=!!((C=u==null?void 0:u.table)!=null&&C.readonly),b=l.useCallback(w=>{f(w.target.value);let D=parseFloat(w.target.value);Number.isNaN(D)?g(new Error(`'${w.target.value}' is not a number`)):(r(D),g(null))},[r,g]),x=l.useCallback(()=>{f("0"),r(0),p(!0)},[p]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&f(t)},[t]),t===void 0?y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:x,disabled:v},"Set number"):y.createElement(Kee,null,y.createElement(Zee,{ref:E,id:Et(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:m?"error":null,autoFocus:h,readOnly:v,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},UD=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},Tp=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],qD=(e,t)=>e&&t&&e.map(r=>t[r]),Xee=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),Qee=_.span({"[aria-readonly=true] &":{opacity:.5}}),ete=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),k3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var p;if(!t)return dm.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=Tp(r,t),[s,u]=l.useState(i),d=!!((p=o==null?void 0:o.table)!=null&&p.readonly),f=m=>{let g=m.target.value,v=[...s];v.includes(g)?v.splice(v.indexOf(g),1):v.push(g),n(qD(v,t)),u(v)};l.useEffect(()=>{u(Tp(r,t))},[r]);let h=Et(e);return y.createElement(Xee,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,g)=>{let v=`${h}-${g}`;return y.createElement(ete,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:f,checked:s==null?void 0:s.includes(m)}),y.createElement(Qee,null,m))}))},tte=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),rte=_.span({"[aria-readonly=true] &":{opacity:.5}}),nte=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),_3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return dm.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=UD(r,t),s=Et(e),u=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return y.createElement(tte,{"aria-readonly":u,isInline:a},Object.keys(t).map((f,h)=>{let p=`${s}-${h}`;return y.createElement(nte,{key:p,htmlFor:p},y.createElement("input",{type:"radio",id:p,name:s,disabled:u,value:f,onChange:m=>n(t[m.currentTarget.value]),checked:f===i}),y.createElement(rte,null,f))}))},ate={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},WD=_.select(ate,({theme:e})=>({boxSizing:"border-box",position:"relative",padding:"6px 10px",width:"100%",color:e.input.color||"inherit",background:e.input.background,borderRadius:e.input.borderRadius,boxShadow:`${e.input.border} 0 0 0 1px inset`,fontSize:e.typography.size.s2-1,lineHeight:"20px","&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"::placeholder":{color:e.textMutedColor},"&[multiple]":{overflow:"auto",padding:0,option:{display:"block",padding:"6px 10px",marginLeft:1,marginRight:1}}})),GD=_.span(({theme:e})=>({display:"inline-block",lineHeight:"normal",overflow:"hidden",position:"relative",verticalAlign:"top",width:"100%",svg:{position:"absolute",zIndex:1,pointerEvents:"none",height:"12px",marginTop:"-6px",right:"12px",top:"50%",fill:e.textMutedColor,path:{fill:e.textMutedColor}}})),F3="Choose option...",ote=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{n(r[f.currentTarget.value])},i=UD(t,r)||F3,s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(AC,null),y.createElement(WD,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},F3),Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},ite=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{let h=Array.from(f.currentTarget.options).filter(p=>p.selected).map(p=>p.value);n(qD(h,r))},i=Tp(t,r),s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(WD,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},I3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(ite,{...e}):y.createElement(ote,{...e}):(dm.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},lte=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,ste={check:k3,"inline-check":k3,radio:_3,"inline-radio":_3,select:I3,"multi-select":I3},qn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?lte(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=ste[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},ute="Error",cte="Object",dte="Array",pte="String",fte="Number",hte="Boolean",mte="Date",gte="Null",vte="Undefined",yte="Function",bte="Symbol",KD="ADD_DELTA_TYPE",YD="REMOVE_DELTA_TYPE",ZD="UPDATE_DELTA_TYPE",fm="value",wte="key";function cn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e[Symbol.iterator]=="function"?"Iterable":Object.prototype.toString.call(e).slice(8,-1)}function JD(e,t){let r=cn(e),n=cn(t);return(r==="Function"||n==="Function")&&n!==r}var hm=class extends l.Component{constructor(e){super(e),this.state={inputRefKey:null,inputRefValue:null},this.refInputValue=this.refInputValue.bind(this),this.refInputKey=this.refInputKey.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onSubmit=this.onSubmit.bind(this)}componentDidMount(){let{inputRefKey:e,inputRefValue:t}=this.state,{onlyValue:r}=this.props;e&&typeof e.focus=="function"&&e.focus(),r&&t&&typeof t.focus=="function"&&t.focus(),document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.onSubmit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.props.handleCancel()))}onSubmit(){let{handleAdd:e,onlyValue:t,onSubmitValueParser:r,keyPath:n,deep:a}=this.props,{inputRefKey:o,inputRefValue:i}=this.state,s={};if(!t){if(!o.value)return;s.key=o.value}s.newValue=r(!1,n,a,s.key,i.value),e(s)}refInputKey(e){this.state.inputRefKey=e}refInputValue(e){this.state.inputRefValue=e}render(){let{handleCancel:e,onlyValue:t,addButtonElement:r,cancelButtonElement:n,inputElementGenerator:a,keyPath:o,deep:i}=this.props,s=l.cloneElement(r,{onClick:this.onSubmit}),u=l.cloneElement(n,{onClick:e}),d=a(fm,o,i),f=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let p=a(wte,o,i);h=l.cloneElement(p,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,f,u,s)}};hm.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var XD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={data:e.data,name:e.name,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveItem=this.handleRemoveItem.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleRemoveItem(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};n.splice(e,1),this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleAddValueAdd({newValue:e}){let{data:t,keyPath:r,nextDeep:n}=this.state,{beforeAddAction:a,logger:o}=this.props;a(t.length,r,n,e).then(()=>{let i=[...t,e];this.setState({data:i}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(r[r.length-1],i),u({type:KD,keyPath:r,deep:n,key:i.length-1,newValue:e})}).catch(o.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=i(e,t,r,n,s),h=o(e,t,r,n,s),p=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&p)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:T,ul:R,addForm:L}=f(e,t,r,n,h),z=d(e,t,r,n,h),M=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),O=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k});return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"["),!a&&M,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map(($,H)=>y.createElement(Xu,{key:H,name:H.toString(),data:$,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(H),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:L},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"]"),!z&&O)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{dataType:o,getStyle:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=i(e,r,n,a,o);return y.createElement("div",{className:"rejt-array-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};XD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var QD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,textareaElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=null,x=null,E=s(e,i,n,a,u);if(r&&!E){let C=p(fm,g,a,e,i,u),w=l.cloneElement(f,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(C,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:v.editForm},S," ",D,w),x=null}else{b=y.createElement("span",{className:"rejt-value",style:v.value,onClick:E?null:this.handleEditMode},t);let C=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});x=E?null:C}return y.createElement("li",{className:"rejt-function-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," :"," "),b,x)}};QD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Xu=class extends l.Component{constructor(e){super(e),this.state={data:e.data,name:e.name,keyPath:e.keyPath,deep:e.deep}}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}render(){let{data:e,name:t,keyPath:r,deep:n}=this.state,{isCollapsed:a,handleRemove:o,handleUpdateValue:i,onUpdate:s,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=cn(e);switch(k){case ute:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:A,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case cte:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case dte:return y.createElement(XD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case pte:return y.createElement(Er,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case fte:return y.createElement(Er,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case hte:return y.createElement(Er,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case mte:return y.createElement(Er,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case gte:return y.createElement(Er,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case vte:return y.createElement(Er,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case yte:return y.createElement(QD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,textareaElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case bte:return y.createElement(Er,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Xu.defaultProps={keyPath:[],deep:0};var Rp=class extends l.Component{constructor(e){super(e);let t=e.deep===-1?[]:[...e.keyPath,e.name];this.state={name:e.name,data:e.data,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveValue=this.handleRemoveValue.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleAddValueAdd({key:e,newValue:t}){let{data:r,keyPath:n,nextDeep:a}=this.state,{beforeAddAction:o,logger:i}=this.props;o(e,n,a,t).then(()=>{r[e]=t,this.setState({data:r}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(n[n.length-1],r),u({type:KD,keyPath:n,deep:a,key:e,newValue:t})}).catch(i.error)}handleRemoveValue(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};delete n[e],this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),p=o(e,n,t,r,i),m=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!p&&m)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:T,ul:R,delimiter:L}=f(e,t,r,n,h),z=Object.getOwnPropertyNames(t),M=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),$=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k}),H=z.map(K=>y.createElement(Xu,{key:K,name:K,data:t[K],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(K),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}));return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"{"),!M&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},H),!M&&o&&y.createElement("div",{className:"rejt-add-form",style:T},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"}"),!M&&$)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{getStyle:o,dataType:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=o(e,r,n,a,i);return y.createElement("div",{className:"rejt-object-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};Rp.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var Er=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,inputElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=s(e,i,n,a,u),x=r&&!b,E=p(fm,g,a,e,i,u),C=l.cloneElement(f,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});return y.createElement("li",{className:"rejt-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," : "),x?y.createElement("span",{className:"rejt-edit-form",style:v.editForm},D," ",w,C):y.createElement("span",{className:"rejt-value",style:v.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!x&&S)}};Er.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};function Ete(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var xte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Cte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Dte={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},eS=class extends l.Component{constructor(e){super(e),this.state={data:e.data,rootName:e.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data||e.rootName!==t.rootName?{data:e.data,rootName:e.rootName}:null}onUpdate(e,t){this.setState({data:t}),this.props.onFullyUpdate(t)}removeRoot(){this.onUpdate(null,null)}render(){let{data:e,rootName:t}=this.state,{isCollapsed:r,onDeltaUpdate:n,readOnly:a,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElement:d,textareaElement:f,minusMenuElement:h,plusMenuElement:p,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x,fallback:E=null}=this.props,C=cn(e),w=a;cn(a)==="Boolean"&&(w=()=>a);let D=d;d&&cn(d)!=="Function"&&(D=()=>d);let S=f;return f&&cn(f)!=="Function"&&(S=()=>f),C==="Object"||C==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Xu,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:w,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:h,plusMenuElement:p,handleRemove:this.removeRoot,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x})):E}};eS.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return xte;case"Array":return Cte;default:return Dte}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>Ete(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:Ste}=et,Ate=_.div(({theme:e})=>({position:"relative",display:"flex",'&[aria-readonly="true"]':{opacity:.5},".rejt-tree":{marginLeft:"1rem",fontSize:"13px"},".rejt-value-node, .rejt-object-node > .rejt-collapsed, .rejt-array-node > .rejt-collapsed, .rejt-object-node > .rejt-not-collapsed, .rejt-array-node > .rejt-not-collapsed":{"& > svg":{opacity:0,transition:"opacity 0.2s"}},".rejt-value-node:hover, .rejt-object-node:hover > .rejt-collapsed, .rejt-array-node:hover > .rejt-collapsed, .rejt-object-node:hover > .rejt-not-collapsed, .rejt-array-node:hover > .rejt-not-collapsed":{"& > svg":{opacity:1}},".rejt-edit-form button":{display:"none"},".rejt-add-form":{marginLeft:10},".rejt-add-value-node":{display:"inline-flex",alignItems:"center"},".rejt-name":{lineHeight:"22px"},".rejt-not-collapsed-delimiter":{lineHeight:"22px"},".rejt-plus-menu":{marginLeft:5},".rejt-object-node > span > *, .rejt-array-node > span > *":{position:"relative",zIndex:2},".rejt-object-node, .rejt-array-node":{position:"relative"},".rejt-object-node > span:first-of-type::after, .rejt-array-node > span:first-of-type::after, .rejt-collapsed::before, .rejt-not-collapsed::before":{content:'""',position:"absolute",top:0,display:"block",width:"100%",marginLeft:"-1rem",padding:"0 4px 0 1rem",height:22},".rejt-collapsed::before, .rejt-not-collapsed::before":{zIndex:1,background:"transparent",borderRadius:4,transition:"background 0.2s",pointerEvents:"none",opacity:.1},".rejt-object-node:hover, .rejt-array-node:hover":{"& > .rejt-collapsed::before, & > .rejt-not-collapsed::before":{background:e.color.secondary}},".rejt-collapsed::after, .rejt-not-collapsed::after":{content:'""',position:"absolute",display:"inline-block",pointerEvents:"none",width:0,height:0},".rejt-collapsed::after":{left:-8,top:8,borderTop:"3px solid transparent",borderBottom:"3px solid transparent",borderLeft:"3px solid rgba(153,153,153,0.6)"},".rejt-not-collapsed::after":{left:-10,top:10,borderTop:"3px solid rgba(153,153,153,0.6)",borderLeft:"3px solid transparent",borderRight:"3px solid transparent"},".rejt-value":{display:"inline-block",border:"1px solid transparent",borderRadius:4,margin:"1px 0",padding:"0 4px",cursor:"text",color:e.color.defaultText},".rejt-value-node:hover > .rejt-value":{background:e.color.lighter,borderColor:e.appBorderColor}})),Bd=_.button(({theme:e,primary:t})=>({border:0,height:20,margin:1,borderRadius:4,background:t?e.color.secondary:"transparent",color:t?e.color.lightest:e.color.dark,fontWeight:t?"bold":"normal",cursor:"pointer",order:t?"initial":9})),kte=_(s$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.ancillary},"svg + &":{marginLeft:0}})),_te=_(u$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.negative},"svg + &":{marginLeft:0}})),T3=_.input(({theme:e,placeholder:t})=>({outline:0,margin:t?1:"1px 0",padding:"3px 4px",color:e.color.defaultText,background:e.background.app,border:`1px solid ${e.appBorderColor}`,borderRadius:4,lineHeight:"14px",width:t==="Key"?80:120,"&:focus":{border:`1px solid ${e.color.secondary}`}})),Fte=_(hn)(({theme:e})=>({position:"absolute",zIndex:2,top:2,right:2,height:21,padding:"0 3px",background:e.background.bar,border:`1px solid ${e.appBorderColor}`,borderRadius:3,color:e.textMutedColor,fontSize:"9px",fontWeight:"bold",textDecoration:"none",span:{marginLeft:3,marginTop:1}})),Ite=_(Ti.Textarea)(({theme:e})=>({flex:1,padding:"7px 6px",fontFamily:e.typography.fonts.mono,fontSize:"12px",lineHeight:"18px","&::placeholder":{fontFamily:e.typography.fonts.base,fontSize:"13px"},"&:placeholder-shown":{padding:"7px 10px"}})),Tte={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},Rte=e=>{e.currentTarget.dispatchEvent(new Ste.KeyboardEvent("keydown",Tte))},Bte=e=>{e.currentTarget.select()},zte=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),R3=({name:e,value:t,onChange:r,argType:n})=>{var C;let a=hb(),o=l.useMemo(()=>t&&QZ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,f]=l.useState(null),h=!!((C=n==null?void 0:n.table)!=null&&C.readonly),p=l.useCallback(w=>{try{w&&r(JSON.parse(w)),f(void 0)}catch(D){f(D)}},[r]),[m,g]=l.useState(!1),v=l.useCallback(()=>{r({}),g(!0)},[g]),b=l.useRef(null);if(l.useEffect(()=>{m&&b.current&&b.current.select()},[m]),!i)return y.createElement(In,{disabled:h,id:Ns(e),onClick:v},"Set object");let x=y.createElement(Ite,{ref:b,id:Et(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:w=>p(w.target.value),placeholder:"Edit JSON string...",autoFocus:m,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return y.createElement(Ate,{"aria-readonly":h},E&&y.createElement(Fte,{onClick:w=>{w.preventDefault(),u(D=>!D)}},s?y.createElement(i$,null):y.createElement(o$,null),y.createElement("span",null,"RAW")),s?x:y.createElement(eS,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:zte(a),cancelButtonElement:y.createElement(Bd,{type:"button"},"Cancel"),editButtonElement:y.createElement(Bd,{type:"submit"},"Save"),addButtonElement:y.createElement(Bd,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement(kte,null),minusMenuElement:y.createElement(_te,null),inputElement:(w,D,S,A)=>A?y.createElement(T3,{onFocus:Bte,onBlur:Rte}):y.createElement(T3,null),fallback:x}))},Ote=_.input(({theme:e,min:t,max:r,value:n,disabled:a})=>({"&":{width:"100%",backgroundColor:"transparent",appearance:"none"},"&::-webkit-slider-runnable-track":{background:e.base==="light"?`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Ot(.02,e.input.background)} ${(n-t)/(r-t)*100}%, ${Ot(.02,e.input.background)} 100%)`:`linear-gradient(to right, @@ -576,7 +576,7 @@ ${t}`);let r=t.match(YO);if(!r)return y.createElement(l.Fragment,null,t);let[,n, ${Ot(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${tn(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${tn(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${sr(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),tS=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Lte=_(tS)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),Mte=_.div({display:"flex",alignItems:"center",width:"100%"});function $te(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var Pte=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{var m;let d=g=>{r(Yee(g.target.value))},f=t!==void 0,h=l.useMemo(()=>$te(o),[o]),p=!!((m=u==null?void 0:u.table)!=null&&m.readonly);return y.createElement(Mte,{"aria-readonly":p},y.createElement(tS,null,n),y.createElement(Ote,{id:Et(e),type:"range",disabled:p,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Lte,{numberOFDecimalsPlaces:h,max:a},f?t.toFixed(h):"--"," / ",a))},Nte=_.label({display:"flex"}),jte=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),Hte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var m;let s=g=>{r(g.target.value)},u=!!((m=i==null?void 0:i.table)!=null&&m.readonly),[d,f]=l.useState(!1),h=l.useCallback(()=>{r(""),f(!0)},[f]);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",disabled:u,id:Ns(e),onClick:h},"Set string");let p=typeof t=="string";return y.createElement(Nte,null,y.createElement(Ti.Textarea,{id:Et(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),o&&y.createElement(jte,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Vte=_(Ti.Input)({padding:10});function Ute(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var qte=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var u;let o=l.useRef(null),i=(u=a==null?void 0:a.control)==null?void 0:u.readOnly;function s(d){if(!d.target.files)return;let f=Array.from(d.target.files).map(h=>URL.createObjectURL(h));e(f),Ute(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(Vte,{ref:o,id:Et(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},Wte=l.lazy(()=>$3(()=>import("./Color-ERTF36HU-rlRgfIB0.js"),__vite__mapDeps([8,2,1,3,4,5,6,7]),import.meta.url)),Gte=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(Wte,{...e})),Kte={array:R3,object:R3,boolean:jee,color:Gte,date:Gee,number:Jee,check:qn,"inline-check":qn,radio:qn,"inline-radio":qn,select:qn,"multi-select":qn,range:Pte,text:Hte,file:qte},B3=()=>y.createElement(y.Fragment,null,"-"),Yte=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var v;let{key:a,control:o}=e,[i,s]=l.useState(!1),[u,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let f=l.useCallback(b=>(d({value:b}),r({[a]:b}),b),[r,a]),h=l.useCallback(()=>s(!1),[]),p=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let b=(o==null?void 0:o.disable)!==!0&&((v=e==null?void 0:e.type)==null?void 0:v.name)!=="function";return n&&b?y.createElement(da,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(B3,null)}let m={name:a,argType:e,value:u.value,onChange:f,onBlur:h,onFocus:p},g=Kte[o.type]||B3;return y.createElement(g,{...m,...o,controlType:o.type})},Zte=_.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:jr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),Jte=({tags:e})=>{let t=(e.params||[]).filter(o=>o.description),r=t.length!==0,n=e.deprecated!=null,a=e.returns!=null&&e.returns.description!=null;return!r&&!a&&!n?null:y.createElement(y.Fragment,null,y.createElement(Zte,null,y.createElement("tbody",null,n&&y.createElement("tr",{key:"deprecated"},y.createElement("td",{colSpan:2},y.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>y.createElement("tr",{key:o.name},y.createElement("td",null,y.createElement("code",null,o.name)),y.createElement("td",null,o.description))),a&&y.createElement("tr",{key:"returns"},y.createElement("td",null,y.createElement("code",null,"Returns")),y.createElement("td",null,e.returns.description)))))},Bp=8,z3=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Xte=_.span(jr,({theme:e,simple:t=!1})=>({flex:"0 0 auto",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...t&&{background:"transparent",border:"0 none",paddingLeft:0}})),Qte=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),ere=_.div(jr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),tre=_.div(({theme:e,width:t})=>({width:t,minWidth:200,maxWidth:800,padding:15,fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),rre=_(f$)({marginLeft:4}),nre=_(AC)({marginLeft:4}),are=()=>y.createElement("span",null,"-"),rS=({text:e,simple:t})=>y.createElement(Xte,{simple:t},e),ore=_D(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),ire=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return OJ(t)},O3=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Bp)),r.map(n=>y.createElement(rS,{key:n,text:n===""?'""':n}))},lre=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=l.useState(!1),[i,s]=l.useState(t||!1);if(r==null)return null;let u=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(u))return y.createElement(rS,{text:u});let d=ire(u),f=d.length;return f>Bp?y.createElement(z3,{isExpanded:i},O3(d,i),y.createElement(Qte,{onClick:()=>s(!i)},i?"Show less...":`Show ${f-Bp} more...`)):y.createElement(z3,null,O3(d))}return y.createElement(SL,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(tre,{width:ore(n)},y.createElement(Ih,{language:"jsx",format:!1},n))},y.createElement(ere,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(rre,null):y.createElement(nre,null)))},zd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(are,null):y.createElement(lre,{value:e,initialExpandedArgs:t}),sre=_.span({fontWeight:"bold"}),ure=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),cre=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...jr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),dre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?4:0})),pre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),fre=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),hre=e=>e&&{summary:typeof e=="string"?e:e.name},vl=e=>{var v;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,f=n.table||{},h=f.type||hre(n.type),p=f.defaultValue||n.defaultValue,m=(v=n.type)==null?void 0:v.required,g=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(fre,{expandable:i},y.createElement(sre,null,u),m?y.createElement(ure,{title:"Required"},"*"):null),o?null:y.createElement("td",null,g&&y.createElement(cre,null,y.createElement(CD,null,d)),f.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(pre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s})),y.createElement(Jte,{tags:f.jsDocTags})):y.createElement(dre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(zd,{value:p,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(Yte,{...e,isHovered:t})):null)},mre=_.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),gre=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),vre=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),yre=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(mre,{inAddonPanel:e},y.createElement(gC,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:y.createElement(y.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:y.createElement(gre,null,e&&y.createElement(y.Fragment,null,y.createElement(da,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(l$,null)," Watch 5m video"),y.createElement(vre,null),y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read docs")),!e&&y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Learn how to set that up"))}))},bre=_(d$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),wre=_(p$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),Ere=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),xre=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Cre=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Dre=_.td(()=>({position:"relative"})),Sre=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${tn(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),L3=_.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Od=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?Cre:xre,u=(r==null?void 0:r.length)||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",f=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Sre,{title:f},y.createElement(s,{colSpan:1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:0},f),y.createElement(Ere,null,o?y.createElement(bre,null):y.createElement(wre,null),t)),y.createElement(Dre,{colSpan:a-1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},f),o?null:d)),o?r:null)},yl=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ye=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Te=[2,4,2,2],Are=()=>y.createElement(y.Fragment,null,y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"})))),kre=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?se(.25,e.color.defaultText):se(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),_re=_(hn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),Fre=_.span({display:"flex",justifyContent:"space-between"}),Ire={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},Tre=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let f=d.subsections[u]||[];f.push({key:o,...i}),d.subsections[u]=f}r.sections[s]=d}else if(u){let d=r.ungroupedSubsections[u]||[];d.push({key:o,...i}),r.ungroupedSubsections[u]=d}else r.ungrouped.push({key:o,...i})});let n=Ire[t],a=o=>n?Object.keys(o).reduce((i,s)=>({...i,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,i)=>({...o,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},Rre=(e,t,r)=>{try{return fS(e,t,r)}catch(n){return ree.warn(n.message),!1}},zp=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:s}=e;if("error"in e){let{error:E}=e;return y.createElement(PD,null,E," ",y.createElement(da,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read the docs"))}if(s)return y.createElement(Are,null);let{rows:u,args:d,globals:f}="rows"in e&&e,h=Tre(pG(u,E=>{var C;return!((C=E==null?void 0:E.table)!=null&&C.disable)&&Rre(E,d||{},f||{})}),i),p=h.ungrouped.length===0,m=Object.entries(h.sections).length===0,g=Object.entries(h.ungroupedSubsections).length===0;if(p&&m&&g)return y.createElement(yre,{inAddonPanel:a});let v=1;t&&(v+=1),n||(v+=2);let b=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(Fh,null,y.createElement(kre,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},y.createElement("thead",{className:"docblock-argstable-head"},y.createElement("tr",null,y.createElement("th",null,y.createElement("span",null,"Name")),n?null:y.createElement("th",null,y.createElement("span",null,"Description")),n?null:y.createElement("th",null,y.createElement("span",null,"Default")),t?y.createElement("th",null,y.createElement(Fre,null,"Control"," ",!s&&r&&y.createElement(_re,{onClick:()=>r(),title:"Reset controls"},y.createElement(h$,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(vl,{key:E.key,row:E,arg:d&&d[E.key],...x})),Object.entries(h.ungroupedSubsections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"subsection",colSpan:v},C.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...x})))),Object.entries(h.sections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"section",colSpan:v},C.ungrouped.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(C.subsections).map(([w,D])=>y.createElement(Od,{key:w,label:w,level:"subsection",colSpan:v},D.map(S=>y.createElement(vl,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...x})))))))))},Bre=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(zp,{...r[0][1],...t}):y.createElement(lM,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,u="div",d=a===0?t:{sort:t.sort};return y.createElement(u,{key:s,id:s,title:o},({active:f})=>f?y.createElement(zp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(de,({theme:e})=>({...Ju(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?se(.2,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...Ju(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));var zre=_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2})),Ore=_.div(({theme:e})=>({...Ju(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}})),Lre=_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"}),Mre=_.div({display:"flex",flexFlow:"row wrap"}),cae=({name:e,children:t})=>y.createElement(Lre,null,y.createElement(Ore,null,t),y.createElement(zre,null,e)),dae=({children:e,...t})=>y.createElement(Fh,null,y.createElement(Mre,{...t,className:"docblock-icongallery sb-unstyled"},e)),$re=e=>`anchor--${e}`,nS=({storyId:e,children:t})=>y.createElement("div",{id:$re(e),className:"sb-anchor"},t);et&&et.__DOCS_CONTEXT__===void 0&&(et.__DOCS_CONTEXT__=l.createContext(null),et.__DOCS_CONTEXT__.displayName="DocsContext");var St=et?et.__DOCS_CONTEXT__:l.createContext(null),zn=(e,t)=>l.useContext(St).resolveOf(e,t),Pre=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),Nre=e=>{if(e)return typeof e=="string"?e.includes("-")?Pre(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function jre(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function aS(e){return eee(e,{allowFunction:!1})}var oS=l.createContext({sources:{}}),iS="--unknown--",Hre=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:u,args:d=void 0,source:f,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,p=d?aS(d):iS;n(m=>({...m,[u]:{...m[u],[p]:{code:f,format:h}}}))};return t.on(Em,a),()=>t.off(Em,a)},[]),y.createElement(oS.Provider,{value:{sources:r}},e)},Vre=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[aS(t)])||(a==null?void 0:a[iS])||{code:""}},Ure=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,d;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},i=r||o.type||tc.AUTO;if(o.code!==void 0)return o.code;let s=i===tc.DYNAMIC||i===tc.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},qre=(e,t,r)=>{var m,g,v,b;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((g=(m=n==null?void 0:n.parameters)==null?void 0:m.docs)==null?void 0:g.source)||{},{code:i}=e,s=e.format??o.format,u=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:u,dark:d};let f=t.getStoryContext(n),h=e.__forceInitialArgs?f.initialArgs:f.unmappedArgs,p=Vre(n.id,h,r);return s=p.format??((b=(v=n.parameters.docs)==null?void 0:v.source)==null?void 0:b.format)??!1,{code:Ure({snippet:p.code,storyContext:{...f,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function Wre(e,t){let r=Gre([e],t);return r&&r[0]}function Gre(e,t){let[r,n]=l.useState({});return l.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(i=>i[a]===o?i:{...i,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var Kre=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},Yre=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,o=a.story||{};if(a.disable)return null;if(e.inline??o.inline??!1){let s=e.height??o.height,u=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:s,autoplay:u,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??o.height??o.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},Zre=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(St),r=Kre(e,t),n=Wre(r,t);if(!n)return y.createElement(HD,null);let a=Yre(e,n,t);return a?y.createElement(_ee,{...a}):null},Jre=e=>{var p,m,g,v,b,x,E,C,w,D;let t=l.useContext(St),r=l.useContext(oS),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:o}=zn(n||"story",["story"]),i=qre({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((m=(p=o.parameters.docs)==null?void 0:p.canvas)==null?void 0:m.layout)??"padded",u=e.withToolbar??((v=(g=o.parameters.docs)==null?void 0:g.canvas)==null?void 0:v.withToolbar)??!1,d=e.additionalActions??((x=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:x.additionalActions),f=e.sourceState??((C=(E=o.parameters.docs)==null?void 0:E.canvas)==null?void 0:C.sourceState)??"hidden",h=e.className??((D=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:D.className);return y.createElement(VD,{withSource:f==="none"?void 0:i,isExpanded:f==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(Zre,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Xre=(e,t)=>{let r=Qre(e,t);if(!r)throw new Error("No result when story was defined");return r},Qre=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=l.useState(r.args);l.useEffect(()=>{let u=d=>{d.storyId===n&&o(d.args)};return t.channel.on(C3,u),()=>t.channel.off(C3,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(nee,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(aee,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]},ene=(e,t)=>{let r=t.getStoryContext(e),[n,a]=l.useState(r.globals);return l.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(D3,o),()=>t.channel.off(D3,o)},[t.channel]),[n]};function tne(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var rne=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(St),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??u.include,f=e.exclude??u.exclude,h=e.sort??u.sort,[p,m,g]=Xre(n,r),[v]=ene(n,r),b=x3(o,d,f);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(p).length>0?y.createElement(zp,{rows:b,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g}):null;let x=Nre(i),E=Object.fromEntries(Object.entries(s).map(([D,S])=>[D,{rows:x3(tne(S,a),d,f),sort:h}])),C={[x]:{rows:b,sort:h},...E};return y.createElement(Bre,{tabs:C,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g})},{document:lS}=et,nne=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(Bx,null,t);let n=e&&e.split("-");return y.createElement(ND,{language:n&&n[1]||"text",format:!1,code:t,...r})};function mm(e,t){e.channel.emit(oee,t)}var Op=DM.a,ane=({hash:e,children:t})=>{let r=l.useContext(St);return y.createElement(Op,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);lS.getElementById(a)&&mm(r,e)}},t)},one=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(St);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(Op,{...e}):t.startsWith("#")?y.createElement(ane,{hash:t},n):y.createElement(Op,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),mm(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},sS=["h1","h2","h3","h4","h5","h6"],ine=sS.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),lne=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),sne=({as:e,id:t,children:r,...n})=>{let a=l.useContext(St),o=ine[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(lne,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{lS.getElementById(t)&&mm(a,i)}},y.createElement(c$,null)),r)},gm=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(sne,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...ce(s,t)})},une=sS.reduce((e,t)=>({...e,[t]:r=>y.createElement(gm,{as:t,...r})}),{}),cne=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(hS`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${tn(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${sr(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),tS=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Lte=_(tS)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),Mte=_.div({display:"flex",alignItems:"center",width:"100%"});function $te(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var Pte=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{var m;let d=g=>{r(Yee(g.target.value))},f=t!==void 0,h=l.useMemo(()=>$te(o),[o]),p=!!((m=u==null?void 0:u.table)!=null&&m.readonly);return y.createElement(Mte,{"aria-readonly":p},y.createElement(tS,null,n),y.createElement(Ote,{id:Et(e),type:"range",disabled:p,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Lte,{numberOFDecimalsPlaces:h,max:a},f?t.toFixed(h):"--"," / ",a))},Nte=_.label({display:"flex"}),jte=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),Hte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var m;let s=g=>{r(g.target.value)},u=!!((m=i==null?void 0:i.table)!=null&&m.readonly),[d,f]=l.useState(!1),h=l.useCallback(()=>{r(""),f(!0)},[f]);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",disabled:u,id:Ns(e),onClick:h},"Set string");let p=typeof t=="string";return y.createElement(Nte,null,y.createElement(Ti.Textarea,{id:Et(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),o&&y.createElement(jte,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Vte=_(Ti.Input)({padding:10});function Ute(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var qte=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var u;let o=l.useRef(null),i=(u=a==null?void 0:a.control)==null?void 0:u.readOnly;function s(d){if(!d.target.files)return;let f=Array.from(d.target.files).map(h=>URL.createObjectURL(h));e(f),Ute(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(Vte,{ref:o,id:Et(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},Wte=l.lazy(()=>$3(()=>import("./Color-ERTF36HU-DhtFufZU.js"),__vite__mapDeps([8,2,1,3,4,5,6,7]),import.meta.url)),Gte=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(Wte,{...e})),Kte={array:R3,object:R3,boolean:jee,color:Gte,date:Gee,number:Jee,check:qn,"inline-check":qn,radio:qn,"inline-radio":qn,select:qn,"multi-select":qn,range:Pte,text:Hte,file:qte},B3=()=>y.createElement(y.Fragment,null,"-"),Yte=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var v;let{key:a,control:o}=e,[i,s]=l.useState(!1),[u,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let f=l.useCallback(b=>(d({value:b}),r({[a]:b}),b),[r,a]),h=l.useCallback(()=>s(!1),[]),p=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let b=(o==null?void 0:o.disable)!==!0&&((v=e==null?void 0:e.type)==null?void 0:v.name)!=="function";return n&&b?y.createElement(da,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(B3,null)}let m={name:a,argType:e,value:u.value,onChange:f,onBlur:h,onFocus:p},g=Kte[o.type]||B3;return y.createElement(g,{...m,...o,controlType:o.type})},Zte=_.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:jr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),Jte=({tags:e})=>{let t=(e.params||[]).filter(o=>o.description),r=t.length!==0,n=e.deprecated!=null,a=e.returns!=null&&e.returns.description!=null;return!r&&!a&&!n?null:y.createElement(y.Fragment,null,y.createElement(Zte,null,y.createElement("tbody",null,n&&y.createElement("tr",{key:"deprecated"},y.createElement("td",{colSpan:2},y.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>y.createElement("tr",{key:o.name},y.createElement("td",null,y.createElement("code",null,o.name)),y.createElement("td",null,o.description))),a&&y.createElement("tr",{key:"returns"},y.createElement("td",null,y.createElement("code",null,"Returns")),y.createElement("td",null,e.returns.description)))))},Bp=8,z3=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Xte=_.span(jr,({theme:e,simple:t=!1})=>({flex:"0 0 auto",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...t&&{background:"transparent",border:"0 none",paddingLeft:0}})),Qte=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),ere=_.div(jr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),tre=_.div(({theme:e,width:t})=>({width:t,minWidth:200,maxWidth:800,padding:15,fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),rre=_(f$)({marginLeft:4}),nre=_(AC)({marginLeft:4}),are=()=>y.createElement("span",null,"-"),rS=({text:e,simple:t})=>y.createElement(Xte,{simple:t},e),ore=_D(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),ire=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return OJ(t)},O3=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Bp)),r.map(n=>y.createElement(rS,{key:n,text:n===""?'""':n}))},lre=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=l.useState(!1),[i,s]=l.useState(t||!1);if(r==null)return null;let u=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(u))return y.createElement(rS,{text:u});let d=ire(u),f=d.length;return f>Bp?y.createElement(z3,{isExpanded:i},O3(d,i),y.createElement(Qte,{onClick:()=>s(!i)},i?"Show less...":`Show ${f-Bp} more...`)):y.createElement(z3,null,O3(d))}return y.createElement(SL,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(tre,{width:ore(n)},y.createElement(Ih,{language:"jsx",format:!1},n))},y.createElement(ere,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(rre,null):y.createElement(nre,null)))},zd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(are,null):y.createElement(lre,{value:e,initialExpandedArgs:t}),sre=_.span({fontWeight:"bold"}),ure=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),cre=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...jr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),dre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?4:0})),pre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),fre=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),hre=e=>e&&{summary:typeof e=="string"?e:e.name},vl=e=>{var v;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,f=n.table||{},h=f.type||hre(n.type),p=f.defaultValue||n.defaultValue,m=(v=n.type)==null?void 0:v.required,g=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(fre,{expandable:i},y.createElement(sre,null,u),m?y.createElement(ure,{title:"Required"},"*"):null),o?null:y.createElement("td",null,g&&y.createElement(cre,null,y.createElement(CD,null,d)),f.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(pre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s})),y.createElement(Jte,{tags:f.jsDocTags})):y.createElement(dre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(zd,{value:p,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(Yte,{...e,isHovered:t})):null)},mre=_.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),gre=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),vre=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),yre=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(mre,{inAddonPanel:e},y.createElement(gC,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:y.createElement(y.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:y.createElement(gre,null,e&&y.createElement(y.Fragment,null,y.createElement(da,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(l$,null)," Watch 5m video"),y.createElement(vre,null),y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read docs")),!e&&y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Learn how to set that up"))}))},bre=_(d$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),wre=_(p$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),Ere=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),xre=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Cre=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Dre=_.td(()=>({position:"relative"})),Sre=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${tn(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),L3=_.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Od=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?Cre:xre,u=(r==null?void 0:r.length)||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",f=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Sre,{title:f},y.createElement(s,{colSpan:1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:0},f),y.createElement(Ere,null,o?y.createElement(bre,null):y.createElement(wre,null),t)),y.createElement(Dre,{colSpan:a-1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},f),o?null:d)),o?r:null)},yl=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ye=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Te=[2,4,2,2],Are=()=>y.createElement(y.Fragment,null,y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"})))),kre=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?se(.25,e.color.defaultText):se(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),_re=_(hn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),Fre=_.span({display:"flex",justifyContent:"space-between"}),Ire={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},Tre=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let f=d.subsections[u]||[];f.push({key:o,...i}),d.subsections[u]=f}r.sections[s]=d}else if(u){let d=r.ungroupedSubsections[u]||[];d.push({key:o,...i}),r.ungroupedSubsections[u]=d}else r.ungrouped.push({key:o,...i})});let n=Ire[t],a=o=>n?Object.keys(o).reduce((i,s)=>({...i,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,i)=>({...o,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},Rre=(e,t,r)=>{try{return fS(e,t,r)}catch(n){return ree.warn(n.message),!1}},zp=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:s}=e;if("error"in e){let{error:E}=e;return y.createElement(PD,null,E," ",y.createElement(da,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read the docs"))}if(s)return y.createElement(Are,null);let{rows:u,args:d,globals:f}="rows"in e&&e,h=Tre(pG(u,E=>{var C;return!((C=E==null?void 0:E.table)!=null&&C.disable)&&Rre(E,d||{},f||{})}),i),p=h.ungrouped.length===0,m=Object.entries(h.sections).length===0,g=Object.entries(h.ungroupedSubsections).length===0;if(p&&m&&g)return y.createElement(yre,{inAddonPanel:a});let v=1;t&&(v+=1),n||(v+=2);let b=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(Fh,null,y.createElement(kre,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},y.createElement("thead",{className:"docblock-argstable-head"},y.createElement("tr",null,y.createElement("th",null,y.createElement("span",null,"Name")),n?null:y.createElement("th",null,y.createElement("span",null,"Description")),n?null:y.createElement("th",null,y.createElement("span",null,"Default")),t?y.createElement("th",null,y.createElement(Fre,null,"Control"," ",!s&&r&&y.createElement(_re,{onClick:()=>r(),title:"Reset controls"},y.createElement(h$,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(vl,{key:E.key,row:E,arg:d&&d[E.key],...x})),Object.entries(h.ungroupedSubsections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"subsection",colSpan:v},C.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...x})))),Object.entries(h.sections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"section",colSpan:v},C.ungrouped.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(C.subsections).map(([w,D])=>y.createElement(Od,{key:w,label:w,level:"subsection",colSpan:v},D.map(S=>y.createElement(vl,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...x})))))))))},Bre=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(zp,{...r[0][1],...t}):y.createElement(lM,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,u="div",d=a===0?t:{sort:t.sort};return y.createElement(u,{key:s,id:s,title:o},({active:f})=>f?y.createElement(zp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(de,({theme:e})=>({...Ju(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?se(.2,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...Ju(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));var zre=_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2})),Ore=_.div(({theme:e})=>({...Ju(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}})),Lre=_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"}),Mre=_.div({display:"flex",flexFlow:"row wrap"}),cae=({name:e,children:t})=>y.createElement(Lre,null,y.createElement(Ore,null,t),y.createElement(zre,null,e)),dae=({children:e,...t})=>y.createElement(Fh,null,y.createElement(Mre,{...t,className:"docblock-icongallery sb-unstyled"},e)),$re=e=>`anchor--${e}`,nS=({storyId:e,children:t})=>y.createElement("div",{id:$re(e),className:"sb-anchor"},t);et&&et.__DOCS_CONTEXT__===void 0&&(et.__DOCS_CONTEXT__=l.createContext(null),et.__DOCS_CONTEXT__.displayName="DocsContext");var St=et?et.__DOCS_CONTEXT__:l.createContext(null),zn=(e,t)=>l.useContext(St).resolveOf(e,t),Pre=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),Nre=e=>{if(e)return typeof e=="string"?e.includes("-")?Pre(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function jre(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function aS(e){return eee(e,{allowFunction:!1})}var oS=l.createContext({sources:{}}),iS="--unknown--",Hre=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:u,args:d=void 0,source:f,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,p=d?aS(d):iS;n(m=>({...m,[u]:{...m[u],[p]:{code:f,format:h}}}))};return t.on(Em,a),()=>t.off(Em,a)},[]),y.createElement(oS.Provider,{value:{sources:r}},e)},Vre=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[aS(t)])||(a==null?void 0:a[iS])||{code:""}},Ure=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,d;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},i=r||o.type||tc.AUTO;if(o.code!==void 0)return o.code;let s=i===tc.DYNAMIC||i===tc.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},qre=(e,t,r)=>{var m,g,v,b;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((g=(m=n==null?void 0:n.parameters)==null?void 0:m.docs)==null?void 0:g.source)||{},{code:i}=e,s=e.format??o.format,u=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:u,dark:d};let f=t.getStoryContext(n),h=e.__forceInitialArgs?f.initialArgs:f.unmappedArgs,p=Vre(n.id,h,r);return s=p.format??((b=(v=n.parameters.docs)==null?void 0:v.source)==null?void 0:b.format)??!1,{code:Ure({snippet:p.code,storyContext:{...f,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function Wre(e,t){let r=Gre([e],t);return r&&r[0]}function Gre(e,t){let[r,n]=l.useState({});return l.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(i=>i[a]===o?i:{...i,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var Kre=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},Yre=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,o=a.story||{};if(a.disable)return null;if(e.inline??o.inline??!1){let s=e.height??o.height,u=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:s,autoplay:u,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??o.height??o.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},Zre=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(St),r=Kre(e,t),n=Wre(r,t);if(!n)return y.createElement(HD,null);let a=Yre(e,n,t);return a?y.createElement(_ee,{...a}):null},Jre=e=>{var p,m,g,v,b,x,E,C,w,D;let t=l.useContext(St),r=l.useContext(oS),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:o}=zn(n||"story",["story"]),i=qre({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((m=(p=o.parameters.docs)==null?void 0:p.canvas)==null?void 0:m.layout)??"padded",u=e.withToolbar??((v=(g=o.parameters.docs)==null?void 0:g.canvas)==null?void 0:v.withToolbar)??!1,d=e.additionalActions??((x=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:x.additionalActions),f=e.sourceState??((C=(E=o.parameters.docs)==null?void 0:E.canvas)==null?void 0:C.sourceState)??"hidden",h=e.className??((D=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:D.className);return y.createElement(VD,{withSource:f==="none"?void 0:i,isExpanded:f==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(Zre,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Xre=(e,t)=>{let r=Qre(e,t);if(!r)throw new Error("No result when story was defined");return r},Qre=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=l.useState(r.args);l.useEffect(()=>{let u=d=>{d.storyId===n&&o(d.args)};return t.channel.on(C3,u),()=>t.channel.off(C3,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(nee,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(aee,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]},ene=(e,t)=>{let r=t.getStoryContext(e),[n,a]=l.useState(r.globals);return l.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(D3,o),()=>t.channel.off(D3,o)},[t.channel]),[n]};function tne(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var rne=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(St),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??u.include,f=e.exclude??u.exclude,h=e.sort??u.sort,[p,m,g]=Xre(n,r),[v]=ene(n,r),b=x3(o,d,f);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(p).length>0?y.createElement(zp,{rows:b,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g}):null;let x=Nre(i),E=Object.fromEntries(Object.entries(s).map(([D,S])=>[D,{rows:x3(tne(S,a),d,f),sort:h}])),C={[x]:{rows:b,sort:h},...E};return y.createElement(Bre,{tabs:C,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g})},{document:lS}=et,nne=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(Bx,null,t);let n=e&&e.split("-");return y.createElement(ND,{language:n&&n[1]||"text",format:!1,code:t,...r})};function mm(e,t){e.channel.emit(oee,t)}var Op=DM.a,ane=({hash:e,children:t})=>{let r=l.useContext(St);return y.createElement(Op,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);lS.getElementById(a)&&mm(r,e)}},t)},one=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(St);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(Op,{...e}):t.startsWith("#")?y.createElement(ane,{hash:t},n):y.createElement(Op,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),mm(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},sS=["h1","h2","h3","h4","h5","h6"],ine=sS.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),lne=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),sne=({as:e,id:t,children:r,...n})=>{let a=l.useContext(St),o=ine[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(lne,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{lS.getElementById(t)&&mm(a,i)}},y.createElement(c$,null)),r)},gm=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(sne,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...ce(s,t)})},une=sS.reduce((e,t)=>({...e,[t]:r=>y.createElement(gm,{as:t,...r})}),{}),cne=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(hS`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' This is often caused by not wrapping the child in a template string. This is invalid: diff --git a/assets/index-B27qxNgk.js b/assets/index-CRjmhI41.js similarity index 92% rename from assets/index-B27qxNgk.js rename to assets/index-CRjmhI41.js index 12adaafd..4217d464 100644 --- a/assets/index-B27qxNgk.js +++ b/assets/index-CRjmhI41.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as o}from"./index-CFK-oMtb.js";import{ae as s}from"./index-D_yKE35a.js";import"./index-0d5eMwbi.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";function i(t){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...o(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Home"}),` +import{j as n}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as o}from"./index-CFK-oMtb.js";import{ae as s}from"./index-CMsN8z4D.js";import"./index-0d5eMwbi.js";import"./iframe-CUIcjkDA.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";function i(t){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...o(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Home"}),` `,n.jsx(e.h1,{id:"hailstorm",children:"Hailstorm"}),` `,n.jsx(e.h2,{id:"introduction",children:"Introduction"}),` `,n.jsx(e.p,{children:"Hailstorm is a design system for Abusix. It is a collection of reusable components, guidelines, and best practices that can be used to build consistent user interfaces across all of our products."}),` diff --git a/assets/inline-alert.stories-CHU6-QPb.js b/assets/inline-alert.stories-wD9HlsAA.js similarity index 97% rename from assets/inline-alert.stories-CHU6-QPb.js rename to assets/inline-alert.stories-wD9HlsAA.js index 15f8741c..6d89b3d5 100644 --- a/assets/inline-alert.stories-CHU6-QPb.js +++ b/assets/inline-alert.stories-wD9HlsAA.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{c as o}from"./class-names-DnY5YZNL.js";import{c as w,d as j,e as S,f as _}from"./zoom-to-fit-icon-DdsCB6de.js";import{g as A}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";const b={info:"text-primary-600",danger:"text-danger-500",success:"text-success-500",warning:"text-warning-600"},T={info:"fill-primary-400",danger:"fill-danger-400",success:"fill-success-400",warning:"fill-warning-500"},V={info:w,success:j,warning:S,danger:_},i=({title:r,className:l,children:n,intent:c="info"})=>{const y=V[c],N=b[c],h=T[c];return e.jsxs("div",{className:o("flex w-full text-sm",l),children:[e.jsx("div",{className:"mr-4 w-4 grow-0 pt-0.5",children:e.jsx(y,{className:h})}),e.jsxs("div",{className:"w-full",children:[e.jsx("h1",{className:o("font-medium",N),children:r}),n?e.jsx("div",{className:"mt-2",children:n}):null]})]})};try{i.displayName="InlineAlert",i.__docgenInfo={description:"",displayName:"InlineAlert",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},intent:{defaultValue:{value:"info"},description:"",name:"intent",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"warning"'},{value:'"danger"'}]}}}}}catch{}const q=["info","success","warning","danger"],D={component:i,title:"Inline Alert",parameters:A("Inline alert text to inform user about contextual things"),args:{title:"Alert title",children:"Alert text"}},t={},s={argTypes:{intent:{table:{disable:!0}}},render:({children:r,...l})=>e.jsx("div",{className:"flex flex-col gap-4",children:q.map(n=>e.jsx(i,{...l,intent:n,children:r},n))})},a={...s,args:{children:void 0}};var d,m,u;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(u=(m=t.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};var p,g,f;s.parameters={...s.parameters,docs:{...(p=s.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{c as o}from"./class-names-DnY5YZNL.js";import{c as w,d as j,e as S,f as _}from"./zoom-to-fit-icon-DdsCB6de.js";import{g as A}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";const b={info:"text-primary-600",danger:"text-danger-500",success:"text-success-500",warning:"text-warning-600"},T={info:"fill-primary-400",danger:"fill-danger-400",success:"fill-success-400",warning:"fill-warning-500"},V={info:w,success:j,warning:S,danger:_},i=({title:r,className:l,children:n,intent:c="info"})=>{const y=V[c],N=b[c],h=T[c];return e.jsxs("div",{className:o("flex w-full text-sm",l),children:[e.jsx("div",{className:"mr-4 w-4 grow-0 pt-0.5",children:e.jsx(y,{className:h})}),e.jsxs("div",{className:"w-full",children:[e.jsx("h1",{className:o("font-medium",N),children:r}),n?e.jsx("div",{className:"mt-2",children:n}):null]})]})};try{i.displayName="InlineAlert",i.__docgenInfo={description:"",displayName:"InlineAlert",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},intent:{defaultValue:{value:"info"},description:"",name:"intent",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"warning"'},{value:'"danger"'},{value:'"info"'}]}}}}}catch{}const q=["info","success","warning","danger"],D={component:i,title:"Inline Alert",parameters:A("Inline alert text to inform user about contextual things"),args:{title:"Alert title",children:"Alert text"}},t={},s={argTypes:{intent:{table:{disable:!0}}},render:({children:r,...l})=>e.jsx("div",{className:"flex flex-col gap-4",children:q.map(n=>e.jsx(i,{...l,intent:n,children:r},n))})},a={...s,args:{children:void 0}};var d,m,u;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(u=(m=t.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};var p,g,f;s.parameters={...s.parameters,docs:{...(p=s.parameters)==null?void 0:p.docs,source:{originalSource:`{ argTypes: { intent: { table: { diff --git a/assets/keyboard-C2Ifhsxt.js b/assets/keyboard-D0BTZntQ.js similarity index 87% rename from assets/keyboard-C2Ifhsxt.js rename to assets/keyboard-D0BTZntQ.js index 82e44068..2a451ebe 100644 --- a/assets/keyboard-C2Ifhsxt.js +++ b/assets/keyboard-D0BTZntQ.js @@ -1 +1 @@ -import{b as o}from"./use-sync-refs-DqQDZvJ6.js";function a(e){return o.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}var n=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(n||{});export{n as o,a as u}; +import{b as o}from"./use-sync-refs-DhZgiOVe.js";function a(e){return o.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}var n=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(n||{});export{n as o,a as u}; diff --git a/assets/label-BBnH-iCi.js b/assets/label-fWs8-lsP.js similarity index 80% rename from assets/label-BBnH-iCi.js rename to assets/label-fWs8-lsP.js index 8d184ca2..91bb80fc 100644 --- a/assets/label-BBnH-iCi.js +++ b/assets/label-fWs8-lsP.js @@ -1 +1 @@ -import{r as n,R as x}from"./index-0d5eMwbi.js";import{L as $,y as F,n as P,o as E,D as I}from"./use-sync-refs-DqQDZvJ6.js";import{a as S}from"./description-D9Ee5mtv.js";let y=n.createContext(void 0);function j(){return n.useContext(y)}function R({id:t,children:r}){return x.createElement(y.Provider,{value:t},r)}let v=n.createContext(null);v.displayName="LabelContext";function L(){let t=n.useContext(v);if(t===null){let r=new Error("You used a