diff --git a/assets/Color-KGDBMAHA-CDtNeP06.js b/assets/Color-KGDBMAHA-BgyUleF8.js similarity index 99% rename from assets/Color-KGDBMAHA-CDtNeP06.js rename to assets/Color-KGDBMAHA-BgyUleF8.js index da118c27..637c9ab7 100644 --- a/assets/Color-KGDBMAHA-CDtNeP06.js +++ b/assets/Color-KGDBMAHA-BgyUleF8.js @@ -1 +1 @@ -import{ae as Me,af as C,a2 as ie,a0 as Ce,b as $e,ag as Oe,ah as Ie}from"./DocsRenderer-PKQXORMH-BeBsJNFx.js";import{a as h,r as m,g as ue}from"./index-BP8_t0zE.js";import{_ as Ne,i as fe}from"./isArray-d9wiqGGH.js";import"./iframe-BUJwMp-o.js";import"../sb-preview/runtime.js";import"./react-18-Glus6dSN.js";import"./index-Cw6ikIwd.js";import"./index-D-8MO0q_.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var N=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(te(o.current,p,s.current)):E(!1)},S=function(){return E(!1)};function E(p){var b=c.current,k=V(o.current),y=p?k.addEventListener:k.removeEventListener;y(b?"touchmove":"mousemove",w),y(b?"touchend":"mouseup",S)}return[function(p){var b=p.nativeEvent,k=o.current;if(k&&(ne(b),!function(R,j){return j&&!z(R)}(b,c.current)&&k)){if(z(b)){c.current=!0;var y=b.changedTouches||[];y.length&&(s.current=y[0].identifier)}k.focus(),a(te(k,b,s.current)),E(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),l({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},E]},[l,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),H=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=H(["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}}))},x=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=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?x(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?x(parseInt(e.substring(6,8),16)/255,2):1}},je=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},Te=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?ze({h:je(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}},ze=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}},Fe=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:x(e.h),s:x(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:x(o/2),a:x(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=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),l=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:x(255*[r,s,l,l,c,r][i]),g:x(255*[c,r,r,s,l,l][i]),b:x(255*[l,l,c,r,r,s][i]),a:x(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({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},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(x(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),l=a-Math.min(t,n,r),s=l?a===t?(n-r)/l:a===n?2+(r-t)/l:4+(t-n)/l:0;return{h:x(60*(s<0?s+6:s)),s:x(a?l/a*100:0),v:x(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=H(["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:N(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({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:N(t.s+100*o.left,0,100),v:N(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(t.s)+"%, Brightness "+x(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],l=o[1],s=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,s.current.color)){var i=e.toHsva(t);s.current={hsva:i,color:t},l(i)}},[t,e]),m.useEffect(function(){var i;ve(a,s.current.hsva)||e.equal(i=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){l(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var qe=typeof window<"u"?m.useLayoutEffect:m.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},re=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!re.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}`,re.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Xe=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=J(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var c=ye(n,o,a),i=c[0],d=c[1],f=H(["react-colorful",t]);return h.createElement("div",$({},l,{ref:s,className:f}),h.createElement(be,{hsva:i,onChange:d}),h.createElement(me,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},De={defaultColor:"000",toHsva:Re,fromHsva:function(e){return Fe({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},We=function(e){return h.createElement(Xe,$({},e,{colorModel:De}))},Ke=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=H(["react-colorful__alpha",t]),l=x(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:N(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=J(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var c=ye(n,o,a),i=c[0],d=c[1],f=H(["react-colorful",t]);return h.createElement("div",$({},l,{ref:s,className:f}),h.createElement(be,{hsva:i,onChange:d}),h.createElement(me,{hue:i.h,onChange:d}),h.createElement(Ke,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:Te,fromHsva:B,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={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=Ye,ke={};for(const e of Object.keys(F))ke[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 _e=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),l=a-o;let s,c;a===o?s=0:t===a?s=(n-r)/l:n===a?s=2+(r-t)/l:r===a&&(s=4+(t-n)/l),s=Math.min(s*60,360),s<0&&(s+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=l/(a+o):c=l/(2-a-o),[s,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const l=e[0]/255,s=e[1]/255,c=e[2]/255,i=Math.max(l,s,c),d=i-Math.min(l,s,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(l),n=f(s),r=f(c),l===i?o=r-n:s===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,l=(1-n-o)/(1-o)||0,s=(1-r-o)/(1-o)||0;return[a*100,l*100,s*100,o*100]};function Je(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=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],l=Je(e,a);l.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,l=t*.0193+n*.1192+r*.9505;return[o*100,a*100,l*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,l=500*(n-r),s=200*(r-o);return[a,l,s]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,l;if(n===0)return l=r*255,[l,l,l];r<.5?o=r*(1+n):o=r+n-r*n;const s=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?l=s+(o-s)*6*a:2*a<1?l=o:3*a<2?l=s+(o-s)*(2/3-a)*6:l=s,c[i]=l*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 l=(r+n)/2,s=r===0?2*o/(a+o):2*n/(r+n);return[t,s*100,l*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),l=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,l];case 1:return[s,r,l];case 2:return[l,r,c];case 3:return[l,s,r];case 4:return[c,l,r];case 5:return[r,l,s]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,l;l=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,l/=2,[t,a*100,l*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 l=Math.floor(6*t),s=1-r;a=6*t-l,l&1&&(a=1-a);const c=n+a*(s-n);let i,d,f;switch(l){default:case 6:case 0:i=s,d=c,f=n;break;case 1:i=c,d=s,f=n;break;case 2:i=n,d=s,f=c;break;case 3:i=n,d=c,f=s;break;case 4:i=c,d=n,f=s;break;case 5:i=s,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),l=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,r*(1-o)+o);return[a*255,l*255,s*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,l;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,l=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,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),l=Math.min(Math.max(0,l),1),[o*255,a*255,l*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),l=200*(n-r);return[o,a,l]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,l;a=(t+16)/116,o=n/500+a,l=a-r/200;const s=a**3,c=o**3,i=l**3;return a=s>.008856?s:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,l=i>.008856?i:(l-16/116)/7.787,o*=95.047,a*=100,l*=108.883,[o,a,l]};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 l=Math.sqrt(n*n+r*r);return[t,l,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),l=n*Math.sin(o);return[t,a,l]};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 l=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(l+=60),l};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(s=>s+s).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,l=r&255;return[o,a,l]};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),l=o-a;let s,c;return l<1?s=a/(1-l):s=0,l<=0?c=0:o===t?c=(n-r)/l%6:o===n?c=2+(r-t)/l:c=4+(t-n)/l,c/=6,c%=1,[c*360,l*100,s*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,l=a%1,s=1-l;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=l,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=l;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=l,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}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=_e;function Qe(){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 lt(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,l=0;l{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=lt(o),O[e][r].raw=at(o)})});var st=O;const _=ue(st);var ct=Ne,it=function(){return ct.Date.now()},ut=it,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,oe=fe,yt=Me,ae=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return ae;if(oe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=oe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?ae:+e}var Mt=Et,Ct=fe,W=ut,le=Mt,$t="Expected a function",Ot=Math.max,It=Math.min;function Nt(e,t,n){var r,o,a,l,s,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Ot(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function w(v){var M=r,T=o;return r=o=void 0,i=v,l=e.apply(T,M),l}function S(v){return i=v,s=setTimeout(b,t),d?w(v):l}function E(v){var M=v-c,T=v-i,ee=t-M;return f?It(ee,a-T):ee}function p(v){var M=v-c,T=v-i;return c===void 0||M>=t||M<0||f&&T>=a}function b(){var v=W();if(p(v))return k(v);s=setTimeout(b,E(v))}function k(v){return s=void 0,g&&r?w(v):(r=o=void 0,l)}function y(){s!==void 0&&clearTimeout(s),i=0,r=c=o=s=void 0}function R(){return s===void 0?l:k(W())}function j(){var v=W(),M=p(v);if(r=arguments,o=this,c=v,M){if(s===void 0)return S(c);if(f)return clearTimeout(s),s=setTimeout(b,t),w(c)}return s===void 0&&(s=setTimeout(b,t)),l}return j.cancel=y,j.flush=R,j}var St=Nt;const Rt=ue(St);var jt=C.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Tt=C(ie)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=C.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=C(Ce)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Ht=C.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=C.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,')`,se=({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=C($e.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=C(Oe)(({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:We,rgb:Ue,hsl:Ae},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e?.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[l,s,c,i]=ce(e),[d,f,g]=_.rgb.hsl([l,s,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([l,s,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([l,s,c]).toLowerCase()}`}}if(Wt.test(e)){let[l,s,c,i]=ce(e),[d,f,g]=_.hsl.rgb([l,s,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([l,s,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([l,s,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?.valid)return q[n];if(n!=="hex")return 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,l]=r[1].split("");return`#${o}${o}${a}${a}${l}${l}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>I(n)),[l,s]=m.useState(o?.colorSpace||"hex");m.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),s(g?.colorSpace||"hex")},[e]);let c=m.useMemo(()=>At(n,o,l).toLowerCase(),[n,o,l]),i=m.useCallback(f=>{let g=I(f),w=g?.value||f||"";r(w),w===""&&(a(void 0),t(void 0)),g&&(a(g),s(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(l)+1;f>=L.length&&(f=0),s(L[f]);let g=o?.[L[f]]||"";r(g),t(g)},[o,l,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:l,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t?.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(s=>typeof s=="string"?I(s):s.title?{...I(s.color),keyword:s.title}:I(s.color)).concat(r).filter(Boolean).slice(-27),[e,r]),l=m.useCallback(s=>{s?.valid&&(a.some(c=>D(c[n])===D(s[n]))||o(c=>c.concat(s)))},[n,a]);return{presets:a,addPreset:l}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:l=!1,argType:s})=>{let c=m.useCallback(Rt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:w,cycleColorSpace:S}=Gt(t,c),{presets:E,addPreset:p}=Ut(a,g,w),b=Vt[w],k=!!s?.table?.readonly;return h.createElement(jt,{"aria-readonly":k},h.createElement(Tt,{startOpen:l,trigger:k?[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}),E.length>0&&h.createElement(Ht,null,E.map((y,R)=>h.createElement(ie,{key:`${y.value}-${R}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:y.keyword||y.value})},h.createElement(se,{value:y[w],active:g&&D(y[w])===D(g[w]),onClick:()=>f(y.value)})))))},h.createElement(se,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ie(e),value:i,onChange:y=>f(y.target.value),onFocus:y=>y.target.select(),readOnly:k,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:S}):null)},ln=Yt;export{Yt as ColorControl,ln as default}; +import{ae as Me,af as C,a2 as ie,a0 as Ce,b as $e,ag as Oe,ah as Ie}from"./DocsRenderer-PKQXORMH-CYafAHU5.js";import{a as h,r as m,g as ue}from"./index-BP8_t0zE.js";import{_ as Ne,i as fe}from"./isArray-d9wiqGGH.js";import"./iframe-uIoLn8e1.js";import"../sb-preview/runtime.js";import"./react-18-Glus6dSN.js";import"./index-Cw6ikIwd.js";import"./index-D-8MO0q_.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var N=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(te(o.current,p,s.current)):E(!1)},S=function(){return E(!1)};function E(p){var b=c.current,k=V(o.current),y=p?k.addEventListener:k.removeEventListener;y(b?"touchmove":"mousemove",w),y(b?"touchend":"mouseup",S)}return[function(p){var b=p.nativeEvent,k=o.current;if(k&&(ne(b),!function(R,j){return j&&!z(R)}(b,c.current)&&k)){if(z(b)){c.current=!0;var y=b.changedTouches||[];y.length&&(s.current=y[0].identifier)}k.focus(),a(te(k,b,s.current)),E(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),l({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},E]},[l,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),H=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=H(["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}}))},x=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=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?x(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?x(parseInt(e.substring(6,8),16)/255,2):1}},je=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},Te=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?ze({h:je(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}},ze=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}},Fe=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:x(e.h),s:x(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:x(o/2),a:x(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=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),l=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:x(255*[r,s,l,l,c,r][i]),g:x(255*[c,r,r,s,l,l][i]),b:x(255*[l,l,c,r,r,s][i]),a:x(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({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},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(x(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),l=a-Math.min(t,n,r),s=l?a===t?(n-r)/l:a===n?2+(r-t)/l:4+(t-n)/l:0;return{h:x(60*(s<0?s+6:s)),s:x(a?l/a*100:0),v:x(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=H(["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:N(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({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:N(t.s+100*o.left,0,100),v:N(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(t.s)+"%, Brightness "+x(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],l=o[1],s=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,s.current.color)){var i=e.toHsva(t);s.current={hsva:i,color:t},l(i)}},[t,e]),m.useEffect(function(){var i;ve(a,s.current.hsva)||e.equal(i=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){l(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var qe=typeof window<"u"?m.useLayoutEffect:m.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},re=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!re.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}`,re.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Xe=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=J(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var c=ye(n,o,a),i=c[0],d=c[1],f=H(["react-colorful",t]);return h.createElement("div",$({},l,{ref:s,className:f}),h.createElement(be,{hsva:i,onChange:d}),h.createElement(me,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},De={defaultColor:"000",toHsva:Re,fromHsva:function(e){return Fe({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},We=function(e){return h.createElement(Xe,$({},e,{colorModel:De}))},Ke=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=H(["react-colorful__alpha",t]),l=x(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:N(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,l=J(e,["className","colorModel","color","onChange"]),s=m.useRef(null);xe(s);var c=ye(n,o,a),i=c[0],d=c[1],f=H(["react-colorful",t]);return h.createElement("div",$({},l,{ref:s,className:f}),h.createElement(be,{hsva:i,onChange:d}),h.createElement(me,{hue:i.h,onChange:d}),h.createElement(Ke,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:Te,fromHsva:B,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={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=Ye,ke={};for(const e of Object.keys(F))ke[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 _e=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),l=a-o;let s,c;a===o?s=0:t===a?s=(n-r)/l:n===a?s=2+(r-t)/l:r===a&&(s=4+(t-n)/l),s=Math.min(s*60,360),s<0&&(s+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=l/(a+o):c=l/(2-a-o),[s,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const l=e[0]/255,s=e[1]/255,c=e[2]/255,i=Math.max(l,s,c),d=i-Math.min(l,s,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(l),n=f(s),r=f(c),l===i?o=r-n:s===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,l=(1-n-o)/(1-o)||0,s=(1-r-o)/(1-o)||0;return[a*100,l*100,s*100,o*100]};function Je(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=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],l=Je(e,a);l.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,l=t*.0193+n*.1192+r*.9505;return[o*100,a*100,l*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,l=500*(n-r),s=200*(r-o);return[a,l,s]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,l;if(n===0)return l=r*255,[l,l,l];r<.5?o=r*(1+n):o=r+n-r*n;const s=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?l=s+(o-s)*6*a:2*a<1?l=o:3*a<2?l=s+(o-s)*(2/3-a)*6:l=s,c[i]=l*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 l=(r+n)/2,s=r===0?2*o/(a+o):2*n/(r+n);return[t,s*100,l*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),l=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,l];case 1:return[s,r,l];case 2:return[l,r,c];case 3:return[l,s,r];case 4:return[c,l,r];case 5:return[r,l,s]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,l;l=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,l/=2,[t,a*100,l*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 l=Math.floor(6*t),s=1-r;a=6*t-l,l&1&&(a=1-a);const c=n+a*(s-n);let i,d,f;switch(l){default:case 6:case 0:i=s,d=c,f=n;break;case 1:i=c,d=s,f=n;break;case 2:i=n,d=s,f=c;break;case 3:i=n,d=c,f=s;break;case 4:i=c,d=n,f=s;break;case 5:i=s,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),l=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,r*(1-o)+o);return[a*255,l*255,s*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,l;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,l=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,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),l=Math.min(Math.max(0,l),1),[o*255,a*255,l*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),l=200*(n-r);return[o,a,l]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,l;a=(t+16)/116,o=n/500+a,l=a-r/200;const s=a**3,c=o**3,i=l**3;return a=s>.008856?s:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,l=i>.008856?i:(l-16/116)/7.787,o*=95.047,a*=100,l*=108.883,[o,a,l]};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 l=Math.sqrt(n*n+r*r);return[t,l,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),l=n*Math.sin(o);return[t,a,l]};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 l=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(l+=60),l};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(s=>s+s).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,l=r&255;return[o,a,l]};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),l=o-a;let s,c;return l<1?s=a/(1-l):s=0,l<=0?c=0:o===t?c=(n-r)/l%6:o===n?c=2+(r-t)/l:c=4+(t-n)/l,c/=6,c%=1,[c*360,l*100,s*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,l=a%1,s=1-l;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=l,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=l;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=l,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}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=_e;function Qe(){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 lt(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,l=0;l{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=lt(o),O[e][r].raw=at(o)})});var st=O;const _=ue(st);var ct=Ne,it=function(){return ct.Date.now()},ut=it,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,oe=fe,yt=Me,ae=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return ae;if(oe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=oe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?ae:+e}var Mt=Et,Ct=fe,W=ut,le=Mt,$t="Expected a function",Ot=Math.max,It=Math.min;function Nt(e,t,n){var r,o,a,l,s,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Ot(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function w(v){var M=r,T=o;return r=o=void 0,i=v,l=e.apply(T,M),l}function S(v){return i=v,s=setTimeout(b,t),d?w(v):l}function E(v){var M=v-c,T=v-i,ee=t-M;return f?It(ee,a-T):ee}function p(v){var M=v-c,T=v-i;return c===void 0||M>=t||M<0||f&&T>=a}function b(){var v=W();if(p(v))return k(v);s=setTimeout(b,E(v))}function k(v){return s=void 0,g&&r?w(v):(r=o=void 0,l)}function y(){s!==void 0&&clearTimeout(s),i=0,r=c=o=s=void 0}function R(){return s===void 0?l:k(W())}function j(){var v=W(),M=p(v);if(r=arguments,o=this,c=v,M){if(s===void 0)return S(c);if(f)return clearTimeout(s),s=setTimeout(b,t),w(c)}return s===void 0&&(s=setTimeout(b,t)),l}return j.cancel=y,j.flush=R,j}var St=Nt;const Rt=ue(St);var jt=C.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Tt=C(ie)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=C.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=C(Ce)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Ht=C.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=C.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,')`,se=({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=C($e.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=C(Oe)(({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:We,rgb:Ue,hsl:Ae},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e?.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[l,s,c,i]=ce(e),[d,f,g]=_.rgb.hsl([l,s,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([l,s,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([l,s,c]).toLowerCase()}`}}if(Wt.test(e)){let[l,s,c,i]=ce(e),[d,f,g]=_.hsl.rgb([l,s,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([l,s,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([l,s,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?.valid)return q[n];if(n!=="hex")return 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,l]=r[1].split("");return`#${o}${o}${a}${a}${l}${l}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>I(n)),[l,s]=m.useState(o?.colorSpace||"hex");m.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),s(g?.colorSpace||"hex")},[e]);let c=m.useMemo(()=>At(n,o,l).toLowerCase(),[n,o,l]),i=m.useCallback(f=>{let g=I(f),w=g?.value||f||"";r(w),w===""&&(a(void 0),t(void 0)),g&&(a(g),s(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(l)+1;f>=L.length&&(f=0),s(L[f]);let g=o?.[L[f]]||"";r(g),t(g)},[o,l,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:l,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t?.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(s=>typeof s=="string"?I(s):s.title?{...I(s.color),keyword:s.title}:I(s.color)).concat(r).filter(Boolean).slice(-27),[e,r]),l=m.useCallback(s=>{s?.valid&&(a.some(c=>D(c[n])===D(s[n]))||o(c=>c.concat(s)))},[n,a]);return{presets:a,addPreset:l}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:l=!1,argType:s})=>{let c=m.useCallback(Rt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:w,cycleColorSpace:S}=Gt(t,c),{presets:E,addPreset:p}=Ut(a,g,w),b=Vt[w],k=!!s?.table?.readonly;return h.createElement(jt,{"aria-readonly":k},h.createElement(Tt,{startOpen:l,trigger:k?[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}),E.length>0&&h.createElement(Ht,null,E.map((y,R)=>h.createElement(ie,{key:`${y.value}-${R}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:y.keyword||y.value})},h.createElement(se,{value:y[w],active:g&&D(y[w])===D(g[w]),onClick:()=>f(y.value)})))))},h.createElement(se,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ie(e),value:i,onChange:y=>f(y.target.value),onFocus:y=>y.target.select(),readOnly:k,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:S}):null)},ln=Yt;export{Yt as ColorControl,ln as default}; diff --git a/assets/ContextMenu-CG6pPwnW.js b/assets/ContextMenu-DdLa5yx0.js similarity index 92% rename from assets/ContextMenu-CG6pPwnW.js rename to assets/ContextMenu-DdLa5yx0.js index 893b5477..a1e7759c 100644 --- a/assets/ContextMenu-CG6pPwnW.js +++ b/assets/ContextMenu-DdLa5yx0.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as s}from"./index-BP8_t0zE.js";import{c as C}from"./index-DD7XHAoh.js";import{c as E}from"./index-vl_XNHfj.js";import{P as O}from"./index-CkD-EKAR.js";import{c as b,A as T,C as G,G as k,L as D,I as U,a as L,R as F,b as q,d as B,S as V,e as W,f as X,g as H,u as J,h as $,P as K,J as f}from"./index-B8nNyT4I.js";import{F as Y}from"./FloatingMenu-t36h7pay.js";import{c as z}from"./index-CSpfAsmC.js";import{d as Q,D as Z,g as ee}from"./DrawerMenu-BgyYdqxq.js";import{a as te}from"./MenuItem-CmF0V73j.js";var g="ContextMenu",[ne,Fe]=E(g,[b]),c=b(),[oe,P]=ne(g),w=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:a,modal:p=!0}=e,[l,i]=s.useState(!1),h=c(t),x=J(n),u=s.useCallback(m=>{i(m),x(m)},[x]);return o.jsx(oe,{scope:t,open:l,onOpenChange:u,modal:p,children:o.jsx($,{...h,dir:a,open:l,onOpenChange:u,modal:p,children:r})})};w.displayName=g;var N="ContextMenuTrigger",y=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...a}=e,p=P(N,r),l=c(r),i=s.useRef({x:0,y:0}),h=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),x=s.useRef(0),u=s.useCallback(()=>window.clearTimeout(x.current),[]),m=d=>{i.current={x:d.clientX,y:d.clientY},p.onOpenChange(!0)};return s.useEffect(()=>u,[u]),s.useEffect(()=>void(n&&u()),[n,u]),o.jsxs(o.Fragment,{children:[o.jsx(T,{...l,virtualRef:h}),o.jsx(O.span,{"data-state":p.open?"open":"closed","data-disabled":n?"":void 0,...a,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:n?e.onContextMenu:C(e.onContextMenu,d=>{u(),m(d),d.preventDefault()}),onPointerDown:n?e.onPointerDown:C(e.onPointerDown,M(d=>{u(),x.current=window.setTimeout(()=>m(d),700)})),onPointerMove:n?e.onPointerMove:C(e.onPointerMove,M(u)),onPointerCancel:n?e.onPointerCancel:C(e.onPointerCancel,M(u)),onPointerUp:n?e.onPointerUp:C(e.onPointerUp,M(u))})]})});y.displayName=N;var re="ContextMenuPortal",I=e=>{const{__scopeContextMenu:t,...r}=e,n=c(t);return o.jsx(K,{...n,...r})};I.displayName=re;var S="ContextMenuContent",A=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=P(S,r),p=c(r),l=s.useRef(!1);return o.jsx(G,{...p,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),!i.defaultPrevented&&l.current&&i.preventDefault(),l.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),!i.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});A.displayName=S;var ae="ContextMenuGroup",se=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(k,{...a,...n,ref:t})});se.displayName=ae;var ie="ContextMenuLabel",ce=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(D,{...a,...n,ref:t})});ce.displayName=ie;var ue="ContextMenuItem",j=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(U,{...a,...n,ref:t})});j.displayName=ue;var le="ContextMenuCheckboxItem",de=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(L,{...a,...n,ref:t})});de.displayName=le;var pe="ContextMenuRadioGroup",xe=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(F,{...a,...n,ref:t})});xe.displayName=pe;var me="ContextMenuRadioItem",he=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(q,{...a,...n,ref:t})});he.displayName=me;var Ce="ContextMenuItemIndicator",fe=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(B,{...a,...n,ref:t})});fe.displayName=Ce;var Me="ContextMenuSeparator",ge=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(V,{...a,...n,ref:t})});ge.displayName=Me;var ve="ContextMenuArrow",_e=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(W,{...a,...n,ref:t})});_e.displayName=ve;var Re="ContextMenuSubTrigger",be=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(X,{...a,...n,ref:t})});be.displayName=Re;var Pe="ContextMenuSubContent",we=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(H,{...a,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});we.displayName=Pe;function M(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var _=w,Ne=y,ye=I,Ie=A;const Se=({onSelect:e,children:t})=>o.jsx(j,{onSelect:e??void 0,asChild:!0,children:t}),R=({title:e,onOpenChange:t,trigger:r,hasAccessibleAlternative:n,children:a})=>{const[p,l]=s.useState(!1),i=s.useCallback(v=>{l(v),t?.(v)},[l,t]),h=ee(),x=h==="android"||h==="ios",u=s.useMemo(()=>({MenuItemWrapper:x?null:Se,onOpenChange:i}),[i]),m=o.jsx(te.Provider,{value:u,children:a}),d=o.jsx(Ne,{"aria-haspopup":"menu",tabIndex:n?void 0:0,asChild:!0,children:r});return x?o.jsxs(o.Fragment,{children:[o.jsx(_,{onOpenChange:i,children:d}),o.jsx(f.Root,{open:p,onOpenChange:i,children:o.jsxs(f.Portal,{children:[o.jsx(f.Overlay,{className:z(Q.bg)}),o.jsx(f.Content,{asChild:!0,children:o.jsx(Z,{title:e,children:m})})]})})]}):o.jsxs(_,{onOpenChange:i,children:[d,o.jsx(ye,{children:o.jsx(Ie,{asChild:!0,children:o.jsx(Y,{title:e,children:m})})})]})};try{R.displayName="ContextMenu",R.__docgenInfo={description:"A menu opened by right-clicking or long-pressing another UI element.",displayName:"ContextMenu",props:{title:{defaultValue:null,description:"The menu title.",name:"title",required:!0,type:{name:"string"}},onOpenChange:{defaultValue:null,description:"Event handler called when the open state of the menu changes.",name:"onOpenChange",required:!1,type:{name:"((open: boolean) => void)"}},trigger:{defaultValue:null,description:`The trigger that can be right-clicked or long-pressed to open the menu. +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as s}from"./index-BP8_t0zE.js";import{c as C}from"./index-DD7XHAoh.js";import{c as E}from"./index-vl_XNHfj.js";import{P as O}from"./index-CkD-EKAR.js";import{c as b,A as T,C as G,G as k,L as D,I as U,a as L,R as F,b as q,d as B,S as V,e as W,f as X,g as H,u as $,h as K,P as Y,D as f}from"./index-D_QEhDW5.js";import{F as z}from"./FloatingMenu-t36h7pay.js";import{c as J}from"./index-CSpfAsmC.js";import{d as Q,D as Z,g as ee}from"./DrawerMenu-BgyYdqxq.js";import{a as te}from"./MenuItem-CmF0V73j.js";var g="ContextMenu",[ne,Fe]=E(g,[b]),c=b(),[oe,P]=ne(g),w=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:n,dir:a,modal:p=!0}=e,[l,i]=s.useState(!1),h=c(t),x=$(n),u=s.useCallback(m=>{i(m),x(m)},[x]);return o.jsx(oe,{scope:t,open:l,onOpenChange:u,modal:p,children:o.jsx(K,{...h,dir:a,open:l,onOpenChange:u,modal:p,children:r})})};w.displayName=g;var N="ContextMenuTrigger",y=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:n=!1,...a}=e,p=P(N,r),l=c(r),i=s.useRef({x:0,y:0}),h=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),x=s.useRef(0),u=s.useCallback(()=>window.clearTimeout(x.current),[]),m=d=>{i.current={x:d.clientX,y:d.clientY},p.onOpenChange(!0)};return s.useEffect(()=>u,[u]),s.useEffect(()=>void(n&&u()),[n,u]),o.jsxs(o.Fragment,{children:[o.jsx(T,{...l,virtualRef:h}),o.jsx(O.span,{"data-state":p.open?"open":"closed","data-disabled":n?"":void 0,...a,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:n?e.onContextMenu:C(e.onContextMenu,d=>{u(),m(d),d.preventDefault()}),onPointerDown:n?e.onPointerDown:C(e.onPointerDown,M(d=>{u(),x.current=window.setTimeout(()=>m(d),700)})),onPointerMove:n?e.onPointerMove:C(e.onPointerMove,M(u)),onPointerCancel:n?e.onPointerCancel:C(e.onPointerCancel,M(u)),onPointerUp:n?e.onPointerUp:C(e.onPointerUp,M(u))})]})});y.displayName=N;var re="ContextMenuPortal",I=e=>{const{__scopeContextMenu:t,...r}=e,n=c(t);return o.jsx(Y,{...n,...r})};I.displayName=re;var S="ContextMenuContent",A=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=P(S,r),p=c(r),l=s.useRef(!1);return o.jsx(G,{...p,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),!i.defaultPrevented&&l.current&&i.preventDefault(),l.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),!i.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});A.displayName=S;var ae="ContextMenuGroup",se=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(k,{...a,...n,ref:t})});se.displayName=ae;var ie="ContextMenuLabel",ce=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(D,{...a,...n,ref:t})});ce.displayName=ie;var ue="ContextMenuItem",j=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(U,{...a,...n,ref:t})});j.displayName=ue;var le="ContextMenuCheckboxItem",de=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(L,{...a,...n,ref:t})});de.displayName=le;var pe="ContextMenuRadioGroup",xe=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(F,{...a,...n,ref:t})});xe.displayName=pe;var me="ContextMenuRadioItem",he=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(q,{...a,...n,ref:t})});he.displayName=me;var Ce="ContextMenuItemIndicator",fe=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(B,{...a,...n,ref:t})});fe.displayName=Ce;var Me="ContextMenuSeparator",ge=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(V,{...a,...n,ref:t})});ge.displayName=Me;var ve="ContextMenuArrow",_e=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(W,{...a,...n,ref:t})});_e.displayName=ve;var Re="ContextMenuSubTrigger",be=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(X,{...a,...n,ref:t})});be.displayName=Re;var Pe="ContextMenuSubContent",we=s.forwardRef((e,t)=>{const{__scopeContextMenu:r,...n}=e,a=c(r);return o.jsx(H,{...a,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});we.displayName=Pe;function M(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var _=w,Ne=y,ye=I,Ie=A;const Se=({onSelect:e,children:t})=>o.jsx(j,{onSelect:e??void 0,asChild:!0,children:t}),R=({title:e,onOpenChange:t,trigger:r,hasAccessibleAlternative:n,children:a})=>{const[p,l]=s.useState(!1),i=s.useCallback(v=>{l(v),t?.(v)},[l,t]),h=ee(),x=h==="android"||h==="ios",u=s.useMemo(()=>({MenuItemWrapper:x?null:Se,onOpenChange:i}),[i]),m=o.jsx(te.Provider,{value:u,children:a}),d=o.jsx(Ne,{"aria-haspopup":"menu",tabIndex:n?void 0:0,asChild:!0,children:r});return x?o.jsxs(o.Fragment,{children:[o.jsx(_,{onOpenChange:i,children:d}),o.jsx(f.Root,{open:p,onOpenChange:i,children:o.jsxs(f.Portal,{children:[o.jsx(f.Overlay,{className:J(Q.bg)}),o.jsx(f.Content,{asChild:!0,children:o.jsx(Z,{title:e,children:m})})]})})]}):o.jsxs(_,{onOpenChange:i,children:[d,o.jsx(ye,{children:o.jsx(Ie,{asChild:!0,children:o.jsx(z,{title:e,children:m})})})]})};try{R.displayName="ContextMenu",R.__docgenInfo={description:"A menu opened by right-clicking or long-pressing another UI element.",displayName:"ContextMenu",props:{title:{defaultValue:null,description:"The menu title.",name:"title",required:!0,type:{name:"string"}},onOpenChange:{defaultValue:null,description:"Event handler called when the open state of the menu changes.",name:"onOpenChange",required:!1,type:{name:"((open: boolean) => void)"}},trigger:{defaultValue:null,description:`The trigger that can be right-clicked or long-pressed to open the menu. This must be a component that accepts a ref and spreads props. https://www.radix-ui.com/primitives/docs/guides/composition`,name:"trigger",required:!0,type:{name:"ReactNode"}},hasAccessibleAlternative:{defaultValue:null,description:`Whether the functionality of this menu is available through some other keyboard-accessible means. Preferably this should be true, because context diff --git a/assets/ContextMenu.stories-BhAVMqL8.js b/assets/ContextMenu.stories-BcmLz1Vg.js similarity index 92% rename from assets/ContextMenu.stories-BhAVMqL8.js rename to assets/ContextMenu.stories-BcmLz1Vg.js index 5c014a86..e9ae9e0f 100644 --- a/assets/ContextMenu.stories-BhAVMqL8.js +++ b/assets/ContextMenu.stories-BcmLz1Vg.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{U as i}from"./user-profile-EvkA4CON.js";import{N as s,C as a,L as c}from"./notifications-MBLL4uPX.js";import{C as o}from"./ContextMenu-CG6pPwnW.js";import{M as n}from"./MenuItem-CmF0V73j.js";import{S as l}from"./Separator-DGmfQX2-.js";import"./index-BP8_t0zE.js";import"./index-DD7XHAoh.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./index-Dp4tTk3o.js";import"./index-B8nNyT4I.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./DrawerMenu-BgyYdqxq.js";import"./chevron-right-DF47_mtr.js";const L={title:"Menu/ContextMenu",component:o,tags:["autodocs"],argTypes:{},args:{}},m=r=>e.jsxs(o,{...r,title:"Settings",trigger:e.jsx("div",{style:{borderRadius:24,background:"var(--cpd-color-bg-subtle-secondary)",inlineSize:300,blockSize:200,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",padding:32,boxSizing:"border-box"},children:"Right click or long press to open menu"}),hasAccessibleAlternative:!1,children:[e.jsx(n,{Icon:i,label:"Profile",onSelect:()=>{}}),e.jsx(n,{Icon:s,label:"Notifications",onSelect:()=>{}}),e.jsx(n,{Icon:a,label:"Feedback",onSelect:()=>{}}),e.jsx(l,{}),e.jsx(n,{kind:"critical",Icon:c,label:"Sign out",onSelect:()=>{}})]}),t=m.bind({});t.args={};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`args => { +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{U as i}from"./user-profile-EvkA4CON.js";import{N as s,C as a,L as c}from"./notifications-MBLL4uPX.js";import{C as o}from"./ContextMenu-DdLa5yx0.js";import{M as n}from"./MenuItem-CmF0V73j.js";import{S as l}from"./Separator-DGmfQX2-.js";import"./index-BP8_t0zE.js";import"./index-DD7XHAoh.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./index-Dp4tTk3o.js";import"./index-D_QEhDW5.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./DrawerMenu-BgyYdqxq.js";import"./chevron-right-DF47_mtr.js";const L={title:"Menu/ContextMenu",component:o,tags:["autodocs"],argTypes:{},args:{}},m=r=>e.jsxs(o,{...r,title:"Settings",trigger:e.jsx("div",{style:{borderRadius:24,background:"var(--cpd-color-bg-subtle-secondary)",inlineSize:300,blockSize:200,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",padding:32,boxSizing:"border-box"},children:"Right click or long press to open menu"}),hasAccessibleAlternative:!1,children:[e.jsx(n,{Icon:i,label:"Profile",onSelect:()=>{}}),e.jsx(n,{Icon:s,label:"Notifications",onSelect:()=>{}}),e.jsx(n,{Icon:a,label:"Feedback",onSelect:()=>{}}),e.jsx(l,{}),e.jsx(n,{kind:"critical",Icon:c,label:"Sign out",onSelect:()=>{}})]}),t=m.bind({});t.args={};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`args => { return i.map(i=>d[i]); -import{_ as op}from"./iframe-BUJwMp-o.js";import{r as l,a as y,g as Cs}from"./index-BP8_t0zE.js";import{r as bD,u as wD}from"./react-18-Glus6dSN.js";import{w as c3,r as ip}from"./index-Cw6ikIwd.js";import{O as d3,P as ED}from"./index-D-8MO0q_.js";import{_ as mr,h as p3,i as Aa,j as lp,d as gr,a as Ds,c as bn,k as xD,l as CD,b as f3,e as Zh,s as zu}from"./isArray-d9wiqGGH.js";import{d as DD}from"./index-DrFu-skq.js";var SD=Object.create,h3=Object.defineProperty,AD=Object.getOwnPropertyDescriptor,m3=Object.getOwnPropertyNames,kD=Object.getPrototypeOf,_D=Object.prototype.hasOwnProperty,ka=(e,t)=>function(){return t||(0,e[m3(e)[0]])((t={exports:{}}).exports,t),t.exports},FD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of m3(t))!_D.call(e,a)&&a!==r&&h3(e,a,{get:()=>t[a],enumerable:!(n=AD(t,a))||n.enumerable});return e},TD=(e,t,r)=>(r=e!=null?SD(kD(e)):{},FD(!e||!e.__esModule?h3(r,"default",{value:e,enumerable:!0}):r,e)),Dt=e=>`control-${e.replace(/\s+/g,"-")}`,Ss=e=>`set-${e.replace(/\s+/g,"-")}`,ID=Object.create,sp=Object.defineProperty,RD=Object.getOwnPropertyDescriptor,BD=Object.getOwnPropertyNames,zD=Object.getPrototypeOf,$D=Object.prototype.hasOwnProperty,T=(e,t)=>sp(e,"name",{value:t,configurable:!0}),Ri=(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')}),As=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),LD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of BD(t))!$D.call(e,a)&&a!==r&&sp(e,a,{get:()=>t[a],enumerable:!(n=RD(t,a))||n.enumerable});return e},up=(e,t,r)=>(r=e!=null?ID(zD(e)):{},LD(t||!e||!e.__esModule?sp(r,"default",{value:e,enumerable:!0}):r,e)),OD=As(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,p=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,m=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,C=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===p||P===i||P===o||P===m||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===g||P.$$typeof===v||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===C||P.$$typeof===E||P.$$typeof===x||P.$$typeof===b)}T(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var ct=P.$$typeof;switch(ct){case r:var _t=P.type;switch(_t){case d:case p:case a:case i:case o:case m:return _t;default:var Vr=_t&&_t.$$typeof;switch(Vr){case u:case h:case g:case v:case s:return Vr;default:return ct}}case n:return ct}}}T(D,"typeOf");var S=d,A=p,k=u,F=s,I=r,R=h,$=a,z=g,O=v,L=n,M=i,j=o,G=m,H=!1;function K(P){return H||(H=!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}T(K,"isAsyncMode");function te(P){return D(P)===p}T(te,"isConcurrentMode");function le(P){return D(P)===u}T(le,"isContextConsumer");function Q(P){return D(P)===s}T(Q,"isContextProvider");function re(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}T(re,"isElement");function N(P){return D(P)===h}T(N,"isForwardRef");function Y(P){return D(P)===a}T(Y,"isFragment");function J(P){return D(P)===g}T(J,"isLazy");function pe(P){return D(P)===v}T(pe,"isMemo");function Se(P){return D(P)===n}T(Se,"isPortal");function kt(P){return D(P)===i}T(kt,"isProfiler");function qe(P){return D(P)===o}T(qe,"isStrictMode");function ut(P){return D(P)===m}T(ut,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=I,e.ForwardRef=R,e.Fragment=$,e.Lazy=z,e.Memo=O,e.Portal=L,e.Profiler=M,e.StrictMode=j,e.Suspense=G,e.isAsyncMode=K,e.isConcurrentMode=te,e.isContextConsumer=le,e.isContextProvider=Q,e.isElement=re,e.isForwardRef=N,e.isFragment=Y,e.isLazy=J,e.isMemo=pe,e.isPortal=Se,e.isProfiler=kt,e.isStrictMode=qe,e.isSuspense=ut,e.isValidElementType=w,e.typeOf=D})()}),MD=As((e,t)=>{t.exports=OD()}),g3=As((e,t)=>{var r=MD(),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}T(u,"getStatics");var d=Object.defineProperty,p=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,v=Object.prototype;function g(b,C,E){if(typeof C!="string"){if(v){var x=f(C);x&&x!==v&&g(b,x,E)}var w=p(C);h&&(w=w.concat(h(C)));for(var D=u(b),S=u(C),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 T(function r(n,a,o){function i(d,p){if(!a[d]){if(!n[d]){var h=typeof Ri=="function"&&Ri;if(!p&&h)return h(d,!0);if(s)return s(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var f=a[d]={exports:{}};n[d][0].call(f.exports,function(v){var g=n[d][1][v];return i(g||v)},f,f.exports,r,n,a,o)}return a[d].exports}T(i,"s");for(var s=typeof Ri=="function"&&Ri,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[C]={cacheItem:v,arg:arguments[C]},x?i(h,E):h.push(E),h.length>d&&s(h.shift())),f.wasMemoized=x,f.numArgs=C+1,b},"memoizerific");return f.limit=d,f.wasMemoized=!1,f.cache=p,f.lru=h,f}};function i(d,p){var h=d.length,m=p.length,f,v,g;for(v=0;v=0&&(h=d[f],m=h.cacheItem.get(h.arg),!m||!m.size);f--)h.cacheItem.delete(h.arg)}T(s,"removeCachedResult");function u(d,p){return d===p||d!==d&&p!==p}T(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.map(i=>d[i]); +import{_ as op}from"./iframe-uIoLn8e1.js";import{r as l,a as y,g as Cs}from"./index-BP8_t0zE.js";import{r as bD,u as wD}from"./react-18-Glus6dSN.js";import{w as c3,r as ip}from"./index-Cw6ikIwd.js";import{O as d3,P as ED}from"./index-D-8MO0q_.js";import{_ as mr,h as p3,i as Aa,j as lp,d as gr,a as Ds,c as bn,k as xD,l as CD,b as f3,e as Zh,s as zu}from"./isArray-d9wiqGGH.js";import{d as DD}from"./index-DrFu-skq.js";var SD=Object.create,h3=Object.defineProperty,AD=Object.getOwnPropertyDescriptor,m3=Object.getOwnPropertyNames,kD=Object.getPrototypeOf,_D=Object.prototype.hasOwnProperty,ka=(e,t)=>function(){return t||(0,e[m3(e)[0]])((t={exports:{}}).exports,t),t.exports},FD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of m3(t))!_D.call(e,a)&&a!==r&&h3(e,a,{get:()=>t[a],enumerable:!(n=AD(t,a))||n.enumerable});return e},TD=(e,t,r)=>(r=e!=null?SD(kD(e)):{},FD(!e||!e.__esModule?h3(r,"default",{value:e,enumerable:!0}):r,e)),Dt=e=>`control-${e.replace(/\s+/g,"-")}`,Ss=e=>`set-${e.replace(/\s+/g,"-")}`,ID=Object.create,sp=Object.defineProperty,RD=Object.getOwnPropertyDescriptor,BD=Object.getOwnPropertyNames,zD=Object.getPrototypeOf,$D=Object.prototype.hasOwnProperty,T=(e,t)=>sp(e,"name",{value:t,configurable:!0}),Ri=(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')}),As=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),LD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of BD(t))!$D.call(e,a)&&a!==r&&sp(e,a,{get:()=>t[a],enumerable:!(n=RD(t,a))||n.enumerable});return e},up=(e,t,r)=>(r=e!=null?ID(zD(e)):{},LD(t||!e||!e.__esModule?sp(r,"default",{value:e,enumerable:!0}):r,e)),OD=As(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,p=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,m=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,C=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===p||P===i||P===o||P===m||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===g||P.$$typeof===v||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===C||P.$$typeof===E||P.$$typeof===x||P.$$typeof===b)}T(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var ct=P.$$typeof;switch(ct){case r:var _t=P.type;switch(_t){case d:case p:case a:case i:case o:case m:return _t;default:var Vr=_t&&_t.$$typeof;switch(Vr){case u:case h:case g:case v:case s:return Vr;default:return ct}}case n:return ct}}}T(D,"typeOf");var S=d,A=p,k=u,F=s,I=r,R=h,$=a,z=g,O=v,L=n,M=i,j=o,G=m,H=!1;function K(P){return H||(H=!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}T(K,"isAsyncMode");function te(P){return D(P)===p}T(te,"isConcurrentMode");function le(P){return D(P)===u}T(le,"isContextConsumer");function Q(P){return D(P)===s}T(Q,"isContextProvider");function re(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}T(re,"isElement");function N(P){return D(P)===h}T(N,"isForwardRef");function Y(P){return D(P)===a}T(Y,"isFragment");function J(P){return D(P)===g}T(J,"isLazy");function pe(P){return D(P)===v}T(pe,"isMemo");function Se(P){return D(P)===n}T(Se,"isPortal");function kt(P){return D(P)===i}T(kt,"isProfiler");function qe(P){return D(P)===o}T(qe,"isStrictMode");function ut(P){return D(P)===m}T(ut,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=I,e.ForwardRef=R,e.Fragment=$,e.Lazy=z,e.Memo=O,e.Portal=L,e.Profiler=M,e.StrictMode=j,e.Suspense=G,e.isAsyncMode=K,e.isConcurrentMode=te,e.isContextConsumer=le,e.isContextProvider=Q,e.isElement=re,e.isForwardRef=N,e.isFragment=Y,e.isLazy=J,e.isMemo=pe,e.isPortal=Se,e.isProfiler=kt,e.isStrictMode=qe,e.isSuspense=ut,e.isValidElementType=w,e.typeOf=D})()}),MD=As((e,t)=>{t.exports=OD()}),g3=As((e,t)=>{var r=MD(),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}T(u,"getStatics");var d=Object.defineProperty,p=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,v=Object.prototype;function g(b,C,E){if(typeof C!="string"){if(v){var x=f(C);x&&x!==v&&g(b,x,E)}var w=p(C);h&&(w=w.concat(h(C)));for(var D=u(b),S=u(C),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 T(function r(n,a,o){function i(d,p){if(!a[d]){if(!n[d]){var h=typeof Ri=="function"&&Ri;if(!p&&h)return h(d,!0);if(s)return s(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var f=a[d]={exports:{}};n[d][0].call(f.exports,function(v){var g=n[d][1][v];return i(g||v)},f,f.exports,r,n,a,o)}return a[d].exports}T(i,"s");for(var s=typeof Ri=="function"&&Ri,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[C]={cacheItem:v,arg:arguments[C]},x?i(h,E):h.push(E),h.length>d&&s(h.shift())),f.wasMemoized=x,f.numArgs=C+1,b},"memoizerific");return f.limit=d,f.wasMemoized=!1,f.cache=p,f.lru=h,f}};function i(d,p){var h=d.length,m=p.length,f,v,g;for(v=0;v=0&&(h=d[f],m=h.cacheItem.get(h.arg),!m||!m.size);f--)h.cacheItem.delete(h.arg)}T(s,"removeCachedResult");function u(d,p){return d===p||d!==d&&p!==p}T(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?be(_a,--je):0,la--,de===10&&(la=1,Fs--),de}T(S3,"prev");function Pe(){return de=je2||sa(de)>3?"":" "}T(A3,"whitespace");function k3(e,t){for(;--t&&Pe()&&!(de<48||de>102||de>57&&de<65||de>70&&de<97););return Fa(e,Ao()+(t<6&&yt()==32&&Pe()==32))}T(k3,"escaping");function Rl(e){for(;Pe();)switch(de){case e:return je;case 34:case 39:e!==34&&e!==39&&Rl(de);break;case 40:e===41&&Rl(e);break;case 92:Pe();break}return je}T(Rl,"delimiter");function _3(e,t){for(;Pe()&&e+de!==57&&!(e+de===84&&yt()===47););return"/*"+Fa(t,je-1)+"*"+ks(e===47?e:Pe())}T(_3,"commenter");function F3(e){for(;!sa(yt());)Pe();return Fa(e,je)}T(F3,"identifier");function T3(e){return vp(_o("",null,null,null,[""],e=gp(e),0,[0],e))}T(T3,"compile");function _o(e,t,r,n,a,o,i,s,u){for(var d=0,p=0,h=i,m=0,f=0,v=0,g=1,b=1,C=1,E=0,x="",w=a,D=o,S=n,A=x;b;)switch(v=E,E=Pe()){case 40:if(v!=108&&be(A,h-1)==58){Il(A+=X(ko(E),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:A+=ko(E);break;case 9:case 10:case 13:case 32:A+=A3(v);break;case 92:A+=k3(Ao()-1,7);continue;case 47:switch(yt()){case 42:case 47:go(I3(_3(Pe(),Ao()),t,r),u);break;default:A+="/"}break;case 123*g:s[d++]=ht(A)*C;case 125*g:case 59:case 0:switch(E){case 0:case 125:b=0;case 59+p:C==-1&&(A=X(A,/\f/g,"")),f>0&&ht(A)-h&&go(f>32?ld(A+";",n,r,h-1):ld(X(A," ","")+";",n,r,h-2),u);break;case 59:A+=";";default:if(go(S=id(A,t,r,d,p,a,s,x,w=[],D=[],h),o),E===123)if(p===0)_o(A,t,S,S,w,o,h,s,D);else switch(m===99&&be(A,3)===110?100:m){case 100:case 108:case 109:case 115:_o(e,S,S,n&&go(id(e,S,S,0,0,a,s,x,a,w=[],h),D),a,D,h,s,n?w:D);break;default:_o(A,S,S,S,[""],D,0,s,D)}}d=p=f=0,g=C=1,x=A="",h=i;break;case 58:h=1+ht(A),f=v;default:if(g<1){if(E==123)--g;else if(E==125&&g++==0&&S3()==125)continue}switch(A+=ks(E),E*g){case 38:C=p>0?1:(A+="\f",-1);break;case 44:s[d++]=(ht(A)-1)*C,C=1;break;case 64:yt()===45&&(A+=ko(Pe())),m=yt(),p=h=ht(x=A+=F3(Ao())),E++;break;case 45:v===45&&ht(A)==2&&(g=0)}}return o}T(_o,"parse");function id(e,t,r,n,a,o,i,s,u,d,p){for(var h=a-1,m=a===0?o:[""],f=_s(m),v=0,g=0,b=0;v0?m[C]+" "+E:X(E,/&\f/g,m[C])))&&(u[b++]=x);return ti(e,t,r,a===0?fp:s,u,d,p)}T(id,"ruleset");function I3(e,t,r){return ti(e,t,r,pp,ks(D3()),ia(e,2,-2),0)}T(I3,"comment");function ld(e,t,r,n){return ti(e,t,r,hp,ia(e,0,n),ia(e,n+1,-1),n)}T(ld,"declaration");function un(e,t){for(var r="",n=_s(e),a=0;a-1},"isIgnoringComment"),QD=T(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(!z3(t[r]))return!0;return!1},"isPrependedWithRegularRules"),em=T(function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},"nullifyElement"),tS=T(function(e,t,r){z3(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."),em(e)):eS(t,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),em(e)))},"incorrectImportAlarm");function yp(e,t){switch(w3(e,t)){case 5103:return ee+"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 ee+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ee+e+Tl+e+Fe+e+e;case 6828:case 4268:return ee+e+Fe+e+e;case 6165:return ee+e+Fe+"flex-"+e+e;case 5187:return ee+e+X(e,/(\w+).+(:[^]+)/,ee+"box-$1$2"+Fe+"flex-$1$2")+e;case 5443:return ee+e+Fe+"flex-item-"+X(e,/flex-|-self/,"")+e;case 4675:return ee+e+Fe+"flex-line-pack"+X(e,/align-content|flex-|-self/,"")+e;case 5548:return ee+e+Fe+X(e,"shrink","negative")+e;case 5292:return ee+e+Fe+X(e,"basis","preferred-size")+e;case 6060:return ee+"box-"+X(e,"-grow","")+ee+e+Fe+X(e,"grow","positive")+e;case 4554:return ee+X(e,/([^-])(transform)/g,"$1"+ee+"$2")+e;case 6187:return X(X(X(e,/(zoom-|grab)/,ee+"$1"),/(image-set)/,ee+"$1"),e,"")+e;case 5495:case 3959:return X(e,/(image-set\([^]*)/,ee+"$1$`$1");case 4968:return X(X(e,/(.+:)(flex-)?(.*)/,ee+"box-pack:$3"+Fe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ee+e+e;case 4095:case 3583:case 4068:case 2532:return X(e,/(.+)-inline(.+)/,ee+"$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(ht(e)-1-t>6)switch(be(e,t+1)){case 109:if(be(e,t+4)!==45)break;case 102:return X(e,/(.+:)(.+)-([^]+)/,"$1"+ee+"$2-$3$1"+Tl+(be(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Il(e,"stretch")?yp(X(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(be(e,t+1)!==115)break;case 6444:switch(be(e,ht(e)-3-(~Il(e,"!important")&&10))){case 107:return X(e,":",":"+ee)+e;case 101:return X(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ee+(be(e,14)===45?"inline-":"")+"box$3$1"+ee+"$2$3$1"+Fe+"$2box$3")+e}break;case 5936:switch(be(e,t+11)){case 114:return ee+e+Fe+X(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ee+e+Fe+X(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ee+e+Fe+X(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ee+e+Fe+e+e}return e}T(yp,"prefix");var rS=T(function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case hp:e.return=yp(e.value,e.length);break;case b3:return un([Vn(e,{value:X(e.value,"@","@"+ee)})],n);case fp:if(e.length)return x3(e.props,function(a){switch(E3(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return un([Vn(e,{props:[X(a,/:(read-\w+)/,":"+Tl+"$1")]})],n);case"::placeholder":return un([Vn(e,{props:[X(a,/:(plac\w+)/,":"+ee+"input-$1")]}),Vn(e,{props:[X(a,/:(plac\w+)/,":"+Tl+"$1")]}),Vn(e,{props:[X(a,/:(plac\w+)/,Fe+"input-$1")]})],n)}return""})}},"prefixer"),nS=[rS],aS=T(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(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var n=e.stylisPlugins||nS;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(v){for(var g=v.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)}T($3,"murmur2");var sS={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},tm=`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';". @@ -537,7 +537,7 @@ ${t}`);let r=t.match(Uz);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:ot}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:_X,once:FX,logger:Hh}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:Ky,composeConfigs:Tre,Preview:Ire,DocsContext:Rre}=__STORYBOOK_MODULE_PREVIEW_API__,{GLOBALS_UPDATED:Yy,STORY_ARGS_UPDATED:Jy,UPDATE_STORY_ARGS:TX,RESET_STORY_ARGS:IX,NAVIGATE_URL:RX}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var BX=ka({"../../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}}}),zX=ka({"../../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=m(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function p(w,D){var S=!1,A=m(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 m(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 f(){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 v(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=v(w.offsetParent))),D}function g(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&&f();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(O,L){if(v(O)>D+r.headingsOffset+10){var M=L===0?L:L-1;return A=S[M],!0}else if(L===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 I=i.querySelectorAll("."+r.linkClass);n.call(I,function(O){g(O,O.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(O){g(O,O.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var $=F&&F.parentNode;$&&$.className.indexOf(r.activeListItemClass)===-1&&($.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(O){O.className.indexOf(r.isCollapsedClass)===-1&&(O.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&g(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),C(F&&F.parentNode.parentNode)}}function C(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(g(w,w.className.replace(u+r.isCollapsedClass,"")),C(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 x(){s=!0}return{enableTocAnimation:x,disableTocAnimation:E,render:p,updateToc:b}}}}),$X=ka({"../../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 m=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var f={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:m};return r.includeHtml&&(f.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(f,h):f}function u(h,m){for(var f=s(h),v=f.headingLevel,g=m,b=a(g),C=b?b.headingLevel:0,E=v-C;E>0&&(b=a(g),!(b&&v===b.headingLevel));)b&&b.children!==void 0&&(g=b.children),E--;return v>=r.collapseDepth&&(f.isCollapsed=!0),g.push(f),g}function d(h,m){var f=m;r.ignoreSelector&&(f=m.split(",").map(function(v){return v.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(f)}catch{return console.warn("Headers not found with selector: "+f),null}}function p(h){return n.call(h,function(m,f){var v=s(f);return v&&u(v,m.nest),m},{nest:[]})}return{nestHeadingsArray:p,selectHeadings:d}}}}),LX=ka({"../../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)}}}}),OX=ka({"../../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(m){!u(m.target)||m.target.className.indexOf("no-smooth-scroll")>-1||m.target.href.charAt(m.target.href.length-2)==="#"&&m.target.href.charAt(m.target.href.length-1)==="!"||m.target.className.indexOf(n.linkClass)===-1||r(m.target.hash,{duration:a,offset:o,callback:function(){p(m.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 p(h){var m=document.getElementById(h.substring(1));m&&(/^(?:a|select|input|button|textarea)$/i.test(m.tagName)||(m.tabIndex=-1),m.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||v},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,p,h;requestAnimationFrame(function(g){p=g,m(g)});function m(g){h=g-p,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var m,f=Object.prototype.hasOwnProperty;function v(){for(var E={},x=0;x({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:ie(.3,e.color.defaultText),fontSize:e.typography.size.s2})),UC=e=>y.createElement(PX,{...e,className:"docblock-emptyblock sb-unstyled"}),NX=_(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"}})),HX=_.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"})),al=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${dd}`]:{margin:0}})),jX=()=>y.createElement(HX,null,y.createElement(al,null),y.createElement(al,{style:{width:"80%"}}),y.createElement(al,{style:{width:"30%"}}),y.createElement(al,{style:{width:"80%"}})),qC=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=H3();if(e)return y.createElement(jX,null);if(t)return y.createElement(UC,null,t);let u=y.createElement(NX,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?ud.dark:ud.light;return y.createElement(j3,{theme:cd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},fe=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,jh=600,VX=_.h1(ue,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${jh}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),UX=_.h2(ue,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${jh}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:ie(.25,e.color.defaultText)})),qX=_.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"?ie(.1,e.color.defaultText):ie(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[fe("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}},[fe("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}},[fe("div")]:t,[fe("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}},[fe("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[fe("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[fe("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[fe("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[fe("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[fe("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[fe("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[fe("img")]:{maxWidth:"100%"},[fe("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[fe("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[fe("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[fe("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"}},[fe("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"}}},[fe("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}},[fe("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),WX=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${jh}px)`]:{}})),GX=({children:e,toc:t})=>y.createElement(WX,{className:"sbdocs sbdocs-wrapper"},y.createElement(qX,{className:"sbdocs sbdocs-content"},e),t),Tu=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}`}),KX=_(mh)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),YX=_.div({display:"flex",alignItems:"center",gap:4}),JX=_.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`})),ZX=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(KX,{...o},y.createElement(YX,{key:"left"},e?[1,2,3].map(i=>y.createElement(JX,{key:i})):y.createElement(y.Fragment,null,y.createElement(pn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(lO,null)),y.createElement(pn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(sO,null)),y.createElement(pn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(uO,null))))),WC=l.createContext({scale:1}),{window:XX}=ot,QX=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=XX.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})}},{PREVIEW_URL:eQ}=ot,tQ=eQ||"iframe.html",X1=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,rQ=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:p}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,m=p(i,h,{showMain:()=>{},showError:({title:f,description:v})=>o(new Error(`${f} - ${v}`)),showException:f=>o(f)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>m())}},[u,p,i]),a?y.createElement("pre",null,y.createElement(Kz,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${X1(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(GC,null),y.createElement("div",{ref:t,id:`${X1(e)}-inner`,"data-name":i.name}))},nQ=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(WC.Consumer,null,({scale:r})=>y.createElement(QX,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:vL(tQ,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),aQ=_.strong(({theme:e})=>({color:e.color.orange})),oQ=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(aQ,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:X1(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(rQ,{...e}):y.createElement(nQ,{...e}))},GC=()=>y.createElement(gL,null),iQ=_.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)`}}:{}),Zy=_(qC)(({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)}})),lQ=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Tu(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),sQ=(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(Zy,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(Zy,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function uQ(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var cQ=_(ZX)({position:"absolute",top:0,left:0,right:0,height:40}),dQ=_.div({overflow:"hidden",position:"relative"}),KC=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...p})=>{let[h,m]=l.useState(i),{source:f,actionItem:v}=sQ(a,h,m),[g,b]=l.useState(1),C=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[v]:[],[x,w]=l.useState(s?[...s]:[]),D=[...E,...x],{window:S}=ot,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:I}=await op(()=>import("./index-DtiVWr1N.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);I()},[]),k=F=>{let I=S.getSelection();I&&I.type==="Range"||(F.preventDefault(),x.filter(R=>R.title==="Copied").length===0&&A(f.props.code).then(()=>{w([...x,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(x.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(lQ,{withSource:a,withToolbar:o,...p,className:C.join(" ")},o&&y.createElement(cQ,{isLoading:e,border:!0,zoom:F=>b(g*F),resetZoom:()=>b(1),storyId:uQ(n),baseUrl:"./iframe.html"}),y.createElement(WC.Provider,{value:{scale:g}},y.createElement(dQ,{className:"docs-story",onCopyCapture:a&&k},y.createElement(iQ,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(Nz.Element,{scale:g},Array.isArray(n)?n.map((F,I)=>y.createElement("div",{key:I},F)):y.createElement("div",null,n))),y.createElement(Lp,{actionItems:D}))),a&&h&&f)};_(KC)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var pQ=_.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:Nr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),fQ=({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(pQ,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)))))},Q1=8,Xy=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),hQ=_.span(Nr,({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}})),mQ=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),gQ=_.div(Nr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),vQ=_.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"}})),yQ=_(yO)({marginLeft:4}),bQ=_(Lx)({marginLeft:4}),wQ=()=>y.createElement("span",null,"-"),YC=({text:e,simple:t})=>y.createElement(hQ,{simple:t},e),EQ=TC(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),xQ=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return DG(t)},Qy=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Q1)),r.map(n=>y.createElement(YC,{key:n,text:n===""?'""':n}))},CQ=({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(YC,{text:u});let d=xQ(u),p=d.length;return p>Q1?y.createElement(Xy,{isExpanded:i},Qy(d,i),y.createElement(mQ,{onClick:()=>s(!i)},i?"Show less...":`Show ${p-Q1} more...`)):y.createElement(Xy,null,Qy(d))}return y.createElement(w$,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(vQ,{width:EQ(n)},y.createElement(ih,{language:"jsx",format:!1},n))},y.createElement(gQ,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(yQ,null):y.createElement(bQ,null)))},nd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(wQ,null):y.createElement(CQ,{value:e,initialExpandedArgs:t}),DQ=_.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:ie(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${tl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${tl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:tl(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"?`${tl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),SQ=e=>e==="true",AQ=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{let i=l.useCallback(()=>r(!1),[r]),s=!!o?.table?.readonly;if(t===void 0)return y.createElement(_n,{variant:"outline",size:"medium",id:Ss(e),onClick:i,disabled:s},"Set boolean");let u=Dt(e),d=typeof t=="string"?SQ(t):t;return y.createElement(DQ,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:p=>r(p.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"))},kQ=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},_Q=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},FQ=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}`},TQ=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},e3=_(ki.Input)(({readOnly:e})=>({opacity:e?.5:1})),IQ=_.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}})),RQ=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),p=!!o?.table?.readonly;l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?FQ(t):""),d&&d.current&&(d.current.value=t?TQ(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let g=kQ(v.target.value),b=new Date(t);b.setFullYear(g.getFullYear(),g.getMonth(),g.getDate());let C=b.getTime();C&&r(C),s(!!C)},m=v=>{if(!v.target.value)return r();let g=_Q(v.target.value),b=new Date(t);b.setHours(g.getHours()),b.setMinutes(g.getMinutes());let C=b.getTime();C&&r(C),s(!!C)},f=Dt(e);return y.createElement(IQ,null,y.createElement(e3,{type:"date",max:"9999-12-31",ref:u,id:`${f}-date`,name:`${f}-date`,readOnly:p,onChange:h,onFocus:n,onBlur:a}),y.createElement(e3,{type:"time",id:`${f}-time`,name:`${f}-time`,ref:d,onChange:m,readOnly:p,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},BQ=_.label({display:"flex"}),zQ=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},$Q=_(ki.Input)(({readOnly:e})=>({opacity:e?.5:1})),LQ=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{let[d,p]=l.useState(typeof t=="number"?t:""),[h,m]=l.useState(!1),[f,v]=l.useState(null),g=!!u?.table?.readonly,b=l.useCallback(x=>{p(x.target.value);let w=parseFloat(x.target.value);Number.isNaN(w)?v(new Error(`'${x.target.value}' is not a number`)):(r(w),v(null))},[r,v]),C=l.useCallback(()=>{p("0"),r(0),m(!0)},[m]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&p(t)},[t]),t===void 0?y.createElement(_n,{variant:"outline",size:"medium",id:Ss(e),onClick:C,disabled:g},"Set number"):y.createElement(BQ,null,y.createElement($Q,{ref:E,id:Dt(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:f?"error":null,autoFocus:h,readOnly:g,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},JC=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},ep=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],ZC=(e,t)=>e&&t&&e.map(r=>t[r]),OQ=_.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"}}}),MQ=_.span({"[aria-readonly=true] &":{opacity:.5}}),PQ=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),t3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{if(!t)return Hh.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=ep(r,t),[s,u]=l.useState(i),d=!!o?.table?.readonly,p=m=>{let f=m.target.value,v=[...s];v.includes(f)?v.splice(v.indexOf(f),1):v.push(f),n(ZC(v,t)),u(v)};l.useEffect(()=>{u(ep(r,t))},[r]);let h=Dt(e);return y.createElement(OQ,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,f)=>{let v=`${h}-${f}`;return y.createElement(PQ,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:p,checked:s?.includes(m)}),y.createElement(MQ,null,m))}))},NQ=_.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"}}}),HQ=_.span({"[aria-readonly=true] &":{opacity:.5}}),jQ=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),r3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{if(!t)return Hh.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=JC(r,t),s=Dt(e),u=!!o?.table?.readonly;return y.createElement(NQ,{"aria-readonly":u,isInline:a},Object.keys(t).map((d,p)=>{let h=`${s}-${p}`;return y.createElement(jQ,{key:h,htmlFor:h},y.createElement("input",{type:"radio",id:h,name:s,disabled:u,value:d,onChange:m=>n(t[m.currentTarget.value]),checked:d===i}),y.createElement(HQ,null,d))}))},VQ={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},XC=_.select(VQ,({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}}})),QC=_.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}}})),n3="Choose option...",UQ=({name:e,value:t,options:r,onChange:n,argType:a})=>{let o=d=>{n(r[d.currentTarget.value])},i=JC(t,r)||n3,s=Dt(e),u=!!a?.table?.readonly;return y.createElement(QC,null,y.createElement(Lx,null),y.createElement(XC,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},n3),Object.keys(r).map(d=>y.createElement("option",{key:d,value:d},d))))},qQ=({name:e,value:t,options:r,onChange:n,argType:a})=>{let o=d=>{let p=Array.from(d.currentTarget.options).filter(h=>h.selected).map(h=>h.value);n(ZC(p,r))},i=ep(t,r),s=Dt(e),u=!!a?.table?.readonly;return y.createElement(QC,null,y.createElement(XC,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(d=>y.createElement("option",{key:d,value:d},d))))},a3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(qQ,{...e}):y.createElement(UQ,{...e}):(Hh.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},WQ=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[t?.[n]||String(n)]=n,r),{}):e,GQ={check:t3,"inline-check":t3,radio:r3,"inline-radio":r3,select:a3,"multi-select":a3},jn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?WQ(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=GQ[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},Vh="value",KQ="key",YQ="Error",JQ="Object",ZQ="Array",XQ="String",QQ="Number",eee="Boolean",tee="Date",ree="Null",nee="Undefined",aee="Function",oee="Symbol",eD="ADD_DELTA_TYPE",tD="REMOVE_DELTA_TYPE",rD="UPDATE_DELTA_TYPE";function sn(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 nD(e,t){let r=sn(e),n=sn(t);return(r==="Function"||n==="Function")&&n!==r}var Uh=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(Vh,o,i),p=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let m=a(KQ,o,i);h=l.cloneElement(m,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,p,u,s)}};Uh.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var aD=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:tD};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:eD,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:p}=this.props;d(i[i.length-1],o),p({type:rD,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:p}=i(e,t,r,n,s),h=o(e,t,r,n,s),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:p,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&m)}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:p,dataType:h,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:I,ul:R,addForm:$}=p(e,t,r,n,h),z=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),L=l.cloneElement(C,{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:I},"["),!a&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map((M,j)=>y.createElement(Iu,{key:j,name:j.toString(),data:M,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(j),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:p,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:$},y.createElement(Uh,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:m,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:I},"]"),!z&&L)}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)}};aD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var oD=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(()=>{nD(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:p,cancelButtonElement:h,textareaElementGenerator:m,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,u),b=null,C=null,E=s(e,i,n,a,u);if(r&&!E){let x=m(Vh,v,a,e,i,u),w=l.cloneElement(p,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(x,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:g.editForm},S," ",D,w),C=null}else{b=y.createElement("span",{className:"rejt-value",style:g.value,onClick:E?null:this.handleEditMode},t);let x=l.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});C=E?null:x}return y.createElement("li",{className:"rejt-function-value-node",style:g.li},y.createElement("span",{className:"rejt-name",style:g.name},e," :"," "),b,C)}};oD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Iu=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:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=sn(e);switch(k){case YQ:return y.createElement(tp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:A,dataType:k,getStyle:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case JQ:return y.createElement(tp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case ZQ:return y.createElement(aD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case XQ:return y.createElement(Cr,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case QQ:return y.createElement(Cr,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case eee:return y.createElement(Cr,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case tee:return y.createElement(Cr,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case ree:return y.createElement(Cr,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case nee:return y.createElement(Cr,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case aee:return y.createElement(oD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,textareaElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case oee:return y.createElement(Cr,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Iu.defaultProps={keyPath:[],deep:0};var tp=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:eD,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:tD};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:p}=this.props;d(i[i.length-1],o),p({type:rD,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:p}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),m=o(e,n,t,r,i),f=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:p,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!m&&f)}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:p,dataType:h,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:I,ul:R,delimiter:$}=p(e,t,r,n,h),z=Object.getOwnPropertyNames(t),O=d(e,t,r,n,h),L=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),M=l.cloneElement(C,{onClick:s,className:"rejt-minus-menu",style:k}),j=z.map(G=>y.createElement(Iu,{key:G,name:G,data:t[G],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(G),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:p,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,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:$},"{"),!O&&L,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},j),!O&&o&&y.createElement("div",{className:"rejt-add-form",style:I},y.createElement(Uh,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:m,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:$},"}"),!O&&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)}};tp.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var Cr=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(()=>{nD(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:p,cancelButtonElement:h,inputElementGenerator:m,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,u),b=s(e,i,n,a,u),C=r&&!b,E=m(Vh,v,a,e,i,u),x=l.cloneElement(p,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});return y.createElement("li",{className:"rejt-value-node",style:g.li},y.createElement("span",{className:"rejt-name",style:g.name},e," : "),C?y.createElement("span",{className:"rejt-edit-form",style:g.editForm},D," ",w,x):y.createElement("span",{className:"rejt-value",style:g.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!C&&S)}};Cr.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var iee={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},lee={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},see={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}};function uee(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var iD=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:p,minusMenuElement:h,plusMenuElement:m,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:b,onSubmitValueParser:C,fallback:E=null}=this.props,x=sn(e),w=a;sn(a)==="Boolean"&&(w=()=>a);let D=d;d&&sn(d)!=="Function"&&(D=()=>d);let S=p;return p&&sn(p)!=="Function"&&(S=()=>p),x==="Object"||x==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Iu,{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:m,handleRemove:this.removeRoot,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:b,onSubmitValueParser:C})):E}};iD.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return iee;case"Array":return lee;default:return see}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>uee(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:cee}=ot,dee=_.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}})),ad=_.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})),pee=_(fO)(({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}})),fee=_(hO)(({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}})),o3=_.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}`}})),hee=_(pn)(({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}})),mee=_(ki.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"}})),gee={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},vee=e=>{e.currentTarget.dispatchEvent(new cee.KeyboardEvent("keydown",gee))},yee=e=>{e.currentTarget.select()},bee=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),i3=({name:e,value:t,onChange:r,argType:n})=>{let a=H3(),o=l.useMemo(()=>t&&uJ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,p]=l.useState(null),h=!!n?.table?.readonly,m=l.useCallback(x=>{try{x&&r(JSON.parse(x)),p(void 0)}catch(w){p(w)}},[r]),[f,v]=l.useState(!1),g=l.useCallback(()=>{r({}),v(!0)},[v]),b=l.useRef(null);if(l.useEffect(()=>{f&&b.current&&b.current.select()},[f]),!i)return y.createElement(_n,{disabled:h,id:Ss(e),onClick:g},"Set object");let C=y.createElement(mee,{ref:b,id:Dt(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:x=>m(x.target.value),placeholder:"Edit JSON string...",autoFocus:f,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&t?.constructor===Object;return y.createElement(dee,{"aria-readonly":h},E&&y.createElement(hee,{onClick:x=>{x.preventDefault(),u(w=>!w)}},s?y.createElement(dO,null):y.createElement(cO,null),y.createElement("span",null,"RAW")),s?C:y.createElement(iD,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:bee(a),cancelButtonElement:y.createElement(ad,{type:"button"},"Cancel"),editButtonElement:y.createElement(ad,{type:"submit"},"Save"),addButtonElement:y.createElement(ad,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement(pee,null),minusMenuElement:y.createElement(fee,null),inputElement:(x,w,D,S)=>S?y.createElement(o3,{onFocus:yee,onBlur:vee}):y.createElement(o3,null),fallback:C}))},wee=_.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:ot}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:_X,once:FX,logger:Hh}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:Ky,composeConfigs:Tre,Preview:Ire,DocsContext:Rre}=__STORYBOOK_MODULE_PREVIEW_API__,{GLOBALS_UPDATED:Yy,STORY_ARGS_UPDATED:Jy,UPDATE_STORY_ARGS:TX,RESET_STORY_ARGS:IX,NAVIGATE_URL:RX}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var BX=ka({"../../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}}}),zX=ka({"../../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=m(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function p(w,D){var S=!1,A=m(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 m(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 f(){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 v(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=v(w.offsetParent))),D}function g(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&&f();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(O,L){if(v(O)>D+r.headingsOffset+10){var M=L===0?L:L-1;return A=S[M],!0}else if(L===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 I=i.querySelectorAll("."+r.linkClass);n.call(I,function(O){g(O,O.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(O){g(O,O.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var $=F&&F.parentNode;$&&$.className.indexOf(r.activeListItemClass)===-1&&($.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(O){O.className.indexOf(r.isCollapsedClass)===-1&&(O.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&g(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),C(F&&F.parentNode.parentNode)}}function C(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(g(w,w.className.replace(u+r.isCollapsedClass,"")),C(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 x(){s=!0}return{enableTocAnimation:x,disableTocAnimation:E,render:p,updateToc:b}}}}),$X=ka({"../../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 m=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var f={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:m};return r.includeHtml&&(f.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(f,h):f}function u(h,m){for(var f=s(h),v=f.headingLevel,g=m,b=a(g),C=b?b.headingLevel:0,E=v-C;E>0&&(b=a(g),!(b&&v===b.headingLevel));)b&&b.children!==void 0&&(g=b.children),E--;return v>=r.collapseDepth&&(f.isCollapsed=!0),g.push(f),g}function d(h,m){var f=m;r.ignoreSelector&&(f=m.split(",").map(function(v){return v.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(f)}catch{return console.warn("Headers not found with selector: "+f),null}}function p(h){return n.call(h,function(m,f){var v=s(f);return v&&u(v,m.nest),m},{nest:[]})}return{nestHeadingsArray:p,selectHeadings:d}}}}),LX=ka({"../../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)}}}}),OX=ka({"../../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(m){!u(m.target)||m.target.className.indexOf("no-smooth-scroll")>-1||m.target.href.charAt(m.target.href.length-2)==="#"&&m.target.href.charAt(m.target.href.length-1)==="!"||m.target.className.indexOf(n.linkClass)===-1||r(m.target.hash,{duration:a,offset:o,callback:function(){p(m.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 p(h){var m=document.getElementById(h.substring(1));m&&(/^(?:a|select|input|button|textarea)$/i.test(m.tagName)||(m.tabIndex=-1),m.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||v},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,p,h;requestAnimationFrame(function(g){p=g,m(g)});function m(g){h=g-p,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var m,f=Object.prototype.hasOwnProperty;function v(){for(var E={},x=0;x({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:ie(.3,e.color.defaultText),fontSize:e.typography.size.s2})),UC=e=>y.createElement(PX,{...e,className:"docblock-emptyblock sb-unstyled"}),NX=_(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"}})),HX=_.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"})),al=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${dd}`]:{margin:0}})),jX=()=>y.createElement(HX,null,y.createElement(al,null),y.createElement(al,{style:{width:"80%"}}),y.createElement(al,{style:{width:"30%"}}),y.createElement(al,{style:{width:"80%"}})),qC=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=H3();if(e)return y.createElement(jX,null);if(t)return y.createElement(UC,null,t);let u=y.createElement(NX,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?ud.dark:ud.light;return y.createElement(j3,{theme:cd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},fe=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,jh=600,VX=_.h1(ue,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${jh}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),UX=_.h2(ue,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${jh}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:ie(.25,e.color.defaultText)})),qX=_.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"?ie(.1,e.color.defaultText):ie(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[fe("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}},[fe("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}},[fe("div")]:t,[fe("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}},[fe("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[fe("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[fe("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[fe("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[fe("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[fe("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[fe("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[fe("img")]:{maxWidth:"100%"},[fe("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[fe("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[fe("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[fe("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"}},[fe("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"}}},[fe("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}},[fe("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),WX=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${jh}px)`]:{}})),GX=({children:e,toc:t})=>y.createElement(WX,{className:"sbdocs sbdocs-wrapper"},y.createElement(qX,{className:"sbdocs sbdocs-content"},e),t),Tu=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}`}),KX=_(mh)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),YX=_.div({display:"flex",alignItems:"center",gap:4}),JX=_.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`})),ZX=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(KX,{...o},y.createElement(YX,{key:"left"},e?[1,2,3].map(i=>y.createElement(JX,{key:i})):y.createElement(y.Fragment,null,y.createElement(pn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(lO,null)),y.createElement(pn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(sO,null)),y.createElement(pn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(uO,null))))),WC=l.createContext({scale:1}),{window:XX}=ot,QX=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=XX.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})}},{PREVIEW_URL:eQ}=ot,tQ=eQ||"iframe.html",X1=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,rQ=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:p}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,m=p(i,h,{showMain:()=>{},showError:({title:f,description:v})=>o(new Error(`${f} - ${v}`)),showException:f=>o(f)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>m())}},[u,p,i]),a?y.createElement("pre",null,y.createElement(Kz,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${X1(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(GC,null),y.createElement("div",{ref:t,id:`${X1(e)}-inner`,"data-name":i.name}))},nQ=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(WC.Consumer,null,({scale:r})=>y.createElement(QX,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:vL(tQ,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),aQ=_.strong(({theme:e})=>({color:e.color.orange})),oQ=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(aQ,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:X1(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(rQ,{...e}):y.createElement(nQ,{...e}))},GC=()=>y.createElement(gL,null),iQ=_.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)`}}:{}),Zy=_(qC)(({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)}})),lQ=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Tu(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),sQ=(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(Zy,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(Zy,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function uQ(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var cQ=_(ZX)({position:"absolute",top:0,left:0,right:0,height:40}),dQ=_.div({overflow:"hidden",position:"relative"}),KC=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...p})=>{let[h,m]=l.useState(i),{source:f,actionItem:v}=sQ(a,h,m),[g,b]=l.useState(1),C=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[v]:[],[x,w]=l.useState(s?[...s]:[]),D=[...E,...x],{window:S}=ot,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:I}=await op(()=>import("./index-B3sqQ65X.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);I()},[]),k=F=>{let I=S.getSelection();I&&I.type==="Range"||(F.preventDefault(),x.filter(R=>R.title==="Copied").length===0&&A(f.props.code).then(()=>{w([...x,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(x.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(lQ,{withSource:a,withToolbar:o,...p,className:C.join(" ")},o&&y.createElement(cQ,{isLoading:e,border:!0,zoom:F=>b(g*F),resetZoom:()=>b(1),storyId:uQ(n),baseUrl:"./iframe.html"}),y.createElement(WC.Provider,{value:{scale:g}},y.createElement(dQ,{className:"docs-story",onCopyCapture:a&&k},y.createElement(iQ,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(Nz.Element,{scale:g},Array.isArray(n)?n.map((F,I)=>y.createElement("div",{key:I},F)):y.createElement("div",null,n))),y.createElement(Lp,{actionItems:D}))),a&&h&&f)};_(KC)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var pQ=_.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:Nr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),fQ=({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(pQ,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)))))},Q1=8,Xy=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),hQ=_.span(Nr,({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}})),mQ=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),gQ=_.div(Nr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),vQ=_.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"}})),yQ=_(yO)({marginLeft:4}),bQ=_(Lx)({marginLeft:4}),wQ=()=>y.createElement("span",null,"-"),YC=({text:e,simple:t})=>y.createElement(hQ,{simple:t},e),EQ=TC(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),xQ=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return DG(t)},Qy=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Q1)),r.map(n=>y.createElement(YC,{key:n,text:n===""?'""':n}))},CQ=({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(YC,{text:u});let d=xQ(u),p=d.length;return p>Q1?y.createElement(Xy,{isExpanded:i},Qy(d,i),y.createElement(mQ,{onClick:()=>s(!i)},i?"Show less...":`Show ${p-Q1} more...`)):y.createElement(Xy,null,Qy(d))}return y.createElement(w$,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(vQ,{width:EQ(n)},y.createElement(ih,{language:"jsx",format:!1},n))},y.createElement(gQ,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(yQ,null):y.createElement(bQ,null)))},nd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(wQ,null):y.createElement(CQ,{value:e,initialExpandedArgs:t}),DQ=_.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:ie(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${tl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${tl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:tl(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"?`${tl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),SQ=e=>e==="true",AQ=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{let i=l.useCallback(()=>r(!1),[r]),s=!!o?.table?.readonly;if(t===void 0)return y.createElement(_n,{variant:"outline",size:"medium",id:Ss(e),onClick:i,disabled:s},"Set boolean");let u=Dt(e),d=typeof t=="string"?SQ(t):t;return y.createElement(DQ,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:p=>r(p.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"))},kQ=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},_Q=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},FQ=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}`},TQ=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},e3=_(ki.Input)(({readOnly:e})=>({opacity:e?.5:1})),IQ=_.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}})),RQ=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),p=!!o?.table?.readonly;l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?FQ(t):""),d&&d.current&&(d.current.value=t?TQ(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let g=kQ(v.target.value),b=new Date(t);b.setFullYear(g.getFullYear(),g.getMonth(),g.getDate());let C=b.getTime();C&&r(C),s(!!C)},m=v=>{if(!v.target.value)return r();let g=_Q(v.target.value),b=new Date(t);b.setHours(g.getHours()),b.setMinutes(g.getMinutes());let C=b.getTime();C&&r(C),s(!!C)},f=Dt(e);return y.createElement(IQ,null,y.createElement(e3,{type:"date",max:"9999-12-31",ref:u,id:`${f}-date`,name:`${f}-date`,readOnly:p,onChange:h,onFocus:n,onBlur:a}),y.createElement(e3,{type:"time",id:`${f}-time`,name:`${f}-time`,ref:d,onChange:m,readOnly:p,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},BQ=_.label({display:"flex"}),zQ=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},$Q=_(ki.Input)(({readOnly:e})=>({opacity:e?.5:1})),LQ=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{let[d,p]=l.useState(typeof t=="number"?t:""),[h,m]=l.useState(!1),[f,v]=l.useState(null),g=!!u?.table?.readonly,b=l.useCallback(x=>{p(x.target.value);let w=parseFloat(x.target.value);Number.isNaN(w)?v(new Error(`'${x.target.value}' is not a number`)):(r(w),v(null))},[r,v]),C=l.useCallback(()=>{p("0"),r(0),m(!0)},[m]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&p(t)},[t]),t===void 0?y.createElement(_n,{variant:"outline",size:"medium",id:Ss(e),onClick:C,disabled:g},"Set number"):y.createElement(BQ,null,y.createElement($Q,{ref:E,id:Dt(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:f?"error":null,autoFocus:h,readOnly:g,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},JC=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},ep=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],ZC=(e,t)=>e&&t&&e.map(r=>t[r]),OQ=_.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"}}}),MQ=_.span({"[aria-readonly=true] &":{opacity:.5}}),PQ=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),t3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{if(!t)return Hh.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=ep(r,t),[s,u]=l.useState(i),d=!!o?.table?.readonly,p=m=>{let f=m.target.value,v=[...s];v.includes(f)?v.splice(v.indexOf(f),1):v.push(f),n(ZC(v,t)),u(v)};l.useEffect(()=>{u(ep(r,t))},[r]);let h=Dt(e);return y.createElement(OQ,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,f)=>{let v=`${h}-${f}`;return y.createElement(PQ,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:p,checked:s?.includes(m)}),y.createElement(MQ,null,m))}))},NQ=_.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"}}}),HQ=_.span({"[aria-readonly=true] &":{opacity:.5}}),jQ=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),r3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{if(!t)return Hh.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=JC(r,t),s=Dt(e),u=!!o?.table?.readonly;return y.createElement(NQ,{"aria-readonly":u,isInline:a},Object.keys(t).map((d,p)=>{let h=`${s}-${p}`;return y.createElement(jQ,{key:h,htmlFor:h},y.createElement("input",{type:"radio",id:h,name:s,disabled:u,value:d,onChange:m=>n(t[m.currentTarget.value]),checked:d===i}),y.createElement(HQ,null,d))}))},VQ={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},XC=_.select(VQ,({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}}})),QC=_.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}}})),n3="Choose option...",UQ=({name:e,value:t,options:r,onChange:n,argType:a})=>{let o=d=>{n(r[d.currentTarget.value])},i=JC(t,r)||n3,s=Dt(e),u=!!a?.table?.readonly;return y.createElement(QC,null,y.createElement(Lx,null),y.createElement(XC,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},n3),Object.keys(r).map(d=>y.createElement("option",{key:d,value:d},d))))},qQ=({name:e,value:t,options:r,onChange:n,argType:a})=>{let o=d=>{let p=Array.from(d.currentTarget.options).filter(h=>h.selected).map(h=>h.value);n(ZC(p,r))},i=ep(t,r),s=Dt(e),u=!!a?.table?.readonly;return y.createElement(QC,null,y.createElement(XC,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(d=>y.createElement("option",{key:d,value:d},d))))},a3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(qQ,{...e}):y.createElement(UQ,{...e}):(Hh.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},WQ=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[t?.[n]||String(n)]=n,r),{}):e,GQ={check:t3,"inline-check":t3,radio:r3,"inline-radio":r3,select:a3,"multi-select":a3},jn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?WQ(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=GQ[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},Vh="value",KQ="key",YQ="Error",JQ="Object",ZQ="Array",XQ="String",QQ="Number",eee="Boolean",tee="Date",ree="Null",nee="Undefined",aee="Function",oee="Symbol",eD="ADD_DELTA_TYPE",tD="REMOVE_DELTA_TYPE",rD="UPDATE_DELTA_TYPE";function sn(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 nD(e,t){let r=sn(e),n=sn(t);return(r==="Function"||n==="Function")&&n!==r}var Uh=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(Vh,o,i),p=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let m=a(KQ,o,i);h=l.cloneElement(m,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,p,u,s)}};Uh.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var aD=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:tD};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:eD,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:p}=this.props;d(i[i.length-1],o),p({type:rD,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:p}=i(e,t,r,n,s),h=o(e,t,r,n,s),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:p,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&m)}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:p,dataType:h,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:I,ul:R,addForm:$}=p(e,t,r,n,h),z=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),L=l.cloneElement(C,{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:I},"["),!a&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map((M,j)=>y.createElement(Iu,{key:j,name:j.toString(),data:M,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(j),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:p,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:$},y.createElement(Uh,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:m,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:I},"]"),!z&&L)}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)}};aD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var oD=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(()=>{nD(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:p,cancelButtonElement:h,textareaElementGenerator:m,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,u),b=null,C=null,E=s(e,i,n,a,u);if(r&&!E){let x=m(Vh,v,a,e,i,u),w=l.cloneElement(p,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(x,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:g.editForm},S," ",D,w),C=null}else{b=y.createElement("span",{className:"rejt-value",style:g.value,onClick:E?null:this.handleEditMode},t);let x=l.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});C=E?null:x}return y.createElement("li",{className:"rejt-function-value-node",style:g.li},y.createElement("span",{className:"rejt-name",style:g.name},e," :"," "),b,C)}};oD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Iu=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:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=sn(e);switch(k){case YQ:return y.createElement(tp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:A,dataType:k,getStyle:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case JQ:return y.createElement(tp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case ZQ:return y.createElement(aD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:p,addButtonElement:h,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:b,plusMenuElement:C,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case XQ:return y.createElement(Cr,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case QQ:return y.createElement(Cr,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case eee:return y.createElement(Cr,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case tee:return y.createElement(Cr,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case ree:return y.createElement(Cr,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case nee:return y.createElement(Cr,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case aee:return y.createElement(oD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,textareaElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case oee:return y.createElement(Cr,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:p,cancelButtonElement:m,editButtonElement:f,inputElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Iu.defaultProps={keyPath:[],deep:0};var tp=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:eD,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:tD};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:p}=this.props;d(i[i.length-1],o),p({type:rD,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:p}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),m=o(e,n,t,r,i),f=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:p,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!m&&f)}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:p,dataType:h,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:I,ul:R,delimiter:$}=p(e,t,r,n,h),z=Object.getOwnPropertyNames(t),O=d(e,t,r,n,h),L=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),M=l.cloneElement(C,{onClick:s,className:"rejt-minus-menu",style:k}),j=z.map(G=>y.createElement(Iu,{key:G,name:G,data:t[G],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(G),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:p,addButtonElement:m,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:b,minusMenuElement:C,plusMenuElement:E,beforeRemoveAction:x,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:$},"{"),!O&&L,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},j),!O&&o&&y.createElement("div",{className:"rejt-add-form",style:I},y.createElement(Uh,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:m,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:$},"}"),!O&&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)}};tp.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var Cr=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(()=>{nD(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:p,cancelButtonElement:h,inputElementGenerator:m,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,u),b=s(e,i,n,a,u),C=r&&!b,E=m(Vh,v,a,e,i,u),x=l.cloneElement(p,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});return y.createElement("li",{className:"rejt-value-node",style:g.li},y.createElement("span",{className:"rejt-name",style:g.name},e," : "),C?y.createElement("span",{className:"rejt-edit-form",style:g.editForm},D," ",w,x):y.createElement("span",{className:"rejt-value",style:g.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!C&&S)}};Cr.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var iee={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},lee={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},see={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}};function uee(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var iD=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:p,minusMenuElement:h,plusMenuElement:m,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:b,onSubmitValueParser:C,fallback:E=null}=this.props,x=sn(e),w=a;sn(a)==="Boolean"&&(w=()=>a);let D=d;d&&sn(d)!=="Function"&&(D=()=>d);let S=p;return p&&sn(p)!=="Function"&&(S=()=>p),x==="Object"||x==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Iu,{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:m,handleRemove:this.removeRoot,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:b,onSubmitValueParser:C})):E}};iD.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return iee;case"Array":return lee;default:return see}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>uee(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:cee}=ot,dee=_.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}})),ad=_.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})),pee=_(fO)(({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}})),fee=_(hO)(({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}})),o3=_.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}`}})),hee=_(pn)(({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}})),mee=_(ki.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"}})),gee={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},vee=e=>{e.currentTarget.dispatchEvent(new cee.KeyboardEvent("keydown",gee))},yee=e=>{e.currentTarget.select()},bee=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),i3=({name:e,value:t,onChange:r,argType:n})=>{let a=H3(),o=l.useMemo(()=>t&&uJ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,p]=l.useState(null),h=!!n?.table?.readonly,m=l.useCallback(x=>{try{x&&r(JSON.parse(x)),p(void 0)}catch(w){p(w)}},[r]),[f,v]=l.useState(!1),g=l.useCallback(()=>{r({}),v(!0)},[v]),b=l.useRef(null);if(l.useEffect(()=>{f&&b.current&&b.current.select()},[f]),!i)return y.createElement(_n,{disabled:h,id:Ss(e),onClick:g},"Set object");let C=y.createElement(mee,{ref:b,id:Dt(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:x=>m(x.target.value),placeholder:"Edit JSON string...",autoFocus:f,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&t?.constructor===Object;return y.createElement(dee,{"aria-readonly":h},E&&y.createElement(hee,{onClick:x=>{x.preventDefault(),u(w=>!w)}},s?y.createElement(dO,null):y.createElement(cO,null),y.createElement("span",null,"RAW")),s?C:y.createElement(iD,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:bee(a),cancelButtonElement:y.createElement(ad,{type:"button"},"Cancel"),editButtonElement:y.createElement(ad,{type:"submit"},"Save"),addButtonElement:y.createElement(ad,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement(pee,null),minusMenuElement:y.createElement(fee,null),inputElement:(x,w,D,S)=>S?y.createElement(o3,{onFocus:yee,onBlur:vee}):y.createElement(o3,null),fallback:C}))},wee=_.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, @@ -555,7 +555,7 @@ ${t}`);let r=t.match(Uz);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}%, ${Qr(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Qr(.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 ${Pt(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),lD=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Eee=_(lD)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),xee=_.div({display:"flex",alignItems:"center",width:"100%"});function Cee(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 Dee=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{let d=f=>{r(zQ(f.target.value))},p=t!==void 0,h=l.useMemo(()=>Cee(o),[o]),m=!!u?.table?.readonly;return y.createElement(xee,{"aria-readonly":m},y.createElement(lD,null,n),y.createElement(wee,{id:Dt(e),type:"range",disabled:m,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Eee,{numberOFDecimalsPlaces:h,max:a},p?t.toFixed(h):"--"," / ",a))},See=_.label({display:"flex"}),Aee=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),kee=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{let s=f=>{r(f.target.value)},u=!!i?.table?.readonly,[d,p]=l.useState(!1),h=l.useCallback(()=>{r(""),p(!0)},[p]);if(t===void 0)return y.createElement(_n,{variant:"outline",size:"medium",disabled:u,id:Ss(e),onClick:h},"Set string");let m=typeof t=="string";return y.createElement(See,null,y.createElement(ki.Textarea,{id:Dt(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:m?null:"error",name:e,value:m?t:"",onFocus:n,onBlur:a}),o&&y.createElement(Aee,{isMaxed:t?.length===o},t?.length??0," / ",o))},_ee=_(ki.Input)({padding:10});function Fee(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var Tee=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{let o=l.useRef(null),i=a?.control?.readOnly;function s(u){if(!u.target.files)return;let d=Array.from(u.target.files).map(p=>URL.createObjectURL(p));e(d),Fee(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(_ee,{ref:o,id:Dt(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},Iee=l.lazy(()=>op(()=>import("./Color-KGDBMAHA-CDtNeP06.js"),__vite__mapDeps([8,2,6,1,3,4,5,7]),import.meta.url)),Ree=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(Iee,{...e})),Bee={array:i3,object:i3,boolean:AQ,color:Ree,date:RQ,number:LQ,check:jn,"inline-check":jn,radio:jn,"inline-radio":jn,select:jn,"multi-select":jn,range:Dee,text:kee,file:Tee},l3=()=>y.createElement(y.Fragment,null,"-"),zee=({row:e,arg:t,updateArgs:r,isHovered:n})=>{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 p=l.useCallback(g=>(d({value:g}),r({[a]:g}),g),[r,a]),h=l.useCallback(()=>s(!1),[]),m=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let g=o?.disable!==!0&&e?.type?.name!=="function";return n&&g?y.createElement(oa,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(l3,null)}let f={name:a,argType:e,value:u.value,onChange:p,onBlur:h,onFocus:m},v=Bee[o.type]||l3;return y.createElement(v,{...f,...o,controlType:o.type})},$ee=_.span({fontWeight:"bold"}),Lee=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),Oee=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Nr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),Mee=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ie(.1,e.color.defaultText):ie(.2,e.color.defaultText),marginTop:t?4:0})),Pee=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ie(.1,e.color.defaultText):ie(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),Nee=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),Hee=e=>e&&{summary:typeof e=="string"?e:e.name},ol=e=>{let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,p=n.table||{},h=p.type||Hee(n.type),m=p.defaultValue||n.defaultValue,f=n.type?.required,v=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(Nee,{expandable:i},y.createElement($ee,null,u),f?y.createElement(Lee,{title:"Required"},"*"):null),o?null:y.createElement("td",null,v&&y.createElement(Oee,null,y.createElement(_C,null,d)),p.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(Pee,{hasDescription:v},y.createElement(nd,{value:h,initialExpandedArgs:s})),y.createElement(fQ,{tags:p.jsDocTags})):y.createElement(Mee,{hasDescription:v},y.createElement(nd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(nd,{value:m,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(zee,{...e,isHovered:t})):null)},jee=_(gO)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ie(.25,e.color.defaultText):ie(.3,e.color.defaultText),border:"none",display:"inline-block"})),Vee=_(vO)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ie(.25,e.color.defaultText):ie(.3,e.color.defaultText),border:"none",display:"inline-block"})),Uee=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),qee=_.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"?ie(.4,e.color.defaultText):ie(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Wee=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Gee=_.td(()=>({position:"relative"})),Kee=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Qr(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),s3=_.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"?Wee:qee,u=r?.length||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",p=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Kee,{title:p},y.createElement(s,{colSpan:1},y.createElement(s3,{onClick:h=>i(!o),tabIndex:0},p),y.createElement(Uee,null,o?y.createElement(jee,null):y.createElement(Vee,null),t)),y.createElement(Gee,{colSpan:a-1},y.createElement(s3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},p),o?null:d)),o?r:null)},il=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),ke=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),he=_.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})),_e=[2,4,2,2],Yee=()=>y.createElement(y.Fragment,null,y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"}))),y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"80%"}),y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"}))),y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"80%"}),y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"}))),y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"80%"}),y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"})))),Jee=_.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"})),Zee=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),Xee=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),Qee=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(Jee,{inAddonPanel:e},y.createElement(_x,{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(Zee,null,e&&y.createElement(y.Fragment,null,y.createElement(oa,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(pO,null)," Watch 5m video"),y.createElement(Xee,null),y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(U1,null)," Read docs")),!e&&y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(U1,null)," Learn how to set that up"))}))},ete=_.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"?ie(.25,e.color.defaultText):ie(.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}}}}})),tte=_(pn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),rte=_.span({display:"flex",justifyContent:"space-between"}),nte={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>+!!t.type?.required-+!!e.type?.required||e.name.localeCompare(t.name),none:void 0},ate=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=i?.table||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let p=d.subsections[u]||[];p.push({key:o,...i}),d.subsections[u]=p}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=nte[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)}}),{})}},ote=(e,t,r)=>{try{return ED(e,t,r)}catch(n){return FX.warn(n.message),!1}},rp=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(UC,null,E," ",y.createElement(oa,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(U1,null)," Read the docs"))}if(s)return y.createElement(Yee,null);let{rows:u,args:d,globals:p}="rows"in e&&e,h=ate(Pq(u,E=>!E?.table?.disable&&ote(E,d||{},p||{})),i),m=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(m&&f&&v)return y.createElement(Qee,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let b=Object.keys(h.sections).length>0,C={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(a9,null,y.createElement(ete,{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(rte,null,"Control"," ",!s&&r&&y.createElement(tte,{onClick:()=>r(),title:"Reset controls"},y.createElement(bO,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(ol,{key:E.key,row:E,arg:d&&d[E.key],...C})),Object.entries(h.ungroupedSubsections).map(([E,x])=>y.createElement(od,{key:E,label:E,level:"subsection",colSpan:g},x.map(w=>y.createElement(ol,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...C})))),Object.entries(h.sections).map(([E,x])=>y.createElement(od,{key:E,label:E,level:"section",colSpan:g},x.ungrouped.map(w=>y.createElement(ol,{key:w.key,row:w,arg:d&&d[w.key],...C})),Object.entries(x.subsections).map(([w,D])=>y.createElement(od,{key:w,label:w,level:"subsection",colSpan:g},D.map(S=>y.createElement(ol,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...C})))))))))},ite=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(rp,{...r[0][1],...t}):y.createElement(rL,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:p})=>p?y.createElement(rp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ie(.4,e.color.defaultText):ie(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(ue,({theme:e})=>({...Tu(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"?ie(.2,e.color.defaultText):ie(.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"?ie(.4,e.color.defaultText):ie(.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})=>({...Tu(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"?ie(.4,e.color.defaultText):ie(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));_.div(({theme:e})=>({...Tu(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});_.div({display:"flex",flexFlow:"row wrap"});var lte=e=>`anchor--${e}`,ste=({storyId:e,children:t})=>y.createElement("div",{id:lte(e),className:"sb-anchor"},t);ot&&ot.__DOCS_CONTEXT__===void 0&&(ot.__DOCS_CONTEXT__=l.createContext(null),ot.__DOCS_CONTEXT__.displayName="DocsContext");var rr=ot?ot.__DOCS_CONTEXT__:l.createContext(null),Tn=(e,t)=>l.useContext(rr).resolveOf(e,t),ute=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),cte=e=>{if(e)return typeof e=="string"?e.includes("-")?ute(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function dte(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function sD(e){return kX(e,{allowFunction:!1})}var uD=l.createContext({sources:{}}),cD="--unknown--",pte=({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:p,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,m=d?sD(d):cD;n(f=>({...f,[u]:{...f[u],[m]:{code:p,format:h}}}))};return t.on(Zh,a),()=>t.off(Zh,a)},[]),y.createElement(uD.Provider,{value:{sources:r}},e)},fte=(e,t,r)=>{let{sources:n}=r,a=n?.[e];return a?.[sD(t)]||a?.[cD]||{code:""}},hte=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{let{__isArgsStory:a}=t.parameters,o=t.parameters.docs?.source||{},i=r||o.type||zu.AUTO;if(o.code!==void 0)return o.code;let s=i===zu.DYNAMIC||i===zu.AUTO&&e&&a?e:o.originalSource||"";return(n??o.transform)?.(s,t)||s},mte=(e,t,r)=>{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=n?.parameters?.docs?.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 p=t.getStoryContext(n),h=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,m=fte(n.id,h,r);return s=m.format??n.parameters.docs?.source?.format??!1,{code:hte({snippet:m.code,storyContext:{...p,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function gte(e,t){let r=vte([e],t);return r&&r[0]}function vte(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 yte=(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},bte=(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}},wte=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(rr),r=yte(e,t),n=gte(r,t);if(!n)return y.createElement(GC,null);let a=bte(e,n,t);return a?y.createElement(oQ,{...a}):null},Ete=e=>{let t=l.useContext(rr),r=l.useContext(uD),{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}=Tn(n||"story",["story"]),i=mte({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??o.parameters.docs?.canvas?.layout??"padded",u=e.withToolbar??o.parameters.docs?.canvas?.withToolbar??!1,d=e.additionalActions??o.parameters.docs?.canvas?.additionalActions,p=e.sourceState??o.parameters.docs?.canvas?.sourceState??"hidden",h=e.className??o.parameters.docs?.canvas?.className;return y.createElement(KC,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(wte,{of:n||o.moduleExport,meta:e.meta,...e.story}))},xte=(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(Yy,o),()=>t.channel.off(Yy,o)},[t.channel]),[n]},Cte=(e,t)=>{let r=Dte(e,t);if(!r)throw new Error("No result when story was defined");return r},Dte=(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(Jy,u),()=>t.channel.off(Jy,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(TX,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(IX,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]};function Ste(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var Ate=e=>{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(rr),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=a.docs?.controls||{},d=e.include??u.include,p=e.exclude??u.exclude,h=e.sort??u.sort,[m,f,v]=Cte(n,r),[g]=xte(n,r),b=Ky(o,d,p);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(m).length>0?y.createElement(rp,{rows:b,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v}):null;let C=cte(i),E=Object.fromEntries(Object.entries(s).map(([w,D])=>[w,{rows:Ky(Ste(D,a),d,p),sort:h}])),x={[C]:{rows:b,sort:h},...E};return y.createElement(ite,{tabs:x,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v})},{document:dD}=ot,pD=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(t9,null,t);let n=e&&e.split("-");return y.createElement(qC,{language:n&&n[1]||"text",format:!1,code:t,...r})};function qh(e,t){e.channel.emit(RX,t)}var np=bL.a,kte=({hash:e,children:t})=>{let r=l.useContext(rr);return y.createElement(np,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);dD.getElementById(a)&&qh(r,e)}},t)},fD=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(rr);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(np,{...e}):t.startsWith("#")?y.createElement(kte,{hash:t},n):y.createElement(np,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),qh(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},hD=["h1","h2","h3","h4","h5","h6"],_te=hD.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),Fte=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),Tte=({as:e,id:t,children:r,...n})=>{let a=l.useContext(rr),o=_te[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(Fte,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{dD.getElementById(t)&&qh(a,i)}},y.createElement(mO,null)),r)},Wh=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(Tte,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...se(s,t)})},mD=hD.reduce((e,t)=>({...e,[t]:r=>y.createElement(Wh,{as:t,...r})}),{}),Ite=e=>{if(!e.children)return null;if(typeof e.children!="string")throw new Error(DD`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${Qr(.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 ${Pt(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),lD=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Eee=_(lD)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),xee=_.div({display:"flex",alignItems:"center",width:"100%"});function Cee(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 Dee=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{let d=f=>{r(zQ(f.target.value))},p=t!==void 0,h=l.useMemo(()=>Cee(o),[o]),m=!!u?.table?.readonly;return y.createElement(xee,{"aria-readonly":m},y.createElement(lD,null,n),y.createElement(wee,{id:Dt(e),type:"range",disabled:m,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Eee,{numberOFDecimalsPlaces:h,max:a},p?t.toFixed(h):"--"," / ",a))},See=_.label({display:"flex"}),Aee=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),kee=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{let s=f=>{r(f.target.value)},u=!!i?.table?.readonly,[d,p]=l.useState(!1),h=l.useCallback(()=>{r(""),p(!0)},[p]);if(t===void 0)return y.createElement(_n,{variant:"outline",size:"medium",disabled:u,id:Ss(e),onClick:h},"Set string");let m=typeof t=="string";return y.createElement(See,null,y.createElement(ki.Textarea,{id:Dt(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:m?null:"error",name:e,value:m?t:"",onFocus:n,onBlur:a}),o&&y.createElement(Aee,{isMaxed:t?.length===o},t?.length??0," / ",o))},_ee=_(ki.Input)({padding:10});function Fee(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var Tee=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{let o=l.useRef(null),i=a?.control?.readOnly;function s(u){if(!u.target.files)return;let d=Array.from(u.target.files).map(p=>URL.createObjectURL(p));e(d),Fee(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(_ee,{ref:o,id:Dt(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},Iee=l.lazy(()=>op(()=>import("./Color-KGDBMAHA-BgyUleF8.js"),__vite__mapDeps([8,2,6,1,3,4,5,7]),import.meta.url)),Ree=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(Iee,{...e})),Bee={array:i3,object:i3,boolean:AQ,color:Ree,date:RQ,number:LQ,check:jn,"inline-check":jn,radio:jn,"inline-radio":jn,select:jn,"multi-select":jn,range:Dee,text:kee,file:Tee},l3=()=>y.createElement(y.Fragment,null,"-"),zee=({row:e,arg:t,updateArgs:r,isHovered:n})=>{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 p=l.useCallback(g=>(d({value:g}),r({[a]:g}),g),[r,a]),h=l.useCallback(()=>s(!1),[]),m=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let g=o?.disable!==!0&&e?.type?.name!=="function";return n&&g?y.createElement(oa,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(l3,null)}let f={name:a,argType:e,value:u.value,onChange:p,onBlur:h,onFocus:m},v=Bee[o.type]||l3;return y.createElement(v,{...f,...o,controlType:o.type})},$ee=_.span({fontWeight:"bold"}),Lee=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),Oee=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Nr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),Mee=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ie(.1,e.color.defaultText):ie(.2,e.color.defaultText),marginTop:t?4:0})),Pee=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ie(.1,e.color.defaultText):ie(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),Nee=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),Hee=e=>e&&{summary:typeof e=="string"?e:e.name},ol=e=>{let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,p=n.table||{},h=p.type||Hee(n.type),m=p.defaultValue||n.defaultValue,f=n.type?.required,v=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(Nee,{expandable:i},y.createElement($ee,null,u),f?y.createElement(Lee,{title:"Required"},"*"):null),o?null:y.createElement("td",null,v&&y.createElement(Oee,null,y.createElement(_C,null,d)),p.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(Pee,{hasDescription:v},y.createElement(nd,{value:h,initialExpandedArgs:s})),y.createElement(fQ,{tags:p.jsDocTags})):y.createElement(Mee,{hasDescription:v},y.createElement(nd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(nd,{value:m,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(zee,{...e,isHovered:t})):null)},jee=_(gO)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ie(.25,e.color.defaultText):ie(.3,e.color.defaultText),border:"none",display:"inline-block"})),Vee=_(vO)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ie(.25,e.color.defaultText):ie(.3,e.color.defaultText),border:"none",display:"inline-block"})),Uee=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),qee=_.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"?ie(.4,e.color.defaultText):ie(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Wee=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Gee=_.td(()=>({position:"relative"})),Kee=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Qr(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),s3=_.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"?Wee:qee,u=r?.length||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",p=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Kee,{title:p},y.createElement(s,{colSpan:1},y.createElement(s3,{onClick:h=>i(!o),tabIndex:0},p),y.createElement(Uee,null,o?y.createElement(jee,null):y.createElement(Vee,null),t)),y.createElement(Gee,{colSpan:a-1},y.createElement(s3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},p),o?null:d)),o?r:null)},il=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),ke=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),he=_.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})),_e=[2,4,2,2],Yee=()=>y.createElement(y.Fragment,null,y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"}))),y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"80%"}),y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"}))),y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"80%"}),y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"}))),y.createElement(il,null,y.createElement(ke,{numColumn:_e[0]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[1]},y.createElement(he,{width:"80%"}),y.createElement(he,{width:"30%"})),y.createElement(ke,{numColumn:_e[2]},y.createElement(he,{width:"60%"})),y.createElement(ke,{numColumn:_e[3]},y.createElement(he,{width:"60%"})))),Jee=_.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"})),Zee=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),Xee=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),Qee=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(Jee,{inAddonPanel:e},y.createElement(_x,{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(Zee,null,e&&y.createElement(y.Fragment,null,y.createElement(oa,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(pO,null)," Watch 5m video"),y.createElement(Xee,null),y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(U1,null)," Read docs")),!e&&y.createElement(oa,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(U1,null)," Learn how to set that up"))}))},ete=_.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"?ie(.25,e.color.defaultText):ie(.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}}}}})),tte=_(pn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),rte=_.span({display:"flex",justifyContent:"space-between"}),nte={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>+!!t.type?.required-+!!e.type?.required||e.name.localeCompare(t.name),none:void 0},ate=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=i?.table||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let p=d.subsections[u]||[];p.push({key:o,...i}),d.subsections[u]=p}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=nte[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)}}),{})}},ote=(e,t,r)=>{try{return ED(e,t,r)}catch(n){return FX.warn(n.message),!1}},rp=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(UC,null,E," ",y.createElement(oa,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(U1,null)," Read the docs"))}if(s)return y.createElement(Yee,null);let{rows:u,args:d,globals:p}="rows"in e&&e,h=ate(Pq(u,E=>!E?.table?.disable&&ote(E,d||{},p||{})),i),m=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(m&&f&&v)return y.createElement(Qee,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let b=Object.keys(h.sections).length>0,C={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(a9,null,y.createElement(ete,{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(rte,null,"Control"," ",!s&&r&&y.createElement(tte,{onClick:()=>r(),title:"Reset controls"},y.createElement(bO,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(ol,{key:E.key,row:E,arg:d&&d[E.key],...C})),Object.entries(h.ungroupedSubsections).map(([E,x])=>y.createElement(od,{key:E,label:E,level:"subsection",colSpan:g},x.map(w=>y.createElement(ol,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...C})))),Object.entries(h.sections).map(([E,x])=>y.createElement(od,{key:E,label:E,level:"section",colSpan:g},x.ungrouped.map(w=>y.createElement(ol,{key:w.key,row:w,arg:d&&d[w.key],...C})),Object.entries(x.subsections).map(([w,D])=>y.createElement(od,{key:w,label:w,level:"subsection",colSpan:g},D.map(S=>y.createElement(ol,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...C})))))))))},ite=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(rp,{...r[0][1],...t}):y.createElement(rL,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:p})=>p?y.createElement(rp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ie(.4,e.color.defaultText):ie(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(ue,({theme:e})=>({...Tu(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"?ie(.2,e.color.defaultText):ie(.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"?ie(.4,e.color.defaultText):ie(.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})=>({...Tu(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"?ie(.4,e.color.defaultText):ie(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));_.div(({theme:e})=>({...Tu(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});_.div({display:"flex",flexFlow:"row wrap"});var lte=e=>`anchor--${e}`,ste=({storyId:e,children:t})=>y.createElement("div",{id:lte(e),className:"sb-anchor"},t);ot&&ot.__DOCS_CONTEXT__===void 0&&(ot.__DOCS_CONTEXT__=l.createContext(null),ot.__DOCS_CONTEXT__.displayName="DocsContext");var rr=ot?ot.__DOCS_CONTEXT__:l.createContext(null),Tn=(e,t)=>l.useContext(rr).resolveOf(e,t),ute=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),cte=e=>{if(e)return typeof e=="string"?e.includes("-")?ute(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function dte(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function sD(e){return kX(e,{allowFunction:!1})}var uD=l.createContext({sources:{}}),cD="--unknown--",pte=({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:p,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,m=d?sD(d):cD;n(f=>({...f,[u]:{...f[u],[m]:{code:p,format:h}}}))};return t.on(Zh,a),()=>t.off(Zh,a)},[]),y.createElement(uD.Provider,{value:{sources:r}},e)},fte=(e,t,r)=>{let{sources:n}=r,a=n?.[e];return a?.[sD(t)]||a?.[cD]||{code:""}},hte=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{let{__isArgsStory:a}=t.parameters,o=t.parameters.docs?.source||{},i=r||o.type||zu.AUTO;if(o.code!==void 0)return o.code;let s=i===zu.DYNAMIC||i===zu.AUTO&&e&&a?e:o.originalSource||"";return(n??o.transform)?.(s,t)||s},mte=(e,t,r)=>{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=n?.parameters?.docs?.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 p=t.getStoryContext(n),h=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,m=fte(n.id,h,r);return s=m.format??n.parameters.docs?.source?.format??!1,{code:hte({snippet:m.code,storyContext:{...p,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function gte(e,t){let r=vte([e],t);return r&&r[0]}function vte(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 yte=(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},bte=(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}},wte=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(rr),r=yte(e,t),n=gte(r,t);if(!n)return y.createElement(GC,null);let a=bte(e,n,t);return a?y.createElement(oQ,{...a}):null},Ete=e=>{let t=l.useContext(rr),r=l.useContext(uD),{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}=Tn(n||"story",["story"]),i=mte({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??o.parameters.docs?.canvas?.layout??"padded",u=e.withToolbar??o.parameters.docs?.canvas?.withToolbar??!1,d=e.additionalActions??o.parameters.docs?.canvas?.additionalActions,p=e.sourceState??o.parameters.docs?.canvas?.sourceState??"hidden",h=e.className??o.parameters.docs?.canvas?.className;return y.createElement(KC,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(wte,{of:n||o.moduleExport,meta:e.meta,...e.story}))},xte=(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(Yy,o),()=>t.channel.off(Yy,o)},[t.channel]),[n]},Cte=(e,t)=>{let r=Dte(e,t);if(!r)throw new Error("No result when story was defined");return r},Dte=(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(Jy,u),()=>t.channel.off(Jy,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(TX,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(IX,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]};function Ste(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var Ate=e=>{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(rr),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=a.docs?.controls||{},d=e.include??u.include,p=e.exclude??u.exclude,h=e.sort??u.sort,[m,f,v]=Cte(n,r),[g]=xte(n,r),b=Ky(o,d,p);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(m).length>0?y.createElement(rp,{rows:b,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v}):null;let C=cte(i),E=Object.fromEntries(Object.entries(s).map(([w,D])=>[w,{rows:Ky(Ste(D,a),d,p),sort:h}])),x={[C]:{rows:b,sort:h},...E};return y.createElement(ite,{tabs:x,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v})},{document:dD}=ot,pD=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(t9,null,t);let n=e&&e.split("-");return y.createElement(qC,{language:n&&n[1]||"text",format:!1,code:t,...r})};function qh(e,t){e.channel.emit(RX,t)}var np=bL.a,kte=({hash:e,children:t})=>{let r=l.useContext(rr);return y.createElement(np,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);dD.getElementById(a)&&qh(r,e)}},t)},fD=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(rr);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(np,{...e}):t.startsWith("#")?y.createElement(kte,{hash:t},n):y.createElement(np,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),qh(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},hD=["h1","h2","h3","h4","h5","h6"],_te=hD.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),Fte=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),Tte=({as:e,id:t,children:r,...n})=>{let a=l.useContext(rr),o=_te[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(Fte,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{dD.getElementById(t)&&qh(a,i)}},y.createElement(mO,null)),r)},Wh=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(Tte,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...se(s,t)})},mD=hD.reduce((e,t)=>({...e,[t]:r=>y.createElement(Wh,{as:t,...r})}),{}),Ite=e=>{if(!e.children)return null;if(typeof e.children!="string")throw new Error(DD`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/EditInPlace-B4xx68e2.js b/assets/EditInPlace-zG_DXBw9.js similarity index 91% rename from assets/EditInPlace-B4xx68e2.js rename to assets/EditInPlace-zG_DXBw9.js index 85820390..06e4003a 100644 --- a/assets/EditInPlace-B4xx68e2.js +++ b/assets/EditInPlace-zG_DXBw9.js @@ -1,14 +1,14 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{r as n}from"./index-BP8_t0zE.js";import{R as se,a as W,L as te,M as N,S as $,V as ne}from"./index-Dn9bhuYh.js";import{C as re}from"./check-Bjchr0Ec.js";import{E as le,C as oe}from"./close-BapqxG5D.js";import"./Action-Ctm0m6gb.js";import"./Password-HQdEGLZE.js";import{a as ie}from"./Text-Cz5oMJIL.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import{c as u}from"./index-CSpfAsmC.js";import{C as ce,S as de}from"./search-BC9ffyhQ.js";import{I as ue}from"./InlineSpinner-DZ2uBgAt.js";import{B as q}from"./Button-iukP6Ype.js";import"./Alert-C8jidQQN.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./IconButton-B43clWNp.js";import{T as me}from"./Text-BgCCN_GG.js";import"./ContextMenu-CG6pPwnW.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DoAMoPfE.js";import"./MenuItem-CmF0V73j.js";import"./Progress-CTwHYCo_.js";import{u as pe}from"./useId-DIHOOv91.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import{a as F}from"./Tooltip-DCOt0Zqn.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const fe="_controls_1h4nb_17",C={controls:fe,"button-group":"_button-group_1h4nb_27"},he="_root_dgy0u_24",ye="_field_dgy0u_34",_e="_label_dgy0u_67",be="_message_dgy0u_98",c={root:he,field:ye,"inline-field":"_inline-field_dgy0u_40","inline-field-body":"_inline-field-body_dgy0u_46","inline-field-control":"_inline-field-control_dgy0u_52",label:_e,message:be,"help-message":"_help-message_dgy0u_104","error-message":"_error-message_dgy0u_108","success-message":"_success-message_dgy0u_112"},w=n.forwardRef(function({children:s,...t},l){const r=u(c.root,t.className);return a.jsx(se,{ref:l,...t,className:r,children:s})});try{w.displayName="Root",w.__docgenInfo={description:`Thin wrapper around Radix UI Root component +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{r as n}from"./index-BP8_t0zE.js";import{R as se,a as W,L as te,M as N,S as $,V as ne}from"./index-Dn9bhuYh.js";import{C as re}from"./check-Bjchr0Ec.js";import{E as le,C as oe}from"./close-BapqxG5D.js";import"./Action-Ctm0m6gb.js";import"./Password-HQdEGLZE.js";import{a as ie}from"./Text-Cz5oMJIL.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import{c as u}from"./index-CSpfAsmC.js";import{C as ce,S as de}from"./search-BC9ffyhQ.js";import{I as ue}from"./InlineSpinner-DZ2uBgAt.js";import{B as q}from"./Button-iukP6Ype.js";import"./Alert-C8jidQQN.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./IconButton-B43clWNp.js";import{T as me}from"./Text-BgCCN_GG.js";import"./ContextMenu-DdLa5yx0.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DReENGuy.js";import"./MenuItem-CmF0V73j.js";import"./Progress-CTwHYCo_.js";import{u as pe}from"./useId-DIHOOv91.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import{a as F}from"./Tooltip-DCOt0Zqn.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const fe="_controls_1h4nb_17",C={controls:fe,"button-group":"_button-group_1h4nb_27"},he="_root_dgy0u_24",ye="_field_dgy0u_34",_e="_label_dgy0u_67",be="_message_dgy0u_98",c={root:he,field:ye,"inline-field":"_inline-field_dgy0u_40","inline-field-body":"_inline-field-body_dgy0u_46","inline-field-control":"_inline-field-control_dgy0u_52",label:_e,message:be,"help-message":"_help-message_dgy0u_104","error-message":"_error-message_dgy0u_108","success-message":"_success-message_dgy0u_112"},w=n.forwardRef(function({children:s,...t},l){const r=u(c.root,t.className);return a.jsx(se,{ref:l,...t,className:r,children:s})});try{w.displayName="Root",w.__docgenInfo={description:`Thin wrapper around Radix UI Root component https://www.radix-ui.com/docs/primitives/components/form#root`,displayName:"Root",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}const g=n.forwardRef(function({children:s,...t},l){const r=u(c.field,t.className);return a.jsx(W,{ref:l,...t,className:r,children:s})});try{g.displayName="Field",g.__docgenInfo={description:`Thin wrapper around Radix UI Field component https://www.radix-ui.com/docs/primitives/components/form#field`,displayName:"Field",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}const M=n.forwardRef(function({className:s,control:t,children:l,...r},o){const f=u(c["inline-field"],s);return a.jsxs(W,{ref:o,...r,className:f,children:[a.jsx("div",{className:c["inline-field-control"],children:t}),a.jsx("div",{className:c["inline-field-body"],children:l})]})});try{M.displayName="InlineField",M.__docgenInfo={description:"",displayName:"InlineField",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}},control:{defaultValue:null,description:"The checkbox/radio control to render alongside the rest of the field.",name:"control",required:!0,type:{name:"ReactElement>"}}}}}catch{}const v=n.forwardRef(function({children:s,...t},l){const r=u(c.label,t.className);return a.jsx(te,{ref:l,...t,className:r,children:s})});try{v.displayName="Label",v.__docgenInfo={description:`Thin wrapper around Radix UI Label component https://www.radix-ui.com/docs/primitives/components/form#label`,displayName:"Label",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}const k=n.forwardRef(function({children:s,className:t,...l},r){const o=u(c.message,c["error-message"],t);return a.jsxs(N,{ref:r,...l,className:o,children:[a.jsx(le,{}),s]})}),I=n.forwardRef(function({children:s,className:t,...l},r){const o=u(c.message,c["success-message"],t);return a.jsxs(N,{ref:r,...l,className:o,children:[a.jsx(ce,{}),s]})}),j=n.forwardRef(function({children:s,className:t,...l},r){const o=u(c.message,t);return a.jsxs(N,{ref:r,...l,className:o,children:[a.jsx(ue,{}),s]})}),R=n.forwardRef(function({children:s,className:t,...l},r){const o=u(c.message,c["help-message"],t);return a.jsx(N,{ref:r,...l,className:o,children:s})});try{k.displayName="ErrorMessage",k.__docgenInfo={description:"An error message to display below a form control.",displayName:"ErrorMessage",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}try{I.displayName="SuccessMessage",I.__docgenInfo={description:"A success message to display below a form control.",displayName:"SuccessMessage",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}try{j.displayName="LoadingMessage",j.__docgenInfo={description:"A message showing a loading state",displayName:"LoadingMessage",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}try{R.displayName="HelpMessage",R.__docgenInfo={description:"A help message to display below a form control.",displayName:"HelpMessage",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}}}catch{}const B=n.forwardRef(function(s,t){return a.jsx($,{asChild:!0,children:a.jsx(q,{type:"submit",ref:t,...s})})});try{B.displayName="Submit",B.__docgenInfo={description:"A stylised submit button for forms.",displayName:"Submit",props:{size:{defaultValue:null,description:"The t-shirt size of the button.",name:"size",required:!1,type:{name:"enum",value:[{value:'"sm"'},{value:'"lg"'}]}},disabled:{defaultValue:null,description:"Note that disabled attribute is not added to buttons, so that disabled buttons are discoverable by keyboard.\n`aria-disabled` attribute is used to indicate button is disabled.\nEvent handlers are not passed to disabled buttons (onClick, onSubmit, etc.)",name:"disabled",required:!1,type:{name:"boolean"}},kind:{defaultValue:null,description:`The type of button. Note: "destructive" is deprecated, please use the destructive prop in -conjunction with another button kind.`,name:"kind",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"destructive"'}]}},destructive:{defaultValue:{value:"false"},description:"Whether this button triggers a destructive action.",name:"destructive",required:!1,type:{name:"boolean"}},iconOnly:{defaultValue:null,description:"Whether the button is an icon only button.",name:"iconOnly",required:!1,type:{name:"boolean"}},Icon:{defaultValue:null,description:"An icon to display within the button.",name:"Icon",required:!1,type:{name:"ComponentType>"}}}}}catch{}const H=({children:e,...s})=>a.jsx(me,{...s,children:e});try{H.displayName="Body",H.__docgenInfo={description:"",displayName:"Body",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"sm"'},{value:'"lg"'},{value:'"xs"'},{value:'"md"'}]}}}}}catch{}const ge="_search_qztja_17",ve="_icon_qztja_46",Ne="_input_qztja_61",V={search:ge,icon:ve,input:Ne},z=n.forwardRef(function({className:s,onChange:t,placeholder:l="Search…",name:r,...o},f){const h=u(V.search,s),y=pe();return a.jsx(g,{name:r,asChild:!0,children:a.jsxs(v,{className:h,htmlFor:y,children:[a.jsx(de,{className:V.icon,width:20,height:20}),a.jsx("input",{ref:f,...o,id:y,name:r,type:"search",placeholder:l,onChange:t,className:V.input})]})})});try{z.displayName="Search",z.__docgenInfo={description:"A standalone search component",displayName:"Search",props:{className:{defaultValue:null,description:"The CSS class name",name:"className",required:!1,type:{name:"string"}},name:{defaultValue:null,description:"The field name.",name:"name",required:!1,type:{name:"string"}},placeholder:{defaultValue:{value:"Search…"},description:"The input placeholder.",name:"placeholder",required:!1,type:{name:"string"}}}}}catch{}function xe(e,s){switch(s){case 0:return e===0||e===3?1:e;case 1:return 2;case 4:return 0;case 2:return e===2?3:e;case 3:return e===2?0:e;case 5:return e===3?0:e}Se(s)}function Se(e){throw new Error(`Unreachable value: ${e}`)}const A=n.forwardRef(function({className:s,label:t,onSave:l,onCancel:r,onInput:o,onClearServerErrors:f,serverInvalid:h,saveButtonLabel:y,cancelButtonLabel:P,savedLabel:T,savingLabel:O,helpLabel:E,disabled:U,children:G,...D},J){const[i,m]=n.useReducer(xe,0),_=n.useRef(!1),[x,b]=n.useState(!1),X=i===1||i===2||x,p=n.useRef();n.useEffect(()=>(i===3&&(p.current=setTimeout(()=>{m(5),p.current=void 0},2e3)),()=>{p.current&&clearTimeout(p.current),p.current=void 0}),[i]);const K=n.useRef(null),L=n.useRef(null),S=n.useRef(null),Q=n.useCallback(()=>{_.current||(_.current=!0,b(!0))},[x,b]),Y=n.useCallback(d=>{_.current&&(d.currentTarget.contains(d.relatedTarget)||(_.current=!1,b(!1)))},[x,b]),Z=n.useCallback(d=>{m(0),o?.(d)},[m,o]),ee=n.useCallback(async d=>{if(d.preventDefault(),i!==0)try{m(1),L.current?.blur(),await l?.(d),m(2)}catch{m(3)}},[l,i,p]),ae=n.useCallback(d=>{S.current?.blur(),r?.(d),m(4)},[S,r]);return a.jsx(w,{className:s,onSubmit:ee,onReset:ae,onFocus:Q,onBlur:Y,onClearServerErrors:f,ref:K,children:a.jsxs(g,{name:"input",serverInvalid:h,children:[a.jsx(v,{children:t}),a.jsxs("div",{className:C.controls,children:[a.jsx(ie,{ref:J,...D,onInput:Z,disabled:U||i===2}),X&&a.jsxs("div",{className:C["button-group"],children:[a.jsx(F,{label:y,children:a.jsx($,{asChild:!0,children:a.jsx(q,{type:"submit",kind:"primary",size:"sm",ref:L,disabled:i!==1,iconOnly:!0,Icon:re})})}),a.jsx(F,{label:P,children:a.jsx(q,{type:"reset",kind:"secondary",size:"sm",ref:S,className:C.button,disabled:i===2,iconOnly:!0,Icon:oe})})]})]}),i===2?a.jsx(j,{children:O}):G,T&&i===3&&a.jsx(I,{children:T}),E&&(i===0||i===1)&&a.jsx(ne,{children:d=>(d===void 0||d.valid)&&!h&&a.jsx(R,{children:E})})]})})});try{A.displayName="EditInPlace",A.__docgenInfo={description:`A text box with save/cancel buttons that appear when the field is active. +conjunction with another button kind.`,name:"kind",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"secondary"'},{value:'"tertiary"'},{value:'"destructive"'}]}},destructive:{defaultValue:{value:"false"},description:"Whether this button triggers a destructive action.",name:"destructive",required:!1,type:{name:"boolean"}},iconOnly:{defaultValue:null,description:"Whether the button is an icon only button.",name:"iconOnly",required:!1,type:{name:"boolean"}},Icon:{defaultValue:null,description:"An icon to display within the button.",name:"Icon",required:!1,type:{name:"ComponentType>"}}}}}catch{}const H=({children:e,...s})=>a.jsx(me,{...s,children:e});try{H.displayName="Body",H.__docgenInfo={description:"",displayName:"Body",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"sm"'},{value:'"lg"'},{value:'"xs"'},{value:'"md"'}]}}}}}catch{}const ge="_search_qztja_17",ve="_icon_qztja_46",Ne="_input_qztja_61",V={search:ge,icon:ve,input:Ne},z=n.forwardRef(function({className:s,onChange:t,placeholder:l="Search…",name:r,...o},f){const h=u(V.search,s),y=pe();return a.jsx(g,{name:r,asChild:!0,children:a.jsxs(v,{className:h,htmlFor:y,children:[a.jsx(de,{className:V.icon,width:20,height:20}),a.jsx("input",{ref:f,...o,id:y,name:r,type:"search",placeholder:l,onChange:t,className:V.input})]})})});try{z.displayName="Search",z.__docgenInfo={description:"A standalone search component",displayName:"Search",props:{name:{defaultValue:null,description:"The field name.",name:"name",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"The CSS class name",name:"className",required:!1,type:{name:"string"}},placeholder:{defaultValue:{value:"Search…"},description:"The input placeholder.",name:"placeholder",required:!1,type:{name:"string"}}}}}catch{}function xe(e,s){switch(s){case 0:return e===0||e===3?1:e;case 1:return 2;case 4:return 0;case 2:return e===2?3:e;case 3:return e===2?0:e;case 5:return e===3?0:e}Se(s)}function Se(e){throw new Error(`Unreachable value: ${e}`)}const A=n.forwardRef(function({className:s,label:t,onSave:l,onCancel:r,onInput:o,onClearServerErrors:f,serverInvalid:h,saveButtonLabel:y,cancelButtonLabel:P,savedLabel:T,savingLabel:O,helpLabel:E,disabled:U,children:G,...D},J){const[i,m]=n.useReducer(xe,0),_=n.useRef(!1),[x,b]=n.useState(!1),X=i===1||i===2||x,p=n.useRef();n.useEffect(()=>(i===3&&(p.current=setTimeout(()=>{m(5),p.current=void 0},2e3)),()=>{p.current&&clearTimeout(p.current),p.current=void 0}),[i]);const K=n.useRef(null),L=n.useRef(null),S=n.useRef(null),Q=n.useCallback(()=>{_.current||(_.current=!0,b(!0))},[x,b]),Y=n.useCallback(d=>{_.current&&(d.currentTarget.contains(d.relatedTarget)||(_.current=!1,b(!1)))},[x,b]),Z=n.useCallback(d=>{m(0),o?.(d)},[m,o]),ee=n.useCallback(async d=>{if(d.preventDefault(),i!==0)try{m(1),L.current?.blur(),await l?.(d),m(2)}catch{m(3)}},[l,i,p]),ae=n.useCallback(d=>{S.current?.blur(),r?.(d),m(4)},[S,r]);return a.jsx(w,{className:s,onSubmit:ee,onReset:ae,onFocus:Q,onBlur:Y,onClearServerErrors:f,ref:K,children:a.jsxs(g,{name:"input",serverInvalid:h,children:[a.jsx(v,{children:t}),a.jsxs("div",{className:C.controls,children:[a.jsx(ie,{ref:J,...D,onInput:Z,disabled:U||i===2}),X&&a.jsxs("div",{className:C["button-group"],children:[a.jsx(F,{label:y,children:a.jsx($,{asChild:!0,children:a.jsx(q,{type:"submit",kind:"primary",size:"sm",ref:L,disabled:i!==1,iconOnly:!0,Icon:re})})}),a.jsx(F,{label:P,children:a.jsx(q,{type:"reset",kind:"secondary",size:"sm",ref:S,className:C.button,disabled:i===2,iconOnly:!0,Icon:oe})})]})]}),i===2?a.jsx(j,{children:O}):G,T&&i===3&&a.jsx(I,{children:T}),E&&(i===0||i===1)&&a.jsx(ne,{children:d=>(d===void 0||d.valid)&&!h&&a.jsx(R,{children:E})})]})})});try{A.displayName="EditInPlace",A.__docgenInfo={description:`A text box with save/cancel buttons that appear when the field is active. Since thios control has its own 'save' button, it should *not* appear as part of a larger form: it exists as its own form that submits separately.`,displayName:"EditInPlace",props:{className:{defaultValue:null,description:"The CSS class name.",name:"className",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"If true, disabled the entire component to disallow editing.",name:"disabled",required:!1,type:{name:"boolean"}},onInput:{defaultValue:null,description:"onInput event handler on the text control",name:"onInput",required:!1,type:{name:"(((e: ChangeEvent) => void) & FormEventHandler)"}},label:{defaultValue:null,description:"The label for the control",name:"label",required:!0,type:{name:"string"}},serverInvalid:{defaultValue:null,description:`Whether the field is in an error state according to the server validation. -For validation messages, use native validations properties directly, or add custom error messages as children.`,name:"serverInvalid",required:!1,type:{name:"boolean"}},enableLigatures:{defaultValue:null,description:`Enable contextual alternate ligatures on input text +For validation messages, use native validations properties directly, or add custom error messages as children.`,name:"serverInvalid",required:!1,type:{name:"boolean"}},onClearServerErrors:{defaultValue:null,description:"Callback for when the server validation errors should be cleared.",name:"onClearServerErrors",required:!1,type:{name:"(() => void)"}},enableLigatures:{defaultValue:null,description:`Enable contextual alternate ligatures on input text For example on an in-place editing field https://github.com/rsms/inter/issues/222 -https://github.com/rsms/inter/blob/master/src/features/calt.fea`,name:"enableLigatures",required:!1,type:{name:"boolean"}},onSave:{defaultValue:null,description:"Callback for when the user confirms the change",name:"onSave",required:!1,type:{name:"((e: FormEvent) => void | Promise)"}},onCancel:{defaultValue:null,description:"Callback for when the user wishes to cancel the change",name:"onCancel",required:!1,type:{name:"((e: FormEvent) => void)"}},onClearServerErrors:{defaultValue:null,description:"Callback for when the server validation errors should be cleared.",name:"onClearServerErrors",required:!1,type:{name:"(() => void)"}},saveButtonLabel:{defaultValue:null,description:"The label for the save button",name:"saveButtonLabel",required:!0,type:{name:"string"}},cancelButtonLabel:{defaultValue:null,description:"The label for the cancel button",name:"cancelButtonLabel",required:!0,type:{name:"string"}},savedLabel:{defaultValue:null,description:`Label to be displayed by the green check at the bottom. Will only be displayed +https://github.com/rsms/inter/blob/master/src/features/calt.fea`,name:"enableLigatures",required:!1,type:{name:"boolean"}},onSave:{defaultValue:null,description:"Callback for when the user confirms the change",name:"onSave",required:!1,type:{name:"((e: FormEvent) => void | Promise)"}},onCancel:{defaultValue:null,description:"Callback for when the user wishes to cancel the change",name:"onCancel",required:!1,type:{name:"((e: FormEvent) => void)"}},saveButtonLabel:{defaultValue:null,description:"The label for the save button",name:"saveButtonLabel",required:!0,type:{name:"string"}},cancelButtonLabel:{defaultValue:null,description:"The label for the cancel button",name:"cancelButtonLabel",required:!0,type:{name:"string"}},savedLabel:{defaultValue:null,description:`Label to be displayed by the green check at the bottom. Will only be displayed for 2 seconds after the onSave callback promise resolves successfully.`,name:"savedLabel",required:!1,type:{name:"string"}},savingLabel:{defaultValue:null,description:"The label for the 'in progress' saving caption",name:"savingLabel",required:!0,type:{name:"string"}},helpLabel:{defaultValue:null,description:"Label to be displayed under the input as a help text",name:"helpLabel",required:!1,type:{name:"string"}}}}}catch{}export{A as E,g as F,R as H,M as I,v as L,w as R,B as S,k as a,I as b,z as c}; diff --git a/assets/EditInPlace.stories-Ez7EFMu_.js b/assets/EditInPlace.stories-D78bXHNm.js similarity index 96% rename from assets/EditInPlace.stories-Ez7EFMu_.js rename to assets/EditInPlace.stories-D78bXHNm.js index 30b55171..6e000cc1 100644 --- a/assets/EditInPlace.stories-Ez7EFMu_.js +++ b/assets/EditInPlace.stories-D78bXHNm.js @@ -1,4 +1,4 @@ -import{j as l}from"./jsx-runtime-CexXSJP5.js";import{E as m,a as d}from"./EditInPlace-B4xx68e2.js";import{w as c,u as a,e as v}from"./index-BSM_bQPn.js";import{T as g}from"./Tooltip-DCOt0Zqn.js";import"./index-BP8_t0zE.js";import"./index-Dn9bhuYh.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./Action-Ctm0m6gb.js";import"./index-CSpfAsmC.js";import"./Text-Cz5oMJIL.js";import"./useId-DIHOOv91.js";import"./Password-HQdEGLZE.js";import"./visibility-on-D1sVPsTi.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-CG6pPwnW.js";import"./index-B8nNyT4I.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DoAMoPfE.js";import"./Progress-CTwHYCo_.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */import"./index-C8k3Z-3Y.js";const be={title:"Form/Controls/EditInPlace",component:m,tags:["autodocs"],parameters:{controls:{include:["onChange","onSave","onCancel","onClearServerErrors","defaultValue","error","serverInvalid","savedLabel","saveButtonLabel","cancelButtonLabel","helpLabel","disabled"]},design:{type:"figma",url:"https://www.figma.com/file/rTaQE2nIUSLav4Tg3nozq7/Compound-Web-Components?type=design&node-id=4335-2016&mode=design&t=BvxRca0YDRaq20IR-0"}},argTypes:{label:{type:"string"},defaultValue:{type:"string"},onChange:{action:"changed"},onCancel:{action:"cancelled"},onClearServerErrors:{action:"cleared server errors"},serverInvalid:{type:"boolean"},helpLabel:{type:"string"},savedLabel:{type:"string"},saveButtonLabel:{type:"string"},savingLabel:{type:"string"},cancelButtonLabel:{type:"string"},disabled:{type:"boolean"}},render:({...e})=>l.jsx(g,{children:l.jsx(m,{...e})}),args:{label:"Label",onSave:()=>new Promise(e=>setTimeout(e,1e3)),savedLabel:"Saved",saveButtonLabel:"Save",cancelButtonLabel:"Cancel",savingLabel:"Saving…"}},o={},n={args:{defaultValue:"Hello, Computer"},play:async({canvasElement:e})=>{const t=c(e).getByRole("textbox");await a.clear(t),await a.type(t,"Hello, Computer")}},s={args:{defaultValue:"Hello",onSave:()=>new Promise(()=>{})},play:async({canvasElement:e})=>{const r=c(e),t=r.getByRole("textbox");await a.clear(t),await a.type(t,"Hello");const u=r.getByRole("button",{name:"Save"});await a.click(u),await v(r.getByText("Saving…")).toBeInTheDocument()}},i={args:{serverInvalid:!0,children:l.jsx(d,{children:"I am a teapot"})}},p={args:{helpLabel:"Optional help text."}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:"{}",...o.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{ +import{j as l}from"./jsx-runtime-CexXSJP5.js";import{E as m,a as d}from"./EditInPlace-zG_DXBw9.js";import{w as c,u as a,e as v}from"./index-BSM_bQPn.js";import{T as g}from"./Tooltip-DCOt0Zqn.js";import"./index-BP8_t0zE.js";import"./index-Dn9bhuYh.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./Action-Ctm0m6gb.js";import"./index-CSpfAsmC.js";import"./Text-Cz5oMJIL.js";import"./useId-DIHOOv91.js";import"./Password-HQdEGLZE.js";import"./visibility-on-D1sVPsTi.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-DdLa5yx0.js";import"./index-D_QEhDW5.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DReENGuy.js";import"./Progress-CTwHYCo_.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */import"./index-C8k3Z-3Y.js";const be={title:"Form/Controls/EditInPlace",component:m,tags:["autodocs"],parameters:{controls:{include:["onChange","onSave","onCancel","onClearServerErrors","defaultValue","error","serverInvalid","savedLabel","saveButtonLabel","cancelButtonLabel","helpLabel","disabled"]},design:{type:"figma",url:"https://www.figma.com/file/rTaQE2nIUSLav4Tg3nozq7/Compound-Web-Components?type=design&node-id=4335-2016&mode=design&t=BvxRca0YDRaq20IR-0"}},argTypes:{label:{type:"string"},defaultValue:{type:"string"},onChange:{action:"changed"},onCancel:{action:"cancelled"},onClearServerErrors:{action:"cleared server errors"},serverInvalid:{type:"boolean"},helpLabel:{type:"string"},savedLabel:{type:"string"},saveButtonLabel:{type:"string"},savingLabel:{type:"string"},cancelButtonLabel:{type:"string"},disabled:{type:"boolean"}},render:({...e})=>l.jsx(g,{children:l.jsx(m,{...e})}),args:{label:"Label",onSave:()=>new Promise(e=>setTimeout(e,1e3)),savedLabel:"Saved",saveButtonLabel:"Save",cancelButtonLabel:"Cancel",savingLabel:"Saving…"}},o={},n={args:{defaultValue:"Hello, Computer"},play:async({canvasElement:e})=>{const t=c(e).getByRole("textbox");await a.clear(t),await a.type(t,"Hello, Computer")}},s={args:{defaultValue:"Hello",onSave:()=>new Promise(()=>{})},play:async({canvasElement:e})=>{const r=c(e),t=r.getByRole("textbox");await a.clear(t),await a.type(t,"Hello");const u=r.getByRole("button",{name:"Save"});await a.click(u),await v(r.getByText("Saving…")).toBeInTheDocument()}},i={args:{serverInvalid:!0,children:l.jsx(d,{children:"I am a teapot"})}},p={args:{helpLabel:"Optional help text."}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:"{}",...o.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{ args: { defaultValue: "Hello, Computer" }, diff --git a/assets/Form.stories-Bjpacd5g.js b/assets/Form.stories-BCDF6fN4.js similarity index 95% rename from assets/Form.stories-Bjpacd5g.js rename to assets/Form.stories-BCDF6fN4.js index 2d41bf7b..cf0928dc 100644 --- a/assets/Form.stories-Bjpacd5g.js +++ b/assets/Form.stories-BCDF6fN4.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import"./Action-Ctm0m6gb.js";import{a as j}from"./Password-HQdEGLZE.js";import{a as h}from"./Text-Cz5oMJIL.js";import{a as u}from"./MFA-QkHhz391.js";import{a as g}from"./Checkbox-Ch9dGUQd.js";import{a as x}from"./Radio-CvV1BscZ.js";import{a as f}from"./Toggle-Q78m7eTC.js";import{R as C,F as d,L as t,a,H as m,I as i,S as I}from"./EditInPlace-B4xx68e2.js";import{T as E}from"./Tooltip-DCOt0Zqn.js";import"./index-BP8_t0zE.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./index-Dn9bhuYh.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./visibility-on-D1sVPsTi.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-CG6pPwnW.js";import"./index-B8nNyT4I.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DoAMoPfE.js";import"./Progress-CTwHYCo_.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const H=({disabled:s,invalid:e,readOnly:o})=>r.jsx(E,{children:r.jsxs(C,{children:[r.jsxs(d,{serverInvalid:e,name:"mxid",children:[r.jsx(t,{children:"Username"}),r.jsx(h,{disabled:s,readOnly:o,defaultValue:"Hello world!"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(d,{serverInvalid:e,name:"password",children:[r.jsx(t,{children:"Password"}),r.jsx(j,{disabled:s,readOnly:o,defaultValue:"sup3rS3cur3p4ssw0rd!"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(d,{serverInvalid:e,name:"mfa",children:[r.jsx(t,{children:"MFA"}),r.jsx(u,{disabled:s,readOnly:o,defaultValue:"123"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"remember",control:r.jsx(g,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Remember me"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"radio",control:r.jsx(x,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Option 1"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"radio",control:r.jsx(x,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Option 2"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"toggle",control:r.jsx(f,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Toggle"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsx(I,{disabled:s,children:"Submit"})]})}),Hr={title:"Form/Kitchen Sink",component:H,argTypes:{disabled:{type:"boolean"},readOnly:{type:"boolean"},invalid:{type:"boolean"}},args:{disabled:!1,readOnly:!1,invalid:!1}},p={},n={args:{disabled:!0}},l={args:{readOnly:!0}},c={args:{invalid:!0}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:"{}",...p.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{ +import{j as r}from"./jsx-runtime-CexXSJP5.js";import"./Action-Ctm0m6gb.js";import{a as j}from"./Password-HQdEGLZE.js";import{a as h}from"./Text-Cz5oMJIL.js";import{a as u}from"./MFA-QkHhz391.js";import{a as g}from"./Checkbox-Ch9dGUQd.js";import{a as x}from"./Radio-CvV1BscZ.js";import{a as f}from"./Toggle-Q78m7eTC.js";import{R as C,F as d,L as t,a,H as m,I as i,S as I}from"./EditInPlace-zG_DXBw9.js";import{T as E}from"./Tooltip-DCOt0Zqn.js";import"./index-BP8_t0zE.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./index-Dn9bhuYh.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./visibility-on-D1sVPsTi.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-DdLa5yx0.js";import"./index-D_QEhDW5.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DReENGuy.js";import"./Progress-CTwHYCo_.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const H=({disabled:s,invalid:e,readOnly:o})=>r.jsx(E,{children:r.jsxs(C,{children:[r.jsxs(d,{serverInvalid:e,name:"mxid",children:[r.jsx(t,{children:"Username"}),r.jsx(h,{disabled:s,readOnly:o,defaultValue:"Hello world!"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(d,{serverInvalid:e,name:"password",children:[r.jsx(t,{children:"Password"}),r.jsx(j,{disabled:s,readOnly:o,defaultValue:"sup3rS3cur3p4ssw0rd!"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(d,{serverInvalid:e,name:"mfa",children:[r.jsx(t,{children:"MFA"}),r.jsx(u,{disabled:s,readOnly:o,defaultValue:"123"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"remember",control:r.jsx(g,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Remember me"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"radio",control:r.jsx(x,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Option 1"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"radio",control:r.jsx(x,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Option 2"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsxs(i,{serverInvalid:e,name:"toggle",control:r.jsx(f,{disabled:s,readOnly:o,defaultChecked:!0}),children:[r.jsx(t,{children:"Toggle"}),e?r.jsx(a,{children:"Error message."}):r.jsx(m,{children:"Help message."})]}),r.jsx(I,{disabled:s,children:"Submit"})]})}),Hr={title:"Form/Kitchen Sink",component:H,argTypes:{disabled:{type:"boolean"},readOnly:{type:"boolean"},invalid:{type:"boolean"}},args:{disabled:!1,readOnly:!1,invalid:!1}},p={},n={args:{disabled:!0}},l={args:{readOnly:!0}},c={args:{invalid:!0}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:"{}",...p.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{ args: { disabled: true } diff --git a/assets/Menu-DoAMoPfE.js b/assets/Menu-DReENGuy.js similarity index 85% rename from assets/Menu-DoAMoPfE.js rename to assets/Menu-DReENGuy.js index 9b9f5a21..e11ae6bb 100644 --- a/assets/Menu-DoAMoPfE.js +++ b/assets/Menu-DReENGuy.js @@ -1,7 +1,7 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{c as f,u as M}from"./index-DD7XHAoh.js";import{c as T}from"./index-Dp4tTk3o.js";import{c as A}from"./index-vl_XNHfj.js";import{c as D,A as E,C as P,G as j,L as O,I as G,a as k,R as q,b as L,d as V,S as F,e as K,f as U,g as W,i as B,h as H,P as J,J as w}from"./index-B8nNyT4I.js";import{P as X}from"./index-CkD-EKAR.js";import{F as $}from"./FloatingMenu-t36h7pay.js";import{c as z}from"./index-CSpfAsmC.js";import{d as Q,D as Y,g as Z}from"./DrawerMenu-BgyYdqxq.js";import{a as ee}from"./MenuItem-CmF0V73j.js";var v="DropdownMenu",[re,Fe]=A(v,[D]),p=D(),[oe,_]=re(v),b=e=>{const{__scopeDropdownMenu:o,children:n,dir:r,open:t,defaultOpen:d,onOpenChange:u,modal:s=!0}=e,l=p(o),m=i.useRef(null),[h=!1,c]=B({prop:t,defaultProp:d,onChange:u});return a.jsx(oe,{scope:o,triggerId:M(),triggerRef:m,contentId:M(),open:h,onOpenChange:c,onOpenToggle:i.useCallback(()=>c(g=>!g),[c]),modal:s,children:a.jsx(H,{...l,open:h,onOpenChange:c,dir:r,modal:s,children:n})})};b.displayName=v;var y="DropdownMenuTrigger",R=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...t}=e,d=_(y,n),u=p(n);return a.jsx(E,{asChild:!0,...u,children:a.jsx(X.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...t,ref:T(o,d.triggerRef),onPointerDown:f(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(d.onOpenToggle(),d.open||s.preventDefault())}),onKeyDown:f(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&d.onOpenToggle(),s.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});R.displayName=y;var ne="DropdownMenuPortal",N=e=>{const{__scopeDropdownMenu:o,...n}=e,r=p(o);return a.jsx(J,{...r,...n})};N.displayName=ne;var I="DropdownMenuContent",C=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=_(I,n),d=p(n),u=i.useRef(!1);return a.jsx(P,{id:t.contentId,"aria-labelledby":t.triggerId,...d,...r,ref:o,onCloseAutoFocus:f(e.onCloseAutoFocus,s=>{u.current||t.triggerRef.current?.focus(),u.current=!1,s.preventDefault()}),onInteractOutside:f(e.onInteractOutside,s=>{const l=s.detail.originalEvent,m=l.button===0&&l.ctrlKey===!0,h=l.button===2||m;(!t.modal||h)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});C.displayName=I;var te="DropdownMenuGroup",ae=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(j,{...t,...r,ref:o})});ae.displayName=te;var se="DropdownMenuLabel",ie=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(O,{...t,...r,ref:o})});ie.displayName=se;var de="DropdownMenuItem",S=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(G,{...t,...r,ref:o})});S.displayName=de;var pe="DropdownMenuCheckboxItem",ue=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(k,{...t,...r,ref:o})});ue.displayName=pe;var le="DropdownMenuRadioGroup",ce=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(q,{...t,...r,ref:o})});ce.displayName=le;var me="DropdownMenuRadioItem",he=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(L,{...t,...r,ref:o})});he.displayName=me;var we="DropdownMenuItemIndicator",fe=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(V,{...t,...r,ref:o})});fe.displayName=we;var ge="DropdownMenuSeparator",ve=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(F,{...t,...r,ref:o})});ve.displayName=ge;var Me="DropdownMenuArrow",xe=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(K,{...t,...r,ref:o})});xe.displayName=Me;var De="DropdownMenuSubTrigger",_e=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(U,{...t,...r,ref:o})});_e.displayName=De;var be="DropdownMenuSubContent",ye=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(W,{...t,...r,ref:o,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ye.displayName=be;var Re=b,Ne=R,Ie=N,Ce=C;const Se=({onSelect:e,children:o})=>a.jsx(S,{onSelect:e??void 0,asChild:!0,children:o}),x=({title:e,showTitle:o=!0,open:n,onOpenChange:r,trigger:t,children:d,side:u="bottom",align:s="center"})=>{const l=Z(),m=l==="android"||l==="ios",h=i.useMemo(()=>({MenuItemWrapper:m?null:Se,onOpenChange:r}),[r]),c=a.jsx(ee.Provider,{value:h,children:d});return m?a.jsxs(w.Root,{open:n,onOpenChange:r,children:[a.jsx(w.Trigger,{asChild:!0,children:t}),a.jsxs(w.Portal,{children:[a.jsx(w.Overlay,{className:z(Q.bg)}),a.jsx(w.Content,{asChild:!0,children:a.jsx(Y,{title:e,children:c})})]})]}):a.jsxs(Re,{open:n,onOpenChange:r,children:[a.jsx(Ne,{asChild:!0,children:t}),a.jsx(Ie,{children:a.jsx(Ce,{asChild:!0,side:u,align:s,sideOffset:8,onCloseAutoFocus:g=>{g.preventDefault()},children:a.jsx($,{title:e,showTitle:o,children:c})})})]})};try{x.displayName="Menu",x.__docgenInfo={description:"A menu opened by pressing a button.",displayName:"Menu",props:{title:{defaultValue:null,description:"The menu title. This can be hidden with `showTitle={false}` in which case it will only\nbe a label for screen readers.",name:"title",required:!0,type:{name:"string"}},showTitle:{defaultValue:{value:"true"},description:"Controls whether the title is displayed (see `title` prop). Titles are only displayed on\nweb: on mobile, this parameter is ignored.",name:"showTitle",required:!1,type:{name:"boolean"}},open:{defaultValue:null,description:"Whether the menu is open.",name:"open",required:!0,type:{name:"boolean"}},onOpenChange:{defaultValue:null,description:`Event handler called when the open state of the menu changes. This includes +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{c as f,u as M}from"./index-DD7XHAoh.js";import{c as T}from"./index-Dp4tTk3o.js";import{c as A}from"./index-vl_XNHfj.js";import{c as x,A as E,C as P,G as j,L as O,I as G,a as k,R as q,b as L,d as V,S as F,e as K,f as U,g as W,i as B,h as H,P as X,D as w}from"./index-D_QEhDW5.js";import{P as $}from"./index-CkD-EKAR.js";import{F as z}from"./FloatingMenu-t36h7pay.js";import{c as J}from"./index-CSpfAsmC.js";import{d as Q,D as Y,g as Z}from"./DrawerMenu-BgyYdqxq.js";import{a as ee}from"./MenuItem-CmF0V73j.js";var v="DropdownMenu",[re,Fe]=A(v,[x]),p=x(),[oe,_]=re(v),b=e=>{const{__scopeDropdownMenu:o,children:n,dir:r,open:t,defaultOpen:d,onOpenChange:u,modal:s=!0}=e,l=p(o),m=i.useRef(null),[h=!1,c]=B({prop:t,defaultProp:d,onChange:u});return a.jsx(oe,{scope:o,triggerId:M(),triggerRef:m,contentId:M(),open:h,onOpenChange:c,onOpenToggle:i.useCallback(()=>c(g=>!g),[c]),modal:s,children:a.jsx(H,{...l,open:h,onOpenChange:c,dir:r,modal:s,children:n})})};b.displayName=v;var y="DropdownMenuTrigger",R=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...t}=e,d=_(y,n),u=p(n);return a.jsx(E,{asChild:!0,...u,children:a.jsx($.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...t,ref:T(o,d.triggerRef),onPointerDown:f(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(d.onOpenToggle(),d.open||s.preventDefault())}),onKeyDown:f(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&d.onOpenToggle(),s.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});R.displayName=y;var ne="DropdownMenuPortal",N=e=>{const{__scopeDropdownMenu:o,...n}=e,r=p(o);return a.jsx(X,{...r,...n})};N.displayName=ne;var I="DropdownMenuContent",C=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=_(I,n),d=p(n),u=i.useRef(!1);return a.jsx(P,{id:t.contentId,"aria-labelledby":t.triggerId,...d,...r,ref:o,onCloseAutoFocus:f(e.onCloseAutoFocus,s=>{u.current||t.triggerRef.current?.focus(),u.current=!1,s.preventDefault()}),onInteractOutside:f(e.onInteractOutside,s=>{const l=s.detail.originalEvent,m=l.button===0&&l.ctrlKey===!0,h=l.button===2||m;(!t.modal||h)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});C.displayName=I;var te="DropdownMenuGroup",ae=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(j,{...t,...r,ref:o})});ae.displayName=te;var se="DropdownMenuLabel",ie=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(O,{...t,...r,ref:o})});ie.displayName=se;var de="DropdownMenuItem",S=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(G,{...t,...r,ref:o})});S.displayName=de;var pe="DropdownMenuCheckboxItem",ue=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(k,{...t,...r,ref:o})});ue.displayName=pe;var le="DropdownMenuRadioGroup",ce=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(q,{...t,...r,ref:o})});ce.displayName=le;var me="DropdownMenuRadioItem",he=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(L,{...t,...r,ref:o})});he.displayName=me;var we="DropdownMenuItemIndicator",fe=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(V,{...t,...r,ref:o})});fe.displayName=we;var ge="DropdownMenuSeparator",ve=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(F,{...t,...r,ref:o})});ve.displayName=ge;var Me="DropdownMenuArrow",De=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(K,{...t,...r,ref:o})});De.displayName=Me;var xe="DropdownMenuSubTrigger",_e=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(U,{...t,...r,ref:o})});_e.displayName=xe;var be="DropdownMenuSubContent",ye=i.forwardRef((e,o)=>{const{__scopeDropdownMenu:n,...r}=e,t=p(n);return a.jsx(W,{...t,...r,ref:o,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ye.displayName=be;var Re=b,Ne=R,Ie=N,Ce=C;const Se=({onSelect:e,children:o})=>a.jsx(S,{onSelect:e??void 0,asChild:!0,children:o}),D=({title:e,showTitle:o=!0,open:n,onOpenChange:r,trigger:t,children:d,side:u="bottom",align:s="center"})=>{const l=Z(),m=l==="android"||l==="ios",h=i.useMemo(()=>({MenuItemWrapper:m?null:Se,onOpenChange:r}),[r]),c=a.jsx(ee.Provider,{value:h,children:d});return m?a.jsxs(w.Root,{open:n,onOpenChange:r,children:[a.jsx(w.Trigger,{asChild:!0,children:t}),a.jsxs(w.Portal,{children:[a.jsx(w.Overlay,{className:J(Q.bg)}),a.jsx(w.Content,{asChild:!0,children:a.jsx(Y,{title:e,children:c})})]})]}):a.jsxs(Re,{open:n,onOpenChange:r,children:[a.jsx(Ne,{asChild:!0,children:t}),a.jsx(Ie,{children:a.jsx(Ce,{asChild:!0,side:u,align:s,sideOffset:8,onCloseAutoFocus:g=>{g.preventDefault()},children:a.jsx(z,{title:e,showTitle:o,children:c})})})]})};try{D.displayName="Menu",D.__docgenInfo={description:"A menu opened by pressing a button.",displayName:"Menu",props:{title:{defaultValue:null,description:"The menu title. This can be hidden with `showTitle={false}` in which case it will only\nbe a label for screen readers.",name:"title",required:!0,type:{name:"string"}},showTitle:{defaultValue:{value:"true"},description:"Controls whether the title is displayed (see `title` prop). Titles are only displayed on\nweb: on mobile, this parameter is ignored.",name:"showTitle",required:!1,type:{name:"boolean"}},open:{defaultValue:null,description:"Whether the menu is open.",name:"open",required:!0,type:{name:"boolean"}},onOpenChange:{defaultValue:null,description:`Event handler called when the open state of the menu changes. This includes anything like clicking the trigger, selecting a menu item, or dismissing the menu with the mouse or keyboard.`,name:"onOpenChange",required:!0,type:{name:"(open: boolean) => void"}},trigger:{defaultValue:null,description:`The button that opens the menu. This must be a component that accepts a ref and spreads props. https://www.radix-ui.com/primitives/docs/guides/composition`,name:"trigger",required:!0,type:{name:"ReactNode"}},children:{defaultValue:null,description:"The menu contents.",name:"children",required:!0,type:{name:"ReactNode"}},side:{defaultValue:{value:"bottom"},description:`The side of the trigger on which to place the menu. Note that the menu may still end up on a different side than the one you request if there isn't -enough space.`,name:"side",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'},{value:'"bottom"'},{value:'"top"'}]}},align:{defaultValue:{value:"center"},description:"The edge along which the menu and trigger will be aligned.",name:"align",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"end"'},{value:'"start"'}]}}}}}catch{}export{x as M}; +enough space.`,name:"side",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'},{value:'"bottom"'},{value:'"top"'}]}},align:{defaultValue:{value:"center"},description:"The edge along which the menu and trigger will be aligned.",name:"align",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"end"'},{value:'"start"'}]}}}}}catch{}export{D as M}; diff --git a/assets/Menu.stories-ZDCHtTNR.js b/assets/Menu.stories-CWigSGRO.js similarity index 95% rename from assets/Menu.stories-ZDCHtTNR.js rename to assets/Menu.stories-CWigSGRO.js index 9d7b719b..3ba5eb20 100644 --- a/assets/Menu.stories-ZDCHtTNR.js +++ b/assets/Menu.stories-CWigSGRO.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as l}from"./index-BP8_t0zE.js";import{U as p}from"./user-profile-EvkA4CON.js";import{N as m,C as u,L as I}from"./notifications-MBLL4uPX.js";import{M as r}from"./Menu-DoAMoPfE.js";import{M as t}from"./MenuItem-CmF0V73j.js";import{S as g}from"./Separator-DGmfQX2-.js";import{B as S}from"./Button-iukP6Ype.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-B8nNyT4I.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./DrawerMenu-BgyYdqxq.js";import"./chevron-right-DF47_mtr.js";import"./UnstyledButton-C9fNLva5.js";const R={title:"Menu",component:r,tags:["autodocs"],argTypes:{},args:{}},a=s=>{const[i,c]=l.useState(!0);return e.jsxs(r,{...s,open:i,onOpenChange:c,trigger:e.jsx(S,{children:"Open menu"}),align:"start",children:[e.jsx(t,{Icon:p,label:"Profile",onSelect:()=>{}}),e.jsx(t,{Icon:m,label:"Notifications",onSelect:()=>{}}),e.jsx(t,{Icon:u,label:"Feedback",onSelect:()=>{}}),e.jsx(g,{}),e.jsx(t,{kind:"critical",Icon:I,label:"Sign out",onSelect:()=>{}})]})},n=a.bind({});n.args={title:"Today's Menu"};const o=a.bind({});o.args={title:"Untitled Menu",showTitle:!1};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`args => { +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as l}from"./index-BP8_t0zE.js";import{U as p}from"./user-profile-EvkA4CON.js";import{N as m,C as u,L as I}from"./notifications-MBLL4uPX.js";import{M as r}from"./Menu-DReENGuy.js";import{M as t}from"./MenuItem-CmF0V73j.js";import{S as g}from"./Separator-DGmfQX2-.js";import{B as S}from"./Button-iukP6Ype.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-D_QEhDW5.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./DrawerMenu-BgyYdqxq.js";import"./chevron-right-DF47_mtr.js";import"./UnstyledButton-C9fNLva5.js";const R={title:"Menu",component:r,tags:["autodocs"],argTypes:{},args:{}},a=s=>{const[i,c]=l.useState(!0);return e.jsxs(r,{...s,open:i,onOpenChange:c,trigger:e.jsx(S,{children:"Open menu"}),align:"start",children:[e.jsx(t,{Icon:p,label:"Profile",onSelect:()=>{}}),e.jsx(t,{Icon:m,label:"Notifications",onSelect:()=>{}}),e.jsx(t,{Icon:u,label:"Feedback",onSelect:()=>{}}),e.jsx(g,{}),e.jsx(t,{kind:"critical",Icon:I,label:"Sign out",onSelect:()=>{}})]})},n=a.bind({});n.args={title:"Today's Menu"};const o=a.bind({});o.args={title:"Untitled Menu",showTitle:!1};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`args => { const [open, setOpen] = useState(true); return Open menu} align="start"> {}} /> diff --git a/assets/PasswordForm.stories-DRzH-aJo.js b/assets/PasswordForm.stories-BDi0df78.js similarity index 96% rename from assets/PasswordForm.stories-DRzH-aJo.js rename to assets/PasswordForm.stories-BDi0df78.js index aec4c433..e73387fe 100644 --- a/assets/PasswordForm.stories-DRzH-aJo.js +++ b/assets/PasswordForm.stories-BDi0df78.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{W as c}from"./warning-B4ZpXzLn.js";import"./Action-Ctm0m6gb.js";import{a as s}from"./Password-HQdEGLZE.js";import"./Text-Cz5oMJIL.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import{R as r,L as a,F as o,H as g,b as w}from"./EditInPlace-B4xx68e2.js";import{P as t}from"./Progress-CTwHYCo_.js";import{T as x}from"./Tooltip-DCOt0Zqn.js";import"./index-BP8_t0zE.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./index-Dn9bhuYh.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./visibility-on-D1sVPsTi.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-CG6pPwnW.js";import"./index-B8nNyT4I.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DoAMoPfE.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const je={title:"Form/Password form",component:r,tags:["autodocs"],subcomponents:{Progress:t,PasswordControl:s,Label:a,Field:o},decorators:[u=>e.jsx(x,{children:e.jsx("div",{style:{maxWidth:"378px"},children:e.jsx(u,{})})})]},n=u=>{switch(u){case 1:return"Very weak password";case 2:return"Weak password";case 3:return"Strong password";case 4:return"Very strong password";default:return"Password strength"}},i=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{}),e.jsx(t,{getValueLabel:n,size:"sm",value:0,max:4})]})}),m=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"password"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"red",value:1,max:4}),e.jsxs(g,{children:[e.jsx(c,{}),"Guess time: a few seconds. Try adding a few more words."]})]})}),d=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"hunter2"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"orange",value:2,max:4}),e.jsxs(g,{children:[e.jsx(c,{}),"Guess time: a few days. Try adding a few more words."]})]})}),l=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"this is a strong password"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"lime",value:3,max:4}),e.jsx(w,{children:"Guess time: years"})]})}),p=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"this is a very strong password"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"green",value:4,max:4}),e.jsx(w,{children:"Guess time: centruries"})]})});i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`() => { +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{W as c}from"./warning-B4ZpXzLn.js";import"./Action-Ctm0m6gb.js";import{a as s}from"./Password-HQdEGLZE.js";import"./Text-Cz5oMJIL.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import{R as r,L as a,F as o,H as g,b as w}from"./EditInPlace-zG_DXBw9.js";import{P as t}from"./Progress-CTwHYCo_.js";import{T as x}from"./Tooltip-DCOt0Zqn.js";import"./index-BP8_t0zE.js";import"./index-CSpfAsmC.js";import"./useId-DIHOOv91.js";import"./index-Dn9bhuYh.js";import"./index-DD7XHAoh.js";import"./index-Dp4tTk3o.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Cw6ikIwd.js";import"./visibility-on-D1sVPsTi.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-DdLa5yx0.js";import"./index-D_QEhDW5.js";import"./floating-ui.react-4qK1KPOR.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DReENGuy.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const je={title:"Form/Password form",component:r,tags:["autodocs"],subcomponents:{Progress:t,PasswordControl:s,Label:a,Field:o},decorators:[u=>e.jsx(x,{children:e.jsx("div",{style:{maxWidth:"378px"},children:e.jsx(u,{})})})]},n=u=>{switch(u){case 1:return"Very weak password";case 2:return"Weak password";case 3:return"Strong password";case 4:return"Very strong password";default:return"Password strength"}},i=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{}),e.jsx(t,{getValueLabel:n,size:"sm",value:0,max:4})]})}),m=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"password"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"red",value:1,max:4}),e.jsxs(g,{children:[e.jsx(c,{}),"Guess time: a few seconds. Try adding a few more words."]})]})}),d=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"hunter2"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"orange",value:2,max:4}),e.jsxs(g,{children:[e.jsx(c,{}),"Guess time: a few days. Try adding a few more words."]})]})}),l=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"this is a strong password"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"lime",value:3,max:4}),e.jsx(w,{children:"Guess time: years"})]})}),p=()=>e.jsx(r,{children:e.jsxs(o,{name:"password",children:[e.jsx(a,{children:"Password"}),e.jsx(s,{defaultValue:"this is a very strong password"}),e.jsx(t,{getValueLabel:n,size:"sm",tint:"green",value:4,max:4}),e.jsx(w,{children:"Guess time: centruries"})]})});i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`() => { return diff --git a/assets/Search.stories-BSl56wwg.js b/assets/Search.stories-B1XMpoRV.js similarity index 87% rename from assets/Search.stories-BSl56wwg.js rename to assets/Search.stories-B1XMpoRV.js index ba0f16a4..2b2b4f54 100644 --- a/assets/Search.stories-BSl56wwg.js +++ b/assets/Search.stories-B1XMpoRV.js @@ -1,3 +1,3 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{c as t}from"./EditInPlace-B4xx68e2.js";import{F as p}from"./index-Dn9bhuYh.js";import"./index-BP8_t0zE.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./Action-Ctm0m6gb.js";import"./index-CSpfAsmC.js";import"./Text-Cz5oMJIL.js";import"./useId-DIHOOv91.js";import"./Tooltip-DCOt0Zqn.js";import"./floating-ui.react-4qK1KPOR.js";import"./index-Cw6ikIwd.js";import"./Password-HQdEGLZE.js";import"./visibility-on-D1sVPsTi.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-CG6pPwnW.js";import"./index-DD7XHAoh.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Dp4tTk3o.js";import"./index-B8nNyT4I.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DoAMoPfE.js";import"./Progress-CTwHYCo_.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const ir={title:"Search",component:t,tags:["autodocs"],argTypes:{},args:{}},i=m=>o.jsx(p,{children:o.jsx(t,{...m})}),r=i.bind({});r.args={};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`args =>
+import{j as o}from"./jsx-runtime-CexXSJP5.js";import{c as t}from"./EditInPlace-zG_DXBw9.js";import{F as p}from"./index-Dn9bhuYh.js";import"./index-BP8_t0zE.js";import"./check-Bjchr0Ec.js";import"./close-BapqxG5D.js";import"./Action-Ctm0m6gb.js";import"./index-CSpfAsmC.js";import"./Text-Cz5oMJIL.js";import"./useId-DIHOOv91.js";import"./Tooltip-DCOt0Zqn.js";import"./floating-ui.react-4qK1KPOR.js";import"./index-Cw6ikIwd.js";import"./Password-HQdEGLZE.js";import"./visibility-on-D1sVPsTi.js";import"./MFA-QkHhz391.js";import"./Checkbox-Ch9dGUQd.js";import"./Radio-CvV1BscZ.js";import"./Toggle-Q78m7eTC.js";import"./search-BC9ffyhQ.js";import"./InlineSpinner-DZ2uBgAt.js";import"./spinner-DszwWdC7.js";import"./Button-iukP6Ype.js";import"./UnstyledButton-C9fNLva5.js";import"./Alert-C8jidQQN.js";import"./Text-BgCCN_GG.js";import"./Typography-DuHxGDyc.js";import"./IconButton-B43clWNp.js";import"./IndicatorIcon-_PMFIuo8.js";import"./Avatar-DyB-Y6ln.js";import"./AvatarStack-DBPldPV8.js";import"./Badge-Cf9Fivpi.js";import"./ContextMenu-DdLa5yx0.js";import"./index-DD7XHAoh.js";import"./index-vl_XNHfj.js";import"./index-CkD-EKAR.js";import"./index-Dp4tTk3o.js";import"./index-D_QEhDW5.js";import"./FloatingMenu-t36h7pay.js";import"./DrawerMenu-BgyYdqxq.js";import"./MenuItem-CmF0V73j.js";import"./chevron-right-DF47_mtr.js";import"./Glass-COqtBFQM.js";import"./Heading-DqG7uK5Y.js";import"./Link-DttFLitk.js";import"./NavItem-CCdVkP0k.js";import"./Menu-DReENGuy.js";import"./Progress-CTwHYCo_.js";import"./Separator-DGmfQX2-.js";import"./ToggleMenuItem-B05vJNUm.js";import"./ReleaseAnnouncement-CgDHpKLk.js";import"./Toast-BFUH-DR1.js";/* empty css */const ir={title:"Search",component:t,tags:["autodocs"],argTypes:{},args:{}},i=m=>o.jsx(p,{children:o.jsx(t,{...m})}),r=i.bind({});r.args={};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`args => `,...r.parameters?.docs?.source}}};const sr=["Search"];export{r as Search,sr as __namedExportsOrder,ir as default}; diff --git a/assets/iframe-BUJwMp-o.js b/assets/iframe-uIoLn8e1.js similarity index 91% rename from assets/iframe-BUJwMp-o.js rename to assets/iframe-uIoLn8e1.js index 766e7f7e..69d9b6d2 100644 --- a/assets/iframe-BUJwMp-o.js +++ b/assets/iframe-uIoLn8e1.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Alert.stories-DbquBx__.js","./jsx-runtime-CexXSJP5.js","./index-BP8_t0zE.js","./Button-iukP6Ype.js","./index-CSpfAsmC.js","./UnstyledButton-C9fNLva5.js","./Button-3p5ggCOH.css","./Alert-C8jidQQN.js","./close-BapqxG5D.js","./Text-BgCCN_GG.js","./Typography-DuHxGDyc.js","./Typography-CfvbYAu4.css","./IconButton-B43clWNp.js","./IndicatorIcon-_PMFIuo8.js","./IndicatorIcon-DPew4OU8.css","./Tooltip-DCOt0Zqn.js","./floating-ui.react-4qK1KPOR.js","./index-Cw6ikIwd.js","./Tooltip-D69ZCLpI.css","./IconButton-BSHvdCWD.css","./Alert-CdCLBpDg.css","./Avatar.stories-5GNcD0iH.js","./Avatar-DyB-Y6ln.js","./Avatar-C-OTxRZn.css","./AvatarStack.stories-wdnsGuiY.js","./AvatarStack-DBPldPV8.js","./Badge.stories-Bit9ymx4.js","./Badge-Cf9Fivpi.js","./Badge-8qM5UjWT.css","./ActionButton.stories-DTGxHg7h.js","./index-BSM_bQPn.js","./index-C8k3Z-3Y.js","./index-GwNsNAUs.js","./notifications-MBLL4uPX.js","./extensions-NPI-SMnu.js","./search-BC9ffyhQ.js","./check-Bjchr0Ec.js","./chevron-right-DF47_mtr.js","./settings-DxGsE2C2.js","./spinner-DszwWdC7.js","./threads-BMeJ5mkW.js","./user-profile-EvkA4CON.js","./visibility-on-D1sVPsTi.js","./warning-B4ZpXzLn.js","./Button.stories-tmq4vXwm.js","./IconButton.stories-Iyn6VJez.js","./Action.stories-DGEkrCIB.js","./Action-Ctm0m6gb.js","./Text-Cz5oMJIL.js","./index-Dn9bhuYh.js","./index-DD7XHAoh.js","./index-Dp4tTk3o.js","./index-vl_XNHfj.js","./index-CkD-EKAR.js","./Text-eTlBFuSe.css","./useId-DIHOOv91.js","./Action-BCJ2_vsV.css","./Checkbox.stories-CSwGs5Vx.js","./Checkbox-Ch9dGUQd.js","./Checkbox-C6phXg9v.css","./EditInPlace.stories-Ez7EFMu_.js","./EditInPlace-B4xx68e2.js","./Password-HQdEGLZE.js","./MFA-QkHhz391.js","./MFA-DE5RR2Vr.css","./Radio-CvV1BscZ.js","./Radio-COtHnm0C.css","./Toggle-Q78m7eTC.js","./Toggle-BxfNLRoj.css","./InlineSpinner-DZ2uBgAt.js","./InlineSpinner-D3NIwA_H.css","./ContextMenu-CG6pPwnW.js","./index-B8nNyT4I.js","./FloatingMenu-t36h7pay.js","./FloatingMenu-DpTpmI5z.css","./DrawerMenu-BgyYdqxq.js","./DrawerMenu-sgngTVD6.css","./MenuItem-CmF0V73j.js","./MenuItem-C06gbZZr.css","./Glass-COqtBFQM.js","./Glass-BiF3lt7L.css","./Heading-DqG7uK5Y.js","./Link-DttFLitk.js","./Link-COi2doS4.css","./NavItem-CCdVkP0k.js","./NavItem-Dqt-FK6G.css","./Menu-DoAMoPfE.js","./Progress-CTwHYCo_.js","./Progress-BQm9KB_P.css","./Separator-DGmfQX2-.js","./Separator-BJXoghAv.css","./ToggleMenuItem-B05vJNUm.js","./ReleaseAnnouncement-CgDHpKLk.js","./ReleaseAnnouncement-DOxWiBH2.css","./Toast-BFUH-DR1.js","./Toast-OmC1UN0x.css","./EditInPlace-Bn9uQDOY.css","./global-BcDaL1SX.css","./MFA.stories-CIpFh1Oq.js","./Password.stories-DPvaqckN.js","./Radio.stories-D6yS1p43.js","./Text.stories-BRJ4IDi8.js","./Toggle.stories-DJmZjPfy.js","./Form.stories-Bjpacd5g.js","./PasswordForm.stories-DRzH-aJo.js","./Glass.stories-CZNcNFEl.js","./Icon.stories-B1cgZ4UF.js","./IndicatorIcon.stories-DxLbbjh4.js","./InlineSpinner.stories-Jgdd3rUD.js","./Link.stories-cdvzg468.js","./ContextMenu.stories-BhAVMqL8.js","./DrawerMenu.stories-DpWcTQS0.js","./FloatingMenu.stories-Bp9cGvBi.js","./Menu.stories-ZDCHtTNR.js","./MenuItem.stories-DJ-4U5wa.js","./ToggleMenuItem.stories-KMfDoesp.js","./NavBar.stories-BviPy9z3.js","./NavItem.stories-HIBg9mgb.js","./Progress.stories-BReUmr8m.js","./ReleaseAnnouncement.stories-w0K54AlL.js","./Search.stories-BSl56wwg.js","./Separator.stories-BynlhyXF.js","./Toast.stories-dVfytGvs.js","./Tooltip.stories-BPc-gP6d.js","./Heading.stories-CHYUY4vG.js","./Text.stories-LnqBI7_q.js","./entry-preview-DWKTXVn2.js","./react-18-Glus6dSN.js","./entry-preview-docs-H4eYC0v-.js","./isArray-d9wiqGGH.js","./index-DrFu-skq.js","./preview-BJPLiuSt.js","./index-D-8MO0q_.js","./preview-Djh1_Tal.js","./preview-DB9FwMii.js","./preview-0Jj89qip.js","./preview-LX5xr5tV.js","./preview-C3lGltAq.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"]'))c(o);new MutationObserver(o=>{for(const e of o)if(e.type==="childList")for(const s of e.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&c(s)}).observe(document,{childList:!0,subtree:!0});function m(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 c(o){if(o.ep)return;o.ep=!0;const e=m(o);fetch(o.href,e)}})();const R="modulepreload",T=function(r,_){return new URL(r,_).href},d={},t=function(_,m,c){let o=Promise.resolve();if(m&&m.length>0){const e=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");o=Promise.all(m.map(i=>{if(i=T(i,c),i in d)return;d[i]=!0;const a=i.endsWith(".css"),O=a?'[rel="stylesheet"]':"";if(!!c)for(let p=e.length-1;p>=0;p--){const u=e[p];if(u.href===i&&(!a||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const n=document.createElement("link");if(n.rel=a?"stylesheet":R,a||(n.as="script",n.crossOrigin=""),n.href=i,l&&n.setAttribute("nonce",l),document.head.appendChild(n),a)return new Promise((p,u)=>{n.addEventListener("load",p),n.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})}))}return o.then(()=>_()).catch(e=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=e,window.dispatchEvent(s),!s.defaultPrevented)throw e})},{createBrowserChannel:I}=__STORYBOOK_MODULE_CHANNELS__,{addons:L}=__STORYBOOK_MODULE_PREVIEW_API__,E=I({page:"preview"});L.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const P={"./src/components/Alert/Alert.stories.tsx":async()=>t(()=>import("./Alert.stories-DbquBx__.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),"./src/components/Avatar/Avatar.stories.tsx":async()=>t(()=>import("./Avatar.stories-5GNcD0iH.js"),__vite__mapDeps([21,1,2,22,4,23]),import.meta.url),"./src/components/Avatar/AvatarStack.stories.tsx":async()=>t(()=>import("./AvatarStack.stories-wdnsGuiY.js"),__vite__mapDeps([24,1,2,25,4,22,23]),import.meta.url),"./src/components/Badge/Badge.stories.tsx":async()=>t(()=>import("./Badge.stories-Bit9ymx4.js"),__vite__mapDeps([26,1,2,27,4,10,11,28]),import.meta.url),"./src/components/Button/ActionButton.stories.tsx":async()=>t(()=>import("./ActionButton.stories-DTGxHg7h.js"),__vite__mapDeps([29,1,2,30,31,32,33,34,35,8,36,37,38,39,40,41,42,43,3,4,5,6,15,16,17,18]),import.meta.url),"./src/components/Button/Button.stories.tsx":async()=>t(()=>import("./Button.stories-tmq4vXwm.js"),__vite__mapDeps([44,30,31,3,1,2,4,5,6,32,33,34,35,8,36,37,38,39,40,41,42,43]),import.meta.url),"./src/components/Button/IconButton/IconButton.stories.tsx":async()=>t(()=>import("./IconButton.stories-Iyn6VJez.js"),__vite__mapDeps([45,1,2,30,31,12,4,5,13,14,15,16,17,18,19,41]),import.meta.url),"./src/components/Form/Controls/Action/Action.stories.tsx":async()=>t(()=>import("./Action.stories-DGEkrCIB.js"),__vite__mapDeps([46,1,2,32,33,34,35,8,36,37,38,39,40,41,42,43,47,4,48,49,50,51,52,53,17,54,55,15,16,18,56]),import.meta.url),"./src/components/Form/Controls/Checkbox/Checkbox.stories.tsx":async()=>t(()=>import("./Checkbox.stories-CSwGs5Vx.js"),__vite__mapDeps([57,1,2,58,4,36,49,50,51,52,53,17,59]),import.meta.url),"./src/components/Form/Controls/EditInPlace/EditInPlace.stories.tsx":async()=>t(()=>import("./EditInPlace.stories-Ez7EFMu_.js"),__vite__mapDeps([60,1,2,61,49,50,51,52,53,17,36,8,47,4,48,54,55,15,16,18,56,62,42,63,64,58,59,65,66,67,68,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,30,31]),import.meta.url),"./src/components/Form/Controls/MFA/MFA.stories.tsx":async()=>t(()=>import("./MFA.stories-CIpFh1Oq.js"),__vite__mapDeps([98,1,2,63,4,49,50,51,52,53,17,64]),import.meta.url),"./src/components/Form/Controls/Password/Password.stories.tsx":async()=>t(()=>import("./Password.stories-DPvaqckN.js"),__vite__mapDeps([99,1,2,62,49,50,51,52,53,17,47,4,48,54,55,15,16,18,56,42,30,31]),import.meta.url),"./src/components/Form/Controls/Radio/Radio.stories.tsx":async()=>t(()=>import("./Radio.stories-D6yS1p43.js"),__vite__mapDeps([100,1,2,65,4,49,50,51,52,53,17,66]),import.meta.url),"./src/components/Form/Controls/Text/Text.stories.tsx":async()=>t(()=>import("./Text.stories-BRJ4IDi8.js"),__vite__mapDeps([101,1,2,48,49,50,51,52,53,17,4,54]),import.meta.url),"./src/components/Form/Controls/Toggle/Toggle.stories.tsx":async()=>t(()=>import("./Toggle.stories-DJmZjPfy.js"),__vite__mapDeps([102,67,1,2,4,49,50,51,52,53,17,68]),import.meta.url),"./src/components/Form/Form.stories.tsx":async()=>t(()=>import("./Form.stories-Bjpacd5g.js"),__vite__mapDeps([103,1,2,47,4,48,49,50,51,52,53,17,54,55,15,16,18,56,62,42,63,64,58,36,59,65,66,67,68,61,8,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]),import.meta.url),"./src/components/Form/PasswordForm.stories.tsx":async()=>t(()=>import("./PasswordForm.stories-DRzH-aJo.js"),__vite__mapDeps([104,1,2,43,47,4,48,49,50,51,52,53,17,54,55,15,16,18,56,62,42,63,64,58,36,59,65,66,67,68,61,8,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]),import.meta.url),"./src/components/Glass/Glass.stories.tsx":async()=>t(()=>import("./Glass.stories-CZNcNFEl.js"),__vite__mapDeps([105,1,2,79,4,80,9,10,11]),import.meta.url),"./src/components/Icon/Icon.stories.tsx":async()=>t(()=>import("./Icon.stories-B1cgZ4UF.js"),__vite__mapDeps([106,1,2,40]),import.meta.url),"./src/components/Icon/IndicatorIcon/IndicatorIcon.stories.tsx":async()=>t(()=>import("./IndicatorIcon.stories-DxLbbjh4.js"),__vite__mapDeps([107,1,2,30,31,13,4,14,40]),import.meta.url),"./src/components/InlineSpinner/InlineSpinner.stories.tsx":async()=>t(()=>import("./InlineSpinner.stories-Jgdd3rUD.js"),__vite__mapDeps([108,69,1,2,39,70]),import.meta.url),"./src/components/Link/Link.stories.tsx":async()=>t(()=>import("./Link.stories-cdvzg468.js"),__vite__mapDeps([109,1,2,82,4,83]),import.meta.url),"./src/components/Menu/ContextMenu.stories.tsx":async()=>t(()=>import("./ContextMenu.stories-BhAVMqL8.js"),__vite__mapDeps([110,1,2,41,33,71,50,52,53,17,51,72,16,73,4,55,9,10,11,74,75,76,77,37,78,89,90]),import.meta.url),"./src/components/Menu/DrawerMenu.stories.tsx":async()=>t(()=>import("./DrawerMenu.stories-DpWcTQS0.js"),__vite__mapDeps([111,1,2,41,33,75,4,76,77,9,10,11,37,51,78,89,53,17,16,90]),import.meta.url),"./src/components/Menu/FloatingMenu.stories.tsx":async()=>t(()=>import("./FloatingMenu.stories-Bp9cGvBi.js"),__vite__mapDeps([112,1,2,41,33,73,4,55,9,10,11,74,77,37,51,78,89,53,17,16,90]),import.meta.url),"./src/components/Menu/Menu.stories.tsx":async()=>t(()=>import("./Menu.stories-ZDCHtTNR.js"),__vite__mapDeps([113,1,2,41,33,86,50,51,52,72,53,17,16,73,4,55,9,10,11,74,75,76,77,37,78,89,90,3,5,6]),import.meta.url),"./src/components/Menu/MenuItem.stories.tsx":async()=>t(()=>import("./MenuItem.stories-DJ-4U5wa.js"),__vite__mapDeps([114,1,2,34,38,77,4,9,10,11,37,51,78]),import.meta.url),"./src/components/Menu/ToggleMenuItem.stories.tsx":async()=>t(()=>import("./ToggleMenuItem.stories-KMfDoesp.js"),__vite__mapDeps([115,1,2,34,91,77,4,9,10,11,37,51,78,67,49,50,52,53,17,68,55]),import.meta.url),"./src/components/Nav/NavBar.stories.tsx":async()=>t(()=>import("./NavBar.stories-BviPy9z3.js"),__vite__mapDeps([116,1,2,84,4,85]),import.meta.url),"./src/components/Nav/NavItem.stories.tsx":async()=>t(()=>import("./NavItem.stories-HIBg9mgb.js"),__vite__mapDeps([117,1,2,84,4,85]),import.meta.url),"./src/components/Progress/Progress.stories.tsx":async()=>t(()=>import("./Progress.stories-BReUmr8m.js"),__vite__mapDeps([118,87,1,2,4,52,53,17,51,55,88]),import.meta.url),"./src/components/ReleaseAnnouncement/ReleaseAnnouncement.stories.tsx":async()=>t(()=>import("./ReleaseAnnouncement.stories-w0K54AlL.js"),__vite__mapDeps([119,1,2,3,4,5,6,12,13,14,15,16,17,18,19,92,9,10,11,93]),import.meta.url),"./src/components/Search/Search.stories.tsx":async()=>t(()=>import("./Search.stories-BSl56wwg.js"),__vite__mapDeps([120,1,2,61,49,50,51,52,53,17,36,8,47,4,48,54,55,15,16,18,56,62,42,63,64,58,59,65,66,67,68,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]),import.meta.url),"./src/components/Separator/Separator.stories.tsx":async()=>t(()=>import("./Separator.stories-BynlhyXF.js"),__vite__mapDeps([121,89,1,2,4,53,17,51,16,90]),import.meta.url),"./src/components/Toast/Toast.stories.tsx":async()=>t(()=>import("./Toast.stories-dVfytGvs.js"),__vite__mapDeps([122,94,1,2,4,95]),import.meta.url),"./src/components/Tooltip/Tooltip.stories.tsx":async()=>t(()=>import("./Tooltip.stories-BPc-gP6d.js"),__vite__mapDeps([123,1,2,15,16,17,4,18,3,5,6,12,13,14,19,41]),import.meta.url),"./src/components/Typography/Heading.stories.tsx":async()=>t(()=>import("./Heading.stories-CHYUY4vG.js"),__vite__mapDeps([124,1,2,81,10,4,11,9]),import.meta.url),"./src/components/Typography/Text.stories.tsx":async()=>t(()=>import("./Text.stories-LnqBI7_q.js"),__vite__mapDeps([125,9,1,2,10,4,11]),import.meta.url)};async function y(r){return P[r]()}const{composeConfigs:A,PreviewWeb:v,ClientApi:x}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(r=[])=>{const _=await Promise.all([r.at(0)??t(()=>import("./entry-preview-DWKTXVn2.js"),__vite__mapDeps([126,2,127,17]),import.meta.url),r.at(1)??t(()=>import("./entry-preview-docs-H4eYC0v-.js"),__vite__mapDeps([128,129,2,130]),import.meta.url),r.at(2)??t(()=>import("./preview-BJPLiuSt.js"),__vite__mapDeps([131,132]),import.meta.url),r.at(3)??t(()=>import("./preview-DQi9OMsq.js"),[],import.meta.url),r.at(4)??t(()=>import("./preview-FpHGYA1q.js"),[],import.meta.url),r.at(5)??t(()=>import("./preview-Djh1_Tal.js"),__vite__mapDeps([133,130]),import.meta.url),r.at(6)??t(()=>import("./preview-BnWGZYux.js"),[],import.meta.url),r.at(7)??t(()=>import("./preview-DaXeQf6O.js"),[],import.meta.url),r.at(8)??t(()=>import("./preview-DB9FwMii.js"),__vite__mapDeps([134,130]),import.meta.url),r.at(9)??t(()=>import("./preview-4Up_z4Em.js"),[],import.meta.url),r.at(10)??t(()=>import("./preview-0Jj89qip.js"),__vite__mapDeps([135,31]),import.meta.url),r.at(11)??t(()=>import("./preview-DF-d5FoE.js"),[],import.meta.url),r.at(12)??t(()=>import("./preview-LX5xr5tV.js"),__vite__mapDeps([136,2,137,97]),import.meta.url)]);return A(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new v(y,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-DbquBx__.js","./jsx-runtime-CexXSJP5.js","./index-BP8_t0zE.js","./Button-iukP6Ype.js","./index-CSpfAsmC.js","./UnstyledButton-C9fNLva5.js","./Button-3p5ggCOH.css","./Alert-C8jidQQN.js","./close-BapqxG5D.js","./Text-BgCCN_GG.js","./Typography-DuHxGDyc.js","./Typography-CfvbYAu4.css","./IconButton-B43clWNp.js","./IndicatorIcon-_PMFIuo8.js","./IndicatorIcon-DPew4OU8.css","./Tooltip-DCOt0Zqn.js","./floating-ui.react-4qK1KPOR.js","./index-Cw6ikIwd.js","./Tooltip-D69ZCLpI.css","./IconButton-BSHvdCWD.css","./Alert-CdCLBpDg.css","./Avatar.stories-5GNcD0iH.js","./Avatar-DyB-Y6ln.js","./Avatar-C-OTxRZn.css","./AvatarStack.stories-wdnsGuiY.js","./AvatarStack-DBPldPV8.js","./Badge.stories-Bit9ymx4.js","./Badge-Cf9Fivpi.js","./Badge-8qM5UjWT.css","./ActionButton.stories-DTGxHg7h.js","./index-BSM_bQPn.js","./index-C8k3Z-3Y.js","./index-GwNsNAUs.js","./notifications-MBLL4uPX.js","./extensions-NPI-SMnu.js","./search-BC9ffyhQ.js","./check-Bjchr0Ec.js","./chevron-right-DF47_mtr.js","./settings-DxGsE2C2.js","./spinner-DszwWdC7.js","./threads-BMeJ5mkW.js","./user-profile-EvkA4CON.js","./visibility-on-D1sVPsTi.js","./warning-B4ZpXzLn.js","./Button.stories-tmq4vXwm.js","./IconButton.stories-Iyn6VJez.js","./Action.stories-DGEkrCIB.js","./Action-Ctm0m6gb.js","./Text-Cz5oMJIL.js","./index-Dn9bhuYh.js","./index-DD7XHAoh.js","./index-Dp4tTk3o.js","./index-vl_XNHfj.js","./index-CkD-EKAR.js","./Text-eTlBFuSe.css","./useId-DIHOOv91.js","./Action-BCJ2_vsV.css","./Checkbox.stories-CSwGs5Vx.js","./Checkbox-Ch9dGUQd.js","./Checkbox-C6phXg9v.css","./EditInPlace.stories-D78bXHNm.js","./EditInPlace-zG_DXBw9.js","./Password-HQdEGLZE.js","./MFA-QkHhz391.js","./MFA-DE5RR2Vr.css","./Radio-CvV1BscZ.js","./Radio-COtHnm0C.css","./Toggle-Q78m7eTC.js","./Toggle-BxfNLRoj.css","./InlineSpinner-DZ2uBgAt.js","./InlineSpinner-D3NIwA_H.css","./ContextMenu-DdLa5yx0.js","./index-D_QEhDW5.js","./FloatingMenu-t36h7pay.js","./FloatingMenu-DpTpmI5z.css","./DrawerMenu-BgyYdqxq.js","./DrawerMenu-sgngTVD6.css","./MenuItem-CmF0V73j.js","./MenuItem-C06gbZZr.css","./Glass-COqtBFQM.js","./Glass-BiF3lt7L.css","./Heading-DqG7uK5Y.js","./Link-DttFLitk.js","./Link-COi2doS4.css","./NavItem-CCdVkP0k.js","./NavItem-Dqt-FK6G.css","./Menu-DReENGuy.js","./Progress-CTwHYCo_.js","./Progress-BQm9KB_P.css","./Separator-DGmfQX2-.js","./Separator-BJXoghAv.css","./ToggleMenuItem-B05vJNUm.js","./ReleaseAnnouncement-CgDHpKLk.js","./ReleaseAnnouncement-DOxWiBH2.css","./Toast-BFUH-DR1.js","./Toast-OmC1UN0x.css","./EditInPlace-Bn9uQDOY.css","./global-BcDaL1SX.css","./MFA.stories-CIpFh1Oq.js","./Password.stories-DPvaqckN.js","./Radio.stories-D6yS1p43.js","./Text.stories-BRJ4IDi8.js","./Toggle.stories-DJmZjPfy.js","./Form.stories-BCDF6fN4.js","./PasswordForm.stories-BDi0df78.js","./Glass.stories-CZNcNFEl.js","./Icon.stories-B1cgZ4UF.js","./IndicatorIcon.stories-DxLbbjh4.js","./InlineSpinner.stories-Jgdd3rUD.js","./Link.stories-cdvzg468.js","./ContextMenu.stories-BcmLz1Vg.js","./DrawerMenu.stories-DpWcTQS0.js","./FloatingMenu.stories-Bp9cGvBi.js","./Menu.stories-CWigSGRO.js","./MenuItem.stories-DJ-4U5wa.js","./ToggleMenuItem.stories-KMfDoesp.js","./NavBar.stories-BviPy9z3.js","./NavItem.stories-HIBg9mgb.js","./Progress.stories-BReUmr8m.js","./ReleaseAnnouncement.stories-w0K54AlL.js","./Search.stories-B1XMpoRV.js","./Separator.stories-BynlhyXF.js","./Toast.stories-dVfytGvs.js","./Tooltip.stories-BPc-gP6d.js","./Heading.stories-CHYUY4vG.js","./Text.stories-LnqBI7_q.js","./entry-preview-DWKTXVn2.js","./react-18-Glus6dSN.js","./entry-preview-docs-H4eYC0v-.js","./isArray-d9wiqGGH.js","./index-DrFu-skq.js","./preview-BJPLiuSt.js","./index-D-8MO0q_.js","./preview-Djh1_Tal.js","./preview-DB9FwMii.js","./preview-0Jj89qip.js","./preview-LX5xr5tV.js","./preview-C3lGltAq.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"]'))c(o);new MutationObserver(o=>{for(const e of o)if(e.type==="childList")for(const s of e.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&c(s)}).observe(document,{childList:!0,subtree:!0});function m(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 c(o){if(o.ep)return;o.ep=!0;const e=m(o);fetch(o.href,e)}})();const R="modulepreload",T=function(r,_){return new URL(r,_).href},d={},t=function(_,m,c){let o=Promise.resolve();if(m&&m.length>0){const e=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");o=Promise.all(m.map(i=>{if(i=T(i,c),i in d)return;d[i]=!0;const a=i.endsWith(".css"),O=a?'[rel="stylesheet"]':"";if(!!c)for(let p=e.length-1;p>=0;p--){const u=e[p];if(u.href===i&&(!a||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const n=document.createElement("link");if(n.rel=a?"stylesheet":R,a||(n.as="script",n.crossOrigin=""),n.href=i,l&&n.setAttribute("nonce",l),document.head.appendChild(n),a)return new Promise((p,u)=>{n.addEventListener("load",p),n.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})}))}return o.then(()=>_()).catch(e=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=e,window.dispatchEvent(s),!s.defaultPrevented)throw e})},{createBrowserChannel:I}=__STORYBOOK_MODULE_CHANNELS__,{addons:L}=__STORYBOOK_MODULE_PREVIEW_API__,E=I({page:"preview"});L.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const P={"./src/components/Alert/Alert.stories.tsx":async()=>t(()=>import("./Alert.stories-DbquBx__.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),"./src/components/Avatar/Avatar.stories.tsx":async()=>t(()=>import("./Avatar.stories-5GNcD0iH.js"),__vite__mapDeps([21,1,2,22,4,23]),import.meta.url),"./src/components/Avatar/AvatarStack.stories.tsx":async()=>t(()=>import("./AvatarStack.stories-wdnsGuiY.js"),__vite__mapDeps([24,1,2,25,4,22,23]),import.meta.url),"./src/components/Badge/Badge.stories.tsx":async()=>t(()=>import("./Badge.stories-Bit9ymx4.js"),__vite__mapDeps([26,1,2,27,4,10,11,28]),import.meta.url),"./src/components/Button/ActionButton.stories.tsx":async()=>t(()=>import("./ActionButton.stories-DTGxHg7h.js"),__vite__mapDeps([29,1,2,30,31,32,33,34,35,8,36,37,38,39,40,41,42,43,3,4,5,6,15,16,17,18]),import.meta.url),"./src/components/Button/Button.stories.tsx":async()=>t(()=>import("./Button.stories-tmq4vXwm.js"),__vite__mapDeps([44,30,31,3,1,2,4,5,6,32,33,34,35,8,36,37,38,39,40,41,42,43]),import.meta.url),"./src/components/Button/IconButton/IconButton.stories.tsx":async()=>t(()=>import("./IconButton.stories-Iyn6VJez.js"),__vite__mapDeps([45,1,2,30,31,12,4,5,13,14,15,16,17,18,19,41]),import.meta.url),"./src/components/Form/Controls/Action/Action.stories.tsx":async()=>t(()=>import("./Action.stories-DGEkrCIB.js"),__vite__mapDeps([46,1,2,32,33,34,35,8,36,37,38,39,40,41,42,43,47,4,48,49,50,51,52,53,17,54,55,15,16,18,56]),import.meta.url),"./src/components/Form/Controls/Checkbox/Checkbox.stories.tsx":async()=>t(()=>import("./Checkbox.stories-CSwGs5Vx.js"),__vite__mapDeps([57,1,2,58,4,36,49,50,51,52,53,17,59]),import.meta.url),"./src/components/Form/Controls/EditInPlace/EditInPlace.stories.tsx":async()=>t(()=>import("./EditInPlace.stories-D78bXHNm.js"),__vite__mapDeps([60,1,2,61,49,50,51,52,53,17,36,8,47,4,48,54,55,15,16,18,56,62,42,63,64,58,59,65,66,67,68,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,30,31]),import.meta.url),"./src/components/Form/Controls/MFA/MFA.stories.tsx":async()=>t(()=>import("./MFA.stories-CIpFh1Oq.js"),__vite__mapDeps([98,1,2,63,4,49,50,51,52,53,17,64]),import.meta.url),"./src/components/Form/Controls/Password/Password.stories.tsx":async()=>t(()=>import("./Password.stories-DPvaqckN.js"),__vite__mapDeps([99,1,2,62,49,50,51,52,53,17,47,4,48,54,55,15,16,18,56,42,30,31]),import.meta.url),"./src/components/Form/Controls/Radio/Radio.stories.tsx":async()=>t(()=>import("./Radio.stories-D6yS1p43.js"),__vite__mapDeps([100,1,2,65,4,49,50,51,52,53,17,66]),import.meta.url),"./src/components/Form/Controls/Text/Text.stories.tsx":async()=>t(()=>import("./Text.stories-BRJ4IDi8.js"),__vite__mapDeps([101,1,2,48,49,50,51,52,53,17,4,54]),import.meta.url),"./src/components/Form/Controls/Toggle/Toggle.stories.tsx":async()=>t(()=>import("./Toggle.stories-DJmZjPfy.js"),__vite__mapDeps([102,67,1,2,4,49,50,51,52,53,17,68]),import.meta.url),"./src/components/Form/Form.stories.tsx":async()=>t(()=>import("./Form.stories-BCDF6fN4.js"),__vite__mapDeps([103,1,2,47,4,48,49,50,51,52,53,17,54,55,15,16,18,56,62,42,63,64,58,36,59,65,66,67,68,61,8,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]),import.meta.url),"./src/components/Form/PasswordForm.stories.tsx":async()=>t(()=>import("./PasswordForm.stories-BDi0df78.js"),__vite__mapDeps([104,1,2,43,47,4,48,49,50,51,52,53,17,54,55,15,16,18,56,62,42,63,64,58,36,59,65,66,67,68,61,8,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]),import.meta.url),"./src/components/Glass/Glass.stories.tsx":async()=>t(()=>import("./Glass.stories-CZNcNFEl.js"),__vite__mapDeps([105,1,2,79,4,80,9,10,11]),import.meta.url),"./src/components/Icon/Icon.stories.tsx":async()=>t(()=>import("./Icon.stories-B1cgZ4UF.js"),__vite__mapDeps([106,1,2,40]),import.meta.url),"./src/components/Icon/IndicatorIcon/IndicatorIcon.stories.tsx":async()=>t(()=>import("./IndicatorIcon.stories-DxLbbjh4.js"),__vite__mapDeps([107,1,2,30,31,13,4,14,40]),import.meta.url),"./src/components/InlineSpinner/InlineSpinner.stories.tsx":async()=>t(()=>import("./InlineSpinner.stories-Jgdd3rUD.js"),__vite__mapDeps([108,69,1,2,39,70]),import.meta.url),"./src/components/Link/Link.stories.tsx":async()=>t(()=>import("./Link.stories-cdvzg468.js"),__vite__mapDeps([109,1,2,82,4,83]),import.meta.url),"./src/components/Menu/ContextMenu.stories.tsx":async()=>t(()=>import("./ContextMenu.stories-BcmLz1Vg.js"),__vite__mapDeps([110,1,2,41,33,71,50,52,53,17,51,72,16,73,4,55,9,10,11,74,75,76,77,37,78,89,90]),import.meta.url),"./src/components/Menu/DrawerMenu.stories.tsx":async()=>t(()=>import("./DrawerMenu.stories-DpWcTQS0.js"),__vite__mapDeps([111,1,2,41,33,75,4,76,77,9,10,11,37,51,78,89,53,17,16,90]),import.meta.url),"./src/components/Menu/FloatingMenu.stories.tsx":async()=>t(()=>import("./FloatingMenu.stories-Bp9cGvBi.js"),__vite__mapDeps([112,1,2,41,33,73,4,55,9,10,11,74,77,37,51,78,89,53,17,16,90]),import.meta.url),"./src/components/Menu/Menu.stories.tsx":async()=>t(()=>import("./Menu.stories-CWigSGRO.js"),__vite__mapDeps([113,1,2,41,33,86,50,51,52,72,53,17,16,73,4,55,9,10,11,74,75,76,77,37,78,89,90,3,5,6]),import.meta.url),"./src/components/Menu/MenuItem.stories.tsx":async()=>t(()=>import("./MenuItem.stories-DJ-4U5wa.js"),__vite__mapDeps([114,1,2,34,38,77,4,9,10,11,37,51,78]),import.meta.url),"./src/components/Menu/ToggleMenuItem.stories.tsx":async()=>t(()=>import("./ToggleMenuItem.stories-KMfDoesp.js"),__vite__mapDeps([115,1,2,34,91,77,4,9,10,11,37,51,78,67,49,50,52,53,17,68,55]),import.meta.url),"./src/components/Nav/NavBar.stories.tsx":async()=>t(()=>import("./NavBar.stories-BviPy9z3.js"),__vite__mapDeps([116,1,2,84,4,85]),import.meta.url),"./src/components/Nav/NavItem.stories.tsx":async()=>t(()=>import("./NavItem.stories-HIBg9mgb.js"),__vite__mapDeps([117,1,2,84,4,85]),import.meta.url),"./src/components/Progress/Progress.stories.tsx":async()=>t(()=>import("./Progress.stories-BReUmr8m.js"),__vite__mapDeps([118,87,1,2,4,52,53,17,51,55,88]),import.meta.url),"./src/components/ReleaseAnnouncement/ReleaseAnnouncement.stories.tsx":async()=>t(()=>import("./ReleaseAnnouncement.stories-w0K54AlL.js"),__vite__mapDeps([119,1,2,3,4,5,6,12,13,14,15,16,17,18,19,92,9,10,11,93]),import.meta.url),"./src/components/Search/Search.stories.tsx":async()=>t(()=>import("./Search.stories-B1XMpoRV.js"),__vite__mapDeps([120,1,2,61,49,50,51,52,53,17,36,8,47,4,48,54,55,15,16,18,56,62,42,63,64,58,59,65,66,67,68,35,69,39,70,3,5,6,7,9,10,11,12,13,14,19,20,22,23,25,27,28,71,72,73,74,75,76,77,37,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]),import.meta.url),"./src/components/Separator/Separator.stories.tsx":async()=>t(()=>import("./Separator.stories-BynlhyXF.js"),__vite__mapDeps([121,89,1,2,4,53,17,51,16,90]),import.meta.url),"./src/components/Toast/Toast.stories.tsx":async()=>t(()=>import("./Toast.stories-dVfytGvs.js"),__vite__mapDeps([122,94,1,2,4,95]),import.meta.url),"./src/components/Tooltip/Tooltip.stories.tsx":async()=>t(()=>import("./Tooltip.stories-BPc-gP6d.js"),__vite__mapDeps([123,1,2,15,16,17,4,18,3,5,6,12,13,14,19,41]),import.meta.url),"./src/components/Typography/Heading.stories.tsx":async()=>t(()=>import("./Heading.stories-CHYUY4vG.js"),__vite__mapDeps([124,1,2,81,10,4,11,9]),import.meta.url),"./src/components/Typography/Text.stories.tsx":async()=>t(()=>import("./Text.stories-LnqBI7_q.js"),__vite__mapDeps([125,9,1,2,10,4,11]),import.meta.url)};async function y(r){return P[r]()}const{composeConfigs:A,PreviewWeb:v,ClientApi:x}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(r=[])=>{const _=await Promise.all([r.at(0)??t(()=>import("./entry-preview-DWKTXVn2.js"),__vite__mapDeps([126,2,127,17]),import.meta.url),r.at(1)??t(()=>import("./entry-preview-docs-H4eYC0v-.js"),__vite__mapDeps([128,129,2,130]),import.meta.url),r.at(2)??t(()=>import("./preview-BJPLiuSt.js"),__vite__mapDeps([131,132]),import.meta.url),r.at(3)??t(()=>import("./preview-BfeG5q0Q.js"),[],import.meta.url),r.at(4)??t(()=>import("./preview-FpHGYA1q.js"),[],import.meta.url),r.at(5)??t(()=>import("./preview-Djh1_Tal.js"),__vite__mapDeps([133,130]),import.meta.url),r.at(6)??t(()=>import("./preview-BnWGZYux.js"),[],import.meta.url),r.at(7)??t(()=>import("./preview-DaXeQf6O.js"),[],import.meta.url),r.at(8)??t(()=>import("./preview-DB9FwMii.js"),__vite__mapDeps([134,130]),import.meta.url),r.at(9)??t(()=>import("./preview-4Up_z4Em.js"),[],import.meta.url),r.at(10)??t(()=>import("./preview-0Jj89qip.js"),__vite__mapDeps([135,31]),import.meta.url),r.at(11)??t(()=>import("./preview-DF-d5FoE.js"),[],import.meta.url),r.at(12)??t(()=>import("./preview-LX5xr5tV.js"),__vite__mapDeps([136,2,137,97]),import.meta.url)]);return A(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new v(y,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _}; diff --git a/assets/index-DtiVWr1N.js b/assets/index-B3sqQ65X.js similarity index 92% rename from assets/index-DtiVWr1N.js rename to assets/index-B3sqQ65X.js index c421a2ae..4d5e99ab 100644 --- a/assets/index-DtiVWr1N.js +++ b/assets/index-B3sqQ65X.js @@ -1 +1 @@ -import{s as l,i as c,S as T,D as b,A as d,u as S,F as B,Z as L,w as C,a as H,y as u,H as g,T as y,J as I,N as h,b as k,x as P,C as W,E as A,c as F,R as x,d as D,e as R,f,X as v,B as E,k as M,g as N,q,h as w,j as O,l as U,L as Z,m as j,I as z,n as G,z as J,v as K,_ as Q,o as V,M as X,p as Y,r as _,t as $,G as aa,$ as sa,K as oa,O as ta,P as ea,Q as ra,U as pa,V as ia,W as na,Y 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"./DocsRenderer-PKQXORMH-BeBsJNFx.js";import"./iframe-BUJwMp-o.js";import"../sb-preview/runtime.js";import"./index-BP8_t0zE.js";import"./react-18-Glus6dSN.js";import"./index-Cw6ikIwd.js";import"./index-D-8MO0q_.js";import"./isArray-d9wiqGGH.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{s as l,i as c,S as T,D as b,A as d,u as S,F as B,Z as L,w as C,a as H,y as u,H as g,T as y,J as I,N as h,b as k,x as P,C as W,E as A,c as F,R as x,d as D,e as R,f,X as v,B as E,k as M,g as N,q,h as w,j as O,l as U,L as Z,m as j,I as z,n as G,z as J,v as K,_ as Q,o as V,M as X,p as Y,r as _,t as $,G as aa,$ as sa,K as oa,O as ta,P as ea,Q as ra,U as pa,V as ia,W as na,Y 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"./DocsRenderer-PKQXORMH-CYafAHU5.js";import"./iframe-uIoLn8e1.js";import"../sb-preview/runtime.js";import"./index-BP8_t0zE.js";import"./react-18-Glus6dSN.js";import"./index-Cw6ikIwd.js";import"./index-D-8MO0q_.js";import"./isArray-d9wiqGGH.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-B8nNyT4I.js b/assets/index-B8nNyT4I.js deleted file mode 100644 index cba1283a..00000000 --- a/assets/index-B8nNyT4I.js +++ /dev/null @@ -1,45 +0,0 @@ -import{a as S,r as o}from"./index-BP8_t0zE.js";import{c as D,a as Ae,u as nt}from"./index-DD7XHAoh.js";import{c as it}from"./index-vl_XNHfj.js";import{u as Z,S as Nt,c as Io}from"./index-Dp4tTk3o.js";import{j as C}from"./jsx-runtime-CexXSJP5.js";import{P as q,d as Un}from"./index-CkD-EKAR.js";import{q as _o,c as Fo,o as Lo,s as ko,l as jo,j as Uo,r as Bo,d as Wo,t as Ko}from"./floating-ui.react-4qK1KPOR.js";import{w as Bn,r as Ht}from"./index-Cw6ikIwd.js";function Wn(e){const t=e+"CollectionProvider",[n,r]=it(t),[a,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:h,children:d}=p,g=S.useRef(null),E=S.useRef(new Map).current;return C.jsx(a,{scope:h,itemMap:E,collectionRef:g,children:d})};s.displayName=t;const i=e+"CollectionSlot",f=S.forwardRef((p,h)=>{const{scope:d,children:g}=p,E=c(i,d),b=Z(h,E.collectionRef);return C.jsx(Nt,{ref:b,children:g})});f.displayName=i;const l=e+"CollectionItemSlot",v="data-radix-collection-item",u=S.forwardRef((p,h)=>{const{scope:d,children:g,...E}=p,b=S.useRef(null),y=Z(h,b),w=c(l,d);return S.useEffect(()=>(w.itemMap.set(b,{ref:b,...E}),()=>void w.itemMap.delete(b))),C.jsx(Nt,{[v]:"",ref:y,children:g})});u.displayName=l;function m(p){const h=c(e+"CollectionConsumer",p);return S.useCallback(()=>{const g=h.collectionRef.current;if(!g)return[];const E=Array.from(g.querySelectorAll(`[${v}]`));return Array.from(h.itemMap.values()).sort((w,$)=>E.indexOf(w.ref.current)-E.indexOf($.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:f,ItemSlot:u},m,r]}var Ho=o.createContext(void 0);function Kn(e){const t=o.useContext(Ho);return e||t||"ltr"}function oe(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>t.current?.(...n),[])}function Vo(e,t=globalThis?.document){const n=oe(e);o.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zo="DismissableLayer",Mt="dismissableLayer.update",Go="dismissableLayer.pointerDownOutside",Yo="dismissableLayer.focusOutside",dn,Hn=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vn=o.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:s,onDismiss:i,...f}=e,l=o.useContext(Hn),[v,u]=o.useState(null),m=v?.ownerDocument??globalThis?.document,[,p]=o.useState({}),h=Z(t,R=>u(R)),d=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),E=d.indexOf(g),b=v?d.indexOf(v):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,w=b>=E,$=qo(R=>{const P=R.target,N=[...l.branches].some(F=>F.contains(P));!w||N||(a?.(R),s?.(R),R.defaultPrevented||i?.())},m),M=Qo(R=>{const P=R.target;[...l.branches].some(F=>F.contains(P))||(c?.(R),s?.(R),R.defaultPrevented||i?.())},m);return Vo(R=>{b===l.layers.size-1&&(r?.(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},m),o.useEffect(()=>{if(v)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(dn=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(v)),l.layers.add(v),fn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=dn)}},[v,m,n,l]),o.useEffect(()=>()=>{v&&(l.layers.delete(v),l.layersWithOutsidePointerEventsDisabled.delete(v),fn())},[v,l]),o.useEffect(()=>{const R=()=>p({});return document.addEventListener(Mt,R),()=>document.removeEventListener(Mt,R)},[]),C.jsx(q.div,{...f,ref:h,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:D(e.onFocusCapture,M.onFocusCapture),onBlurCapture:D(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:D(e.onPointerDownCapture,$.onPointerDownCapture)})});Vn.displayName=zo;var Xo="DismissableLayerBranch",Zo=o.forwardRef((e,t)=>{const n=o.useContext(Hn),r=o.useRef(null),a=Z(t,r);return o.useEffect(()=>{const c=r.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),C.jsx(q.div,{...e,ref:a})});Zo.displayName=Xo;function qo(e,t=globalThis?.document){const n=oe(e),r=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const c=i=>{if(i.target&&!r.current){let f=function(){zn(Go,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",c),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Qo(e,t=globalThis?.document){const n=oe(e),r=o.useRef(!1);return o.useEffect(()=>{const a=c=>{c.target&&!r.current&&zn(Yo,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fn(){const e=new CustomEvent(Mt);document.dispatchEvent(e)}function zn(e,t,n,{discrete:r}){const a=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Un(a,c):a.dispatchEvent(c)}var ht=0;function Jo(){o.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vn()),document.body.insertAdjacentElement("beforeend",e[1]??vn()),ht++,()=>{ht===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ht--}},[])}function vn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var gt="focusScope.autoFocusOnMount",bt="focusScope.autoFocusOnUnmount",mn={bubbles:!1,cancelable:!0},ea="FocusScope",Gn=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...s}=e,[i,f]=o.useState(null),l=oe(a),v=oe(c),u=o.useRef(null),m=Z(t,d=>f(d)),p=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let d=function(y){if(p.paused||!i)return;const w=y.target;i.contains(w)?u.current=w:de(u.current,{select:!0})},g=function(y){if(p.paused||!i)return;const w=y.relatedTarget;w!==null&&(i.contains(w)||de(u.current,{select:!0}))},E=function(y){if(document.activeElement===document.body)for(const $ of y)$.removedNodes.length>0&&de(i)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const b=new MutationObserver(E);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),b.disconnect()}}},[r,i,p.paused]),o.useEffect(()=>{if(i){hn.add(p);const d=document.activeElement;if(!i.contains(d)){const E=new CustomEvent(gt,mn);i.addEventListener(gt,l),i.dispatchEvent(E),E.defaultPrevented||(ta(ca(Yn(i)),{select:!0}),document.activeElement===d&&de(i))}return()=>{i.removeEventListener(gt,l),setTimeout(()=>{const E=new CustomEvent(bt,mn);i.addEventListener(bt,v),i.dispatchEvent(E),E.defaultPrevented||de(d??document.body,{select:!0}),i.removeEventListener(bt,v),hn.remove(p)},0)}}},[i,l,v,p]);const h=o.useCallback(d=>{if(!n&&!r||p.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,E=document.activeElement;if(g&&E){const b=d.currentTarget,[y,w]=na(b);y&&w?!d.shiftKey&&E===w?(d.preventDefault(),n&&de(y,{select:!0})):d.shiftKey&&E===y&&(d.preventDefault(),n&&de(w,{select:!0})):E===b&&d.preventDefault()}},[n,r,p.paused]);return C.jsx(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});Gn.displayName=ea;function ta(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(de(r,{select:t}),document.activeElement!==n)return}function na(e){const t=Yn(e),n=pn(t,e),r=pn(t.reverse(),e);return[n,r]}function Yn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pn(e,t){for(const n of e)if(!ra(n,{upTo:t}))return n}function ra(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oa(e){return e instanceof HTMLInputElement&&"select"in e}function de(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oa(e)&&t&&e.select()}}var hn=aa();function aa(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gn(e,t),e.unshift(t)},remove(t){e=gn(e,t),e[0]?.resume()}}}function gn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ca(e){return e.filter(t=>t.tagName!=="A")}var ia="Arrow",Xn=o.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...c}=e;return C.jsx(q.svg,{...c,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xn.displayName=ia;var sa=Xn;function ua(e){const[t,n]=o.useState(void 0);return Ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const c=a[0];let s,i;if("borderBoxSize"in c){const f=c.borderBoxSize,l=Array.isArray(f)?f[0]:f;s=l.inlineSize,i=l.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Vt="Popper",[Zn,qn]=it(Vt),[la,Qn]=Zn(Vt),Jn=e=>{const{__scopePopper:t,children:n}=e,[r,a]=o.useState(null);return C.jsx(la,{scope:t,anchor:r,onAnchorChange:a,children:n})};Jn.displayName=Vt;var er="PopperAnchor",tr=o.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,c=Qn(er,n),s=o.useRef(null),i=Z(t,s);return o.useEffect(()=>{c.onAnchorChange(r?.current||s.current)}),r?null:C.jsx(q.div,{...a,ref:i})});tr.displayName=er;var zt="PopperContent",[da,fa]=Zn(zt),nr=o.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:c="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:f=!0,collisionBoundary:l=[],collisionPadding:v=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:h,...d}=e,g=Qn(zt,n),[E,b]=o.useState(null),y=Z(t,k=>b(k)),[w,$]=o.useState(null),M=ua(w),R=M?.width??0,P=M?.height??0,N=r+(c!=="center"?"-"+c:""),F=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},V=Array.isArray(l)?l:[l],ce=V.length>0,Q={padding:F,boundary:V.filter(ma),altBoundary:ce},{refs:G,floatingStyles:ne,placement:z,isPositioned:ie,middlewareData:B}=_o({strategy:"fixed",placement:N,whileElementsMounted:(...k)=>Fo(...k,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[Lo({mainAxis:a+P,alignmentAxis:s}),f&&ko({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?jo():void 0,...Q}),f&&Uo({...Q}),Bo({...Q,apply:({elements:k,rects:me,availableWidth:pe,availableHeight:Be})=>{const{width:mt,height:he}=me.reference,ye=k.floating.style;ye.setProperty("--radix-popper-available-width",`${pe}px`),ye.setProperty("--radix-popper-available-height",`${Be}px`),ye.setProperty("--radix-popper-anchor-width",`${mt}px`),ye.setProperty("--radix-popper-anchor-height",`${he}px`)}}),w&&Wo({element:w,padding:i}),pa({arrowWidth:R,arrowHeight:P}),m&&Ko({strategy:"referenceHidden",...Q})]}),[x,J]=ar(z),Y=oe(h);Ae(()=>{ie&&Y?.()},[ie,Y]);const X=B.arrow?.x,ue=B.arrow?.y,A=B.arrow?.centerOffset!==0,[ve,re]=o.useState();return Ae(()=>{E&&re(window.getComputedStyle(E).zIndex)},[E]),C.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:ie?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(da,{scope:n,placedSide:x,onArrowChange:$,arrowX:X,arrowY:ue,shouldHideArrow:A,children:C.jsx(q.div,{"data-side":x,"data-align":J,...d,ref:y,style:{...d.style,animation:ie?void 0:"none"}})})})});nr.displayName=zt;var rr="PopperArrow",va={top:"bottom",right:"left",bottom:"top",left:"right"},or=o.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,c=fa(rr,r),s=va[c.placedSide];return C.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:C.jsx(sa,{...a,ref:n,style:{...a.style,display:"block"}})})});or.displayName=rr;function ma(e){return e!==null}var pa=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[l,v]=ar(n),u={start:"0%",center:"50%",end:"100%"}[v],m=(a.arrow?.x??0)+i/2,p=(a.arrow?.y??0)+f/2;let h="",d="";return l==="bottom"?(h=s?u:`${m}px`,d=`${-f}px`):l==="top"?(h=s?u:`${m}px`,d=`${r.floating.height+f}px`):l==="right"?(h=`${-f}px`,d=s?u:`${p}px`):l==="left"&&(h=`${r.floating.width+f}px`,d=s?u:`${p}px`),{data:{x:h,y:d}}}});function ar(e){const[t,n="center"]=e.split("-");return[t,n]}var ha=Jn,ga=tr,ba=nr,Ea=or,ya="Portal",cr=o.forwardRef((e,t)=>{const{container:n,...r}=e,[a,c]=o.useState(!1);Ae(()=>c(!0),[]);const s=n||a&&globalThis?.document?.body;return s?Bn.createPortal(C.jsx(q.div,{...r,ref:t}),s):null});cr.displayName=ya;function wa(e,t){return o.useReducer((n,r)=>t[n][r]??n,e)}var Le=e=>{const{present:t,children:n}=e,r=$a(t),a=typeof n=="function"?n({present:r.isPresent}):o.Children.only(n),c=Z(r.ref,Ca(a));return typeof n=="function"||r.isPresent?o.cloneElement(a,{ref:c}):null};Le.displayName="Presence";function $a(e){const[t,n]=o.useState(),r=o.useRef({}),a=o.useRef(e),c=o.useRef("none"),s=e?"mounted":"unmounted",[i,f]=wa(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect(()=>{const l=Ve(r.current);c.current=i==="mounted"?l:"none"},[i]),Ae(()=>{const l=r.current,v=a.current;if(v!==e){const m=c.current,p=Ve(l);e?f("MOUNT"):p==="none"||l?.display==="none"?f("UNMOUNT"):f(v&&m!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Ae(()=>{if(t){const l=u=>{const p=Ve(r.current).includes(u.animationName);u.target===t&&p&&Ht.flushSync(()=>f("ANIMATION_END"))},v=u=>{u.target===t&&(c.current=Ve(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:o.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Ve(e){return e?.animationName||"none"}function Ca(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Sa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Pa({defaultProp:t,onChange:n}),c=e!==void 0,s=c?e:r,i=oe(n),f=o.useCallback(l=>{if(c){const u=typeof l=="function"?l(e):l;u!==e&&i(u)}else a(l)},[c,e,a,i]);return[s,f]}function Pa({defaultProp:e,onChange:t}){const n=o.useState(e),[r]=n,a=o.useRef(r),c=oe(t);return o.useEffect(()=>{a.current!==r&&(c(r),a.current=r)},[r,a,c]),n}var Et="rovingFocusGroup.onEntryFocus",Ra={bubbles:!1,cancelable:!0},st="RovingFocusGroup",[Dt,ir,xa]=Wn(st),[Aa,sr]=it(st,[xa]),[Ta,Oa]=Aa(st),ur=o.forwardRef((e,t)=>C.jsx(Dt.Provider,{scope:e.__scopeRovingFocusGroup,children:C.jsx(Dt.Slot,{scope:e.__scopeRovingFocusGroup,children:C.jsx(Na,{...e,ref:t})})}));ur.displayName=st;var Na=o.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:c,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:f,onEntryFocus:l,preventScrollOnEntryFocus:v=!1,...u}=e,m=o.useRef(null),p=Z(t,m),h=Kn(c),[d=null,g]=Sa({prop:s,defaultProp:i,onChange:f}),[E,b]=o.useState(!1),y=oe(l),w=ir(n),$=o.useRef(!1),[M,R]=o.useState(0);return o.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(Et,y),()=>P.removeEventListener(Et,y)},[y]),C.jsx(Ta,{scope:n,orientation:r,dir:h,loop:a,currentTabStopId:d,onItemFocus:o.useCallback(P=>g(P),[g]),onItemShiftTab:o.useCallback(()=>b(!0),[]),onFocusableItemAdd:o.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:o.useCallback(()=>R(P=>P-1),[]),children:C.jsx(q.div,{tabIndex:E||M===0?-1:0,"data-orientation":r,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:D(e.onMouseDown,()=>{$.current=!0}),onFocus:D(e.onFocus,P=>{const N=!$.current;if(P.target===P.currentTarget&&N&&!E){const F=new CustomEvent(Et,Ra);if(P.currentTarget.dispatchEvent(F),!F.defaultPrevented){const V=w().filter(z=>z.focusable),ce=V.find(z=>z.active),Q=V.find(z=>z.id===d),ne=[ce,Q,...V].filter(Boolean).map(z=>z.ref.current);fr(ne,v)}}$.current=!1}),onBlur:D(e.onBlur,()=>b(!1))})})}),lr="RovingFocusGroupItem",dr=o.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:c,...s}=e,i=nt(),f=c||i,l=Oa(lr,n),v=l.currentTabStopId===f,u=ir(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=l;return o.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),C.jsx(Dt.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:C.jsx(q.span,{tabIndex:v?0:-1,"data-orientation":l.orientation,...s,ref:t,onMouseDown:D(e.onMouseDown,h=>{r?l.onItemFocus(f):h.preventDefault()}),onFocus:D(e.onFocus,()=>l.onItemFocus(f)),onKeyDown:D(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){l.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const d=Ia(h,l.orientation,l.dir);if(d!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let E=u().filter(b=>b.focusable).map(b=>b.ref.current);if(d==="last")E.reverse();else if(d==="prev"||d==="next"){d==="prev"&&E.reverse();const b=E.indexOf(h.currentTarget);E=l.loop?_a(E,b+1):E.slice(b+1)}setTimeout(()=>fr(E))}})})})});dr.displayName=lr;var Ma={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Da(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ia(e,t,n){const r=Da(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ma[r]}function fr(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function _a(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Fa=ur,La=dr,ka=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$e=new WeakMap,ze=new WeakMap,Ge={},yt=0,vr=function(e){return e&&(e.host||vr(e.parentNode))},ja=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vr(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ua=function(e,t,n,r){var a=ja(t,Array.isArray(e)?e:[e]);Ge[n]||(Ge[n]=new WeakMap);var c=Ge[n],s=[],i=new Set,f=new Set(a),l=function(u){!u||i.has(u)||(i.add(u),l(u.parentNode))};a.forEach(l);var v=function(u){!u||f.has(u)||Array.prototype.forEach.call(u.children,function(m){if(i.has(m))v(m);else try{var p=m.getAttribute(r),h=p!==null&&p!=="false",d=($e.get(m)||0)+1,g=(c.get(m)||0)+1;$e.set(m,d),c.set(m,g),s.push(m),d===1&&h&&ze.set(m,!0),g===1&&m.setAttribute(n,"true"),h||m.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",m,E)}})};return v(t),i.clear(),yt++,function(){s.forEach(function(u){var m=$e.get(u)-1,p=c.get(u)-1;$e.set(u,m),c.set(u,p),m||(ze.has(u)||u.removeAttribute(r),ze.delete(u)),p||u.removeAttribute(n)}),yt--,yt||($e=new WeakMap,$e=new WeakMap,ze=new WeakMap,Ge={})}},mr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=ka(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Ua(r,a,n,"aria-hidden")):function(){return null}},H=function(){return H=Object.assign||function(t){for(var n,r=1,a=arguments.length;r"u")return Ja;var t=ec(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nc=Yt(),xe="data-scroll-locked",rc=function(e,t,n,r){var a=e.left,c=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Ba,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(i,"px ").concat(r,`; - } - body[`).concat(xe,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(a,`px; - padding-top: `).concat(c,`px; - padding-right: `).concat(s,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(i,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(Ne,` { - right: `).concat(i,"px ").concat(r,`; - } - - .`).concat(Me,` { - margin-right: `).concat(i,"px ").concat(r,`; - } - - .`).concat(Ne," .").concat(Ne,` { - right: 0 `).concat(r,`; - } - - .`).concat(Me," .").concat(Me,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(xe,`] { - `).concat(Wa,": ").concat(i,`px; - } -`)},En=function(){var e=parseInt(document.body.getAttribute(xe)||"0",10);return isFinite(e)?e:0},oc=function(){o.useEffect(function(){return document.body.setAttribute(xe,(En()+1).toString()),function(){var e=En()-1;e<=0?document.body.removeAttribute(xe):document.body.setAttribute(xe,e.toString())}},[])},wr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;oc();var c=o.useMemo(function(){return tc(a)},[a]);return o.createElement(nc,{styles:rc(c,!t,a,n?"":"!important")})},It=!1;if(typeof window<"u")try{var Ye=Object.defineProperty({},"passive",{get:function(){return It=!0,!0}});window.addEventListener("test",Ye,Ye),window.removeEventListener("test",Ye,Ye)}catch{It=!1}var Ce=It?{passive:!1}:!1,ac=function(e){return e.tagName==="TEXTAREA"},$r=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ac(e)&&n[t]==="visible")},cc=function(e){return $r(e,"overflowY")},ic=function(e){return $r(e,"overflowX")},yn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Cr(e,r);if(a){var c=Sr(e,r),s=c[1],i=c[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sc=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uc=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Cr=function(e,t){return e==="v"?cc(t):ic(t)},Sr=function(e,t){return e==="v"?sc(t):uc(t)},lc=function(e,t){return e==="h"&&t==="rtl"?-1:1},dc=function(e,t,n,r,a){var c=lc(e,window.getComputedStyle(t).direction),s=c*r,i=n.target,f=t.contains(i),l=!1,v=s>0,u=0,m=0;do{var p=Sr(e,i),h=p[0],d=p[1],g=p[2],E=d-g-c*h;(h||E)&&Cr(e,i)&&(u+=E,m+=h),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!f&&i!==document.body||f&&(t.contains(i)||t===i));return(v&&(Math.abs(u)<1||!a)||!v&&(Math.abs(m)<1||!a))&&(l=!0),l},Xe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wn=function(e){return[e.deltaX,e.deltaY]},$n=function(e){return e&&"current"in e?e.current:e},fc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vc=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},mc=0,Se=[];function pc(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(mc++)[0],c=o.useState(Yt)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var d=pr([e.lockRef.current],(e.shards||[]).map($n),!0).filter(Boolean);return d.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),d.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=o.useCallback(function(d,g){if("touches"in d&&d.touches.length===2)return!s.current.allowPinchZoom;var E=Xe(d),b=n.current,y="deltaX"in d?d.deltaX:b[0]-E[0],w="deltaY"in d?d.deltaY:b[1]-E[1],$,M=d.target,R=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in d&&R==="h"&&M.type==="range")return!1;var P=yn(R,M);if(!P)return!0;if(P?$=R:($=R==="v"?"h":"v",P=yn(R,M)),!P)return!1;if(!r.current&&"changedTouches"in d&&(y||w)&&(r.current=$),!$)return!0;var N=r.current||$;return dc(N,g,d,N==="h"?y:w,!0)},[]),f=o.useCallback(function(d){var g=d;if(!(!Se.length||Se[Se.length-1]!==c)){var E="deltaY"in g?wn(g):Xe(g),b=t.current.filter(function($){return $.name===g.type&&($.target===g.target||g.target===$.shadowParent)&&fc($.delta,E)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var y=(s.current.shards||[]).map($n).filter(Boolean).filter(function($){return $.contains(g.target)}),w=y.length>0?i(g,y[0]):!s.current.noIsolation;w&&g.cancelable&&g.preventDefault()}}},[]),l=o.useCallback(function(d,g,E,b){var y={name:d,delta:g,target:E,should:b,shadowParent:hc(E)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),v=o.useCallback(function(d){n.current=Xe(d),r.current=void 0},[]),u=o.useCallback(function(d){l(d.type,wn(d),d.target,i(d,e.lockRef.current))},[]),m=o.useCallback(function(d){l(d.type,Xe(d),d.target,i(d,e.lockRef.current))},[]);o.useEffect(function(){return Se.push(c),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Ce),document.addEventListener("touchmove",f,Ce),document.addEventListener("touchstart",v,Ce),function(){Se=Se.filter(function(d){return d!==c}),document.removeEventListener("wheel",f,Ce),document.removeEventListener("touchmove",f,Ce),document.removeEventListener("touchstart",v,Ce)}},[]);var p=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(c,{styles:vc(a)}):null,p?o.createElement(wr,{gapMode:e.gapMode}):null)}function hc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gc=Er(yr,pc);var Pr=o.forwardRef(function(e,t){return o.createElement(ut,H({},e,{ref:t,sideCar:gc}))});Pr.classNames=ut.classNames;var _t=["Enter"," "],bc=["ArrowDown","PageUp","Home"],Rr=["ArrowUp","PageDown","End"],Ec=[...bc,...Rr],yc={ltr:[..._t,"ArrowRight"],rtl:[..._t,"ArrowLeft"]},wc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ke="Menu",[Ie,$c,Cc]=Wn(ke),[be,eu]=it(ke,[Cc,qn,sr]),lt=qn(),xr=sr(),[Sc,Ee]=be(ke),[Pc,je]=be(ke),Ar=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:c,modal:s=!0}=e,i=lt(t),[f,l]=o.useState(null),v=o.useRef(!1),u=oe(c),m=Kn(a);return o.useEffect(()=>{const p=()=>{v.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>v.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),C.jsx(ha,{...i,children:C.jsx(Sc,{scope:t,open:n,onOpenChange:u,content:f,onContentChange:l,children:C.jsx(Pc,{scope:t,onClose:o.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:v,dir:m,modal:s,children:r})})})};Ar.displayName=ke;var Rc="MenuAnchor",Xt=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=lt(n);return C.jsx(ga,{...a,...r,ref:t})});Xt.displayName=Rc;var Zt="MenuPortal",[xc,Tr]=be(Zt,{forceMount:void 0}),Or=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,c=Ee(Zt,t);return C.jsx(xc,{scope:t,forceMount:n,children:C.jsx(Le,{present:n||c.open,children:C.jsx(cr,{asChild:!0,container:a,children:r})})})};Or.displayName=Zt;var te="MenuContent",[Ac,qt]=be(te),Nr=o.forwardRef((e,t)=>{const n=Tr(te,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,c=Ee(te,e.__scopeMenu),s=je(te,e.__scopeMenu);return C.jsx(Ie.Provider,{scope:e.__scopeMenu,children:C.jsx(Le,{present:r||c.open,children:C.jsx(Ie.Slot,{scope:e.__scopeMenu,children:s.modal?C.jsx(Tc,{...a,ref:t}):C.jsx(Oc,{...a,ref:t})})})})}),Tc=o.forwardRef((e,t)=>{const n=Ee(te,e.__scopeMenu),r=o.useRef(null),a=Z(t,r);return o.useEffect(()=>{const c=r.current;if(c)return mr(c)},[]),C.jsx(Qt,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:D(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Oc=o.forwardRef((e,t)=>{const n=Ee(te,e.__scopeMenu);return C.jsx(Qt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qt=o.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:f,onEscapeKeyDown:l,onPointerDownOutside:v,onFocusOutside:u,onInteractOutside:m,onDismiss:p,disableOutsideScroll:h,...d}=e,g=Ee(te,n),E=je(te,n),b=lt(n),y=xr(n),w=$c(n),[$,M]=o.useState(null),R=o.useRef(null),P=Z(t,R,g.onContentChange),N=o.useRef(0),F=o.useRef(""),V=o.useRef(0),ce=o.useRef(null),Q=o.useRef("right"),G=o.useRef(0),ne=h?Pr:o.Fragment,z=h?{as:Nt,allowPinchZoom:!0}:void 0,ie=x=>{const J=F.current+x,Y=w().filter(k=>!k.disabled),X=document.activeElement,ue=Y.find(k=>k.ref.current===X)?.textValue,A=Y.map(k=>k.textValue),ve=Wc(A,J,ue),re=Y.find(k=>k.textValue===ve)?.ref.current;(function k(me){F.current=me,window.clearTimeout(N.current),me!==""&&(N.current=window.setTimeout(()=>k(""),1e3))})(J),re&&setTimeout(()=>re.focus())};o.useEffect(()=>()=>window.clearTimeout(N.current),[]),Jo();const B=o.useCallback(x=>Q.current===ce.current?.side&&Hc(x,ce.current?.area),[]);return C.jsx(Ac,{scope:n,searchRef:F,onItemEnter:o.useCallback(x=>{B(x)&&x.preventDefault()},[B]),onItemLeave:o.useCallback(x=>{B(x)||(R.current?.focus(),M(null))},[B]),onTriggerLeave:o.useCallback(x=>{B(x)&&x.preventDefault()},[B]),pointerGraceTimerRef:V,onPointerGraceIntentChange:o.useCallback(x=>{ce.current=x},[]),children:C.jsx(ne,{...z,children:C.jsx(Gn,{asChild:!0,trapped:a,onMountAutoFocus:D(c,x=>{x.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:C.jsx(Vn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:v,onFocusOutside:u,onInteractOutside:m,onDismiss:p,children:C.jsx(Fa,{asChild:!0,...y,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:$,onCurrentTabStopIdChange:M,onEntryFocus:D(f,x=>{E.isUsingKeyboardRef.current||x.preventDefault()}),preventScrollOnEntryFocus:!0,children:C.jsx(ba,{role:"menu","aria-orientation":"vertical","data-state":Gr(g.open),"data-radix-menu-content":"",dir:E.dir,...b,...d,ref:P,style:{outline:"none",...d.style},onKeyDown:D(d.onKeyDown,x=>{const Y=x.target.closest("[data-radix-menu-content]")===x.currentTarget,X=x.ctrlKey||x.altKey||x.metaKey,ue=x.key.length===1;Y&&(x.key==="Tab"&&x.preventDefault(),!X&&ue&&ie(x.key));const A=R.current;if(x.target!==A||!Ec.includes(x.key))return;x.preventDefault();const re=w().filter(k=>!k.disabled).map(k=>k.ref.current);Rr.includes(x.key)&&re.reverse(),Uc(re)}),onBlur:D(e.onBlur,x=>{x.currentTarget.contains(x.target)||(window.clearTimeout(N.current),F.current="")}),onPointerMove:D(e.onPointerMove,_e(x=>{const J=x.target,Y=G.current!==x.clientX;if(x.currentTarget.contains(J)&&Y){const X=x.clientX>G.current?"right":"left";Q.current=X,G.current=x.clientX}}))})})})})})})});Nr.displayName=te;var Nc="MenuGroup",Jt=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return C.jsx(q.div,{role:"group",...r,ref:t})});Jt.displayName=Nc;var Mc="MenuLabel",Mr=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return C.jsx(q.div,{...r,ref:t})});Mr.displayName=Mc;var rt="MenuItem",Cn="menu.itemSelect",dt=o.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,c=o.useRef(null),s=je(rt,e.__scopeMenu),i=qt(rt,e.__scopeMenu),f=Z(t,c),l=o.useRef(!1),v=()=>{const u=c.current;if(!n&&u){const m=new CustomEvent(Cn,{bubbles:!0,cancelable:!0});u.addEventListener(Cn,p=>r?.(p),{once:!0}),Un(u,m),m.defaultPrevented?l.current=!1:s.onClose()}};return C.jsx(Dr,{...a,ref:f,disabled:n,onClick:D(e.onClick,v),onPointerDown:u=>{e.onPointerDown?.(u),l.current=!0},onPointerUp:D(e.onPointerUp,u=>{l.current||u.currentTarget?.click()}),onKeyDown:D(e.onKeyDown,u=>{const m=i.searchRef.current!=="";n||m&&u.key===" "||_t.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});dt.displayName=rt;var Dr=o.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...c}=e,s=qt(rt,n),i=xr(n),f=o.useRef(null),l=Z(t,f),[v,u]=o.useState(!1),[m,p]=o.useState("");return o.useEffect(()=>{const h=f.current;h&&p((h.textContent??"").trim())},[c.children]),C.jsx(Ie.ItemSlot,{scope:n,disabled:r,textValue:a??m,children:C.jsx(La,{asChild:!0,...i,focusable:!r,children:C.jsx(q.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:l,onPointerMove:D(e.onPointerMove,_e(h=>{r?s.onItemLeave(h):(s.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:D(e.onPointerLeave,_e(h=>s.onItemLeave(h))),onFocus:D(e.onFocus,()=>u(!0)),onBlur:D(e.onBlur,()=>u(!1))})})})}),Dc="MenuCheckboxItem",Ir=o.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return C.jsx(jr,{scope:e.__scopeMenu,checked:n,children:C.jsx(dt,{role:"menuitemcheckbox","aria-checked":ot(n)?"mixed":n,...a,ref:t,"data-state":tn(n),onSelect:D(a.onSelect,()=>r?.(ot(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ir.displayName=Dc;var _r="MenuRadioGroup",[Ic,_c]=be(_r,{value:void 0,onValueChange:()=>{}}),Fr=o.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,c=oe(r);return C.jsx(Ic,{scope:e.__scopeMenu,value:n,onValueChange:c,children:C.jsx(Jt,{...a,ref:t})})});Fr.displayName=_r;var Lr="MenuRadioItem",kr=o.forwardRef((e,t)=>{const{value:n,...r}=e,a=_c(Lr,e.__scopeMenu),c=n===a.value;return C.jsx(jr,{scope:e.__scopeMenu,checked:c,children:C.jsx(dt,{role:"menuitemradio","aria-checked":c,...r,ref:t,"data-state":tn(c),onSelect:D(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});kr.displayName=Lr;var en="MenuItemIndicator",[jr,Fc]=be(en,{checked:!1}),Ur=o.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,c=Fc(en,n);return C.jsx(Le,{present:r||ot(c.checked)||c.checked===!0,children:C.jsx(q.span,{...a,ref:t,"data-state":tn(c.checked)})})});Ur.displayName=en;var Lc="MenuSeparator",Br=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return C.jsx(q.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Br.displayName=Lc;var kc="MenuArrow",Wr=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=lt(n);return C.jsx(Ea,{...a,...r,ref:t})});Wr.displayName=kc;var jc="MenuSub",[tu,Kr]=be(jc),Oe="MenuSubTrigger",Hr=o.forwardRef((e,t)=>{const n=Ee(Oe,e.__scopeMenu),r=je(Oe,e.__scopeMenu),a=Kr(Oe,e.__scopeMenu),c=qt(Oe,e.__scopeMenu),s=o.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:f}=c,l={__scopeMenu:e.__scopeMenu},v=o.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return o.useEffect(()=>v,[v]),o.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),f(null)}},[i,f]),C.jsx(Xt,{asChild:!0,...l,children:C.jsx(Dr,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Gr(n.open),...e,ref:Io(t,a.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:D(e.onPointerMove,_e(u=>{c.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(c.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),v()},100))})),onPointerLeave:D(e.onPointerLeave,_e(u=>{v();const m=n.content?.getBoundingClientRect();if(m){const p=n.content?.dataset.side,h=p==="right",d=h?-5:5,g=m[h?"left":"right"],E=m[h?"right":"left"];c.onPointerGraceIntentChange({area:[{x:u.clientX+d,y:u.clientY},{x:g,y:m.top},{x:E,y:m.top},{x:E,y:m.bottom},{x:g,y:m.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(u),u.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:D(e.onKeyDown,u=>{const m=c.searchRef.current!=="";e.disabled||m&&u.key===" "||yc[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});Hr.displayName=Oe;var Vr="MenuSubContent",zr=o.forwardRef((e,t)=>{const n=Tr(te,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,c=Ee(te,e.__scopeMenu),s=je(te,e.__scopeMenu),i=Kr(Vr,e.__scopeMenu),f=o.useRef(null),l=Z(t,f);return C.jsx(Ie.Provider,{scope:e.__scopeMenu,children:C.jsx(Le,{present:r||c.open,children:C.jsx(Ie.Slot,{scope:e.__scopeMenu,children:C.jsx(Qt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,ref:l,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{s.isUsingKeyboardRef.current&&f.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:D(e.onFocusOutside,v=>{v.target!==i.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:D(e.onEscapeKeyDown,v=>{s.onClose(),v.preventDefault()}),onKeyDown:D(e.onKeyDown,v=>{const u=v.currentTarget.contains(v.target),m=wc[s.dir].includes(v.key);u&&m&&(c.onOpenChange(!1),i.trigger?.focus(),v.preventDefault())})})})})})});zr.displayName=Vr;function Gr(e){return e?"open":"closed"}function ot(e){return e==="indeterminate"}function tn(e){return ot(e)?"indeterminate":e?"checked":"unchecked"}function Uc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Bc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Wc(e,t,n){const a=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let s=Bc(e,Math.max(c,0));a.length===1&&(s=s.filter(l=>l!==n));const f=s.find(l=>l.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function Kc(e,t){const{x:n,y:r}=e;let a=!1;for(let c=0,s=t.length-1;cr!=v>r&&n<(l-i)*(r-f)/(v-f)+i&&(a=!a)}return a}function Hc(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Kc(n,t)}function _e(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nu=Ar,ru=Xt,ou=Or,au=Nr,cu=Jt,iu=Mr,su=dt,uu=Ir,lu=Fr,du=kr,fu=Ur,vu=Br,mu=Wr,pu=Hr,hu=zr;function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>Vc(n,t))}function nn(...e){return o.useCallback(Yr(...e),e)}function zc(e,t=[]){let n=[];function r(c,s){const i=o.createContext(s),f=n.length;n=[...n,s];function l(u){const{scope:m,children:p,...h}=u,d=m?.[e][f]||i,g=o.useMemo(()=>h,Object.values(h));return o.createElement(d.Provider,{value:g},p)}function v(u,m){const p=m?.[e][f]||i,h=o.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${c}\``)}return l.displayName=c+"Provider",[l,v]}const a=()=>{const c=n.map(s=>o.createContext(s));return function(i){const f=i?.[e]||c;return o.useMemo(()=>({[`__scope${e}`]:{...i,[e]:f}}),[i,f])}};return a.scopeName=e,[r,Gc(a,...t)]}function Gc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const s=r.reduce((i,{useScope:f,scopeName:l})=>{const u=f(c)[`__scope${l}`];return{...i,...u}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Xr(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Yc({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Xc({defaultProp:t,onChange:n}),c=e!==void 0,s=c?e:r,i=Xr(n),f=o.useCallback(l=>{if(c){const u=typeof l=="function"?l(e):l;u!==e&&i(u)}else a(l)},[c,e,a,i]);return[s,f]}function Xc({defaultProp:e,onChange:t}){const n=o.useState(e),[r]=n,a=o.useRef(r),c=Xr(t);return o.useEffect(()=>{a.current!==r&&(c(r),a.current=r)},[r,a,c]),n}function St(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function Zc(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Zr(...e){return t=>e.forEach(n=>Zc(n,t))}function qc(...e){return o.useCallback(Zr(...e),e)}const qr=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(Jc);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(Ft,I({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(Ft,I({},r,{ref:t}),n)});qr.displayName="Slot";const Ft=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...ei(r,n.props),ref:t?Zr(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});Ft.displayName="SlotClone";const Qc=({children:e})=>o.createElement(o.Fragment,null,e);function Jc(e){return o.isValidElement(e)&&e.type===Qc}function ei(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const ti=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ni=ti.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?qr:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,I({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ri(e,t){e&&Ht.flushSync(()=>e.dispatchEvent(t))}function Qr(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function oi(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ai(e,t=globalThis?.document){const n=oi(e);o.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Lt="dismissableLayer.update",ci="dismissableLayer.pointerDownOutside",ii="dismissableLayer.focusOutside";let Sn;const si=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ui=o.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:s,onInteractOutside:i,onDismiss:f,...l}=e,v=o.useContext(si),[u,m]=o.useState(null),p=(n=u?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,h]=o.useState({}),d=qc(t,P=>m(P)),g=Array.from(v.layers),[E]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(E),y=u?g.indexOf(u):-1,w=v.layersWithOutsidePointerEventsDisabled.size>0,$=y>=b,M=li(P=>{const N=P.target,F=[...v.branches].some(V=>V.contains(N));!$||F||(c?.(P),i?.(P),P.defaultPrevented||f?.())},p),R=di(P=>{const N=P.target;[...v.branches].some(V=>V.contains(N))||(s?.(P),i?.(P),P.defaultPrevented||f?.())},p);return ai(P=>{y===v.layers.size-1&&(a?.(P),!P.defaultPrevented&&f&&(P.preventDefault(),f()))},p),o.useEffect(()=>{if(u)return r&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Sn=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(u)),v.layers.add(u),Pn(),()=>{r&&v.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Sn)}},[u,p,r,v]),o.useEffect(()=>()=>{u&&(v.layers.delete(u),v.layersWithOutsidePointerEventsDisabled.delete(u),Pn())},[u,v]),o.useEffect(()=>{const P=()=>h({});return document.addEventListener(Lt,P),()=>document.removeEventListener(Lt,P)},[]),o.createElement(ni.div,I({},l,{ref:d,style:{pointerEvents:w?$?"auto":"none":void 0,...e.style},onFocusCapture:St(e.onFocusCapture,R.onFocusCapture),onBlurCapture:St(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:St(e.onPointerDownCapture,M.onPointerDownCapture)}))});function li(e,t=globalThis?.document){const n=Qr(e),r=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const c=i=>{if(i.target&&!r.current){let l=function(){Jr(ci,n,f,{discrete:!0})};const f={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",c),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function di(e,t=globalThis?.document){const n=Qr(e),r=o.useRef(!1);return o.useEffect(()=>{const a=c=>{c.target&&!r.current&&Jr(ii,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pn(){const e=new CustomEvent(Lt);document.dispatchEvent(e)}function Jr(e,t,n,{discrete:r}){const a=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?ri(a,c):a.dispatchEvent(c)}function fi(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function eo(...e){return t=>e.forEach(n=>fi(n,t))}function vi(...e){return o.useCallback(eo(...e),e)}const to=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(pi);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(kt,I({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(kt,I({},r,{ref:t}),n)});to.displayName="Slot";const kt=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...hi(r,n.props),ref:t?eo(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});kt.displayName="SlotClone";const mi=({children:e})=>o.createElement(o.Fragment,null,e);function pi(e){return o.isValidElement(e)&&e.type===mi}function hi(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const gi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],bi=gi.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?to:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,I({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Rn(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const Pt="focusScope.autoFocusOnMount",Rt="focusScope.autoFocusOnUnmount",xn={bubbles:!1,cancelable:!0},Ei=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...s}=e,[i,f]=o.useState(null),l=Rn(a),v=Rn(c),u=o.useRef(null),m=vi(t,d=>f(d)),p=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let d=function(y){if(p.paused||!i)return;const w=y.target;i.contains(w)?u.current=w:fe(u.current,{select:!0})},g=function(y){if(p.paused||!i)return;const w=y.relatedTarget;w!==null&&(i.contains(w)||fe(u.current,{select:!0}))},E=function(y){if(document.activeElement===document.body)for(const $ of y)$.removedNodes.length>0&&fe(i)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const b=new MutationObserver(E);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),b.disconnect()}}},[r,i,p.paused]),o.useEffect(()=>{if(i){Tn.add(p);const d=document.activeElement;if(!i.contains(d)){const E=new CustomEvent(Pt,xn);i.addEventListener(Pt,l),i.dispatchEvent(E),E.defaultPrevented||(yi(Pi(no(i)),{select:!0}),document.activeElement===d&&fe(i))}return()=>{i.removeEventListener(Pt,l),setTimeout(()=>{const E=new CustomEvent(Rt,xn);i.addEventListener(Rt,v),i.dispatchEvent(E),E.defaultPrevented||fe(d??document.body,{select:!0}),i.removeEventListener(Rt,v),Tn.remove(p)},0)}}},[i,l,v,p]);const h=o.useCallback(d=>{if(!n&&!r||p.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,E=document.activeElement;if(g&&E){const b=d.currentTarget,[y,w]=wi(b);y&&w?!d.shiftKey&&E===w?(d.preventDefault(),n&&fe(y,{select:!0})):d.shiftKey&&E===y&&(d.preventDefault(),n&&fe(w,{select:!0})):E===b&&d.preventDefault()}},[n,r,p.paused]);return o.createElement(bi.div,I({tabIndex:-1},s,{ref:m,onKeyDown:h}))});function yi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fe(r,{select:t}),document.activeElement!==n)return}function wi(e){const t=no(e),n=An(t,e),r=An(t.reverse(),e);return[n,r]}function no(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function An(e,t){for(const n of e)if(!$i(n,{upTo:t}))return n}function $i(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ci(e){return e instanceof HTMLInputElement&&"select"in e}function fe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ci(e)&&t&&e.select()}}const Tn=Si();function Si(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=On(e,t),e.unshift(t)},remove(t){var n;e=On(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function On(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Pi(e){return e.filter(t=>t.tagName!=="A")}function Ri(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xi(...e){return t=>e.forEach(n=>Ri(n,t))}const ro=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(Ti);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(jt,I({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(jt,I({},r,{ref:t}),n)});ro.displayName="Slot";const jt=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...Oi(r,n.props),ref:t?xi(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});jt.displayName="SlotClone";const Ai=({children:e})=>o.createElement(o.Fragment,null,e);function Ti(e){return o.isValidElement(e)&&e.type===Ai}function Oi(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const Ni=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mi=Ni.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?ro:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,I({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Di=o.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...a}=e;return r?Bn.createPortal(o.createElement(Mi.div,I({},a,{ref:t})),r):null});function Ii(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _i(...e){return t=>e.forEach(n=>Ii(n,t))}function Fi(...e){return o.useCallback(_i(...e),e)}const Nn=globalThis?.document?o.useLayoutEffect:()=>{};function Li(e,t){return o.useReducer((n,r)=>{const a=t[n][r];return a??n},e)}const ft=e=>{const{present:t,children:n}=e,r=ki(t),a=typeof n=="function"?n({present:r.isPresent}):o.Children.only(n),c=Fi(r.ref,a.ref);return typeof n=="function"||r.isPresent?o.cloneElement(a,{ref:c}):null};ft.displayName="Presence";function ki(e){const[t,n]=o.useState(),r=o.useRef({}),a=o.useRef(e),c=o.useRef("none"),s=e?"mounted":"unmounted",[i,f]=Li(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect(()=>{const l=Ze(r.current);c.current=i==="mounted"?l:"none"},[i]),Nn(()=>{const l=r.current,v=a.current;if(v!==e){const m=c.current,p=Ze(l);e?f("MOUNT"):p==="none"||l?.display==="none"?f("UNMOUNT"):f(v&&m!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Nn(()=>{if(t){const l=u=>{const p=Ze(r.current).includes(u.animationName);u.target===t&&p&&Ht.flushSync(()=>f("ANIMATION_END"))},v=u=>{u.target===t&&(c.current=Ze(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:o.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Ze(e){return e?.animationName||"none"}const rn=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(Ui);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(Ut,I({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(Ut,I({},r,{ref:t}),n)});rn.displayName="Slot";const Ut=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...Bi(r,n.props),ref:t?Yr(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});Ut.displayName="SlotClone";const ji=({children:e})=>o.createElement(o.Fragment,null,e);function Ui(e){return o.isValidElement(e)&&e.type===ji}function Bi(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const Wi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ue=Wi.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?rn:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,I({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});let xt=0;function Ki(){o.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Mn()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Mn()),xt++,()=>{xt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),xt--}},[])}function Mn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var oo=gr(),At=function(){},vt=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:At,onWheelCapture:At,onTouchMoveCapture:At}),a=r[0],c=r[1],s=e.forwardProps,i=e.children,f=e.className,l=e.removeScrollBar,v=e.enabled,u=e.shards,m=e.sideCar,p=e.noIsolation,h=e.inert,d=e.allowPinchZoom,g=e.as,E=g===void 0?"div":g,b=Gt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=m,w=hr([n,t]),$=H(H({},b),a);return o.createElement(o.Fragment,null,v&&o.createElement(y,{sideCar:oo,removeScrollBar:l,shards:u,noIsolation:p,inert:h,setCallbacks:c,allowPinchZoom:!!d,lockRef:n}),s?o.cloneElement(o.Children.only(i),H(H({},$),{ref:w})):o.createElement(E,H({},$,{className:f,ref:w}),i))});vt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vt.classNames={fullWidth:Me,zeroRight:Ne};var Bt=!1;if(typeof window<"u")try{var qe=Object.defineProperty({},"passive",{get:function(){return Bt=!0,!0}});window.addEventListener("test",qe,qe),window.removeEventListener("test",qe,qe)}catch{Bt=!1}var Pe=Bt?{passive:!1}:!1,Hi=function(e){return e.tagName==="TEXTAREA"},ao=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hi(e)&&n[t]==="visible")},Vi=function(e){return ao(e,"overflowY")},zi=function(e){return ao(e,"overflowX")},Dn=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=co(e,n);if(r){var a=io(e,n),c=a[1],s=a[2];if(c>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Gi=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Yi=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},co=function(e,t){return e==="v"?Vi(t):zi(t)},io=function(e,t){return e==="v"?Gi(t):Yi(t)},Xi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zi=function(e,t,n,r,a){var c=Xi(e,window.getComputedStyle(t).direction),s=c*r,i=n.target,f=t.contains(i),l=!1,v=s>0,u=0,m=0;do{var p=io(e,i),h=p[0],d=p[1],g=p[2],E=d-g-c*h;(h||E)&&co(e,i)&&(u+=E,m+=h),i=i.parentNode}while(!f&&i!==document.body||f&&(t.contains(i)||t===i));return(v&&(u===0||!a)||!v&&(m===0||!a))&&(l=!0),l},Qe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},In=function(e){return[e.deltaX,e.deltaY]},_n=function(e){return e&&"current"in e?e.current:e},qi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qi=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Ji=0,Re=[];function es(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(Ji++)[0],c=o.useState(function(){return Yt()})[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var d=pr([e.lockRef.current],(e.shards||[]).map(_n),!0).filter(Boolean);return d.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),d.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=o.useCallback(function(d,g){if("touches"in d&&d.touches.length===2)return!s.current.allowPinchZoom;var E=Qe(d),b=n.current,y="deltaX"in d?d.deltaX:b[0]-E[0],w="deltaY"in d?d.deltaY:b[1]-E[1],$,M=d.target,R=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in d&&R==="h"&&M.type==="range")return!1;var P=Dn(R,M);if(!P)return!0;if(P?$=R:($=R==="v"?"h":"v",P=Dn(R,M)),!P)return!1;if(!r.current&&"changedTouches"in d&&(y||w)&&(r.current=$),!$)return!0;var N=r.current||$;return Zi(N,g,d,N==="h"?y:w,!0)},[]),f=o.useCallback(function(d){var g=d;if(!(!Re.length||Re[Re.length-1]!==c)){var E="deltaY"in g?In(g):Qe(g),b=t.current.filter(function($){return $.name===g.type&&$.target===g.target&&qi($.delta,E)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var y=(s.current.shards||[]).map(_n).filter(Boolean).filter(function($){return $.contains(g.target)}),w=y.length>0?i(g,y[0]):!s.current.noIsolation;w&&g.cancelable&&g.preventDefault()}}},[]),l=o.useCallback(function(d,g,E,b){var y={name:d,delta:g,target:E,should:b};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),v=o.useCallback(function(d){n.current=Qe(d),r.current=void 0},[]),u=o.useCallback(function(d){l(d.type,In(d),d.target,i(d,e.lockRef.current))},[]),m=o.useCallback(function(d){l(d.type,Qe(d),d.target,i(d,e.lockRef.current))},[]);o.useEffect(function(){return Re.push(c),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Pe),document.addEventListener("touchmove",f,Pe),document.addEventListener("touchstart",v,Pe),function(){Re=Re.filter(function(d){return d!==c}),document.removeEventListener("wheel",f,Pe),document.removeEventListener("touchmove",f,Pe),document.removeEventListener("touchstart",v,Pe)}},[]);var p=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(c,{styles:Qi(a)}):null,p?o.createElement(wr,{gapMode:"margin"}):null)}const ts=Er(oo,es);var so=o.forwardRef(function(e,t){return o.createElement(vt,H({},e,{ref:t,sideCar:ts}))});so.classNames=vt.classNames;const uo="Dialog",[lo,gu]=zc(uo),[ns,ae]=lo(uo),rs=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:s=!0}=e,i=o.useRef(null),f=o.useRef(null),[l=!1,v]=Yc({prop:r,defaultProp:a,onChange:c});return o.createElement(ns,{scope:t,triggerRef:i,contentRef:f,contentId:nt(),titleId:nt(),descriptionId:nt(),open:l,onOpenChange:v,onOpenToggle:o.useCallback(()=>v(u=>!u),[v]),modal:s},n)},os="DialogTrigger",as=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ae(os,n),c=nn(t,a.triggerRef);return o.createElement(Ue.button,I({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":on(a.open)},r,{ref:c,onClick:De(e.onClick,a.onOpenToggle)}))}),fo="DialogPortal",[cs,vo]=lo(fo,{forceMount:void 0}),is=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,c=ae(fo,t);return o.createElement(cs,{scope:t,forceMount:n},o.Children.map(r,s=>o.createElement(ft,{present:n||c.open},o.createElement(Di,{asChild:!0,container:a},s))))},Wt="DialogOverlay",ss=o.forwardRef((e,t)=>{const n=vo(Wt,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,c=ae(Wt,e.__scopeDialog);return c.modal?o.createElement(ft,{present:r||c.open},o.createElement(us,I({},a,{ref:t}))):null}),us=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ae(Wt,n);return o.createElement(so,{as:rn,allowPinchZoom:!0,shards:[a.contentRef]},o.createElement(Ue.div,I({"data-state":on(a.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Fe="DialogContent",ls=o.forwardRef((e,t)=>{const n=vo(Fe,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,c=ae(Fe,e.__scopeDialog);return o.createElement(ft,{present:r||c.open},c.modal?o.createElement(ds,I({},a,{ref:t})):o.createElement(fs,I({},a,{ref:t})))}),ds=o.forwardRef((e,t)=>{const n=ae(Fe,e.__scopeDialog),r=o.useRef(null),a=nn(t,n.contentRef,r);return o.useEffect(()=>{const c=r.current;if(c)return mr(c)},[]),o.createElement(mo,I({},e,{ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(e.onCloseAutoFocus,c=>{var s;c.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:De(e.onPointerDownOutside,c=>{const s=c.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&c.preventDefault()}),onFocusOutside:De(e.onFocusOutside,c=>c.preventDefault())}))}),fs=o.forwardRef((e,t)=>{const n=ae(Fe,e.__scopeDialog),r=o.useRef(!1),a=o.useRef(!1);return o.createElement(mo,I({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,c),!c.defaultPrevented){var i;r.current||(i=n.triggerRef.current)===null||i===void 0||i.focus(),c.preventDefault()}r.current=!1,a.current=!1},onInteractOutside:c=>{var s,i;(s=e.onInteractOutside)===null||s===void 0||s.call(e,c),c.defaultPrevented||(r.current=!0,c.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=c.target;((i=n.triggerRef.current)===null||i===void 0?void 0:i.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.current&&c.preventDefault()}}))}),mo=o.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:c,...s}=e,i=ae(Fe,n),f=o.useRef(null),l=nn(t,f);return Ki(),o.createElement(o.Fragment,null,o.createElement(Ei,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:c},o.createElement(ui,I({role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":on(i.open)},s,{ref:l,onDismiss:()=>i.onOpenChange(!1)}))),!1)}),vs="DialogTitle",ms=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ae(vs,n);return o.createElement(Ue.h2,I({id:a.titleId},r,{ref:t}))}),ps="DialogDescription",hs=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ae(ps,n);return o.createElement(Ue.p,I({id:a.descriptionId},r,{ref:t}))}),gs="DialogClose",bs=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ae(gs,n);return o.createElement(Ue.button,I({type:"button"},r,{ref:t,onClick:De(e.onClick,()=>a.onOpenChange(!1))}))});function on(e){return e?"open":"closed"}const Es=rs,ys=as,ws=is,$s=ss,Cs=ls,Ss=ms,Ps=hs,Rs=bs;var po=S.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},dismissible:!1,isOpen:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{}}),an=()=>S.useContext(po);function xs(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}xs(`[vaul-drawer]{touch-action:none;transform:translate3d(0,100%,0);transition:transform .5s cubic-bezier(.32,.72,0,1)}[vaul-drawer][vaul-drawer-visible=true]{transform:translate3d(0,var(--snap-point-height, 0),0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]:after{content:"";position:absolute;top:100%;background:inherit;background-color:inherit;left:0;right:0;height:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay="true"]):not([data-state="closed"]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible="false"]){opacity:1}@keyframes fake-animation{}@media (hover: hover) and (pointer: fine){[vaul-drawer]{user-select:none}} -`);var As=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Kt(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function Ts(){return cn(/^Mac/)}function Os(){return cn(/^iPhone/)}function Ns(){return cn(/^iPad/)||Ts()&&navigator.maxTouchPoints>1}function ho(){return Os()||Ns()}function cn(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}var Tt=typeof document<"u"&&window.visualViewport;function Fn(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function go(e){for(Fn(e)&&(e=e.parentElement);e&&!Fn(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var Ms=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),Je=0,Ot;function Ds(e={}){let{isDisabled:t}=e;As(()=>{if(!t)return Je++,Je===1&&(ho()?Ot=_s():Ot=Is()),()=>{Je--,Je===0&&Ot()}},[t])}function Is(){return Kt(at(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),at(document.documentElement,"overflow","hidden"))}function _s(){let e,t=0,n=u=>{e=go(u.target),!(e===document.documentElement&&e===document.body)&&(t=u.changedTouches[0].pageY)},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}let m=u.changedTouches[0].pageY,p=e.scrollTop,h=e.scrollHeight-e.clientHeight;h!==0&&((p<=0&&m>t||p>=h&&m{let m=u.target;ct(m)&&m!==document.activeElement&&(u.preventDefault(),m.style.transform="translateY(-2000px)",m.focus(),requestAnimationFrame(()=>{m.style.transform=""}))},c=u=>{let m=u.target;ct(m)&&(m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",Tt&&(Tt.height{Ln(m)}):Tt.addEventListener("resize",()=>Ln(m),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,f=window.pageYOffset,l=Kt(at(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),at(document.documentElement,"overflow","hidden"));window.scrollTo(0,0);let v=Kt(Te(document,"touchstart",n,{passive:!1,capture:!0}),Te(document,"touchmove",r,{passive:!1,capture:!0}),Te(document,"touchend",a,{passive:!1,capture:!0}),Te(document,"focus",c,!0),Te(window,"scroll",s));return()=>{l(),v(),window.scrollTo(i,f)}}function at(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Te(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ln(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=go(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,c=e.getBoundingClientRect().bottom,s=n.getBoundingClientRect().bottom;c>s&&(n.scrollTop+=a-r)}e=n.parentElement}}function ct(e){return e instanceof HTMLInputElement&&!Ms.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Fs(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ls(...e){return t=>e.forEach(n=>Fs(n,t))}function bo(...e){return o.useCallback(Ls(...e),e)}var le=null;function ks({isOpen:e,modal:t,nested:n,hasBeenOpened:r}){let a=S.useRef(0);function c(){if(le===null){le={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};let{scrollX:i,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),document.body.style.top=`${-a.current}px`,document.body.style.left=`${-i}px`,document.body.style.right="0px",document.body.style.height="auto",setTimeout(()=>requestAnimationFrame(()=>{let l=f-window.innerHeight;l&&a.current>=f&&(document.body.style.top=`${-(a.current+l)}px`)}),300)}}function s(){if(le!==null){let i=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);document.body.style.position=le.position,document.body.style.top=le.top,document.body.style.left=le.left,document.body.style.height=le.height,document.body.style.right="unset",requestAnimationFrame(()=>{window.scrollTo(f,i)}),le=null}}return S.useEffect(()=>{function i(){a.current=window.scrollY}return i(),window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}},[]),S.useEffect(()=>{n||!r||(e?(c(),t||setTimeout(()=>{s()},500)):s())},[e]),{restorePositionSetting:s}}var Eo=new WeakMap;function L(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;let r={};Object.entries(t).forEach(([a,c])=>{if(a.startsWith("--")){e.style.setProperty(a,c);return}r[a]=e.style[a],e.style[a]=c}),!n&&Eo.set(e,r)}function et(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Eo.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([r,a])=>{e.style[r]=a}))}function tt(e){let t=window.getComputedStyle(e),n=t.transform||t.webkitTransform||t.mozTransform,r=n.match(/^matrix3d\((.+)\)$/);return r?parseFloat(r[1].split(", ")[13]):(r=n.match(/^matrix\((.+)\)$/),r?parseFloat(r[1].split(", ")[5]):null)}function js(e){return 8*(Math.log(e+1)-2)}var _={DURATION:.5,EASE:[.32,.72,0,1]},yo=.4;function wo(e){let t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Us({defaultProp:e,onChange:t}){let n=S.useState(e),[r]=n,a=S.useRef(r),c=wo(t);return S.useEffect(()=>{a.current!==r&&(c(r),a.current=r)},[r,a,c]),n}function Bs({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,a]=Us({defaultProp:t,onChange:n}),c=e!==void 0,s=c?e:r,i=wo(n),f=S.useCallback(l=>{if(c){let v=typeof l=="function"?l(e):l;v!==e&&i(v)}else a(l)},[c,e,a,i]);return[s,f]}function Ws({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:c,onSnapPointChange:s}){let[i,f]=Bs({prop:e,defaultProp:n?.[0],onChange:t}),l=S.useMemo(()=>i===n?.[n.length-1],[n,i]),v=n&&n.length>0&&c&&n[c]===i||!n,u=S.useMemo(()=>{var b;return(b=n?.findIndex(y=>y===i))!=null?b:null},[n,i]),m=S.useMemo(()=>{var b;return(b=n?.map(y=>{let w=typeof window<"u",$=typeof y=="string",M=0;$&&(M=parseInt(y,10));let R=$?M:w?y*window.innerHeight:0;return w?window.innerHeight-R:R}))!=null?b:[]},[n]),p=S.useMemo(()=>u!==null?m?.[u]:null,[m,u]),h=S.useCallback(b=>{var y;let w=(y=m?.findIndex($=>$===b))!=null?y:null;s(w),L(r.current,{transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,transform:`translate3d(0, ${b}px, 0)`}),m&&w!==m.length-1&&w!==c?L(a.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,opacity:"0"}):L(a.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,opacity:"1"}),f(w!==null?n?.[w]:null)},[r,n,m,c,a,f]);S.useEffect(()=>{var b;if(e){let y=(b=n?.findIndex(w=>w===e))!=null?b:null;m&&y&&typeof m[y]=="number"&&h(m[y])}},[e,n,m,h]);function d({draggedDistance:b,closeDrawer:y,velocity:w}){if(c===void 0)return;let $=p-b,M=u===c-1,R=u===0;if(M&&L(a.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`}),w>2&&b<0){y();return}if(w>2&&b>0&&m&&n){h(m[n.length-1]);return}let P=m?.reduce((N,F)=>typeof N!="number"||typeof F!="number"?N:Math.abs(F-$)yo&&Math.abs(b)0?1:-1;if(N>0&&l){h(m[n.length-1]);return}if(R&&N<0&&y(),u===null)return;h(m[u+N]);return}h(P)}function g({draggedDistance:b}){if(p===null)return;let y=p-b;L(r.current,{transform:`translate3d(0, ${y}px, 0)`})}function E(b,y){if(!n||typeof u!="number"||!m||c===void 0)return null;let w=u===c-1;if(u>=c&&y)return 0;if(w&&!y)return 1;if(!v&&!w)return null;let $=w?u+1:u-1,M=w?m[$]-m[$-1]:m[$+1]-m[$],R=b/Math.abs(M);return w?1-R:R}return{isLastSnapPoint:l,activeSnapPoint:i,shouldFade:v,getPercentageDragged:E,setActiveSnapPoint:f,activeSnapPointIndex:u,onRelease:d,onDrag:g,snapPointsOffset:m}}var Ks=.25,Hs=500,kn=8,ge=16,jn=26;function $o({open:e,onOpenChange:t,children:n,shouldScaleBackground:r,onDrag:a,onRelease:c,snapPoints:s,nested:i,closeThreshold:f=Ks,scrollLockTimeout:l=Hs,dismissible:v=!0,fadeFromIndex:u=s&&s.length-1,activeSnapPoint:m,setActiveSnapPoint:p,fixed:h,modal:d=!0,onClose:g}){var E;let[b=!1,y]=S.useState(!1),[w,$]=S.useState(!1),[M,R]=S.useState(!1),[P,N]=S.useState(!1),[F,V]=S.useState(!1),[ce,Q]=S.useState(!1),G=S.useRef(null),ne=S.useRef(null),z=S.useRef(null),ie=S.useRef(null),B=S.useRef(null),x=S.useRef(!1),J=S.useRef(null),Y=S.useRef(0),X=S.useRef(!1),ue=S.useRef(0),A=S.useRef(null),ve=S.useRef(((E=A.current)==null?void 0:E.getBoundingClientRect().height)||0),re=S.useRef(0),k=S.useCallback(T=>{s&&T===he.length-1&&(ne.current=new Date)},[]),{activeSnapPoint:me,activeSnapPointIndex:pe,setActiveSnapPoint:Be,onRelease:mt,snapPointsOffset:he,onDrag:ye,shouldFade:sn,getPercentageDragged:Po}=Ws({snapPoints:s,activeSnapPointProp:m,setActiveSnapPointProp:p,drawerRef:A,fadeFromIndex:u,overlayRef:G,onSnapPointChange:k});Ds({isDisabled:!b||F||!d||ce||!w});let{restorePositionSetting:Ro}=ks({isOpen:b,modal:d,nested:i,hasBeenOpened:w});function We(){return(window.innerWidth-jn)/window.innerWidth}function xo(T){var O;!v&&!s||F||A.current&&!A.current.contains(T.target)||(ve.current=((O=A.current)==null?void 0:O.getBoundingClientRect().height)||0,V(!0),z.current=new Date,ho()&&window.addEventListener("touchend",()=>x.current=!1,{once:!0}),T.target.setPointerCapture(T.pointerId),Y.current=T.clientY)}function un(T,O){var j;let U=T,K=new Date,W=(j=window.getSelection())==null?void 0:j.toString(),ee=A.current?tt(A.current):null;if(ne.current&&K.getTime()-ne.current.getTime()<500)return!1;if(ee>0)return!0;if(W&&W.length>0)return!1;if(B.current&&K.getTime()-B.current.getTime()U.clientHeight){if(U.getAttribute("role")==="dialog")return!0;if(O&&U!==document.body&&!ee&&ee>=0)return B.current=new Date,!1;if(U.scrollTop!==0)return B.current=new Date,!1}U=U.parentNode}return!0}function Ao(T){if(F){let O=Y.current-T.clientY,j=O>0;if(s&&pe===0&&!v||!x.current&&!un(T.target,j))return;if(x.current=!0,L(A.current,{transition:"none"}),L(G.current,{transition:"none"}),s&&ye({draggedDistance:O}),O>0&&!s){let se=js(O);L(A.current,{transform:`translate3d(0, ${Math.min(se*-1,0)}px, 0)`});return}let U=Math.abs(O),K=document.querySelector("[vaul-drawer-wrapper]"),W=U/ve.current,ee=Po(U,j);ee!==null&&(W=ee);let pt=1-W;if((sn||u&&pe===u-1)&&(a?.(T,W),L(G.current,{opacity:`${pt}`,transition:"none"},!0)),K&&G.current&&r){let se=Math.min(We()+W*(1-We()),1),He=8-W*8,Do=Math.max(0,14-W*14);L(K,{borderRadius:`${He}px`,transform:`scale(${se}) translate3d(0, ${Do}px, 0)`,transition:"none"},!0)}s||L(A.current,{transform:`translate3d(0, ${U}px, 0)`})}}S.useEffect(()=>{if(document.querySelector("[vaul-drawer-wrapper]"))return()=>{Ke(!1),Ro()}},[]),S.useEffect(()=>{var T;function O(){var j;if(!A.current)return;let U=document.activeElement;if(ct(U)||X.current){let K=((j=window.visualViewport)==null?void 0:j.height)||0,W=window.innerHeight-K,ee=A.current.getBoundingClientRect().height||0;re.current||(re.current=ee);let pt=A.current.getBoundingClientRect().top;if(Math.abs(ue.current-W)>60&&(X.current=!X.current),s&&s.length>0&&he&&pe){let se=he[pe]||0;W+=se}if(ue.current=W,ee>K||X.current){let se=A.current.getBoundingClientRect().height,He=se;se>K&&(He=K-jn),h?A.current.style.height=`${se-Math.max(W,0)}px`:A.current.style.height=`${Math.max(He,K-pt)}px`}else A.current.style.height=`${re.current}px`;s&&s.length>0&&!X.current?A.current.style.bottom="0px":A.current.style.bottom=`${Math.max(W,0)}px`}}return(T=window.visualViewport)==null||T.addEventListener("resize",O),()=>{var j;return(j=window.visualViewport)==null?void 0:j.removeEventListener("resize",O)}},[pe,s,he]);function we(){A.current&&(g?.(),A.current&&(L(A.current,{transform:"translate3d(0, 100%, 0)",transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`}),L(G.current,{opacity:"0",transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`}),Ke(!1)),setTimeout(()=>{R(!1),y(!1)},300),setTimeout(()=>{s&&Be(s[0])},500))}S.useEffect(()=>{if(!b&&r){let T=setTimeout(()=>{et(document.body)},200);return()=>clearTimeout(T)}},[b,r]),S.useEffect(()=>{e?(y(!0),$(!0)):we()},[e]),S.useEffect(()=>{P&&t?.(b)},[b]),S.useEffect(()=>{N(!0)},[]);function ln(){if(!A.current)return;let T=document.querySelector("[vaul-drawer-wrapper]"),O=tt(A.current);L(A.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`}),L(G.current,{transition:`opacity ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,opacity:"1"}),r&&O&&O>0&&b&&L(T,{borderRadius:`${kn}px`,overflow:"hidden",transform:`scale(${We()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top",transitionProperty:"transform, border-radius",transitionDuration:`${_.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_.EASE.join(",")})`},!0)}function To(T){if(!F||!A.current)return;x.current&&ct(T.target)&&T.target.blur(),x.current=!1,V(!1),ie.current=new Date;let O=tt(A.current);if(!un(T.target,!1)||!O||Number.isNaN(O)||z.current===null)return;let j=T.clientY,U=ie.current.getTime()-z.current.getTime(),K=Y.current-j,W=Math.abs(K)/U;if(W>.05&&(Q(!0),setTimeout(()=>{Q(!1)},200)),s){mt({draggedDistance:K,closeDrawer:we,velocity:W});return}if(K>0){ln(),c?.(T,!0);return}if(W>yo){we(),c?.(T,!1);return}let ee=Math.min(A.current.getBoundingClientRect().height||0,window.innerHeight);if(O>=ee*f){we(),c?.(T,!1);return}c?.(T,!0),ln()}S.useEffect(()=>{b&&(ne.current=new Date,Ke(!0))},[b]);function Ke(T){let O=document.querySelector("[vaul-drawer-wrapper]");!O||!r||(T?(L(document.body,{background:"black"},!0),L(O,{borderRadius:`${kn}px`,overflow:"hidden",transform:`scale(${We()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top",transitionProperty:"transform, border-radius",transitionDuration:`${_.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_.EASE.join(",")})`})):(et(O,"overflow"),et(O,"transform"),et(O,"borderRadius"),L(O,{transitionProperty:"transform, border-radius",transitionDuration:`${_.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_.EASE.join(",")})`})))}function Oo(T){let O=T?(window.innerWidth-ge)/window.innerWidth:1,j=T?-ge:0;J.current&&window.clearTimeout(J.current),L(A.current,{transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,transform:`scale(${O}) translate3d(0, ${j}px, 0)`}),!T&&A.current&&(J.current=setTimeout(()=>{L(A.current,{transition:"none",transform:`translate3d(0, ${tt(A.current)}px, 0)`})},500))}function No(T,O){if(O<0)return;let j=(window.innerWidth-ge)/window.innerWidth,U=j+O*(1-j),K=-ge+O*ge;L(A.current,{transform:`scale(${U}) translate3d(0, ${K}px, 0)`,transition:"none"})}function Mo(T,O){let j=O?(window.innerWidth-ge)/window.innerWidth:1,U=O?-ge:0;O&&L(A.current,{transition:`transform ${_.DURATION}s cubic-bezier(${_.EASE.join(",")})`,transform:`scale(${j}) translate3d(0, ${U}px, 0)`})}return S.createElement(Es,{modal:d,onOpenChange:T=>{T?($(!0),y(T)):we()},open:b},S.createElement(po.Provider,{value:{visible:M,activeSnapPoint:me,snapPoints:s,setActiveSnapPoint:Be,drawerRef:A,overlayRef:G,scaleBackground:Ke,onPress:xo,setVisible:R,onRelease:To,onDrag:Ao,dismissible:v,isOpen:b,shouldFade:sn,closeDrawer:we,onNestedDrag:No,onNestedOpenChange:Oo,onNestedRelease:Mo,keyboardIsOpen:X,modal:d,snapPointsOffset:he}},n))}var Co=S.forwardRef(function({children:e,...t},n){let{overlayRef:r,snapPoints:a,onRelease:c,shouldFade:s,isOpen:i,visible:f}=an(),l=bo(n,r),v=a&&a.length>0;return S.createElement($s,{onMouseUp:c,ref:l,"vaul-drawer-visible":f?"true":"false","vaul-overlay":"","vaul-snap-points":i&&v?"true":"false","vaul-snap-points-overlay":i&&s?"true":"false",...t})});Co.displayName="Drawer.Overlay";var So=S.forwardRef(function({children:e,onOpenAutoFocus:t,onPointerDownOutside:n,onAnimationEnd:r,style:a,...c},s){let{drawerRef:i,onPress:f,onRelease:l,onDrag:v,dismissible:u,keyboardIsOpen:m,snapPointsOffset:p,visible:h,closeDrawer:d,modal:g,setVisible:E}=an(),b=bo(s,i);return S.useEffect(()=>{E(!0)},[]),S.createElement(Cs,{onOpenAutoFocus:y=>{t?t(y):(y.preventDefault(),i.current.focus())},onPointerDown:f,onPointerDownOutside:y=>{if(!g){y.preventDefault();return}m.current&&(m.current=!1),y.preventDefault(),u&&(d(),n?.(y))},onPointerMove:v,onPointerUp:l,ref:b,style:p&&p.length>0?{"--snap-point-height":`${p[0]}px`,...a}:a,...c,"vaul-drawer":"","vaul-drawer-visible":h?"true":"false"},e)});So.displayName="Drawer.Content";function Vs({children:e,onDrag:t,onOpenChange:n,...r}){let{onNestedDrag:a,onNestedOpenChange:c,onNestedRelease:s}=an();if(!a)throw new Error("Drawer.NestedRoot must be placed in another drawer");return S.createElement($o,{nested:!0,onClose:()=>{c(!1)},onDrag:(i,f)=>{a(i,f),t?.(i,f)},onOpenChange:i=>{i&&c(i),n?.(i)},onRelease:s,...r},e)}var bu={Root:$o,NestedRoot:Vs,Content:So,Overlay:Co,Trigger:ys,Portal:ws,Close:Rs,Title:Ss,Description:Ps};export{ru as A,au as C,cu as G,su as I,bu as J,iu as L,ou as P,lu as R,vu as S,uu as a,du as b,eu as c,fu as d,mu as e,pu as f,hu as g,nu as h,Sa as i,oe as u}; diff --git a/assets/index-D_QEhDW5.js b/assets/index-D_QEhDW5.js new file mode 100644 index 00000000..a54c1db7 --- /dev/null +++ b/assets/index-D_QEhDW5.js @@ -0,0 +1,44 @@ +import{a as C,r as o}from"./index-BP8_t0zE.js";import{c as _,a as Ae,u as ut}from"./index-DD7XHAoh.js";import{c as ft}from"./index-vl_XNHfj.js";import{u as J,S as Lt,c as Yo}from"./index-Dp4tTk3o.js";import{j as x}from"./jsx-runtime-CexXSJP5.js";import{P as ee,d as Gn}from"./index-CkD-EKAR.js";import{q as Go,c as zo,o as Xo,s as Zo,l as qo,j as Qo,r as Jo,d as ea,t as ta}from"./floating-ui.react-4qK1KPOR.js";import{w as zn,r as Zt}from"./index-Cw6ikIwd.js";function Xn(e){const t=e+"CollectionProvider",[n,r]=ft(t),[a,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:g,children:l}=m,b=C.useRef(null),E=C.useRef(new Map).current;return x.jsx(a,{scope:g,itemMap:E,collectionRef:b,children:l})};s.displayName=t;const i=e+"CollectionSlot",f=C.forwardRef((m,g)=>{const{scope:l,children:b}=m,E=c(i,l),S=J(g,E.collectionRef);return x.jsx(Lt,{ref:S,children:b})});f.displayName=i;const d=e+"CollectionItemSlot",v="data-radix-collection-item",u=C.forwardRef((m,g)=>{const{scope:l,children:b,...E}=m,S=C.useRef(null),w=J(g,S),h=c(d,l);return C.useEffect(()=>(h.itemMap.set(S,{ref:S,...E}),()=>void h.itemMap.delete(S))),x.jsx(Lt,{[v]:"",ref:w,children:b})});u.displayName=d;function p(m){const g=c(e+"CollectionConsumer",m);return C.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const E=Array.from(b.querySelectorAll(`[${v}]`));return Array.from(g.itemMap.values()).sort((h,y)=>E.indexOf(h.ref.current)-E.indexOf(y.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:f,ItemSlot:u},p,r]}var na=o.createContext(void 0);function Zn(e){const t=o.useContext(na);return e||t||"ltr"}function se(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>t.current?.(...n),[])}function ra(e,t=globalThis?.document){const n=se(e);o.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var oa="DismissableLayer",Ft="dismissableLayer.update",aa="dismissableLayer.pointerDownOutside",ca="dismissableLayer.focusOutside",bn,qn=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qn=o.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:s,onDismiss:i,...f}=e,d=o.useContext(qn),[v,u]=o.useState(null),p=v?.ownerDocument??globalThis?.document,[,m]=o.useState({}),g=J(t,P=>u(P)),l=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=l.indexOf(b),S=v?l.indexOf(v):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,h=S>=E,y=ua(P=>{const $=P.target,R=[...d.branches].some(I=>I.contains($));!h||R||(a?.(P),s?.(P),P.defaultPrevented||i?.())},p),A=la(P=>{const $=P.target;[...d.branches].some(I=>I.contains($))||(c?.(P),s?.(P),P.defaultPrevented||i?.())},p);return ra(P=>{S===d.layers.size-1&&(r?.(P),!P.defaultPrevented&&i&&(P.preventDefault(),i()))},p),o.useEffect(()=>{if(v)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(bn=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(v)),d.layers.add(v),En(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=bn)}},[v,p,n,d]),o.useEffect(()=>()=>{v&&(d.layers.delete(v),d.layersWithOutsidePointerEventsDisabled.delete(v),En())},[v,d]),o.useEffect(()=>{const P=()=>m({});return document.addEventListener(Ft,P),()=>document.removeEventListener(Ft,P)},[]),x.jsx(ee.div,{...f,ref:g,style:{pointerEvents:w?h?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,A.onFocusCapture),onBlurCapture:_(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,y.onPointerDownCapture)})});Qn.displayName=oa;var ia="DismissableLayerBranch",sa=o.forwardRef((e,t)=>{const n=o.useContext(qn),r=o.useRef(null),a=J(t,r);return o.useEffect(()=>{const c=r.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),x.jsx(ee.div,{...e,ref:a})});sa.displayName=ia;function ua(e,t=globalThis?.document){const n=se(e),r=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const c=i=>{if(i.target&&!r.current){let f=function(){Jn(aa,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",c),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function la(e,t=globalThis?.document){const n=se(e),r=o.useRef(!1);return o.useEffect(()=>{const a=c=>{c.target&&!r.current&&Jn(ca,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function En(){const e=new CustomEvent(Ft);document.dispatchEvent(e)}function Jn(e,t,n,{discrete:r}){const a=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Gn(a,c):a.dispatchEvent(c)}var wt=0;function da(){o.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wn()),document.body.insertAdjacentElement("beforeend",e[1]??wn()),wt++,()=>{wt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wt--}},[])}function wn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var yt="focusScope.autoFocusOnMount",$t="focusScope.autoFocusOnUnmount",yn={bubbles:!1,cancelable:!0},fa="FocusScope",er=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...s}=e,[i,f]=o.useState(null),d=se(a),v=se(c),u=o.useRef(null),p=J(t,l=>f(l)),m=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let l=function(w){if(m.paused||!i)return;const h=w.target;i.contains(h)?u.current=h:pe(u.current,{select:!0})},b=function(w){if(m.paused||!i)return;const h=w.relatedTarget;h!==null&&(i.contains(h)||pe(u.current,{select:!0}))},E=function(w){if(document.activeElement===document.body)for(const y of w)y.removedNodes.length>0&&pe(i)};document.addEventListener("focusin",l),document.addEventListener("focusout",b);const S=new MutationObserver(E);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",b),S.disconnect()}}},[r,i,m.paused]),o.useEffect(()=>{if(i){Cn.add(m);const l=document.activeElement;if(!i.contains(l)){const E=new CustomEvent(yt,yn);i.addEventListener(yt,d),i.dispatchEvent(E),E.defaultPrevented||(va(ba(tr(i)),{select:!0}),document.activeElement===l&&pe(i))}return()=>{i.removeEventListener(yt,d),setTimeout(()=>{const E=new CustomEvent($t,yn);i.addEventListener($t,v),i.dispatchEvent(E),E.defaultPrevented||pe(l??document.body,{select:!0}),i.removeEventListener($t,v),Cn.remove(m)},0)}}},[i,d,v,m]);const g=o.useCallback(l=>{if(!n&&!r||m.paused)return;const b=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,E=document.activeElement;if(b&&E){const S=l.currentTarget,[w,h]=ma(S);w&&h?!l.shiftKey&&E===h?(l.preventDefault(),n&&pe(w,{select:!0})):l.shiftKey&&E===w&&(l.preventDefault(),n&&pe(h,{select:!0})):E===S&&l.preventDefault()}},[n,r,m.paused]);return x.jsx(ee.div,{tabIndex:-1,...s,ref:p,onKeyDown:g})});er.displayName=fa;function va(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pe(r,{select:t}),document.activeElement!==n)return}function ma(e){const t=tr(e),n=$n(t,e),r=$n(t.reverse(),e);return[n,r]}function tr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $n(e,t){for(const n of e)if(!pa(n,{upTo:t}))return n}function pa(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ha(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ha(e)&&t&&e.select()}}var Cn=ga();function ga(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Sn(e,t),e.unshift(t)},remove(t){e=Sn(e,t),e[0]?.resume()}}}function Sn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ba(e){return e.filter(t=>t.tagName!=="A")}var Ea="Arrow",nr=o.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...c}=e;return x.jsx(ee.svg,{...c,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});nr.displayName=Ea;var wa=nr;function ya(e){const[t,n]=o.useState(void 0);return Ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const c=a[0];let s,i;if("borderBoxSize"in c){const f=c.borderBoxSize,d=Array.isArray(f)?f[0]:f;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var qt="Popper",[rr,or]=ft(qt),[$a,ar]=rr(qt),cr=e=>{const{__scopePopper:t,children:n}=e,[r,a]=o.useState(null);return x.jsx($a,{scope:t,anchor:r,onAnchorChange:a,children:n})};cr.displayName=qt;var ir="PopperAnchor",sr=o.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,c=ar(ir,n),s=o.useRef(null),i=J(t,s);return o.useEffect(()=>{c.onAnchorChange(r?.current||s.current)}),r?null:x.jsx(ee.div,{...a,ref:i})});sr.displayName=ir;var Qt="PopperContent",[Ca,Sa]=rr(Qt),ur=o.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:c="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:v=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...l}=e,b=ar(Qt,n),[E,S]=o.useState(null),w=J(t,W=>S(W)),[h,y]=o.useState(null),A=ya(h),P=A?.width??0,$=A?.height??0,R=r+(c!=="center"?"-"+c:""),I=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},B=Array.isArray(d)?d:[d],H=B.length>0,k={padding:I,boundary:B.filter(xa),altBoundary:H},{refs:z,floatingStyles:oe,placement:G,isPositioned:le,middlewareData:q}=Go({strategy:"fixed",placement:R,whileElementsMounted:(...W)=>zo(...W,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[Xo({mainAxis:a+$,alignmentAxis:s}),f&&Zo({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?qo():void 0,...k}),f&&Qo({...k}),Jo({...k,apply:({elements:W,rects:te,availableWidth:Ge,availableHeight:D})=>{const{width:ze,height:De}=te.reference,ye=W.floating.style;ye.setProperty("--radix-popper-available-width",`${Ge}px`),ye.setProperty("--radix-popper-available-height",`${D}px`),ye.setProperty("--radix-popper-anchor-width",`${ze}px`),ye.setProperty("--radix-popper-anchor-height",`${De}px`)}}),h&&ea({element:h,padding:i}),Pa({arrowWidth:P,arrowHeight:$}),p&&ta({strategy:"referenceHidden",...k})]}),[T,X]=fr(G),Q=se(g);Ae(()=>{le&&Q?.()},[le,Q]);const ae=q.arrow?.x,ve=q.arrow?.y,ce=q.arrow?.centerOffset!==0,[de,ie]=o.useState();return Ae(()=>{E&&ie(window.getComputedStyle(E).zIndex)},[E]),x.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:le?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Ca,{scope:n,placedSide:T,onArrowChange:y,arrowX:ae,arrowY:ve,shouldHideArrow:ce,children:x.jsx(ee.div,{"data-side":T,"data-align":X,...l,ref:w,style:{...l.style,animation:le?void 0:"none"}})})})});ur.displayName=Qt;var lr="PopperArrow",Ra={top:"bottom",right:"left",bottom:"top",left:"right"},dr=o.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,c=Sa(lr,r),s=Ra[c.placedSide];return x.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:x.jsx(wa,{...a,ref:n,style:{...a.style,display:"block"}})})});dr.displayName=lr;function xa(e){return e!==null}var Pa=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[d,v]=fr(n),u={start:"0%",center:"50%",end:"100%"}[v],p=(a.arrow?.x??0)+i/2,m=(a.arrow?.y??0)+f/2;let g="",l="";return d==="bottom"?(g=s?u:`${p}px`,l=`${-f}px`):d==="top"?(g=s?u:`${p}px`,l=`${r.floating.height+f}px`):d==="right"?(g=`${-f}px`,l=s?u:`${m}px`):d==="left"&&(g=`${r.floating.width+f}px`,l=s?u:`${m}px`),{data:{x:g,y:l}}}});function fr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ta=cr,Oa=sr,Aa=ur,Da=dr,Ma="Portal",vr=o.forwardRef((e,t)=>{const{container:n,...r}=e,[a,c]=o.useState(!1);Ae(()=>c(!0),[]);const s=n||a&&globalThis?.document?.body;return s?zn.createPortal(x.jsx(ee.div,{...r,ref:t}),s):null});vr.displayName=Ma;function Na(e,t){return o.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=Ia(t),a=typeof n=="function"?n({present:r.isPresent}):o.Children.only(n),c=J(r.ref,_a(a));return typeof n=="function"||r.isPresent?o.cloneElement(a,{ref:c}):null};He.displayName="Presence";function Ia(e){const[t,n]=o.useState(),r=o.useRef({}),a=o.useRef(e),c=o.useRef("none"),s=e?"mounted":"unmounted",[i,f]=Na(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect(()=>{const d=Qe(r.current);c.current=i==="mounted"?d:"none"},[i]),Ae(()=>{const d=r.current,v=a.current;if(v!==e){const p=c.current,m=Qe(d);e?f("MOUNT"):m==="none"||d?.display==="none"?f("UNMOUNT"):f(v&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Ae(()=>{if(t){const d=u=>{const m=Qe(r.current).includes(u.animationName);u.target===t&&m&&Zt.flushSync(()=>f("ANIMATION_END"))},v=u=>{u.target===t&&(c.current=Qe(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:o.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function Qe(e){return e?.animationName||"none"}function _a(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function La({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Fa({defaultProp:t,onChange:n}),c=e!==void 0,s=c?e:r,i=se(n),f=o.useCallback(d=>{if(c){const u=typeof d=="function"?d(e):d;u!==e&&i(u)}else a(d)},[c,e,a,i]);return[s,f]}function Fa({defaultProp:e,onChange:t}){const n=o.useState(e),[r]=n,a=o.useRef(r),c=se(t);return o.useEffect(()=>{a.current!==r&&(c(r),a.current=r)},[r,a,c]),n}var Ct="rovingFocusGroup.onEntryFocus",ka={bubbles:!1,cancelable:!0},vt="RovingFocusGroup",[kt,mr,Ua]=Xn(vt),[ja,pr]=ft(vt,[Ua]),[Ba,Wa]=ja(vt),hr=o.forwardRef((e,t)=>x.jsx(kt.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(kt.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Ha,{...e,ref:t})})}));hr.displayName=vt;var Ha=o.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:c,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:v=!1,...u}=e,p=o.useRef(null),m=J(t,p),g=Zn(c),[l=null,b]=La({prop:s,defaultProp:i,onChange:f}),[E,S]=o.useState(!1),w=se(d),h=mr(n),y=o.useRef(!1),[A,P]=o.useState(0);return o.useEffect(()=>{const $=p.current;if($)return $.addEventListener(Ct,w),()=>$.removeEventListener(Ct,w)},[w]),x.jsx(Ba,{scope:n,orientation:r,dir:g,loop:a,currentTabStopId:l,onItemFocus:o.useCallback($=>b($),[b]),onItemShiftTab:o.useCallback(()=>S(!0),[]),onFocusableItemAdd:o.useCallback(()=>P($=>$+1),[]),onFocusableItemRemove:o.useCallback(()=>P($=>$-1),[]),children:x.jsx(ee.div,{tabIndex:E||A===0?-1:0,"data-orientation":r,...u,ref:m,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{y.current=!0}),onFocus:_(e.onFocus,$=>{const R=!y.current;if($.target===$.currentTarget&&R&&!E){const I=new CustomEvent(Ct,ka);if($.currentTarget.dispatchEvent(I),!I.defaultPrevented){const B=h().filter(G=>G.focusable),H=B.find(G=>G.active),k=B.find(G=>G.id===l),oe=[H,k,...B].filter(Boolean).map(G=>G.ref.current);Er(oe,v)}}y.current=!1}),onBlur:_(e.onBlur,()=>S(!1))})})}),gr="RovingFocusGroupItem",br=o.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:c,...s}=e,i=ut(),f=c||i,d=Wa(gr,n),v=d.currentTabStopId===f,u=mr(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=d;return o.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),x.jsx(kt.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:x.jsx(ee.span,{tabIndex:v?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:_(e.onMouseDown,g=>{r?d.onItemFocus(f):g.preventDefault()}),onFocus:_(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:_(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const l=Ya(g,d.orientation,d.dir);if(l!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let E=u().filter(S=>S.focusable).map(S=>S.ref.current);if(l==="last")E.reverse();else if(l==="prev"||l==="next"){l==="prev"&&E.reverse();const S=E.indexOf(g.currentTarget);E=d.loop?Ga(E,S+1):E.slice(S+1)}setTimeout(()=>Er(E))}})})})});br.displayName=gr;var Va={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ka(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ya(e,t,n){const r=Ka(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Va[r]}function Er(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ga(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var za=hr,Xa=br,Za=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Se=new WeakMap,Je=new WeakMap,et={},St=0,wr=function(e){return e&&(e.host||wr(e.parentNode))},qa=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wr(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qa=function(e,t,n,r){var a=qa(t,Array.isArray(e)?e:[e]);et[n]||(et[n]=new WeakMap);var c=et[n],s=[],i=new Set,f=new Set(a),d=function(u){!u||i.has(u)||(i.add(u),d(u.parentNode))};a.forEach(d);var v=function(u){!u||f.has(u)||Array.prototype.forEach.call(u.children,function(p){if(i.has(p))v(p);else try{var m=p.getAttribute(r),g=m!==null&&m!=="false",l=(Se.get(p)||0)+1,b=(c.get(p)||0)+1;Se.set(p,l),c.set(p,b),s.push(p),l===1&&g&&Je.set(p,!0),b===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",p,E)}})};return v(t),i.clear(),St++,function(){s.forEach(function(u){var p=Se.get(u)-1,m=c.get(u)-1;Se.set(u,p),c.set(u,m),p||(Je.has(u)||u.removeAttribute(r),Je.delete(u)),m||u.removeAttribute(n)}),St--,St||(Se=new WeakMap,Se=new WeakMap,Je=new WeakMap,et={})}},yr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Za(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Qa(r,a,n,"aria-hidden")):function(){return null}},Z=function(){return Z=Object.assign||function(t){for(var n,r=1,a=arguments.length;r"u")return dc;var t=fc(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mc=en(),Oe="data-scroll-locked",pc=function(e,t,n,r){var a=e.left,c=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),` + .`.concat(Ja,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(i,"px ").concat(r,`; + } + body[`).concat(Oe,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(a,`px; + padding-top: `).concat(c,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(i,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Fe,` { + right: `).concat(i,"px ").concat(r,`; + } + + .`).concat(ke,` { + margin-right: `).concat(i,"px ").concat(r,`; + } + + .`).concat(Fe," .").concat(Fe,` { + right: 0 `).concat(r,`; + } + + .`).concat(ke," .").concat(ke,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(Oe,`] { + `).concat(ec,": ").concat(i,`px; + } +`)},xn=function(){var e=parseInt(document.body.getAttribute(Oe)||"0",10);return isFinite(e)?e:0},hc=function(){o.useEffect(function(){return document.body.setAttribute(Oe,(xn()+1).toString()),function(){var e=xn()-1;e<=0?document.body.removeAttribute(Oe):document.body.setAttribute(Oe,e.toString())}},[])},Tr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;hc();var c=o.useMemo(function(){return vc(a)},[a]);return o.createElement(mc,{styles:pc(c,!t,a,n?"":"!important")})},Ut=!1;if(typeof window<"u")try{var tt=Object.defineProperty({},"passive",{get:function(){return Ut=!0,!0}});window.addEventListener("test",tt,tt),window.removeEventListener("test",tt,tt)}catch{Ut=!1}var Re=Ut?{passive:!1}:!1,gc=function(e){return e.tagName==="TEXTAREA"},Or=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!gc(e)&&n[t]==="visible")},bc=function(e){return Or(e,"overflowY")},Ec=function(e){return Or(e,"overflowX")},Pn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Ar(e,r);if(a){var c=Dr(e,r),s=c[1],i=c[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wc=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},yc=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ar=function(e,t){return e==="v"?bc(t):Ec(t)},Dr=function(e,t){return e==="v"?wc(t):yc(t)},$c=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cc=function(e,t,n,r,a){var c=$c(e,window.getComputedStyle(t).direction),s=c*r,i=n.target,f=t.contains(i),d=!1,v=s>0,u=0,p=0;do{var m=Dr(e,i),g=m[0],l=m[1],b=m[2],E=l-b-c*g;(g||E)&&Ar(e,i)&&(u+=E,p+=g),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!f&&i!==document.body||f&&(t.contains(i)||t===i));return(v&&(Math.abs(u)<1||!a)||!v&&(Math.abs(p)<1||!a))&&(d=!0),d},nt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tn=function(e){return[e.deltaX,e.deltaY]},On=function(e){return e&&"current"in e?e.current:e},Sc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Rc=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},xc=0,xe=[];function Pc(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(xc++)[0],c=o.useState(en)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=$r([e.lockRef.current],(e.shards||[]).map(On),!0).filter(Boolean);return l.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=o.useCallback(function(l,b){if("touches"in l&&l.touches.length===2)return!s.current.allowPinchZoom;var E=nt(l),S=n.current,w="deltaX"in l?l.deltaX:S[0]-E[0],h="deltaY"in l?l.deltaY:S[1]-E[1],y,A=l.target,P=Math.abs(w)>Math.abs(h)?"h":"v";if("touches"in l&&P==="h"&&A.type==="range")return!1;var $=Pn(P,A);if(!$)return!0;if($?y=P:(y=P==="v"?"h":"v",$=Pn(P,A)),!$)return!1;if(!r.current&&"changedTouches"in l&&(w||h)&&(r.current=y),!y)return!0;var R=r.current||y;return Cc(R,b,l,R==="h"?w:h,!0)},[]),f=o.useCallback(function(l){var b=l;if(!(!xe.length||xe[xe.length-1]!==c)){var E="deltaY"in b?Tn(b):nt(b),S=t.current.filter(function(y){return y.name===b.type&&(y.target===b.target||b.target===y.shadowParent)&&Sc(y.delta,E)})[0];if(S&&S.should){b.cancelable&&b.preventDefault();return}if(!S){var w=(s.current.shards||[]).map(On).filter(Boolean).filter(function(y){return y.contains(b.target)}),h=w.length>0?i(b,w[0]):!s.current.noIsolation;h&&b.cancelable&&b.preventDefault()}}},[]),d=o.useCallback(function(l,b,E,S){var w={name:l,delta:b,target:E,should:S,shadowParent:Tc(E)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(h){return h!==w})},1)},[]),v=o.useCallback(function(l){n.current=nt(l),r.current=void 0},[]),u=o.useCallback(function(l){d(l.type,Tn(l),l.target,i(l,e.lockRef.current))},[]),p=o.useCallback(function(l){d(l.type,nt(l),l.target,i(l,e.lockRef.current))},[]);o.useEffect(function(){return xe.push(c),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",f,Re),document.addEventListener("touchmove",f,Re),document.addEventListener("touchstart",v,Re),function(){xe=xe.filter(function(l){return l!==c}),document.removeEventListener("wheel",f,Re),document.removeEventListener("touchmove",f,Re),document.removeEventListener("touchstart",v,Re)}},[]);var m=e.removeScrollBar,g=e.inert;return o.createElement(o.Fragment,null,g?o.createElement(c,{styles:Rc(a)}):null,m?o.createElement(Tr,{gapMode:e.gapMode}):null)}function Tc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Oc=xr(Pr,Pc);var Mr=o.forwardRef(function(e,t){return o.createElement(mt,Z({},e,{ref:t,sideCar:Oc}))});Mr.classNames=mt.classNames;var jt=["Enter"," "],Ac=["ArrowDown","PageUp","Home"],Nr=["ArrowUp","PageDown","End"],Dc=[...Ac,...Nr],Mc={ltr:[...jt,"ArrowRight"],rtl:[...jt,"ArrowLeft"]},Nc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ve="Menu",[je,Ic,_c]=Xn(Ve),[Ee,mu]=ft(Ve,[_c,or,pr]),pt=or(),Ir=pr(),[Lc,we]=Ee(Ve),[Fc,Ke]=Ee(Ve),_r=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:c,modal:s=!0}=e,i=pt(t),[f,d]=o.useState(null),v=o.useRef(!1),u=se(c),p=Zn(a);return o.useEffect(()=>{const m=()=>{v.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>v.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),x.jsx(Ta,{...i,children:x.jsx(Lc,{scope:t,open:n,onOpenChange:u,content:f,onContentChange:d,children:x.jsx(Fc,{scope:t,onClose:o.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:v,dir:p,modal:s,children:r})})})};_r.displayName=Ve;var kc="MenuAnchor",tn=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=pt(n);return x.jsx(Oa,{...a,...r,ref:t})});tn.displayName=kc;var nn="MenuPortal",[Uc,Lr]=Ee(nn,{forceMount:void 0}),Fr=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,c=we(nn,t);return x.jsx(Uc,{scope:t,forceMount:n,children:x.jsx(He,{present:n||c.open,children:x.jsx(vr,{asChild:!0,container:a,children:r})})})};Fr.displayName=nn;var re="MenuContent",[jc,rn]=Ee(re),kr=o.forwardRef((e,t)=>{const n=Lr(re,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,c=we(re,e.__scopeMenu),s=Ke(re,e.__scopeMenu);return x.jsx(je.Provider,{scope:e.__scopeMenu,children:x.jsx(He,{present:r||c.open,children:x.jsx(je.Slot,{scope:e.__scopeMenu,children:s.modal?x.jsx(Bc,{...a,ref:t}):x.jsx(Wc,{...a,ref:t})})})})}),Bc=o.forwardRef((e,t)=>{const n=we(re,e.__scopeMenu),r=o.useRef(null),a=J(t,r);return o.useEffect(()=>{const c=r.current;if(c)return yr(c)},[]),x.jsx(on,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Wc=o.forwardRef((e,t)=>{const n=we(re,e.__scopeMenu);return x.jsx(on,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),on=o.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:v,onFocusOutside:u,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...l}=e,b=we(re,n),E=Ke(re,n),S=pt(n),w=Ir(n),h=Ic(n),[y,A]=o.useState(null),P=o.useRef(null),$=J(t,P,b.onContentChange),R=o.useRef(0),I=o.useRef(""),B=o.useRef(0),H=o.useRef(null),k=o.useRef("right"),z=o.useRef(0),oe=g?Mr:o.Fragment,G=g?{as:Lt,allowPinchZoom:!0}:void 0,le=T=>{const X=I.current+T,Q=h().filter(W=>!W.disabled),ae=document.activeElement,ve=Q.find(W=>W.ref.current===ae)?.textValue,ce=Q.map(W=>W.textValue),de=ei(ce,X,ve),ie=Q.find(W=>W.textValue===de)?.ref.current;(function W(te){I.current=te,window.clearTimeout(R.current),te!==""&&(R.current=window.setTimeout(()=>W(""),1e3))})(X),ie&&setTimeout(()=>ie.focus())};o.useEffect(()=>()=>window.clearTimeout(R.current),[]),da();const q=o.useCallback(T=>k.current===H.current?.side&&ni(T,H.current?.area),[]);return x.jsx(jc,{scope:n,searchRef:I,onItemEnter:o.useCallback(T=>{q(T)&&T.preventDefault()},[q]),onItemLeave:o.useCallback(T=>{q(T)||(P.current?.focus(),A(null))},[q]),onTriggerLeave:o.useCallback(T=>{q(T)&&T.preventDefault()},[q]),pointerGraceTimerRef:B,onPointerGraceIntentChange:o.useCallback(T=>{H.current=T},[]),children:x.jsx(oe,{...G,children:x.jsx(er,{asChild:!0,trapped:a,onMountAutoFocus:_(c,T=>{T.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:x.jsx(Qn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:v,onFocusOutside:u,onInteractOutside:p,onDismiss:m,children:x.jsx(za,{asChild:!0,...w,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:A,onEntryFocus:_(f,T=>{E.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(Aa,{role:"menu","aria-orientation":"vertical","data-state":eo(b.open),"data-radix-menu-content":"",dir:E.dir,...S,...l,ref:$,style:{outline:"none",...l.style},onKeyDown:_(l.onKeyDown,T=>{const Q=T.target.closest("[data-radix-menu-content]")===T.currentTarget,ae=T.ctrlKey||T.altKey||T.metaKey,ve=T.key.length===1;Q&&(T.key==="Tab"&&T.preventDefault(),!ae&&ve&&le(T.key));const ce=P.current;if(T.target!==ce||!Dc.includes(T.key))return;T.preventDefault();const ie=h().filter(W=>!W.disabled).map(W=>W.ref.current);Nr.includes(T.key)&&ie.reverse(),Qc(ie)}),onBlur:_(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(R.current),I.current="")}),onPointerMove:_(e.onPointerMove,Be(T=>{const X=T.target,Q=z.current!==T.clientX;if(T.currentTarget.contains(X)&&Q){const ae=T.clientX>z.current?"right":"left";k.current=ae,z.current=T.clientX}}))})})})})})})});kr.displayName=re;var Hc="MenuGroup",an=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(ee.div,{role:"group",...r,ref:t})});an.displayName=Hc;var Vc="MenuLabel",Ur=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(ee.div,{...r,ref:t})});Ur.displayName=Vc;var lt="MenuItem",An="menu.itemSelect",ht=o.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,c=o.useRef(null),s=Ke(lt,e.__scopeMenu),i=rn(lt,e.__scopeMenu),f=J(t,c),d=o.useRef(!1),v=()=>{const u=c.current;if(!n&&u){const p=new CustomEvent(An,{bubbles:!0,cancelable:!0});u.addEventListener(An,m=>r?.(m),{once:!0}),Gn(u,p),p.defaultPrevented?d.current=!1:s.onClose()}};return x.jsx(jr,{...a,ref:f,disabled:n,onClick:_(e.onClick,v),onPointerDown:u=>{e.onPointerDown?.(u),d.current=!0},onPointerUp:_(e.onPointerUp,u=>{d.current||u.currentTarget?.click()}),onKeyDown:_(e.onKeyDown,u=>{const p=i.searchRef.current!=="";n||p&&u.key===" "||jt.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});ht.displayName=lt;var jr=o.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...c}=e,s=rn(lt,n),i=Ir(n),f=o.useRef(null),d=J(t,f),[v,u]=o.useState(!1),[p,m]=o.useState("");return o.useEffect(()=>{const g=f.current;g&&m((g.textContent??"").trim())},[c.children]),x.jsx(je.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:x.jsx(Xa,{asChild:!0,...i,focusable:!r,children:x.jsx(ee.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:d,onPointerMove:_(e.onPointerMove,Be(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,Be(g=>s.onItemLeave(g))),onFocus:_(e.onFocus,()=>u(!0)),onBlur:_(e.onBlur,()=>u(!1))})})})}),Kc="MenuCheckboxItem",Br=o.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(Yr,{scope:e.__scopeMenu,checked:n,children:x.jsx(ht,{role:"menuitemcheckbox","aria-checked":dt(n)?"mixed":n,...a,ref:t,"data-state":sn(n),onSelect:_(a.onSelect,()=>r?.(dt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Br.displayName=Kc;var Wr="MenuRadioGroup",[Yc,Gc]=Ee(Wr,{value:void 0,onValueChange:()=>{}}),Hr=o.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,c=se(r);return x.jsx(Yc,{scope:e.__scopeMenu,value:n,onValueChange:c,children:x.jsx(an,{...a,ref:t})})});Hr.displayName=Wr;var Vr="MenuRadioItem",Kr=o.forwardRef((e,t)=>{const{value:n,...r}=e,a=Gc(Vr,e.__scopeMenu),c=n===a.value;return x.jsx(Yr,{scope:e.__scopeMenu,checked:c,children:x.jsx(ht,{role:"menuitemradio","aria-checked":c,...r,ref:t,"data-state":sn(c),onSelect:_(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Kr.displayName=Vr;var cn="MenuItemIndicator",[Yr,zc]=Ee(cn,{checked:!1}),Gr=o.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,c=zc(cn,n);return x.jsx(He,{present:r||dt(c.checked)||c.checked===!0,children:x.jsx(ee.span,{...a,ref:t,"data-state":sn(c.checked)})})});Gr.displayName=cn;var Xc="MenuSeparator",zr=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});zr.displayName=Xc;var Zc="MenuArrow",Xr=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=pt(n);return x.jsx(Da,{...a,...r,ref:t})});Xr.displayName=Zc;var qc="MenuSub",[pu,Zr]=Ee(qc),Le="MenuSubTrigger",qr=o.forwardRef((e,t)=>{const n=we(Le,e.__scopeMenu),r=Ke(Le,e.__scopeMenu),a=Zr(Le,e.__scopeMenu),c=rn(Le,e.__scopeMenu),s=o.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:f}=c,d={__scopeMenu:e.__scopeMenu},v=o.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return o.useEffect(()=>v,[v]),o.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),f(null)}},[i,f]),x.jsx(tn,{asChild:!0,...d,children:x.jsx(jr,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":eo(n.open),...e,ref:Yo(t,a.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,Be(u=>{c.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(c.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),v()},100))})),onPointerLeave:_(e.onPointerLeave,Be(u=>{v();const p=n.content?.getBoundingClientRect();if(p){const m=n.content?.dataset.side,g=m==="right",l=g?-5:5,b=p[g?"left":"right"],E=p[g?"right":"left"];c.onPointerGraceIntentChange({area:[{x:u.clientX+l,y:u.clientY},{x:b,y:p.top},{x:E,y:p.top},{x:E,y:p.bottom},{x:b,y:p.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(u),u.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,u=>{const p=c.searchRef.current!=="";e.disabled||p&&u.key===" "||Mc[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});qr.displayName=Le;var Qr="MenuSubContent",Jr=o.forwardRef((e,t)=>{const n=Lr(re,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,c=we(re,e.__scopeMenu),s=Ke(re,e.__scopeMenu),i=Zr(Qr,e.__scopeMenu),f=o.useRef(null),d=J(t,f);return x.jsx(je.Provider,{scope:e.__scopeMenu,children:x.jsx(He,{present:r||c.open,children:x.jsx(je.Slot,{scope:e.__scopeMenu,children:x.jsx(on,{id:i.contentId,"aria-labelledby":i.triggerId,...a,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{s.isUsingKeyboardRef.current&&f.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:_(e.onFocusOutside,v=>{v.target!==i.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,v=>{s.onClose(),v.preventDefault()}),onKeyDown:_(e.onKeyDown,v=>{const u=v.currentTarget.contains(v.target),p=Nc[s.dir].includes(v.key);u&&p&&(c.onOpenChange(!1),i.trigger?.focus(),v.preventDefault())})})})})})});Jr.displayName=Qr;function eo(e){return e?"open":"closed"}function dt(e){return e==="indeterminate"}function sn(e){return dt(e)?"indeterminate":e?"checked":"unchecked"}function Qc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Jc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ei(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let s=Jc(e,Math.max(c,0));a.length===1&&(s=s.filter(d=>d!==n));const f=s.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function ti(e,t){const{x:n,y:r}=e;let a=!1;for(let c=0,s=t.length-1;cr!=v>r&&n<(d-i)*(r-f)/(v-f)+i&&(a=!a)}return a}function ni(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ti(n,t)}function Be(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hu=_r,gu=tn,bu=Fr,Eu=kr,wu=an,yu=Ur,$u=ht,Cu=Br,Su=Hr,Ru=Kr,xu=Gr,Pu=zr,Tu=Xr,Ou=qr,Au=Jr;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>ri(n,t))}function un(...e){return o.useCallback(to(...e),e)}function oi(e,t=[]){let n=[];function r(c,s){const i=o.createContext(s),f=n.length;n=[...n,s];function d(u){const{scope:p,children:m,...g}=u,l=p?.[e][f]||i,b=o.useMemo(()=>g,Object.values(g));return o.createElement(l.Provider,{value:b},m)}function v(u,p){const m=p?.[e][f]||i,g=o.useContext(m);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${c}\``)}return d.displayName=c+"Provider",[d,v]}const a=()=>{const c=n.map(s=>o.createContext(s));return function(i){const f=i?.[e]||c;return o.useMemo(()=>({[`__scope${e}`]:{...i,[e]:f}}),[i,f])}};return a.scopeName=e,[r,ai(a,...t)]}function ai(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const s=r.reduce((i,{useScope:f,scopeName:d})=>{const u=f(c)[`__scope${d}`];return{...i,...u}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function no(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ci({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=ii({defaultProp:t,onChange:n}),c=e!==void 0,s=c?e:r,i=no(n),f=o.useCallback(d=>{if(c){const u=typeof d=="function"?d(e):d;u!==e&&i(u)}else a(d)},[c,e,a,i]);return[s,f]}function ii({defaultProp:e,onChange:t}){const n=o.useState(e),[r]=n,a=o.useRef(r),c=no(t);return o.useEffect(()=>{a.current!==r&&(c(r),a.current=r)},[r,a,c]),n}function Tt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function si(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ro(...e){return t=>e.forEach(n=>si(n,t))}function ui(...e){return o.useCallback(ro(...e),e)}const oo=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(di);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(Bt,L({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(Bt,L({},r,{ref:t}),n)});oo.displayName="Slot";const Bt=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...fi(r,n.props),ref:t?ro(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});Bt.displayName="SlotClone";const li=({children:e})=>o.createElement(o.Fragment,null,e);function di(e){return o.isValidElement(e)&&e.type===li}function fi(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const vi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],mi=vi.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?oo:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,L({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pi(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}function ao(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function hi(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function gi(e,t=globalThis?.document){const n=hi(e);o.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Wt="dismissableLayer.update",bi="dismissableLayer.pointerDownOutside",Ei="dismissableLayer.focusOutside";let Dn;const wi=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yi=o.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:s,onInteractOutside:i,onDismiss:f,...d}=e,v=o.useContext(wi),[u,p]=o.useState(null),m=(n=u?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,g]=o.useState({}),l=ui(t,$=>p($)),b=Array.from(v.layers),[E]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(E),w=u?b.indexOf(u):-1,h=v.layersWithOutsidePointerEventsDisabled.size>0,y=w>=S,A=$i($=>{const R=$.target,I=[...v.branches].some(B=>B.contains(R));!y||I||(c?.($),i?.($),$.defaultPrevented||f?.())},m),P=Ci($=>{const R=$.target;[...v.branches].some(B=>B.contains(R))||(s?.($),i?.($),$.defaultPrevented||f?.())},m);return gi($=>{w===v.layers.size-1&&(a?.($),!$.defaultPrevented&&f&&($.preventDefault(),f()))},m),o.useEffect(()=>{if(u)return r&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Dn=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(u)),v.layers.add(u),Mn(),()=>{r&&v.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Dn)}},[u,m,r,v]),o.useEffect(()=>()=>{u&&(v.layers.delete(u),v.layersWithOutsidePointerEventsDisabled.delete(u),Mn())},[u,v]),o.useEffect(()=>{const $=()=>g({});return document.addEventListener(Wt,$),()=>document.removeEventListener(Wt,$)},[]),o.createElement(mi.div,L({},d,{ref:l,style:{pointerEvents:h?y?"auto":"none":void 0,...e.style},onFocusCapture:Tt(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Tt(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Tt(e.onPointerDownCapture,A.onPointerDownCapture)}))});function $i(e,t=globalThis?.document){const n=ao(e),r=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const c=i=>{if(i.target&&!r.current){let d=function(){co(bi,n,f,{discrete:!0})};const f={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",c),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ci(e,t=globalThis?.document){const n=ao(e),r=o.useRef(!1);return o.useEffect(()=>{const a=c=>{c.target&&!r.current&&co(Ei,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mn(){const e=new CustomEvent(Wt);document.dispatchEvent(e)}function co(e,t,n,{discrete:r}){const a=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?pi(a,c):a.dispatchEvent(c)}function Si(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function io(...e){return t=>e.forEach(n=>Si(n,t))}function Ri(...e){return o.useCallback(io(...e),e)}const so=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(Pi);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(Ht,L({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(Ht,L({},r,{ref:t}),n)});so.displayName="Slot";const Ht=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...Ti(r,n.props),ref:t?io(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});Ht.displayName="SlotClone";const xi=({children:e})=>o.createElement(o.Fragment,null,e);function Pi(e){return o.isValidElement(e)&&e.type===xi}function Ti(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const Oi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ai=Oi.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?so:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,L({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Nn(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const Ot="focusScope.autoFocusOnMount",At="focusScope.autoFocusOnUnmount",In={bubbles:!1,cancelable:!0},Di=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...s}=e,[i,f]=o.useState(null),d=Nn(a),v=Nn(c),u=o.useRef(null),p=Ri(t,l=>f(l)),m=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let l=function(w){if(m.paused||!i)return;const h=w.target;i.contains(h)?u.current=h:he(u.current,{select:!0})},b=function(w){if(m.paused||!i)return;const h=w.relatedTarget;h!==null&&(i.contains(h)||he(u.current,{select:!0}))},E=function(w){if(document.activeElement===document.body)for(const y of w)y.removedNodes.length>0&&he(i)};document.addEventListener("focusin",l),document.addEventListener("focusout",b);const S=new MutationObserver(E);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",b),S.disconnect()}}},[r,i,m.paused]),o.useEffect(()=>{if(i){Ln.add(m);const l=document.activeElement;if(!i.contains(l)){const E=new CustomEvent(Ot,In);i.addEventListener(Ot,d),i.dispatchEvent(E),E.defaultPrevented||(Mi(Fi(uo(i)),{select:!0}),document.activeElement===l&&he(i))}return()=>{i.removeEventListener(Ot,d),setTimeout(()=>{const E=new CustomEvent(At,In);i.addEventListener(At,v),i.dispatchEvent(E),E.defaultPrevented||he(l??document.body,{select:!0}),i.removeEventListener(At,v),Ln.remove(m)},0)}}},[i,d,v,m]);const g=o.useCallback(l=>{if(!n&&!r||m.paused)return;const b=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,E=document.activeElement;if(b&&E){const S=l.currentTarget,[w,h]=Ni(S);w&&h?!l.shiftKey&&E===h?(l.preventDefault(),n&&he(w,{select:!0})):l.shiftKey&&E===w&&(l.preventDefault(),n&&he(h,{select:!0})):E===S&&l.preventDefault()}},[n,r,m.paused]);return o.createElement(Ai.div,L({tabIndex:-1},s,{ref:p,onKeyDown:g}))});function Mi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(he(r,{select:t}),document.activeElement!==n)return}function Ni(e){const t=uo(e),n=_n(t,e),r=_n(t.reverse(),e);return[n,r]}function uo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _n(e,t){for(const n of e)if(!Ii(n,{upTo:t}))return n}function Ii(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function _i(e){return e instanceof HTMLInputElement&&"select"in e}function he(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_i(e)&&t&&e.select()}}const Ln=Li();function Li(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Fn(e,t),e.unshift(t)},remove(t){var n;e=Fn(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Fn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Fi(e){return e.filter(t=>t.tagName!=="A")}function ki(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ui(...e){return t=>e.forEach(n=>ki(n,t))}const lo=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(Bi);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(Vt,L({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(Vt,L({},r,{ref:t}),n)});lo.displayName="Slot";const Vt=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...Wi(r,n.props),ref:t?Ui(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});Vt.displayName="SlotClone";const ji=({children:e})=>o.createElement(o.Fragment,null,e);function Bi(e){return o.isValidElement(e)&&e.type===ji}function Wi(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const Hi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vi=Hi.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?lo:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,L({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ki=o.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...a}=e;return r?zn.createPortal(o.createElement(Vi.div,L({},a,{ref:t})),r):null});function Yi(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Gi(...e){return t=>e.forEach(n=>Yi(n,t))}function zi(...e){return o.useCallback(Gi(...e),e)}const kn=globalThis?.document?o.useLayoutEffect:()=>{};function Xi(e,t){return o.useReducer((n,r)=>{const a=t[n][r];return a??n},e)}const gt=e=>{const{present:t,children:n}=e,r=Zi(t),a=typeof n=="function"?n({present:r.isPresent}):o.Children.only(n),c=zi(r.ref,a.ref);return typeof n=="function"||r.isPresent?o.cloneElement(a,{ref:c}):null};gt.displayName="Presence";function Zi(e){const[t,n]=o.useState(),r=o.useRef({}),a=o.useRef(e),c=o.useRef("none"),s=e?"mounted":"unmounted",[i,f]=Xi(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect(()=>{const d=rt(r.current);c.current=i==="mounted"?d:"none"},[i]),kn(()=>{const d=r.current,v=a.current;if(v!==e){const p=c.current,m=rt(d);e?f("MOUNT"):m==="none"||d?.display==="none"?f("UNMOUNT"):f(v&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),kn(()=>{if(t){const d=u=>{const m=rt(r.current).includes(u.animationName);u.target===t&&m&&Zt.flushSync(()=>f("ANIMATION_END"))},v=u=>{u.target===t&&(c.current=rt(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:o.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function rt(e){return e?.animationName||"none"}const ln=o.forwardRef((e,t)=>{const{children:n,...r}=e,a=o.Children.toArray(n),c=a.find(Qi);if(c){const s=c.props.children,i=a.map(f=>f===c?o.Children.count(s)>1?o.Children.only(null):o.isValidElement(s)?s.props.children:null:f);return o.createElement(Kt,L({},r,{ref:t}),o.isValidElement(s)?o.cloneElement(s,void 0,i):null)}return o.createElement(Kt,L({},r,{ref:t}),n)});ln.displayName="Slot";const Kt=o.forwardRef((e,t)=>{const{children:n,...r}=e;return o.isValidElement(n)?o.cloneElement(n,{...Ji(r,n.props),ref:t?to(t,n.ref):n.ref}):o.Children.count(n)>1?o.Children.only(null):null});Kt.displayName="SlotClone";const qi=({children:e})=>o.createElement(o.Fragment,null,e);function Qi(e){return o.isValidElement(e)&&e.type===qi}function Ji(e,t){const n={...t};for(const r in t){const a=e[r],c=t[r];/^on[A-Z]/.test(r)?a&&c?n[r]=(...i)=>{c(...i),a(...i)}:a&&(n[r]=a):r==="style"?n[r]={...a,...c}:r==="className"&&(n[r]=[a,c].filter(Boolean).join(" "))}return{...e,...n}}const es=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ye=es.reduce((e,t)=>{const n=o.forwardRef((r,a)=>{const{asChild:c,...s}=r,i=c?ln:t;return o.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),o.createElement(i,L({},s,{ref:a}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});let Dt=0;function ts(){o.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Un()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Un()),Dt++,()=>{Dt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Dt--}},[])}function Un(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var fo=Sr(),Mt=function(){},bt=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:Mt,onWheelCapture:Mt,onTouchMoveCapture:Mt}),a=r[0],c=r[1],s=e.forwardProps,i=e.children,f=e.className,d=e.removeScrollBar,v=e.enabled,u=e.shards,p=e.sideCar,m=e.noIsolation,g=e.inert,l=e.allowPinchZoom,b=e.as,E=b===void 0?"div":b,S=Jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,h=Cr([n,t]),y=Z(Z({},S),a);return o.createElement(o.Fragment,null,v&&o.createElement(w,{sideCar:fo,removeScrollBar:d,shards:u,noIsolation:m,inert:g,setCallbacks:c,allowPinchZoom:!!l,lockRef:n}),s?o.cloneElement(o.Children.only(i),Z(Z({},y),{ref:h})):o.createElement(E,Z({},y,{className:f,ref:h}),i))});bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bt.classNames={fullWidth:ke,zeroRight:Fe};var Yt=!1;if(typeof window<"u")try{var ot=Object.defineProperty({},"passive",{get:function(){return Yt=!0,!0}});window.addEventListener("test",ot,ot),window.removeEventListener("test",ot,ot)}catch{Yt=!1}var Pe=Yt?{passive:!1}:!1,ns=function(e){return e.tagName==="TEXTAREA"},vo=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ns(e)&&n[t]==="visible")},rs=function(e){return vo(e,"overflowY")},os=function(e){return vo(e,"overflowX")},jn=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=mo(e,n);if(r){var a=po(e,n),c=a[1],s=a[2];if(c>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},as=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},cs=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},mo=function(e,t){return e==="v"?rs(t):os(t)},po=function(e,t){return e==="v"?as(t):cs(t)},is=function(e,t){return e==="h"&&t==="rtl"?-1:1},ss=function(e,t,n,r,a){var c=is(e,window.getComputedStyle(t).direction),s=c*r,i=n.target,f=t.contains(i),d=!1,v=s>0,u=0,p=0;do{var m=po(e,i),g=m[0],l=m[1],b=m[2],E=l-b-c*g;(g||E)&&mo(e,i)&&(u+=E,p+=g),i=i.parentNode}while(!f&&i!==document.body||f&&(t.contains(i)||t===i));return(v&&(u===0||!a)||!v&&(p===0||!a))&&(d=!0),d},at=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bn=function(e){return[e.deltaX,e.deltaY]},Wn=function(e){return e&&"current"in e?e.current:e},us=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ls=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},ds=0,Te=[];function fs(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(ds++)[0],c=o.useState(function(){return en()})[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=$r([e.lockRef.current],(e.shards||[]).map(Wn),!0).filter(Boolean);return l.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=o.useCallback(function(l,b){if("touches"in l&&l.touches.length===2)return!s.current.allowPinchZoom;var E=at(l),S=n.current,w="deltaX"in l?l.deltaX:S[0]-E[0],h="deltaY"in l?l.deltaY:S[1]-E[1],y,A=l.target,P=Math.abs(w)>Math.abs(h)?"h":"v";if("touches"in l&&P==="h"&&A.type==="range")return!1;var $=jn(P,A);if(!$)return!0;if($?y=P:(y=P==="v"?"h":"v",$=jn(P,A)),!$)return!1;if(!r.current&&"changedTouches"in l&&(w||h)&&(r.current=y),!y)return!0;var R=r.current||y;return ss(R,b,l,R==="h"?w:h,!0)},[]),f=o.useCallback(function(l){var b=l;if(!(!Te.length||Te[Te.length-1]!==c)){var E="deltaY"in b?Bn(b):at(b),S=t.current.filter(function(y){return y.name===b.type&&y.target===b.target&&us(y.delta,E)})[0];if(S&&S.should){b.cancelable&&b.preventDefault();return}if(!S){var w=(s.current.shards||[]).map(Wn).filter(Boolean).filter(function(y){return y.contains(b.target)}),h=w.length>0?i(b,w[0]):!s.current.noIsolation;h&&b.cancelable&&b.preventDefault()}}},[]),d=o.useCallback(function(l,b,E,S){var w={name:l,delta:b,target:E,should:S};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(h){return h!==w})},1)},[]),v=o.useCallback(function(l){n.current=at(l),r.current=void 0},[]),u=o.useCallback(function(l){d(l.type,Bn(l),l.target,i(l,e.lockRef.current))},[]),p=o.useCallback(function(l){d(l.type,at(l),l.target,i(l,e.lockRef.current))},[]);o.useEffect(function(){return Te.push(c),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",f,Pe),document.addEventListener("touchmove",f,Pe),document.addEventListener("touchstart",v,Pe),function(){Te=Te.filter(function(l){return l!==c}),document.removeEventListener("wheel",f,Pe),document.removeEventListener("touchmove",f,Pe),document.removeEventListener("touchstart",v,Pe)}},[]);var m=e.removeScrollBar,g=e.inert;return o.createElement(o.Fragment,null,g?o.createElement(c,{styles:ls(a)}):null,m?o.createElement(Tr,{gapMode:"margin"}):null)}const vs=xr(fo,fs);var ho=o.forwardRef(function(e,t){return o.createElement(bt,Z({},e,{ref:t,sideCar:vs}))});ho.classNames=bt.classNames;const go="Dialog",[bo,Du]=oi(go),[ms,ue]=bo(go),ps=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:s=!0}=e,i=o.useRef(null),f=o.useRef(null),[d=!1,v]=ci({prop:r,defaultProp:a,onChange:c});return o.createElement(ms,{scope:t,triggerRef:i,contentRef:f,contentId:ut(),titleId:ut(),descriptionId:ut(),open:d,onOpenChange:v,onOpenToggle:o.useCallback(()=>v(u=>!u),[v]),modal:s},n)},hs="DialogTrigger",gs=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ue(hs,n),c=un(t,a.triggerRef);return o.createElement(Ye.button,L({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":dn(a.open)},r,{ref:c,onClick:Ue(e.onClick,a.onOpenToggle)}))}),Eo="DialogPortal",[bs,wo]=bo(Eo,{forceMount:void 0}),Es=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,c=ue(Eo,t);return o.createElement(bs,{scope:t,forceMount:n},o.Children.map(r,s=>o.createElement(gt,{present:n||c.open},o.createElement(Ki,{asChild:!0,container:a},s))))},Gt="DialogOverlay",ws=o.forwardRef((e,t)=>{const n=wo(Gt,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,c=ue(Gt,e.__scopeDialog);return c.modal?o.createElement(gt,{present:r||c.open},o.createElement(ys,L({},a,{ref:t}))):null}),ys=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ue(Gt,n);return o.createElement(ho,{as:ln,allowPinchZoom:!0,shards:[a.contentRef]},o.createElement(Ye.div,L({"data-state":dn(a.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),We="DialogContent",$s=o.forwardRef((e,t)=>{const n=wo(We,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,c=ue(We,e.__scopeDialog);return o.createElement(gt,{present:r||c.open},c.modal?o.createElement(Cs,L({},a,{ref:t})):o.createElement(Ss,L({},a,{ref:t})))}),Cs=o.forwardRef((e,t)=>{const n=ue(We,e.__scopeDialog),r=o.useRef(null),a=un(t,n.contentRef,r);return o.useEffect(()=>{const c=r.current;if(c)return yr(c)},[]),o.createElement(yo,L({},e,{ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ue(e.onCloseAutoFocus,c=>{var s;c.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Ue(e.onPointerDownOutside,c=>{const s=c.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&c.preventDefault()}),onFocusOutside:Ue(e.onFocusOutside,c=>c.preventDefault())}))}),Ss=o.forwardRef((e,t)=>{const n=ue(We,e.__scopeDialog),r=o.useRef(!1),a=o.useRef(!1);return o.createElement(yo,L({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,c),!c.defaultPrevented){var i;r.current||(i=n.triggerRef.current)===null||i===void 0||i.focus(),c.preventDefault()}r.current=!1,a.current=!1},onInteractOutside:c=>{var s,i;(s=e.onInteractOutside)===null||s===void 0||s.call(e,c),c.defaultPrevented||(r.current=!0,c.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=c.target;((i=n.triggerRef.current)===null||i===void 0?void 0:i.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.current&&c.preventDefault()}}))}),yo=o.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:c,...s}=e,i=ue(We,n),f=o.useRef(null),d=un(t,f);return ts(),o.createElement(o.Fragment,null,o.createElement(Di,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:c},o.createElement(yi,L({role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":dn(i.open)},s,{ref:d,onDismiss:()=>i.onOpenChange(!1)}))),!1)}),Rs="DialogTitle",xs=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ue(Rs,n);return o.createElement(Ye.h2,L({id:a.titleId},r,{ref:t}))}),Ps="DialogDescription",Ts=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ue(Ps,n);return o.createElement(Ye.p,L({id:a.descriptionId},r,{ref:t}))}),Os="DialogClose",As=o.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ue(Os,n);return o.createElement(Ye.button,L({type:"button"},r,{ref:t,onClick:Ue(e.onClick,()=>a.onOpenChange(!1))}))});function dn(e){return e?"open":"closed"}const Ds=ps,Ms=gs,Ns=Es,Is=ws,_s=$s,Ls=xs,Fs=Ts,ks=As;function Us(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const $o=C.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,handleOnly:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),Et=()=>{const e=C.useContext($o);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Us("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");const js=typeof window<"u"?o.useLayoutEffect:o.useEffect;function zt(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function Bs(){return fn(/^Mac/)}function Ws(){return fn(/^iPhone/)}function Hs(){return fn(/^iPad/)||Bs()&&navigator.maxTouchPoints>1}function Co(){return Ws()||Hs()}function fn(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const Nt=typeof document<"u"&&window.visualViewport;function Hn(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function So(e){for(Hn(e)&&(e=e.parentElement);e&&!Hn(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Vs=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ct=0,It;function Ks(e={}){let{isDisabled:t}=e;js(()=>{if(!t)return ct++,ct===1&&(Co()?It=Gs():It=Ys()),()=>{ct--,ct===0&&It()}},[t])}function Ys(){return zt(Ro(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function Gs(){let e,t=0,n=u=>{e=So(u.target),!(e===document.documentElement&&e===document.body)&&(t=u.changedTouches[0].pageY)},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}let p=u.changedTouches[0].pageY,m=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((m<=0&&p>t||m>=g&&p{let p=u.target;Xt(p)&&p!==document.activeElement&&(u.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},c=u=>{let p=u.target;Xt(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",Nt&&(Nt.height{Vn(p)}):Nt.addEventListener("resize",()=>Vn(p),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,f=window.pageYOffset,d=zt(Ro(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let v=zt(Ie(document,"touchstart",n,{passive:!1,capture:!0}),Ie(document,"touchmove",r,{passive:!1,capture:!0}),Ie(document,"touchend",a,{passive:!1,capture:!0}),Ie(document,"focus",c,!0),Ie(window,"scroll",s));return()=>{d(),v(),window.scrollTo(i,f)}}function Ro(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ie(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Vn(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=So(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,c=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom;c>s&&(n.scrollTop+=a-r)}e=n.parentElement}}function Xt(e){return e instanceof HTMLInputElement&&!Vs.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function zs(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Xs(...e){return t=>e.forEach(n=>zs(n,t))}function xo(...e){return o.useCallback(Xs(...e),e)}let _e=null;function Zs({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:c}){const[s,i]=C.useState(()=>typeof window<"u"?window.location.href:""),f=C.useRef(0),d=C.useCallback(()=>{if(_e===null&&e&&!c){_e={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:u,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-u}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const m=p-window.innerHeight;m&&f.current>=p&&(document.body.style.top=`${-(f.current+m)}px`)}),300)}},[e]),v=C.useCallback(()=>{if(_e!==null&&!c){const u=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,_e),window.requestAnimationFrame(()=>{if(a&&s!==window.location.href){i(window.location.href);return}window.scrollTo(p,u)}),_e=null}},[s]);return C.useEffect(()=>{function u(){f.current=window.scrollY}return u(),window.addEventListener("scroll",u),()=>{window.removeEventListener("scroll",u)}},[]),C.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&d(),t||window.setTimeout(()=>{v()},500)):v())},[e,r,s,t,n,d,v]),{restorePositionSetting:v}}const Po=new WeakMap;function U(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([a,c])=>{if(a.startsWith("--")){e.style.setProperty(a,c);return}r[a]=e.style[a],e.style[a]=c}),!n&&Po.set(e,r)}function it(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Po.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([r,a])=>{e.style[r]=a}))}const Y=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function st(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Y(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Y(t)?5:4]):null)}function qs(e){return 8*(Math.log(e+1)-2)}const F={DURATION:.5,EASE:[.32,.72,0,1]},To=.4;function Oo(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Qs({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,a=C.useRef(r),c=Oo(t);return C.useEffect(()=>{a.current!==r&&(c(r),a.current=r)},[r,a,c]),n}function Js({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Qs({defaultProp:t,onChange:n}),c=e!==void 0,s=c?e:r,i=Oo(n),f=C.useCallback(d=>{if(c){const u=typeof d=="function"?d(e):d;u!==e&&i(u)}else a(d)},[c,e,a,i]);return[s,f]}function eu({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:c,onSnapPointChange:s,direction:i="bottom"}){const[f,d]=Js({prop:e,defaultProp:n?.[0],onChange:t}),v=C.useMemo(()=>f===n?.[n.length-1]||null,[n,f]),u=n&&n.length>0&&(c||c===0)&&!Number.isNaN(c)&&n[c]===f||!n,p=C.useMemo(()=>n?.findIndex(w=>w===f),[n,f]),m=C.useMemo(()=>{var w;return(w=n?.map(h=>{const y=typeof window<"u",A=typeof h=="string";let P=0;if(A&&(P=parseInt(h,10)),Y(i)){const R=A?P:y?h*window.innerHeight:0;return y?i==="bottom"?window.innerHeight-R:-window.innerHeight+R:R}const $=A?P:y?h*window.innerWidth:0;return y?i==="right"?window.innerWidth-$:-window.innerWidth+$:$}))!=null?w:[]},[n]),g=C.useMemo(()=>p!==null?m?.[p]:null,[m,p]),l=C.useCallback(w=>{var h;const y=(h=m?.findIndex(A=>A===w))!=null?h:null;s(y),U(r.current,{transition:`transform ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`,transform:Y(i)?`translate3d(0, ${w}px, 0)`:`translate3d(${w}px, 0, 0)`}),m&&y!==m.length-1&&y!==c?U(a.current,{transition:`opacity ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`,opacity:"0"}):U(a.current,{transition:`opacity ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`,opacity:"1"}),d(y!==null?n?.[y]:null)},[r.current,n,m,c,a,d]);C.useEffect(()=>{if(f||e){var w;const h=(w=n?.findIndex(y=>y===e||y===f))!=null?w:-1;m&&h!==-1&&typeof m[h]=="number"&&l(m[h])}},[f,e,n,m,l]);function b({draggedDistance:w,closeDrawer:h,velocity:y,dismissible:A}){if(c===void 0)return;const P=i==="bottom"||i==="right"?(g??0)-w:(g??0)+w,$=p===c-1,R=p===0,I=w>0;if($&&U(a.current,{transition:`opacity ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`}),y>2&&!I){A?h():l(m[0]);return}if(y>2&&I&&m&&n){l(m[n.length-1]);return}const B=m?.reduce((k,z)=>typeof k!="number"||typeof z!="number"?k:Math.abs(z-P)To&&Math.abs(w)0&&v){l(m[n.length-1]);return}if(R&&k<0&&A&&h(),p===null)return;l(m[p+k]);return}l(B)}function E({draggedDistance:w}){if(g===null)return;const h=i==="bottom"||i==="right"?g-w:g+w;(i==="bottom"||i==="right")&&hm[m.length-1]||U(r.current,{transform:Y(i)?`translate3d(0, ${h}px, 0)`:`translate3d(${h}px, 0, 0)`})}function S(w,h){if(!n||typeof p!="number"||!m||c===void 0)return null;const y=p===c-1;if(p>=c&&h)return 0;if(y&&!h)return 1;if(!u&&!y)return null;const P=y?p+1:p-1,$=y?m[P]-m[P-1]:m[P+1]-m[P],R=w/Math.abs($);return y?1-R:R}return{isLastSnapPoint:v,activeSnapPoint:f,shouldFade:u,getPercentageDragged:S,setActiveSnapPoint:d,activeSnapPointIndex:p,onRelease:b,onDrag:E,snapPointsOffset:m}}const tu=.25,nu=100,Kn=8,be=16,Yn=26,_t="vaul-dragging";function Ao({open:e,onOpenChange:t,children:n,shouldScaleBackground:r,onDrag:a,onRelease:c,snapPoints:s,nested:i=!1,setBackgroundColorOnScale:f=!0,closeThreshold:d=tu,scrollLockTimeout:v=nu,dismissible:u=!0,handleOnly:p=!1,fadeFromIndex:m=s&&s.length-1,activeSnapPoint:g,setActiveSnapPoint:l,fixed:b,modal:E=!0,onClose:S,noBodyStyles:w,direction:h="bottom",preventScrollRestoration:y=!0,disablePreventScroll:A=!1}){var P;const[$=!1,R]=C.useState(!1),[I,B]=C.useState(!1),[H,k]=C.useState(!1),[z,oe]=C.useState(!1),[G,le]=C.useState(!1),[q,T]=C.useState(!1),X=C.useRef(null),Q=C.useRef(null),ae=C.useRef(null),ve=C.useRef(null),ce=C.useRef(null),de=C.useRef(!1),ie=C.useRef(null),W=C.useRef(0),te=C.useRef(!1),Ge=C.useRef(0),D=C.useRef(null),ze=C.useRef(((P=D.current)==null?void 0:P.getBoundingClientRect().height)||0),De=C.useRef(0),ye=C.useCallback(O=>{s&&O===Ne.length-1&&(Q.current=new Date)},[]),{activeSnapPoint:Io,activeSnapPointIndex:Me,setActiveSnapPoint:vn,onRelease:_o,snapPointsOffset:Ne,onDrag:Lo,shouldFade:mn,getPercentageDragged:Fo}=eu({snapPoints:s,activeSnapPointProp:g,setActiveSnapPointProp:l,drawerRef:D,fadeFromIndex:m,overlayRef:X,onSnapPointChange:ye,direction:h});Ks({isDisabled:!$||G||!E||q||!I||A});const{restorePositionSetting:ko}=Zs({isOpen:$,modal:E,nested:i,hasBeenOpened:I,preventScrollRestoration:y,noBodyStyles:w});function $e(){return(window.innerWidth-Yn)/window.innerWidth}function Uo(O){var M;!u&&!s||D.current&&!D.current.contains(O.target)||(ze.current=((M=D.current)==null?void 0:M.getBoundingClientRect().height)||0,le(!0),ae.current=new Date,Co()&&window.addEventListener("touchend",()=>de.current=!1,{once:!0}),O.target.setPointerCapture(O.pointerId),W.current=Y(h)?O.clientY:O.clientX)}function pn(O,M){var j;let N=O;const V=(j=window.getSelection())==null?void 0:j.toString(),K=D.current?st(D.current,h):null,ne=new Date;if(N.hasAttribute("data-vaul-no-drag")||N.closest("[data-vaul-no-drag]"))return!1;if(h==="right"||h==="left")return!0;if(Q.current&&ne.getTime()-Q.current.getTime()<500)return!1;if(K!==null&&(h==="bottom"?K>0:K<0))return!0;if(V&&V.length>0)return!1;if(ce.current&&ne.getTime()-ce.current.getTime()N.clientHeight){if(N.scrollTop!==0)return ce.current=new Date,!1;if(N.getAttribute("role")==="dialog")return!0}N=N.parentNode}return!0}function jo(O){if(D.current&&G){const M=h==="bottom"||h==="right"?1:-1,j=(W.current-(Y(h)?O.clientY:O.clientX))*M,N=j>0,V=s&&!u&&!N;if(V&&Me===0)return;const K=Math.abs(j),ne=document.querySelector("[vaul-drawer-wrapper]");let fe=K/ze.current;const me=Fo(K,N);if(me!==null&&(fe=me),V&&fe>=1||!de.current&&!pn(O.target,N))return;if(D.current.classList.add(_t),de.current=!0,U(D.current,{transition:"none"}),U(X.current,{transition:"none"}),s&&Lo({draggedDistance:j}),N&&!s){const ge=qs(j),qe=Math.min(ge*-1,0)*M;U(D.current,{transform:Y(h)?`translate3d(0, ${qe}px, 0)`:`translate3d(${qe}px, 0, 0)`});return}const Ze=1-fe;if((mn||m&&Me===m-1)&&(a?.(O,fe),U(X.current,{opacity:`${Ze}`,transition:"none"},!0)),ne&&X.current&&r){const ge=Math.min($e()+fe*(1-$e()),1),qe=8-fe*8,gn=Math.max(0,14-fe*14);U(ne,{borderRadius:`${qe}px`,transform:Y(h)?`scale(${ge}) translate3d(0, ${gn}px, 0)`:`scale(${ge}) translate3d(${gn}px, 0, 0)`,transition:"none"},!0)}if(!s){const ge=K*M;U(D.current,{transform:Y(h)?`translate3d(0, ${ge}px, 0)`:`translate3d(${ge}px, 0, 0)`})}}}C.useEffect(()=>()=>{Xe(!1),ko()},[]),C.useEffect(()=>{var O;function M(){if(!D.current)return;const j=document.activeElement;if(Xt(j)||te.current){var N;const V=((N=window.visualViewport)==null?void 0:N.height)||0;let K=window.innerHeight-V;const ne=D.current.getBoundingClientRect().height||0;De.current||(De.current=ne);const fe=D.current.getBoundingClientRect().top;if(Math.abs(Ge.current-K)>60&&(te.current=!te.current),s&&s.length>0&&Ne&&Me){const me=Ne[Me]||0;K+=me}if(Ge.current=K,ne>V||te.current){const me=D.current.getBoundingClientRect().height;let Ze=me;me>V&&(Ze=V-Yn),b?D.current.style.height=`${me-Math.max(K,0)}px`:D.current.style.height=`${Math.max(Ze,V-fe)}px`}else D.current.style.height=`${De.current}px`;s&&s.length>0&&!te.current?D.current.style.bottom="0px":D.current.style.bottom=`${Math.max(K,0)}px`}}return(O=window.visualViewport)==null||O.addEventListener("resize",M),()=>{var j;return(j=window.visualViewport)==null?void 0:j.removeEventListener("resize",M)}},[Me,s,Ne]);function Ce(){D.current&&(Bo(),S?.(),U(D.current,{transform:Y(h)?`translate3d(0, ${h==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${h==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`}),U(X.current,{opacity:"0",transition:`opacity ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`}),Xe(!1),setTimeout(()=>{k(!1),R(!1)},300),setTimeout(()=>{s&&vn(s[0])},F.DURATION*1e3))}C.useEffect(()=>{if(!$&&r){const O=setTimeout(()=>{it(document.body)},200);return()=>clearTimeout(O)}},[$,r]),C.useLayoutEffect(()=>{e?(R(!0),B(!0)):Ce()},[e]),C.useEffect(()=>{z&&t?.($)},[$]),C.useEffect(()=>{oe(!0)},[]);function hn(){if(!D.current)return;const O=document.querySelector("[vaul-drawer-wrapper]"),M=st(D.current,h);U(D.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`}),U(X.current,{transition:`opacity ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`,opacity:"1"}),r&&M&&M>0&&$&&U(O,{borderRadius:`${Kn}px`,overflow:"hidden",...Y(h)?{transform:`scale(${$e()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${$e()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${F.DURATION}s`,transitionTimingFunction:`cubic-bezier(${F.EASE.join(",")})`},!0)}function Bo(){!G||!D.current||(D.current.classList.remove(_t),de.current=!1,le(!1),ve.current=new Date)}function Wo(O){if(!G||!D.current)return;D.current.classList.remove(_t),de.current=!1,le(!1),ve.current=new Date;const M=st(D.current,h);if(!pn(O.target,!1)||!M||Number.isNaN(M)||ae.current===null)return;const j=ve.current.getTime()-ae.current.getTime(),N=W.current-(Y(h)?O.clientY:O.clientX),V=Math.abs(N)/j;if(V>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),s){_o({draggedDistance:N*(h==="bottom"||h==="right"?1:-1),closeDrawer:Ce,velocity:V,dismissible:u}),c?.(O,!0);return}if(h==="bottom"||h==="right"?N>0:N<0){hn(),c?.(O,!0);return}if(V>To){Ce(),c?.(O,!1);return}var K;const ne=Math.min((K=D.current.getBoundingClientRect().height)!=null?K:0,window.innerHeight);if(M>=ne*d){Ce(),c?.(O,!1);return}c?.(O,!0),hn()}C.useEffect(()=>{$&&(U(document.documentElement,{scrollBehavior:"auto"}),Q.current=new Date,Xe(!0))},[$]),C.useEffect(()=>{if(D.current&&H){var O;const M=D==null||(O=D.current)==null?void 0:O.querySelectorAll("*");M?.forEach(j=>{const N=j;(N.scrollHeight>N.clientHeight||N.scrollWidth>N.clientWidth)&&N.classList.add("vaul-scrollable")})}},[H]);function Xe(O){const M=document.querySelector("[vaul-drawer-wrapper]");!M||!r||(O?(f&&(w||(U(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),U(document.body,{background:"black"},!0))),U(M,{borderRadius:`${Kn}px`,overflow:"hidden",...Y(h)?{transform:`scale(${$e()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${$e()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${F.DURATION}s`,transitionTimingFunction:`cubic-bezier(${F.EASE.join(",")})`})):(it(M,"overflow"),it(M,"transform"),it(M,"borderRadius"),U(M,{transitionProperty:"transform, border-radius",transitionDuration:`${F.DURATION}s`,transitionTimingFunction:`cubic-bezier(${F.EASE.join(",")})`})))}function Ho(O){const M=O?(window.innerWidth-be)/window.innerWidth:1,j=O?-be:0;ie.current&&window.clearTimeout(ie.current),U(D.current,{transition:`transform ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`,transform:`scale(${M}) translate3d(0, ${j}px, 0)`}),!O&&D.current&&(ie.current=setTimeout(()=>{const N=st(D.current,h);U(D.current,{transition:"none",transform:Y(h)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`})},500))}function Vo(O,M){if(M<0)return;const j=Y(h)?window.innerHeight:window.innerWidth,N=(j-be)/j,V=N+M*(1-N),K=-be+M*be;U(D.current,{transform:Y(h)?`scale(${V}) translate3d(0, ${K}px, 0)`:`scale(${V}) translate3d(${K}px, 0, 0)`,transition:"none"})}function Ko(O,M){const j=Y(h)?window.innerHeight:window.innerWidth,N=M?(j-be)/j:1,V=M?-be:0;M&&U(D.current,{transition:`transform ${F.DURATION}s cubic-bezier(${F.EASE.join(",")})`,transform:Y(h)?`scale(${N}) translate3d(0, ${V}px, 0)`:`scale(${N}) translate3d(${V}px, 0, 0)`})}return C.createElement(Ds,{modal:E,onOpenChange:O=>{if(e!==void 0){t?.(O);return}O?(B(!0),R(O)):Ce()},open:$},C.createElement($o.Provider,{value:{visible:H,activeSnapPoint:Io,snapPoints:s,setActiveSnapPoint:vn,drawerRef:D,overlayRef:X,scaleBackground:Xe,onOpenChange:t,onPress:Uo,setVisible:k,onRelease:Wo,onDrag:jo,dismissible:u,handleOnly:p,isOpen:$,isDragging:G,shouldFade:mn,closeDrawer:Ce,onNestedDrag:Vo,onNestedOpenChange:Ho,onNestedRelease:Ko,keyboardIsOpen:te,openProp:e,modal:E,snapPointsOffset:Ne,direction:h}},n))}const ru=250,ou=120,Do=C.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{visible:a,closeDrawer:c,isDragging:s,snapPoints:i,activeSnapPoint:f,setActiveSnapPoint:d,dismissible:v,handleOnly:u,onPress:p,onDrag:m}=Et(),g=C.useRef(null),l=C.useRef(!1);function b(){if(l.current){w();return}window.setTimeout(()=>{E()},ou)}function E(){if(s||e||l.current){w();return}if(w(),(!i||i.length===0)&&v){c();return}if(f===i[i.length-1]&&v){c();return}const y=i.findIndex(P=>P===f);if(y===-1)return;const A=i[y+1];d(A)}function S(){g.current=window.setTimeout(()=>{l.current=!0},ru)}function w(){window.clearTimeout(g.current),l.current=!1}return C.createElement("div",{onClick:b,onDoubleClick:()=>{l.current=!0,c()},onPointerCancel:w,onPointerDown:h=>{u&&p(h),S()},onPointerMove:h=>{u&&m(h)},ref:r,"vaul-drawer-visible":a?"true":"false","vaul-handle":"","aria-hidden":"true",...n},C.createElement("span",{"vaul-handle-hitarea":"","aria-hidden":"true"},t))});Do.displayName="Drawer.Handle";const Mo=C.forwardRef(function({children:e,...t},n){const{overlayRef:r,snapPoints:a,onRelease:c,shouldFade:s,isOpen:i,visible:f}=Et(),d=xo(n,r),v=a&&a.length>0;return C.createElement(Is,{onMouseUp:c,ref:d,"vaul-drawer-visible":f?"true":"false","vaul-overlay":"","vaul-snap-points":i&&v?"true":"false","vaul-snap-points-overlay":i&&s?"true":"false",...t})});Mo.displayName="Drawer.Overlay";const No=C.forwardRef(function({onOpenAutoFocus:e,onPointerDownOutside:t,onAnimationEnd:n,style:r,...a},c){const{drawerRef:s,onPress:i,onRelease:f,onDrag:d,dismissible:v,keyboardIsOpen:u,snapPointsOffset:p,visible:m,closeDrawer:g,modal:l,openProp:b,onOpenChange:E,setVisible:S,handleOnly:w,direction:h}=Et(),y=xo(c,s),A=C.useRef(null),P=C.useRef(!1),$=(R,I,B=0)=>{if(P.current)return!0;const H=Math.abs(R.y),k=Math.abs(R.x),z=k>H,oe=["bottom","right"].includes(I)?1:-1;if(I==="left"||I==="right"){if(!(R.x*oe<0)&&k>=0&&k<=B)return z}else if(!(R.y*oe<0)&&H>=0&&H<=B)return!z;return P.current=!0,!0};return C.useEffect(()=>{S(!0)},[]),C.createElement(_s,{"vaul-drawer":"","vaul-drawer-direction":h,"vaul-drawer-visible":m?"true":"false",...a,ref:y,style:p&&p.length>0?{"--snap-point-height":`${p[0]}px`,...r}:r,onOpenAutoFocus:R=>{if(e)e(R);else{var I;R.preventDefault(),(I=s.current)==null||I.focus()}},onPointerDown:R=>{w||(a.onPointerDown==null||a.onPointerDown.call(a,R),A.current={x:R.clientX,y:R.clientY},i(R))},onPointerDownOutside:R=>{if(t?.(R),!l||R.defaultPrevented){R.preventDefault();return}u.current&&(u.current=!1),R.preventDefault(),E?.(!1),!(!v||b!==void 0)&&g()},onFocusOutside:R=>{if(!l){R.preventDefault();return}},onEscapeKeyDown:R=>{if(!l){R.preventDefault();return}},onPointerMove:R=>{if(w||(a.onPointerMove==null||a.onPointerMove.call(a,R),!A.current))return;const I=R.clientY-A.current.y,B=R.clientX-A.current.x,H=R.pointerType==="touch"?10:2;$({x:B,y:I},h,H)?d(R):(Math.abs(B)>H||Math.abs(I)>H)&&(A.current=null)},onPointerUp:R=>{a.onPointerUp==null||a.onPointerUp.call(a,R),A.current=null,P.current=!1,f(R)}})});No.displayName="Drawer.Content";function au({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:a,onNestedRelease:c}=Et();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return C.createElement(Ao,{nested:!0,onClose:()=>{a(!1)},onDrag:(s,i)=>{r(s,i),e?.(s,i)},onOpenChange:s=>{s&&a(s),t?.(s)},onRelease:c,...n})}const Mu={Root:Ao,NestedRoot:au,Content:No,Handle:Do,Overlay:Mo,Trigger:Ms,Portal:Ns,Close:ks,Title:Ls,Description:Fs};export{gu as A,Eu as C,Mu as D,wu as G,$u as I,yu as L,bu as P,Su as R,Pu as S,Cu as a,Ru as b,mu as c,xu as d,Tu as e,Ou as f,Au as g,hu as h,La as i,se as u}; diff --git a/assets/preview-DQi9OMsq.js b/assets/preview-BfeG5q0Q.js similarity index 76% rename from assets/preview-DQi9OMsq.js rename to assets/preview-BfeG5q0Q.js index f68d7150..f4162889 100644 --- a/assets/preview-DQi9OMsq.js +++ b/assets/preview-BfeG5q0Q.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-BeBsJNFx.js","./iframe-BUJwMp-o.js","./index-BP8_t0zE.js","./react-18-Glus6dSN.js","./index-Cw6ikIwd.js","./index-D-8MO0q_.js","./isArray-d9wiqGGH.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]); -import{_ as a}from"./iframe-BUJwMp-o.js";import"../sb-preview/runtime.js";const{global:i}=__STORYBOOK_MODULE_GLOBAL__;var s=Object.entries(i.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),n={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-PKQXORMH-BeBsJNFx.js").then(r=>r.ai),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>(e.tags||[]).filter(r=>s[r]).length===0&&!e.parameters.docs?.disable}}};export{n as parameters}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-CYafAHU5.js","./iframe-uIoLn8e1.js","./index-BP8_t0zE.js","./react-18-Glus6dSN.js","./index-Cw6ikIwd.js","./index-D-8MO0q_.js","./isArray-d9wiqGGH.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]); +import{_ as a}from"./iframe-uIoLn8e1.js";import"../sb-preview/runtime.js";const{global:i}=__STORYBOOK_MODULE_GLOBAL__;var s=Object.entries(i.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),n={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-PKQXORMH-CYafAHU5.js").then(r=>r.ai),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>(e.tags||[]).filter(r=>s[r]).length===0&&!e.parameters.docs?.disable}}};export{n as parameters}; diff --git a/iframe.html b/iframe.html index 60b70a78..acd6ce04 100644 --- a/iframe.html +++ b/iframe.html @@ -513,7 +513,7 @@ window.global = window; - + diff --git a/project.json b/project.json index 5a358450..514c0c8e 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1722621361540,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@playwright/test":"1.45.3","@testing-library/dom":"10.4.0","@testing-library/jest-dom":"6.4.8","@testing-library/react":"16.0.0","@testing-library/user-event":null,"@vitest/coverage-v8":"2.0.4","vitest":"2.0.4"},"packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"reactDocgen":"react-docgen-typescript"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"8.2.6","storybookVersionSpecifier":"^8.1.1","language":"typescript","storybookPackages":{"@storybook/addon-a11y":{"version":"8.2.6"},"@storybook/manager-api":{"version":"8.2.6"},"@storybook/react":{"version":"8.2.6"},"@storybook/react-vite":{"version":"8.2.6"},"@storybook/test":{"version":"8.2.6"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.2.6"}},"addons":{"@storybook/addon-links":{"version":"8.2.6"},"@storybook/addon-essentials":{"version":"8.2.6"},"@storybook/addon-interactions":{"version":"8.2.6"},"@storybook/addon-designs":{"version":"8.0.3"},"@storybook/addon-themes":{"version":"8.2.6"}}} +{"generatedAt":1722623022700,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@playwright/test":"1.45.3","@testing-library/dom":"10.4.0","@testing-library/jest-dom":"6.4.8","@testing-library/react":"16.0.0","@testing-library/user-event":null,"@vitest/coverage-v8":"2.0.4","vitest":"2.0.4"},"packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"reactDocgen":"react-docgen-typescript"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"8.2.6","storybookVersionSpecifier":"^8.1.1","language":"typescript","storybookPackages":{"@storybook/addon-a11y":{"version":"8.2.6"},"@storybook/manager-api":{"version":"8.2.6"},"@storybook/react":{"version":"8.2.6"},"@storybook/react-vite":{"version":"8.2.6"},"@storybook/test":{"version":"8.2.6"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.2.6"}},"addons":{"@storybook/addon-links":{"version":"8.2.6"},"@storybook/addon-essentials":{"version":"8.2.6"},"@storybook/addon-interactions":{"version":"8.2.6"},"@storybook/addon-designs":{"version":"8.0.3"},"@storybook/addon-themes":{"version":"8.2.6"}}}