diff --git a/assets/AppBar.stories-8uLU1XeL.js b/assets/AppBar.stories-D0-ctvwG.js similarity index 95% rename from assets/AppBar.stories-8uLU1XeL.js rename to assets/AppBar.stories-D0-ctvwG.js index 237a395..252043c 100644 --- a/assets/AppBar.stories-8uLU1XeL.js +++ b/assets/AppBar.stories-D0-ctvwG.js @@ -1,4 +1,4 @@ -import{j as t}from"./assertThisInitialized-DaBLapIa.js";import{A,T as B,P as x,a as b}from"./Graph-DpGUcQhO.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const S={title:"AppBar",component:A,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}},decorators:[g=>t.jsx(B,{theme:x,children:t.jsx(g,{})})]},r={},a={args:{centered:!0}},e={args:{},render:()=>t.jsx(b,{title:"Tablet App Bar"})};var s,o,p;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:"{}",...(p=(o=r.parameters)==null?void 0:o.docs)==null?void 0:p.source}}};var n,c,d;a.parameters={...a.parameters,docs:{...(n=a.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as t}from"./assertThisInitialized-DaBLapIa.js";import{A,T as B,P as x,a as b}from"./Graph-YQGnloR9.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const S={title:"AppBar",component:A,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}},decorators:[g=>t.jsx(B,{theme:x,children:t.jsx(g,{})})]},r={},a={args:{centered:!0}},e={args:{},render:()=>t.jsx(b,{title:"Tablet App Bar"})};var s,o,p;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:"{}",...(p=(o=r.parameters)==null?void 0:o.docs)==null?void 0:p.source}}};var n,c,d;a.parameters={...a.parameters,docs:{...(n=a.parameters)==null?void 0:n.docs,source:{originalSource:`{ args: { centered: true } diff --git a/assets/Button.stories-B9sngJDd.js b/assets/Button.stories-D_qdzbED.js similarity index 96% rename from assets/Button.stories-B9sngJDd.js rename to assets/Button.stories-D_qdzbED.js index 6b69234..4b82157 100644 --- a/assets/Button.stories-B9sngJDd.js +++ b/assets/Button.stories-D_qdzbED.js @@ -1,4 +1,4 @@ -import{j as r}from"./assertThisInitialized-DaBLapIa.js";import{B as n}from"./Graph-DpGUcQhO.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const g={title:"Button",component:n,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}}},t={args:{btheme:"light",bvariant:"outlined"},render:e=>r.jsxs("div",{style:{backgroundColor:e.btheme==="dark"?"#1f1f1f":"#ffffff",padding:"30px"},children:[r.jsx(n,{...e,children:"I'm Enabled."})," ",r.jsx(n,{disabled:!0,...e,children:"I'm Disabled."})]})},a={args:{btheme:"dark",bvariant:"outlined"},render:e=>r.jsxs("div",{style:{backgroundColor:e.btheme==="dark"?"#1f1f1f":"#ffffff",padding:"30px"},children:[r.jsx(n,{...e,children:"I'm Enabled."})," ",r.jsx(n,{disabled:!0,...e,children:"I'm Disabled."})]})};var d,s,o;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`{ +import{j as r}from"./assertThisInitialized-DaBLapIa.js";import{B as n}from"./Graph-YQGnloR9.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const g={title:"Button",component:n,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}}},t={args:{btheme:"light",bvariant:"outlined"},render:e=>r.jsxs("div",{style:{backgroundColor:e.btheme==="dark"?"#1f1f1f":"#ffffff",padding:"30px"},children:[r.jsx(n,{...e,children:"I'm Enabled."})," ",r.jsx(n,{disabled:!0,...e,children:"I'm Disabled."})]})},a={args:{btheme:"dark",bvariant:"outlined"},render:e=>r.jsxs("div",{style:{backgroundColor:e.btheme==="dark"?"#1f1f1f":"#ffffff",padding:"30px"},children:[r.jsx(n,{...e,children:"I'm Enabled."})," ",r.jsx(n,{disabled:!0,...e,children:"I'm Disabled."})]})};var d,s,o;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`{ args: { btheme: 'light', bvariant: 'outlined' diff --git a/assets/Card.stories-hJpAJujk.js b/assets/Card.stories-DAGstdPs.js similarity index 94% rename from assets/Card.stories-hJpAJujk.js rename to assets/Card.stories-DAGstdPs.js index 8a69423..30a44eb 100644 --- a/assets/Card.stories-hJpAJujk.js +++ b/assets/Card.stories-DAGstdPs.js @@ -1,4 +1,4 @@ -import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{H as d,T as s,P as n}from"./Graph-DpGUcQhO.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const v={title:"HorizontalCard",component:d,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}},decorators:[r=>e.jsx(s,{theme:n,children:e.jsx(r,{})})]},l=r=>{console.log("Card Value",r)},a={args:{onCardClick:l,cardSpacing:5,cardContentText:[{cardLabel:"Card 1",val:"val 1",cardDesc:"Card Desc 1"},{cardLabel:"Card 2",val:"val 2",cardDesc:" Card Desc 2"}]}};var o,c,t;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`{ +import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{H as d,T as s,P as n}from"./Graph-YQGnloR9.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const v={title:"HorizontalCard",component:d,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}},decorators:[r=>e.jsx(s,{theme:n,children:e.jsx(r,{})})]},l=r=>{console.log("Card Value",r)},a={args:{onCardClick:l,cardSpacing:5,cardContentText:[{cardLabel:"Card 1",val:"val 1",cardDesc:"Card Desc 1"},{cardLabel:"Card 2",val:"val 2",cardDesc:" Card Desc 2"}]}};var o,c,t;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`{ args: { onCardClick, cardSpacing: 5, diff --git a/assets/Color-ERTF36HU-B1JHFnKk.js b/assets/Color-ERTF36HU-Do5AllBJ.js similarity index 99% rename from assets/Color-ERTF36HU-B1JHFnKk.js rename to assets/Color-ERTF36HU-Do5AllBJ.js index 6095eae..e5c285b 100644 --- a/assets/Color-ERTF36HU-B1JHFnKk.js +++ b/assets/Color-ERTF36HU-Do5AllBJ.js @@ -1 +1 @@ -import{ae as Me,af as ie,ag as Ce,ah as $,a2 as ue,a0 as $e,x as Ie,ai as Oe,aj as Ne}from"./DocsRenderer-CFRXHY34-BlTxGutv.js";import{g as fe,R as h,r as m}from"./index-uubelm5h.js";import"./iframe-DKAGVA_i.js";import"../sb-preview/runtime.js";import"./assertThisInitialized-DaBLapIa.js";import"./index-CfOt2XX2.js";import"./index-D-8MO0q_.js";import"./index-DmeKSGxc.js";import"./index-DrFu-skq.js";import"./react-18-CtsMCmcS.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Se,he={};for(const e of Object.keys(F))he[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,c;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=s/(a+o):c=s/(2-a-o),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,c=e[2]/255,i=Math.max(s,l,c),d=i-Math.min(s,l,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(s),n=f(l),r=f(c),s===i?o=r-n:l===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Re(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,c[i]=s*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,s];case 1:return[l,r,s];case 2:return[s,r,c];case 3:return[s,l,r];case 4:return[c,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const c=n+a*(l-n);let i,d,f;switch(s){default:case 6:case 0:i=l,d=c,f=n;break;case 1:i=c,d=l,f=n;break;case 2:i=n,d=l,f=c;break;case 3:i=n,d=c,f=l;break;case 4:i=c,d=n,f=l;break;case 5:i=l,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,c=o**3,i=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,c;return s<1?l=a/(1-s):l=0,s<=0?c=0:o===t?c=(n-r)/s%6:o===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{N[e]={},Object.defineProperty(N[e],"channels",{value:K[e].channels}),Object.defineProperty(N[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];N[e][r]=Be(o),N[e][r].raw=qe(o)})});var Xe=N;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=at,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,s,l,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,lt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,z=o;return r=o=void 0,i=v,s=e.apply(z,C),s}function j(v){return i=v,l=setTimeout(b,t),d?x(v):s}function M(v){var C=v-c,z=v-i,ee=t-C;return f?ut(ee,a-z):ee}function p(v){var C=v-c,z=v-i;return c===void 0||C>=t||C<0||f&&z>=a}function b(){var v=W();if(p(v))return w(v);l=setTimeout(b,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=o=l=void 0}function k(){return l===void 0?s:w(W())}function I(){var v=W(),C=p(v);if(r=arguments,o=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(b,t),x(c)}return l===void 0&&(l=setTimeout(b,t)),s}return I.cancel=E,I.flush=k,I}var ht=ft;const dt=fe(ht);function O(){return(O=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function V(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(oe(o.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=c.current,w=A(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(ae(b),!function(k,I){return I&&!H(k)}(b,c.current)&&w)){if(H(b)){c.current=!0;var E=b.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),a(oe(w,b,l.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[s,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",O({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),T=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},mt=function(e){return be(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},bt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:bt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(me(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},me=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:y(255*[r,l,s,s,c,r][i]),g:y(255*[c,r,r,l,s,s][i]),b:y(255*[s,s,c,r,r,l][i]),a:y(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?be({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},be=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=T(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),m.useEffect(function(){var i;ye(a,l.current.hsva)||e.equal(i=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},se=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!se.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,se.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:mt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,O({},e,{colorModel:Ct}))},It=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:R(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(It,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ot={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,O({},e,{colorModel:Ot}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=me(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,O({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),zt=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ht=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ft=$($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Tt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,')`,le=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=$(Ie.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(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:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.rgb.hsl([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([s,l,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([s,l,c]).toLowerCase()}`}}if(Wt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.hsl.rgb([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([s,l,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([s,l,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[s,l]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=m.useMemo(()=>At(n,o,s).toLowerCase(),[n,o,s]),i=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(l=>typeof l=="string"?S(l):l.title?{...S(l.color),keyword:l.title}:S(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=m.useCallback(l=>{l!=null&&l.valid&&(a.some(c=>D(c[n])===D(l[n]))||o(c=>c.concat(l)))},[n,a]);return{presets:a,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1,argType:l})=>{var E;let c=m.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Gt(t,c),{presets:M,addPreset:p}=Ut(a,g,x),b=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(zt,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(Ht,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Tt,null,M.map((k,I)=>h.createElement(ue,{key:`${k.value}-${I}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:k.keyword||k.value})},h.createElement(le,{value:k[x],active:g&&D(k[x])===D(g[x]),onClick:()=>f(k.value)})))))},h.createElement(le,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:j}):null)},ln=Yt;export{Yt as ColorControl,ln as default}; +import{ae as Me,af as ie,ag as Ce,ah as $,a2 as ue,a0 as $e,x as Ie,ai as Oe,aj as Ne}from"./DocsRenderer-CFRXHY34-BSW2TFFe.js";import{g as fe,R as h,r as m}from"./index-uubelm5h.js";import"./iframe-WttpdJI2.js";import"../sb-preview/runtime.js";import"./assertThisInitialized-DaBLapIa.js";import"./index-CfOt2XX2.js";import"./index-D-8MO0q_.js";import"./index-DmeKSGxc.js";import"./index-DrFu-skq.js";import"./react-18-CtsMCmcS.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Se,he={};for(const e of Object.keys(F))he[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,c;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=s/(a+o):c=s/(2-a-o),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,c=e[2]/255,i=Math.max(s,l,c),d=i-Math.min(s,l,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(s),n=f(l),r=f(c),s===i?o=r-n:l===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Re(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,c[i]=s*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,s];case 1:return[l,r,s];case 2:return[s,r,c];case 3:return[s,l,r];case 4:return[c,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const c=n+a*(l-n);let i,d,f;switch(s){default:case 6:case 0:i=l,d=c,f=n;break;case 1:i=c,d=l,f=n;break;case 2:i=n,d=l,f=c;break;case 3:i=n,d=c,f=l;break;case 4:i=c,d=n,f=l;break;case 5:i=l,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,c=o**3,i=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,c;return s<1?l=a/(1-s):l=0,s<=0?c=0:o===t?c=(n-r)/s%6:o===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{N[e]={},Object.defineProperty(N[e],"channels",{value:K[e].channels}),Object.defineProperty(N[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];N[e][r]=Be(o),N[e][r].raw=qe(o)})});var Xe=N;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=at,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,s,l,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,lt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,z=o;return r=o=void 0,i=v,s=e.apply(z,C),s}function j(v){return i=v,l=setTimeout(b,t),d?x(v):s}function M(v){var C=v-c,z=v-i,ee=t-C;return f?ut(ee,a-z):ee}function p(v){var C=v-c,z=v-i;return c===void 0||C>=t||C<0||f&&z>=a}function b(){var v=W();if(p(v))return w(v);l=setTimeout(b,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=o=l=void 0}function k(){return l===void 0?s:w(W())}function I(){var v=W(),C=p(v);if(r=arguments,o=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(b,t),x(c)}return l===void 0&&(l=setTimeout(b,t)),s}return I.cancel=E,I.flush=k,I}var ht=ft;const dt=fe(ht);function O(){return(O=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function V(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(oe(o.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=c.current,w=A(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(ae(b),!function(k,I){return I&&!H(k)}(b,c.current)&&w)){if(H(b)){c.current=!0;var E=b.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),a(oe(w,b,l.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[s,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",O({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),T=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},mt=function(e){return be(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},bt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:bt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(me(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},me=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:y(255*[r,l,s,s,c,r][i]),g:y(255*[c,r,r,l,s,s][i]),b:y(255*[s,s,c,r,r,l][i]),a:y(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?be({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},be=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=T(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),m.useEffect(function(){var i;ye(a,l.current.hsva)||e.equal(i=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},se=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!se.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,se.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:mt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,O({},e,{colorModel:Ct}))},It=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:R(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(It,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ot={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,O({},e,{colorModel:Ot}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=me(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,O({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),zt=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ht=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ft=$($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Tt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,')`,le=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=$(Ie.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(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:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.rgb.hsl([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([s,l,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([s,l,c]).toLowerCase()}`}}if(Wt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.hsl.rgb([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([s,l,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([s,l,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[s,l]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=m.useMemo(()=>At(n,o,s).toLowerCase(),[n,o,s]),i=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(l=>typeof l=="string"?S(l):l.title?{...S(l.color),keyword:l.title}:S(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=m.useCallback(l=>{l!=null&&l.valid&&(a.some(c=>D(c[n])===D(l[n]))||o(c=>c.concat(l)))},[n,a]);return{presets:a,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1,argType:l})=>{var E;let c=m.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Gt(t,c),{presets:M,addPreset:p}=Ut(a,g,x),b=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(zt,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(Ht,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Tt,null,M.map((k,I)=>h.createElement(ue,{key:`${k.value}-${I}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:k.keyword||k.value})},h.createElement(le,{value:k[x],active:g&&D(k[x])===D(g[x]),onClick:()=>f(k.value)})))))},h.createElement(le,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:j}):null)},ln=Yt;export{Yt as ColorControl,ln as default}; diff --git a/assets/DataTable.stories-DkZcD-6X.js b/assets/DataTable.stories-C0cP0CBW.js similarity index 99% rename from assets/DataTable.stories-DkZcD-6X.js rename to assets/DataTable.stories-C0cP0CBW.js index 2564630..43927e4 100644 --- a/assets/DataTable.stories-DkZcD-6X.js +++ b/assets/DataTable.stories-C0cP0CBW.js @@ -1,4 +1,4 @@ -import{j as r}from"./assertThisInitialized-DaBLapIa.js";import{r as l,R as Je}from"./index-uubelm5h.js";import{j as Ye,k as qe,s as Ke,u as Qe,l as Ze,m as er,n as rr,o as sr,p as c,d as m,q as ze,e as _,r as or,t as tr,M as W,F as E,v as A}from"./Graph-DpGUcQhO.js";import"./index-CfOt2XX2.js";function ar(e){return qe("MuiFormGroup",e)}Ye("MuiFormGroup",["root","row","error"]);const nr=e=>{const{classes:s,row:a,error:n}=e;return sr({root:["root",a&&"row",n&&"error"]},ar,s)},ir=Ke("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:a}=e;return[s.root,a.row&&s.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),lr=l.forwardRef(function(s,a){const n=Qe({props:s,name:"MuiFormGroup"}),{className:d,row:g=!1,...u}=n,h=Ze(),p=er({props:n,muiFormControl:h,states:["error"]}),b={...n,row:g,error:p.error},U=nr(b);return r.jsx(ir,{className:rr(U.root,d),ownerState:b,ref:a,...u})}),br={title:"DataTable",component:c,tags:["autodocs"],argTypes:{},parameters:{controls:{expanded:!0},docs:{description:{component:"@todo These stories should really be cleaned up, especially dense and headerRender"}}}},cr=[{header:"Functional Column",value:e=>e.index,FunctionalRender:()=>{const[e,s]=l.useState(0);return r.jsxs(r.Fragment,{children:[r.jsx("strong",{children:"Index"}),": ",e,r.jsx("br",{}),r.jsx("button",{onClick:()=>s(e+1),children:"Increment Index"})]})}}],t=[{header:"Index",value:e=>e.index},{header:"Text",value:e=>e.text},{header:"Color",value:e=>e.color,render:e=>r.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:e.color},children:" "})},{header:"Description",value:e=>e.description}],ur=[{header:"Index",value:e=>e.index,tooltip:"This is the index column"},{header:"Text",value:e=>e.text},{header:"Color",value:e=>e.color,render:e=>r.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:e.color},children:" "})},{header:"Description",value:e=>e.description,tooltip:"This is the description column"}],o=[{index:0,text:"this_is_row_0",color:"#ff0000",description:"this_is_row_0"},{index:1,text:"this is row 1",color:"#dd0000",description:"this is row 1"},{index:2,text:"this is row 2",color:"#bb0000",description:"this is row 2"},{index:3,text:"this is row 3",color:"#990000",description:"this is row 3"},{index:4,text:"this is row 4",color:"#770000",description:"this is row 4"},{index:5,text:"this is row 5",color:"#550000",description:"this is row 5"},{index:6,text:"this is row 6",color:"#330000",description:"this is row 6"},{index:7,text:"this is row 7",color:"#110000",description:"this is row 7"}],T={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,hideHeader:!1}},w={args:{rows:[],emptyText:"No Data to Display",columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0}},x={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,hideHeader:!0}},C={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,showMoreColumns:!0,noOfDefaultColumns:2}},P={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,titleHoverInfo:"Here is some more information about this table. Here is some more information about this table.Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. "}},f={args:{rows:o,columns:cr,tableTitle:"Table Title",searchable:!0,showMoreColumns:!0,noOfDefaultColumns:5}},S={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,onRowClick:e=>window.alert(`You clicked on: +import{j as r}from"./assertThisInitialized-DaBLapIa.js";import{r as l,R as Je}from"./index-uubelm5h.js";import{j as Ye,k as qe,s as Ke,u as Qe,l as Ze,m as er,n as rr,o as sr,p as c,d as m,q as ze,e as _,r as or,t as tr,M as W,F as E,v as A}from"./Graph-YQGnloR9.js";import"./index-CfOt2XX2.js";function ar(e){return qe("MuiFormGroup",e)}Ye("MuiFormGroup",["root","row","error"]);const nr=e=>{const{classes:s,row:a,error:n}=e;return sr({root:["root",a&&"row",n&&"error"]},ar,s)},ir=Ke("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:a}=e;return[s.root,a.row&&s.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),lr=l.forwardRef(function(s,a){const n=Qe({props:s,name:"MuiFormGroup"}),{className:d,row:g=!1,...u}=n,h=Ze(),p=er({props:n,muiFormControl:h,states:["error"]}),b={...n,row:g,error:p.error},U=nr(b);return r.jsx(ir,{className:rr(U.root,d),ownerState:b,ref:a,...u})}),br={title:"DataTable",component:c,tags:["autodocs"],argTypes:{},parameters:{controls:{expanded:!0},docs:{description:{component:"@todo These stories should really be cleaned up, especially dense and headerRender"}}}},cr=[{header:"Functional Column",value:e=>e.index,FunctionalRender:()=>{const[e,s]=l.useState(0);return r.jsxs(r.Fragment,{children:[r.jsx("strong",{children:"Index"}),": ",e,r.jsx("br",{}),r.jsx("button",{onClick:()=>s(e+1),children:"Increment Index"})]})}}],t=[{header:"Index",value:e=>e.index},{header:"Text",value:e=>e.text},{header:"Color",value:e=>e.color,render:e=>r.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:e.color},children:" "})},{header:"Description",value:e=>e.description}],ur=[{header:"Index",value:e=>e.index,tooltip:"This is the index column"},{header:"Text",value:e=>e.text},{header:"Color",value:e=>e.color,render:e=>r.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:e.color},children:" "})},{header:"Description",value:e=>e.description,tooltip:"This is the description column"}],o=[{index:0,text:"this_is_row_0",color:"#ff0000",description:"this_is_row_0"},{index:1,text:"this is row 1",color:"#dd0000",description:"this is row 1"},{index:2,text:"this is row 2",color:"#bb0000",description:"this is row 2"},{index:3,text:"this is row 3",color:"#990000",description:"this is row 3"},{index:4,text:"this is row 4",color:"#770000",description:"this is row 4"},{index:5,text:"this is row 5",color:"#550000",description:"this is row 5"},{index:6,text:"this is row 6",color:"#330000",description:"this is row 6"},{index:7,text:"this is row 7",color:"#110000",description:"this is row 7"}],T={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,hideHeader:!1}},w={args:{rows:[],emptyText:"No Data to Display",columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0}},x={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,hideHeader:!0}},C={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,showMoreColumns:!0,noOfDefaultColumns:2}},P={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,titleHoverInfo:"Here is some more information about this table. Here is some more information about this table.Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. Here is some more information about this table. "}},f={args:{rows:o,columns:cr,tableTitle:"Table Title",searchable:!0,showMoreColumns:!0,noOfDefaultColumns:5}},S={args:{rows:o,columns:t,itemsPerPage:4,tableTitle:"Table Title",searchable:!0,onRowClick:e=>window.alert(`You clicked on: Index: ${e.index.toString()} Text: ${e.text} Color: ${e.color} diff --git a/assets/DocsRenderer-CFRXHY34-BlTxGutv.js b/assets/DocsRenderer-CFRXHY34-BSW2TFFe.js similarity index 99% rename from assets/DocsRenderer-CFRXHY34-BlTxGutv.js rename to assets/DocsRenderer-CFRXHY34-BSW2TFFe.js index 8281aa9..a5aa569 100644 --- a/assets/DocsRenderer-CFRXHY34-BlTxGutv.js +++ b/assets/DocsRenderer-CFRXHY34-BSW2TFFe.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DgFDPaKo.js","./iframe-DKAGVA_i.js","./index-uubelm5h.js","./assertThisInitialized-DaBLapIa.js","./index-CfOt2XX2.js","./index-D-8MO0q_.js","./index-DmeKSGxc.js","./index-DrFu-skq.js","./react-18-CtsMCmcS.js","./Color-ERTF36HU-B1JHFnKk.js","./index-FeUjBnvO.js"])))=>i.map(i=>d[i]); -var sS=Object.defineProperty;var uS=(e,t,r)=>t in e?sS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var jn=(e,t,r)=>uS(e,typeof t!="symbol"?t+"":t,r);import{_ as Lp}from"./iframe-DKAGVA_i.js";import{r as l,R as y,c as ji,g as Ns}from"./index-uubelm5h.js";import{j as X,_ as N3,a as cS,b as dS,c as rt}from"./assertThisInitialized-DaBLapIa.js";import{r as Hs,f as H3}from"./index-CfOt2XX2.js";import{O as j3,P as pS}from"./index-D-8MO0q_.js";import{y as Cm,D as ec}from"./index-DmeKSGxc.js";import{d as fS}from"./index-DrFu-skq.js";import{renderElement as hS,unmountElement as mS}from"./react-18-CtsMCmcS.js";var gS=Object.create,V3=Object.defineProperty,vS=Object.getOwnPropertyDescriptor,U3=Object.getOwnPropertyNames,yS=Object.getPrototypeOf,bS=Object.prototype.hasOwnProperty,La=(e,t)=>function(){return t||(0,e[U3(e)[0]])((t={exports:{}}).exports,t),t.exports},wS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of U3(t))!bS.call(e,a)&&a!==r&&V3(e,a,{get:()=>t[a],enumerable:!(n=vS(t,a))||n.enumerable});return e},ES=(e,t,r)=>(r=e!=null?gS(yS(e)):{},wS(!e||!e.__esModule?V3(r,"default",{value:e,enumerable:!0}):r,e)),Ct=e=>`control-${e.replace(/\s+/g,"-")}`,js=e=>`set-${e.replace(/\s+/g,"-")}`,xS=Object.create,Op=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,DS=Object.getOwnPropertyNames,SS=Object.getPrototypeOf,AS=Object.prototype.hasOwnProperty,I=(e,t)=>Op(e,"name",{value:t,configurable:!0}),Vi=(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')}),Vs=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of DS(t))!AS.call(e,a)&&a!==r&&Op(e,a,{get:()=>t[a],enumerable:!(n=CS(t,a))||n.enumerable});return e},Mp=(e,t,r)=>(r=e!=null?xS(SS(e)):{},kS(t||!e||!e.__esModule?Op(r,"default",{value:e,enumerable:!0}):r,e)),_S=Vs(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===f||P===i||P===o||P===p||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===g||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===x||P.$$typeof===E||P.$$typeof===C||P.$$typeof===b)}I(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var st=P.$$typeof;switch(st){case r:var kt=P.type;switch(kt){case d:case f:case a:case i:case o:case p:return kt;default:var Gr=kt&&kt.$$typeof;switch(Gr){case u:case h:case v:case g:case s:return Gr;default:return st}}case n:return st}}}I(D,"typeOf");var S=d,A=f,k=u,F=s,T=r,R=h,L=a,z=v,O=g,$=n,M=i,j=o,K=p,N=!1;function W(P){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(P)||D(P)===d}I(W,"isAsyncMode");function te(P){return D(P)===f}I(te,"isConcurrentMode");function ue(P){return D(P)===u}I(ue,"isContextConsumer");function re(P){return D(P)===s}I(re,"isContextProvider");function ae(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}I(ae,"isElement");function H(P){return D(P)===h}I(H,"isForwardRef");function Z(P){return D(P)===a}I(Z,"isFragment");function J(P){return D(P)===v}I(J,"isLazy");function ge(P){return D(P)===g}I(ge,"isMemo");function ke(P){return D(P)===n}I(ke,"isPortal");function At(P){return D(P)===i}I(At,"isProfiler");function Ue(P){return D(P)===o}I(Ue,"isStrictMode");function lt(P){return D(P)===p}I(lt,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=T,e.ForwardRef=R,e.Fragment=L,e.Lazy=z,e.Memo=O,e.Portal=$,e.Profiler=M,e.StrictMode=j,e.Suspense=K,e.isAsyncMode=W,e.isConcurrentMode=te,e.isContextConsumer=ue,e.isContextProvider=re,e.isElement=ae,e.isForwardRef=H,e.isFragment=Z,e.isLazy=J,e.isMemo=ge,e.isPortal=ke,e.isProfiler=At,e.isStrictMode=Ue,e.isSuspense=lt,e.isValidElementType=w,e.typeOf=D})()}),FS=Vs((e,t)=>{t.exports=_S()}),q3=Vs((e,t)=>{var r=FS(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function u(b){return r.isMemo(b)?i:s[b.$$typeof]||n}I(u,"getStatics");var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;function v(b,x,E){if(typeof x!="string"){if(g){var C=m(x);C&&C!==g&&v(b,C,E)}var w=f(x);h&&(w=w.concat(h(x)));for(var D=u(b),S=u(x),A=0;A{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return I(function r(n,a,o){function i(d,f){if(!a[d]){if(!n[d]){var h=typeof Vi=="function"&&Vi;if(!f&&h)return h(d,!0);if(s)return s(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=a[d]={exports:{}};n[d][0].call(m.exports,function(g){var v=n[d][1][g];return i(v||g)},m,m.exports,r,n,a,o)}return a[d].exports}I(i,"s");for(var s=typeof Vi=="function"&&Vi,u=0;u=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var u;for(u=0;u0&&(E[x]={cacheItem:g,arg:arguments[x]},C?i(h,E):h.push(E),h.length>d&&s(h.shift())),m.wasMemoized=C,m.numArgs=x+1,b},"memoizerific");return m.limit=d,m.wasMemoized=!1,m.cache=f,m.lru=h,m}};function i(d,f){var h=d.length,p=f.length,m,g,v;for(g=0;g=0&&(h=d[m],p=h.cacheItem.get(h.arg),!p||!p.size);m--)h.cacheItem.delete(h.arg)}I(s,"removeCachedResult");function u(d,f){return d===f||d!==d&&f!==f}I(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.map(i=>d[i]); +var sS=Object.defineProperty;var uS=(e,t,r)=>t in e?sS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var jn=(e,t,r)=>uS(e,typeof t!="symbol"?t+"":t,r);import{_ as Lp}from"./iframe-WttpdJI2.js";import{r as l,R as y,c as ji,g as Ns}from"./index-uubelm5h.js";import{j as X,_ as N3,a as cS,b as dS,c as rt}from"./assertThisInitialized-DaBLapIa.js";import{r as Hs,f as H3}from"./index-CfOt2XX2.js";import{O as j3,P as pS}from"./index-D-8MO0q_.js";import{y as Cm,D as ec}from"./index-DmeKSGxc.js";import{d as fS}from"./index-DrFu-skq.js";import{renderElement as hS,unmountElement as mS}from"./react-18-CtsMCmcS.js";var gS=Object.create,V3=Object.defineProperty,vS=Object.getOwnPropertyDescriptor,U3=Object.getOwnPropertyNames,yS=Object.getPrototypeOf,bS=Object.prototype.hasOwnProperty,La=(e,t)=>function(){return t||(0,e[U3(e)[0]])((t={exports:{}}).exports,t),t.exports},wS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of U3(t))!bS.call(e,a)&&a!==r&&V3(e,a,{get:()=>t[a],enumerable:!(n=vS(t,a))||n.enumerable});return e},ES=(e,t,r)=>(r=e!=null?gS(yS(e)):{},wS(!e||!e.__esModule?V3(r,"default",{value:e,enumerable:!0}):r,e)),Ct=e=>`control-${e.replace(/\s+/g,"-")}`,js=e=>`set-${e.replace(/\s+/g,"-")}`,xS=Object.create,Op=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,DS=Object.getOwnPropertyNames,SS=Object.getPrototypeOf,AS=Object.prototype.hasOwnProperty,I=(e,t)=>Op(e,"name",{value:t,configurable:!0}),Vi=(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')}),Vs=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of DS(t))!AS.call(e,a)&&a!==r&&Op(e,a,{get:()=>t[a],enumerable:!(n=CS(t,a))||n.enumerable});return e},Mp=(e,t,r)=>(r=e!=null?xS(SS(e)):{},kS(t||!e||!e.__esModule?Op(r,"default",{value:e,enumerable:!0}):r,e)),_S=Vs(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===f||P===i||P===o||P===p||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===g||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===x||P.$$typeof===E||P.$$typeof===C||P.$$typeof===b)}I(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var st=P.$$typeof;switch(st){case r:var kt=P.type;switch(kt){case d:case f:case a:case i:case o:case p:return kt;default:var Gr=kt&&kt.$$typeof;switch(Gr){case u:case h:case v:case g:case s:return Gr;default:return st}}case n:return st}}}I(D,"typeOf");var S=d,A=f,k=u,F=s,T=r,R=h,L=a,z=v,O=g,$=n,M=i,j=o,K=p,N=!1;function W(P){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(P)||D(P)===d}I(W,"isAsyncMode");function te(P){return D(P)===f}I(te,"isConcurrentMode");function ue(P){return D(P)===u}I(ue,"isContextConsumer");function re(P){return D(P)===s}I(re,"isContextProvider");function ae(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}I(ae,"isElement");function H(P){return D(P)===h}I(H,"isForwardRef");function Z(P){return D(P)===a}I(Z,"isFragment");function J(P){return D(P)===v}I(J,"isLazy");function ge(P){return D(P)===g}I(ge,"isMemo");function ke(P){return D(P)===n}I(ke,"isPortal");function At(P){return D(P)===i}I(At,"isProfiler");function Ue(P){return D(P)===o}I(Ue,"isStrictMode");function lt(P){return D(P)===p}I(lt,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=T,e.ForwardRef=R,e.Fragment=L,e.Lazy=z,e.Memo=O,e.Portal=$,e.Profiler=M,e.StrictMode=j,e.Suspense=K,e.isAsyncMode=W,e.isConcurrentMode=te,e.isContextConsumer=ue,e.isContextProvider=re,e.isElement=ae,e.isForwardRef=H,e.isFragment=Z,e.isLazy=J,e.isMemo=ge,e.isPortal=ke,e.isProfiler=At,e.isStrictMode=Ue,e.isSuspense=lt,e.isValidElementType=w,e.typeOf=D})()}),FS=Vs((e,t)=>{t.exports=_S()}),q3=Vs((e,t)=>{var r=FS(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function u(b){return r.isMemo(b)?i:s[b.$$typeof]||n}I(u,"getStatics");var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;function v(b,x,E){if(typeof x!="string"){if(g){var C=m(x);C&&C!==g&&v(b,C,E)}var w=f(x);h&&(w=w.concat(h(x)));for(var D=u(b),S=u(x),A=0;A{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return I(function r(n,a,o){function i(d,f){if(!a[d]){if(!n[d]){var h=typeof Vi=="function"&&Vi;if(!f&&h)return h(d,!0);if(s)return s(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=a[d]={exports:{}};n[d][0].call(m.exports,function(g){var v=n[d][1][g];return i(v||g)},m,m.exports,r,n,a,o)}return a[d].exports}I(i,"s");for(var s=typeof Vi=="function"&&Vi,u=0;u=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var u;for(u=0;u0&&(E[x]={cacheItem:g,arg:arguments[x]},C?i(h,E):h.push(E),h.length>d&&s(h.shift())),m.wasMemoized=C,m.numArgs=x+1,b},"memoizerific");return m.limit=d,m.wasMemoized=!1,m.cache=f,m.lru=h,m}};function i(d,f){var h=d.length,p=f.length,m,g,v;for(g=0;g=0&&(h=d[m],p=h.cacheItem.get(h.arg),!p||!p.size);m--)h.cacheItem.delete(h.arg)}I(s,"removeCachedResult");function u(d,f){return d===f||d!==d&&f!==f}I(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Ce(Oa,--je):0,va--,he===10&&(va=1,Ws--),he}I(eb,"prev");function Pe(){return he=je2||ya(he)>3?"":" "}I(tb,"whitespace");function rb(e,t){for(;--t&&Pe()&&!(he<48||he>102||he>57&&he<65||he>70&&he<97););return Ma(e,Oo()+(t<6&&vt()==32&&Pe()==32))}I(rb,"escaping");function Kl(e){for(;Pe();)switch(he){case e:return je;case 34:case 39:e!==34&&e!==39&&Kl(he);break;case 40:e===41&&Kl(e);break;case 92:Pe();break}return je}I(Kl,"delimiter");function nb(e,t){for(;Pe()&&e+he!==57&&!(e+he===84&&vt()===47););return"/*"+Ma(t,je-1)+"*"+Us(e===47?e:Pe())}I(nb,"commenter");function ab(e){for(;!ya(vt());)Pe();return Ma(e,je)}I(ab,"identifier");function ob(e){return Wp(Po("",null,null,null,[""],e=qp(e),0,[0],e))}I(ob,"compile");function Po(e,t,r,n,a,o,i,s,u){for(var d=0,f=0,h=i,p=0,m=0,g=0,v=1,b=1,x=1,E=0,C="",w=a,D=o,S=n,A=C;b;)switch(g=E,E=Pe()){case 40:if(g!=108&&Ce(A,h-1)==58){Gl(A+=Q(Mo(E),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:A+=Mo(E);break;case 9:case 10:case 13:case 32:A+=tb(g);break;case 92:A+=rb(Oo()-1,7);continue;case 47:switch(vt()){case 42:case 47:Do(ib(nb(Pe(),Oo()),t,r),u);break;default:A+="/"}break;case 123*v:s[d++]=ft(A)*x;case 125*v:case 59:case 0:switch(E){case 0:case 125:b=0;case 59+f:x==-1&&(A=Q(A,/\f/g,"")),m>0&&ft(A)-h&&Do(m>32?Ld(A+";",n,r,h-1):Ld(Q(A," ","")+";",n,r,h-2),u);break;case 59:A+=";";default:if(Do(S=$d(A,t,r,d,f,a,s,C,w=[],D=[],h),o),E===123)if(f===0)Po(A,t,S,S,w,o,h,s,D);else switch(p===99&&Ce(A,3)===110?100:p){case 100:case 108:case 109:case 115:Po(e,S,S,n&&Do($d(e,S,S,0,0,a,s,C,a,w=[],h),D),a,D,h,s,n?w:D);break;default:Po(A,S,S,S,[""],D,0,s,D)}}d=f=m=0,v=x=1,C=A="",h=i;break;case 58:h=1+ft(A),m=g;default:if(v<1){if(E==123)--v;else if(E==125&&v++==0&&eb()==125)continue}switch(A+=Us(E),E*v){case 38:x=f>0?1:(A+="\f",-1);break;case 44:s[d++]=(ft(A)-1)*x,x=1;break;case 64:vt()===45&&(A+=Mo(Pe())),p=vt(),f=h=ft(C=A+=ab(Oo())),E++;break;case 45:g===45&&ft(A)==2&&(v=0)}}return o}I(Po,"parse");function $d(e,t,r,n,a,o,i,s,u,d,f){for(var h=a-1,p=a===0?o:[""],m=qs(p),g=0,v=0,b=0;g0?p[x]+" "+E:Q(E,/&\f/g,p[x])))&&(u[b++]=C);return pi(e,t,r,a===0?jp:s,u,d,f)}I($d,"ruleset");function ib(e,t,r){return pi(e,t,r,Hp,Us(Q3()),ga(e,2,-2),0)}I(ib,"comment");function Ld(e,t,r,n){return pi(e,t,r,Vp,ga(e,0,n),ga(e,n+1,-1),n)}I(Ld,"declaration");function mn(e,t){for(var r="",n=qs(e),a=0;a-1},"isIgnoringComment"),US=I(function(e){return function(t,r,n){if(!(t.type!=="rule"||e.compat)){var a=t.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var o=!!t.parent,i=o?t.parent.children:n,s=i.length-1;s>=0;s--){var u=i[s];if(u.line=0;r--)if(!ub(t[r]))return!0;return!1},"isPrependedWithRegularRules"),Am=I(function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},"nullifyElement"),WS=I(function(e,t,r){ub(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."),Am(e)):qS(t,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Am(e)))},"incorrectImportAlarm");function Gp(e,t){switch(Y3(e,t)){case 5103:return ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ne+e+Wl+e+Re+e+e;case 6828:case 4268:return ne+e+Re+e+e;case 6165:return ne+e+Re+"flex-"+e+e;case 5187:return ne+e+Q(e,/(\w+).+(:[^]+)/,ne+"box-$1$2"+Re+"flex-$1$2")+e;case 5443:return ne+e+Re+"flex-item-"+Q(e,/flex-|-self/,"")+e;case 4675:return ne+e+Re+"flex-line-pack"+Q(e,/align-content|flex-|-self/,"")+e;case 5548:return ne+e+Re+Q(e,"shrink","negative")+e;case 5292:return ne+e+Re+Q(e,"basis","preferred-size")+e;case 6060:return ne+"box-"+Q(e,"-grow","")+ne+e+Re+Q(e,"grow","positive")+e;case 4554:return ne+Q(e,/([^-])(transform)/g,"$1"+ne+"$2")+e;case 6187:return Q(Q(Q(e,/(zoom-|grab)/,ne+"$1"),/(image-set)/,ne+"$1"),e,"")+e;case 5495:case 3959:return Q(e,/(image-set\([^]*)/,ne+"$1$`$1");case 4968:return Q(Q(e,/(.+:)(flex-)?(.*)/,ne+"box-pack:$3"+Re+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ne+e+e;case 4095:case 3583:case 4068:case 2532:return Q(e,/(.+)-inline(.+)/,ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ft(e)-1-t>6)switch(Ce(e,t+1)){case 109:if(Ce(e,t+4)!==45)break;case 102:return Q(e,/(.+:)(.+)-([^]+)/,"$1"+ne+"$2-$3$1"+Wl+(Ce(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gl(e,"stretch")?Gp(Q(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ce(e,t+1)!==115)break;case 6444:switch(Ce(e,ft(e)-3-(~Gl(e,"!important")&&10))){case 107:return Q(e,":",":"+ne)+e;case 101:return Q(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ne+(Ce(e,14)===45?"inline-":"")+"box$3$1"+ne+"$2$3$1"+Re+"$2box$3")+e}break;case 5936:switch(Ce(e,t+11)){case 114:return ne+e+Re+Q(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ne+e+Re+Q(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ne+e+Re+Q(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ne+e+Re+e+e}return e}I(Gp,"prefix");var GS=I(function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Vp:e.return=Gp(e.value,e.length);break;case K3:return mn([Zn(e,{value:Q(e.value,"@","@"+ne)})],n);case jp:if(e.length)return J3(e.props,function(a){switch(Z3(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mn([Zn(e,{props:[Q(a,/:(read-\w+)/,":"+Wl+"$1")]})],n);case"::placeholder":return mn([Zn(e,{props:[Q(a,/:(plac\w+)/,":"+ne+"input-$1")]}),Zn(e,{props:[Q(a,/:(plac\w+)/,":"+Wl+"$1")]}),Zn(e,{props:[Q(a,/:(plac\w+)/,Re+"input-$1")]})],n)}return""})}},"prefixer"),KS=[GS],YS=I(function(e){var t=e.key;if(!t)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements.`);if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var n=e.stylisPlugins||KS;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var a={},o,i=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}I(cb,"murmur2");var QS={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},km=`You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". @@ -558,7 +558,7 @@ ${t}`);let r=t.match(Y$);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:tt}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:uee,once:cee,logger:fm}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:D3,composeConfigs:fae,Preview:hae,DocsContext:mae}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:S3,UPDATE_STORY_ARGS:dee,RESET_STORY_ARGS:pee,GLOBALS_UPDATED:A3,NAVIGATE_URL:fee}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var hee=La({"../../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}}}),mee=La({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,s=!0,u=" ";function d(w,D){var S=D.appendChild(h(w));if(w.children.length){var A=p(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function f(w,D){var S=!1,A=p(S);if(D.forEach(function(k){d(k,A)}),i=w||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(A)}function h(w){var D=document.createElement("li"),S=document.createElement("a");return r.listItemClass&&D.setAttribute("class",r.listItemClass),r.onClick&&(S.onclick=r.onClick),r.includeTitleTags&&S.setAttribute("title",w.textContent),r.includeHtml&&w.childNodes.length?n.call(w.childNodes,function(A){S.appendChild(A.cloneNode(!0))}):S.textContent=w.textContent,S.setAttribute("href",r.basePath+"#"+w.id),S.setAttribute("class",r.linkClass+u+"node-name--"+w.nodeName+u+r.extraLinkClasses),D.appendChild(S),D}function p(w){var D=r.orderedList?"ol":"ul",S=document.createElement(D),A=r.listClass+u+r.extraListClasses;return w&&(A=A+u+r.collapsibleClass,A=A+u+r.isCollapsedClass),S.setAttribute("class",A),S}function m(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var w;w=document.querySelector(r.scrollContainer).scrollTop}else w=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),w>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=u+r.positionFixedClass):D.className=D.className.replace(u+r.positionFixedClass,"")}function g(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=g(w.offsetParent))),D}function v(w,D){return w&&w.className!==D&&(w.className=D),w}function b(w){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&m();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(O,$){if(g(O)>D+r.headingsOffset+10){var M=$===0?$:$-1;return A=S[M],!0}else if($===S.length-1)return A=S[S.length-1],!0});var k=i.querySelector("."+r.activeLinkClass),F=i.querySelector("."+r.linkClass+".node-name--"+A.nodeName+'[href="'+r.basePath+"#"+A.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(k===F)return;var T=i.querySelectorAll("."+r.linkClass);n.call(T,function(O){v(O,O.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(O){v(O,O.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var L=F&&F.parentNode;L&&L.className.indexOf(r.activeListItemClass)===-1&&(L.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(O){O.className.indexOf(r.isCollapsedClass)===-1&&(O.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&v(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),x(F&&F.parentNode.parentNode)}}function x(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(v(w,w.className.replace(u+r.isCollapsedClass,"")),x(w.parentNode.parentNode)):w}function E(w){var D=w.target||w.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(s=!1)}function C(){s=!0}return{enableTocAnimation:C,disableTocAnimation:E,render:f,updateToc:b}}}}),gee=La({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(h){return h[h.length-1]}function o(h){return+h.nodeName.toUpperCase().replace("H","")}function i(h){try{return h instanceof window.HTMLElement||h instanceof window.parent.HTMLElement}catch{return h instanceof window.HTMLElement}}function s(h){if(!i(h))return h;if(r.ignoreHiddenElements&&(!h.offsetHeight||!h.offsetParent))return null;let p=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var m={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:p};return r.includeHtml&&(m.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(m,h):m}function u(h,p){for(var m=s(h),g=m.headingLevel,v=p,b=a(v),x=b?b.headingLevel:0,E=g-x;E>0&&(b=a(v),!(b&&g===b.headingLevel));)b&&b.children!==void 0&&(v=b.children),E--;return g>=r.collapseDepth&&(m.isCollapsed=!0),v.push(m),v}function d(h,p){var m=p;r.ignoreSelector&&(m=p.split(",").map(function(g){return g.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(m)}catch{return console.warn("Headers not found with selector: "+m),null}}function f(h){return n.call(h,function(p,m){var g=s(m);return g&&u(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:f,selectHeadings:d}}}}),vee=La({"../../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)}}}}),yee=La({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(e){e.initSmoothScrolling=t;function t(n){var a=n.duration,o=n.offset,i=location.hash?d(location.href):location.href;s();function s(){document.body.addEventListener("click",h,!1);function h(p){!u(p.target)||p.target.className.indexOf("no-smooth-scroll")>-1||p.target.href.charAt(p.target.href.length-2)==="#"&&p.target.href.charAt(p.target.href.length-1)==="!"||p.target.className.indexOf(n.linkClass)===-1||r(p.target.hash,{duration:a,offset:o,callback:function(){f(p.target.hash)}})}}function u(h){return h.tagName.toLowerCase()==="a"&&(h.hash.length>0||h.href.charAt(h.href.length-1)==="#")&&(d(h.href)===i||d(h.href)+"#"===i)}function d(h){return h.slice(0,h.lastIndexOf("#"))}function f(h){var p=document.getElementById(h.substring(1));p&&(/^(?:a|select|input|button|textarea)$/i.test(p.tagName)||(p.tabIndex=-1),p.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||g},s=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),u=typeof n=="string"?i.offset+(n?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(u):i.duration,f,h;requestAnimationFrame(function(v){f=v,p(v)});function p(v){h=v-f,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var p,m=Object.prototype.hasOwnProperty;function g(){for(var E={},C=0;C({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:se(.3,e.color.defaultText),fontSize:e.typography.size.s2})),BD=e=>y.createElement(wee,{...e,className:"docblock-emptyblock sb-unstyled"}),Eee=_(Th)(({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"}})),xee=_.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"})),wl=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${Nd}`]:{margin:0}})),Cee=()=>y.createElement(xee,null,y.createElement(wl,null),y.createElement(wl,{style:{width:"80%"}}),y.createElement(wl,{style:{width:"30%"}}),y.createElement(wl,{style:{width:"80%"}})),zD=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=gb();if(e)return y.createElement(Cee,null);if(t)return y.createElement(BD,null,t);let u=y.createElement(Eee,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?Md.dark:Md.light;return y.createElement(vb,{theme:Pd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},ve=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,hm=600,Dee=_.h1(de,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${hm}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),See=_.h2(de,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${hm}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:se(.25,e.color.defaultText)})),Aee=_.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?se(.1,e.color.defaultText):se(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[ve("a")]:{...t,fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[ve("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[ve("div")]:t,[ve("dl")]:{...t,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[ve("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[ve("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[ve("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[ve("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[ve("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[ve("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[ve("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[ve("img")]:{maxWidth:"100%"},[ve("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[ve("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[ve("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[ve("pre")]:{...t,fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[ve("span")]:{...t,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[ve("table")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[ve("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),kee=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${hm}px)`]:{}})),_ee=({children:e,toc:t})=>y.createElement(kee,{className:"sbdocs sbdocs-wrapper"},y.createElement(Aee,{className:"sbdocs sbdocs-content"},e),t),Zu=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:Fee}=tt,Iee=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=Fee.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})}},$D=l.createContext({scale:1}),{PREVIEW_URL:Tee}=tt,Ree=Tee||"iframe.html",Fp=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,Bee=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:f}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,p=f(i,h,{showMain:()=>{},showError:({title:m,description:g})=>o(new Error(`${m} - ${g}`)),showException:m=>o(m)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>p())}},[u,f,i]),a?y.createElement("pre",null,y.createElement(Q$,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${Fp(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(LD,null),y.createElement("div",{ref:t,id:`${Fp(e)}-inner`,"data-name":i.name}))},zee=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement($D.Consumer,null,({scale:r})=>y.createElement(Iee,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:xO(Ree,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),$ee=_.strong(({theme:e})=>({color:e.color.orange})),Lee=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement($ee,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:Fp(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(Bee,{...e}):y.createElement(zee,{...e}))},LD=()=>y.createElement(EO,null),Oee=_(Hh)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Mee=_.div({display:"flex",alignItems:"center",gap:4}),Pee=_.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`})),Nee=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(Oee,{...o},y.createElement(Mee,{key:"left"},e?[1,2,3].map(i=>y.createElement(Pee,{key:i})):y.createElement(y.Fragment,null,y.createElement(yn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(cM,null)),y.createElement(yn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(dM,null)),y.createElement(yn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(pM,null))))),Hee=_.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)`}}:{}),k3=_(zD)(({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)":$t(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":$t(.05,e.background.content)}})),jee=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Zu(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),Vee=(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(k3,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(k3,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function Uee(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var qee=_(Nee)({position:"absolute",top:0,left:0,right:0,height:40}),Wee=_.div({overflow:"hidden",position:"relative"}),OD=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...f})=>{let[h,p]=l.useState(i),{source:m,actionItem:g}=Vee(a,h,p),[v,b]=l.useState(1),x=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[g]:[],[C,w]=l.useState(s?[...s]:[]),D=[...E,...C],{window:S}=tt,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:T}=await Lp(()=>import("./index-DgFDPaKo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url);T()},[]),k=F=>{let T=S.getSelection();T&&T.type==="Range"||(F.preventDefault(),C.filter(R=>R.title==="Copied").length===0&&A(m.props.code).then(()=>{w([...C,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(C.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(jee,{withSource:a,withToolbar:o,...f,className:x.join(" ")},o&&y.createElement(qee,{isLoading:e,border:!0,zoom:F=>b(v*F),resetZoom:()=>b(1),storyId:Uee(n),baseUrl:"./iframe.html"}),y.createElement($D.Provider,{value:{scale:v}},y.createElement(Wee,{className:"docs-story",onCopyCapture:a&&k},y.createElement(Hee,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(q$.Element,{scale:v},Array.isArray(n)?n.map((F,T)=>y.createElement("div",{key:T},F)):y.createElement("div",null,n))),y.createElement(pf,{actionItems:D}))),a&&h&&m)};_(OD)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Gee=_.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:se(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${gl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${gl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:gl(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"?`${gl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),Kee=e=>e==="true",Yee=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var f;let i=l.useCallback(()=>r(!1),[r]),s=!!((f=o==null?void 0:o.table)!=null&&f.readonly);if(t===void 0)return y.createElement(zn,{variant:"outline",size:"medium",id:js(e),onClick:i,disabled:s},"Set boolean");let u=Ct(e),d=typeof t=="string"?Kee(t):t;return y.createElement(Gee,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:h=>r(h.target.checked),checked:d,role:"switch",disabled:s,name:e,onBlur:n,onFocus:a}),y.createElement("span",{"aria-hidden":"true"},"False"),y.createElement("span",{"aria-hidden":"true"},"True"))},Zee=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},Jee=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},Xee=e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),a=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${a}`},Qee=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},_3=_($i.Input)(({readOnly:e})=>({opacity:e?.5:1})),ete=_.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}})),tte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var g;let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),f=!!((g=o==null?void 0:o.table)!=null&&g.readonly);l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?Xee(t):""),d&&d.current&&(d.current.value=t?Qee(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let b=Zee(v.target.value),x=new Date(t);x.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());let E=x.getTime();E&&r(E),s(!!E)},p=v=>{if(!v.target.value)return r();let b=Jee(v.target.value),x=new Date(t);x.setHours(b.getHours()),x.setMinutes(b.getMinutes());let E=x.getTime();E&&r(E),s(!!E)},m=Ct(e);return y.createElement(ete,null,y.createElement(_3,{type:"date",max:"9999-12-31",ref:u,id:`${m}-date`,name:`${m}-date`,readOnly:f,onChange:h,onFocus:n,onBlur:a}),y.createElement(_3,{type:"time",id:`${m}-time`,name:`${m}-time`,ref:d,onChange:p,readOnly:f,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},rte=_.label({display:"flex"}),nte=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},ate=_($i.Input)(({readOnly:e})=>({opacity:e?.5:1})),ote=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{var C;let[d,f]=l.useState(typeof t=="number"?t:""),[h,p]=l.useState(!1),[m,g]=l.useState(null),v=!!((C=u==null?void 0:u.table)!=null&&C.readonly),b=l.useCallback(w=>{f(w.target.value);let D=parseFloat(w.target.value);Number.isNaN(D)?g(new Error(`'${w.target.value}' is not a number`)):(r(D),g(null))},[r,g]),x=l.useCallback(()=>{f("0"),r(0),p(!0)},[p]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&f(t)},[t]),t===void 0?y.createElement(zn,{variant:"outline",size:"medium",id:js(e),onClick:x,disabled:v},"Set number"):y.createElement(rte,null,y.createElement(ate,{ref:E,id:Ct(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:m?"error":null,autoFocus:h,readOnly:v,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},MD=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},Ip=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],PD=(e,t)=>e&&t&&e.map(r=>t[r]),ite=_.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"}}}),lte=_.span({"[aria-readonly=true] &":{opacity:.5}}),ste=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),F3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var p;if(!t)return fm.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=Ip(r,t),[s,u]=l.useState(i),d=!!((p=o==null?void 0:o.table)!=null&&p.readonly),f=m=>{let g=m.target.value,v=[...s];v.includes(g)?v.splice(v.indexOf(g),1):v.push(g),n(PD(v,t)),u(v)};l.useEffect(()=>{u(Ip(r,t))},[r]);let h=Ct(e);return y.createElement(ite,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,g)=>{let v=`${h}-${g}`;return y.createElement(ste,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:f,checked:s==null?void 0:s.includes(m)}),y.createElement(lte,null,m))}))},ute=_.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"}}}),cte=_.span({"[aria-readonly=true] &":{opacity:.5}}),dte=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),I3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return fm.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=MD(r,t),s=Ct(e),u=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return y.createElement(ute,{"aria-readonly":u,isInline:a},Object.keys(t).map((f,h)=>{let p=`${s}-${h}`;return y.createElement(dte,{key:p,htmlFor:p},y.createElement("input",{type:"radio",id:p,name:s,disabled:u,value:f,onChange:m=>n(t[m.currentTarget.value]),checked:f===i}),y.createElement(cte,null,f))}))},pte={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},ND=_.select(pte,({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}}})),HD=_.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}}})),T3="Choose option...",fte=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{n(r[f.currentTarget.value])},i=MD(t,r)||T3,s=Ct(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(HD,null,y.createElement(wC,null),y.createElement(ND,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},T3),Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},hte=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{let h=Array.from(f.currentTarget.options).filter(p=>p.selected).map(p=>p.value);n(PD(h,r))},i=Ip(t,r),s=Ct(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(HD,null,y.createElement(ND,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},R3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(hte,{...e}):y.createElement(fte,{...e}):(fm.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},mte=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,gte={check:F3,"inline-check":F3,radio:I3,"inline-radio":I3,select:R3,"multi-select":R3},Yn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?mte(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=gte[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},vte="Error",yte="Object",bte="Array",wte="String",Ete="Number",xte="Boolean",Cte="Date",Dte="Null",Ste="Undefined",Ate="Function",kte="Symbol",jD="ADD_DELTA_TYPE",VD="REMOVE_DELTA_TYPE",UD="UPDATE_DELTA_TYPE",mm="value",_te="key";function hn(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 qD(e,t){let r=hn(e),n=hn(t);return(r==="Function"||n==="Function")&&n!==r}var gm=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(mm,o,i),f=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let p=a(_te,o,i);h=l.cloneElement(p,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,f,u,s)}};gm.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var WD=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:VD};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:jD,keyPath:r,deep:n,key:i.length-1,newValue:e})}).catch(o.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:UD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=i(e,t,r,n,s),h=o(e,t,r,n,s),p=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&p)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:T,ul:R,addForm:L}=f(e,t,r,n,h),z=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),$=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k});return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"["),!a&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map((M,j)=>y.createElement(Ju,{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:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:L},y.createElement(gm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"]"),!z&&$)}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)}};WD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var GD=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(()=>{qD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,textareaElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=null,x=null,E=s(e,i,n,a,u);if(r&&!E){let C=p(mm,g,a,e,i,u),w=l.cloneElement(f,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(C,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:v.editForm},S," ",D,w),x=null}else{b=y.createElement("span",{className:"rejt-value",style:v.value,onClick:E?null:this.handleEditMode},t);let C=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});x=E?null:C}return y.createElement("li",{className:"rejt-function-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," :"," "),b,x)}};GD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Ju=class extends l.Component{constructor(e){super(e),this.state={data:e.data,name:e.name,keyPath:e.keyPath,deep:e.deep}}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}render(){let{data:e,name:t,keyPath:r,deep:n}=this.state,{isCollapsed:a,handleRemove:o,handleUpdateValue:i,onUpdate:s,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=hn(e);switch(k){case vte: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:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case yte: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:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case bte:return y.createElement(WD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case wte:return y.createElement(Cr,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Ete:return y.createElement(Cr,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case xte: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:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Cte:return y.createElement(Cr,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Dte:return y.createElement(Cr,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Ste:return y.createElement(Cr,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Ate:return y.createElement(GD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,textareaElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case kte:return y.createElement(Cr,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Ju.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:jD,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:VD};delete n[e],this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:UD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),p=o(e,n,t,r,i),m=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!p&&m)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:T,ul:R,delimiter:L}=f(e,t,r,n,h),z=Object.getOwnPropertyNames(t),O=d(e,t,r,n,h),$=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),M=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k}),j=z.map(K=>y.createElement(Ju,{key:K,name:K,data:t[K],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(K),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}));return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"{"),!O&&$,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},j),!O&&o&&y.createElement("div",{className:"rejt-add-form",style:T},y.createElement(gm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"}"),!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(()=>{qD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,inputElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=s(e,i,n,a,u),x=r&&!b,E=p(mm,g,a,e,i,u),C=l.cloneElement(f,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});return y.createElement("li",{className:"rejt-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," : "),x?y.createElement("span",{className:"rejt-edit-form",style:v.editForm},D," ",w,C):y.createElement("span",{className:"rejt-value",style:v.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!x&&S)}};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," - ")};function Fte(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var Ite={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Tte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Rte={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},KD=class extends l.Component{constructor(e){super(e),this.state={data:e.data,rootName:e.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data||e.rootName!==t.rootName?{data:e.data,rootName:e.rootName}:null}onUpdate(e,t){this.setState({data:t}),this.props.onFullyUpdate(t)}removeRoot(){this.onUpdate(null,null)}render(){let{data:e,rootName:t}=this.state,{isCollapsed:r,onDeltaUpdate:n,readOnly:a,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElement:d,textareaElement:f,minusMenuElement:h,plusMenuElement:p,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x,fallback:E=null}=this.props,C=hn(e),w=a;hn(a)==="Boolean"&&(w=()=>a);let D=d;d&&hn(d)!=="Function"&&(D=()=>d);let S=f;return f&&hn(f)!=="Function"&&(S=()=>f),C==="Object"||C==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Ju,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:w,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:h,plusMenuElement:p,handleRemove:this.removeRoot,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x})):E}};KD.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return Ite;case"Array":return Tte;default:return Rte}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>Fte(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:Bte}=tt,zte=_.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}})),Rd=_.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})),$te=_(gM)(({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}})),Lte=_(vM)(({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}})),B3=_.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}`}})),Ote=_(yn)(({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}})),Mte=_($i.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"}})),Pte={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},Nte=e=>{e.currentTarget.dispatchEvent(new Bte.KeyboardEvent("keydown",Pte))},Hte=e=>{e.currentTarget.select()},jte=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),z3=({name:e,value:t,onChange:r,argType:n})=>{var C;let a=gb(),o=l.useMemo(()=>t&&lJ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,f]=l.useState(null),h=!!((C=n==null?void 0:n.table)!=null&&C.readonly),p=l.useCallback(w=>{try{w&&r(JSON.parse(w)),f(void 0)}catch(D){f(D)}},[r]),[m,g]=l.useState(!1),v=l.useCallback(()=>{r({}),g(!0)},[g]),b=l.useRef(null);if(l.useEffect(()=>{m&&b.current&&b.current.select()},[m]),!i)return y.createElement(zn,{disabled:h,id:js(e),onClick:v},"Set object");let x=y.createElement(Mte,{ref:b,id:Ct(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:w=>p(w.target.value),placeholder:"Edit JSON string...",autoFocus:m,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return y.createElement(zte,{"aria-readonly":h},E&&y.createElement(Ote,{onClick:w=>{w.preventDefault(),u(D=>!D)}},s?y.createElement(hM,null):y.createElement(fM,null),y.createElement("span",null,"RAW")),s?x:y.createElement(KD,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:jte(a),cancelButtonElement:y.createElement(Rd,{type:"button"},"Cancel"),editButtonElement:y.createElement(Rd,{type:"submit"},"Save"),addButtonElement:y.createElement(Rd,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement($te,null),minusMenuElement:y.createElement(Lte,null),inputElement:(w,D,S,A)=>A?y.createElement(B3,{onFocus:Hte,onBlur:Nte}):y.createElement(B3,null),fallback:x}))},Vte=_.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:tt}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:uee,once:cee,logger:fm}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:D3,composeConfigs:fae,Preview:hae,DocsContext:mae}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:S3,UPDATE_STORY_ARGS:dee,RESET_STORY_ARGS:pee,GLOBALS_UPDATED:A3,NAVIGATE_URL:fee}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var hee=La({"../../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}}}),mee=La({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,s=!0,u=" ";function d(w,D){var S=D.appendChild(h(w));if(w.children.length){var A=p(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function f(w,D){var S=!1,A=p(S);if(D.forEach(function(k){d(k,A)}),i=w||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(A)}function h(w){var D=document.createElement("li"),S=document.createElement("a");return r.listItemClass&&D.setAttribute("class",r.listItemClass),r.onClick&&(S.onclick=r.onClick),r.includeTitleTags&&S.setAttribute("title",w.textContent),r.includeHtml&&w.childNodes.length?n.call(w.childNodes,function(A){S.appendChild(A.cloneNode(!0))}):S.textContent=w.textContent,S.setAttribute("href",r.basePath+"#"+w.id),S.setAttribute("class",r.linkClass+u+"node-name--"+w.nodeName+u+r.extraLinkClasses),D.appendChild(S),D}function p(w){var D=r.orderedList?"ol":"ul",S=document.createElement(D),A=r.listClass+u+r.extraListClasses;return w&&(A=A+u+r.collapsibleClass,A=A+u+r.isCollapsedClass),S.setAttribute("class",A),S}function m(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var w;w=document.querySelector(r.scrollContainer).scrollTop}else w=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),w>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=u+r.positionFixedClass):D.className=D.className.replace(u+r.positionFixedClass,"")}function g(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=g(w.offsetParent))),D}function v(w,D){return w&&w.className!==D&&(w.className=D),w}function b(w){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&m();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(O,$){if(g(O)>D+r.headingsOffset+10){var M=$===0?$:$-1;return A=S[M],!0}else if($===S.length-1)return A=S[S.length-1],!0});var k=i.querySelector("."+r.activeLinkClass),F=i.querySelector("."+r.linkClass+".node-name--"+A.nodeName+'[href="'+r.basePath+"#"+A.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(k===F)return;var T=i.querySelectorAll("."+r.linkClass);n.call(T,function(O){v(O,O.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(O){v(O,O.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var L=F&&F.parentNode;L&&L.className.indexOf(r.activeListItemClass)===-1&&(L.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(O){O.className.indexOf(r.isCollapsedClass)===-1&&(O.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&v(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),x(F&&F.parentNode.parentNode)}}function x(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(v(w,w.className.replace(u+r.isCollapsedClass,"")),x(w.parentNode.parentNode)):w}function E(w){var D=w.target||w.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(s=!1)}function C(){s=!0}return{enableTocAnimation:C,disableTocAnimation:E,render:f,updateToc:b}}}}),gee=La({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(h){return h[h.length-1]}function o(h){return+h.nodeName.toUpperCase().replace("H","")}function i(h){try{return h instanceof window.HTMLElement||h instanceof window.parent.HTMLElement}catch{return h instanceof window.HTMLElement}}function s(h){if(!i(h))return h;if(r.ignoreHiddenElements&&(!h.offsetHeight||!h.offsetParent))return null;let p=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var m={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:p};return r.includeHtml&&(m.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(m,h):m}function u(h,p){for(var m=s(h),g=m.headingLevel,v=p,b=a(v),x=b?b.headingLevel:0,E=g-x;E>0&&(b=a(v),!(b&&g===b.headingLevel));)b&&b.children!==void 0&&(v=b.children),E--;return g>=r.collapseDepth&&(m.isCollapsed=!0),v.push(m),v}function d(h,p){var m=p;r.ignoreSelector&&(m=p.split(",").map(function(g){return g.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(m)}catch{return console.warn("Headers not found with selector: "+m),null}}function f(h){return n.call(h,function(p,m){var g=s(m);return g&&u(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:f,selectHeadings:d}}}}),vee=La({"../../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)}}}}),yee=La({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(e){e.initSmoothScrolling=t;function t(n){var a=n.duration,o=n.offset,i=location.hash?d(location.href):location.href;s();function s(){document.body.addEventListener("click",h,!1);function h(p){!u(p.target)||p.target.className.indexOf("no-smooth-scroll")>-1||p.target.href.charAt(p.target.href.length-2)==="#"&&p.target.href.charAt(p.target.href.length-1)==="!"||p.target.className.indexOf(n.linkClass)===-1||r(p.target.hash,{duration:a,offset:o,callback:function(){f(p.target.hash)}})}}function u(h){return h.tagName.toLowerCase()==="a"&&(h.hash.length>0||h.href.charAt(h.href.length-1)==="#")&&(d(h.href)===i||d(h.href)+"#"===i)}function d(h){return h.slice(0,h.lastIndexOf("#"))}function f(h){var p=document.getElementById(h.substring(1));p&&(/^(?:a|select|input|button|textarea)$/i.test(p.tagName)||(p.tabIndex=-1),p.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||g},s=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),u=typeof n=="string"?i.offset+(n?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(u):i.duration,f,h;requestAnimationFrame(function(v){f=v,p(v)});function p(v){h=v-f,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var p,m=Object.prototype.hasOwnProperty;function g(){for(var E={},C=0;C({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:se(.3,e.color.defaultText),fontSize:e.typography.size.s2})),BD=e=>y.createElement(wee,{...e,className:"docblock-emptyblock sb-unstyled"}),Eee=_(Th)(({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"}})),xee=_.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"})),wl=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${Nd}`]:{margin:0}})),Cee=()=>y.createElement(xee,null,y.createElement(wl,null),y.createElement(wl,{style:{width:"80%"}}),y.createElement(wl,{style:{width:"30%"}}),y.createElement(wl,{style:{width:"80%"}})),zD=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=gb();if(e)return y.createElement(Cee,null);if(t)return y.createElement(BD,null,t);let u=y.createElement(Eee,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?Md.dark:Md.light;return y.createElement(vb,{theme:Pd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},ve=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,hm=600,Dee=_.h1(de,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${hm}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),See=_.h2(de,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${hm}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:se(.25,e.color.defaultText)})),Aee=_.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?se(.1,e.color.defaultText):se(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[ve("a")]:{...t,fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[ve("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[ve("div")]:t,[ve("dl")]:{...t,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[ve("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[ve("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[ve("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[ve("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[ve("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[ve("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[ve("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[ve("img")]:{maxWidth:"100%"},[ve("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[ve("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[ve("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[ve("pre")]:{...t,fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[ve("span")]:{...t,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[ve("table")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[ve("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),kee=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${hm}px)`]:{}})),_ee=({children:e,toc:t})=>y.createElement(kee,{className:"sbdocs sbdocs-wrapper"},y.createElement(Aee,{className:"sbdocs sbdocs-content"},e),t),Zu=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:Fee}=tt,Iee=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=Fee.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})}},$D=l.createContext({scale:1}),{PREVIEW_URL:Tee}=tt,Ree=Tee||"iframe.html",Fp=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,Bee=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:f}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,p=f(i,h,{showMain:()=>{},showError:({title:m,description:g})=>o(new Error(`${m} - ${g}`)),showException:m=>o(m)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>p())}},[u,f,i]),a?y.createElement("pre",null,y.createElement(Q$,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${Fp(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(LD,null),y.createElement("div",{ref:t,id:`${Fp(e)}-inner`,"data-name":i.name}))},zee=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement($D.Consumer,null,({scale:r})=>y.createElement(Iee,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:xO(Ree,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),$ee=_.strong(({theme:e})=>({color:e.color.orange})),Lee=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement($ee,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:Fp(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(Bee,{...e}):y.createElement(zee,{...e}))},LD=()=>y.createElement(EO,null),Oee=_(Hh)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Mee=_.div({display:"flex",alignItems:"center",gap:4}),Pee=_.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`})),Nee=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(Oee,{...o},y.createElement(Mee,{key:"left"},e?[1,2,3].map(i=>y.createElement(Pee,{key:i})):y.createElement(y.Fragment,null,y.createElement(yn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(cM,null)),y.createElement(yn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(dM,null)),y.createElement(yn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(pM,null))))),Hee=_.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)`}}:{}),k3=_(zD)(({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)":$t(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":$t(.05,e.background.content)}})),jee=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Zu(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),Vee=(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(k3,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(k3,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function Uee(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var qee=_(Nee)({position:"absolute",top:0,left:0,right:0,height:40}),Wee=_.div({overflow:"hidden",position:"relative"}),OD=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...f})=>{let[h,p]=l.useState(i),{source:m,actionItem:g}=Vee(a,h,p),[v,b]=l.useState(1),x=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[g]:[],[C,w]=l.useState(s?[...s]:[]),D=[...E,...C],{window:S}=tt,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:T}=await Lp(()=>import("./index-DiSMTqGw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url);T()},[]),k=F=>{let T=S.getSelection();T&&T.type==="Range"||(F.preventDefault(),C.filter(R=>R.title==="Copied").length===0&&A(m.props.code).then(()=>{w([...C,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(C.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(jee,{withSource:a,withToolbar:o,...f,className:x.join(" ")},o&&y.createElement(qee,{isLoading:e,border:!0,zoom:F=>b(v*F),resetZoom:()=>b(1),storyId:Uee(n),baseUrl:"./iframe.html"}),y.createElement($D.Provider,{value:{scale:v}},y.createElement(Wee,{className:"docs-story",onCopyCapture:a&&k},y.createElement(Hee,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(q$.Element,{scale:v},Array.isArray(n)?n.map((F,T)=>y.createElement("div",{key:T},F)):y.createElement("div",null,n))),y.createElement(pf,{actionItems:D}))),a&&h&&m)};_(OD)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Gee=_.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:se(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${gl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${gl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:gl(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"?`${gl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),Kee=e=>e==="true",Yee=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var f;let i=l.useCallback(()=>r(!1),[r]),s=!!((f=o==null?void 0:o.table)!=null&&f.readonly);if(t===void 0)return y.createElement(zn,{variant:"outline",size:"medium",id:js(e),onClick:i,disabled:s},"Set boolean");let u=Ct(e),d=typeof t=="string"?Kee(t):t;return y.createElement(Gee,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:h=>r(h.target.checked),checked:d,role:"switch",disabled:s,name:e,onBlur:n,onFocus:a}),y.createElement("span",{"aria-hidden":"true"},"False"),y.createElement("span",{"aria-hidden":"true"},"True"))},Zee=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},Jee=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},Xee=e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),a=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${a}`},Qee=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},_3=_($i.Input)(({readOnly:e})=>({opacity:e?.5:1})),ete=_.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}})),tte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var g;let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),f=!!((g=o==null?void 0:o.table)!=null&&g.readonly);l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?Xee(t):""),d&&d.current&&(d.current.value=t?Qee(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let b=Zee(v.target.value),x=new Date(t);x.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());let E=x.getTime();E&&r(E),s(!!E)},p=v=>{if(!v.target.value)return r();let b=Jee(v.target.value),x=new Date(t);x.setHours(b.getHours()),x.setMinutes(b.getMinutes());let E=x.getTime();E&&r(E),s(!!E)},m=Ct(e);return y.createElement(ete,null,y.createElement(_3,{type:"date",max:"9999-12-31",ref:u,id:`${m}-date`,name:`${m}-date`,readOnly:f,onChange:h,onFocus:n,onBlur:a}),y.createElement(_3,{type:"time",id:`${m}-time`,name:`${m}-time`,ref:d,onChange:p,readOnly:f,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},rte=_.label({display:"flex"}),nte=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},ate=_($i.Input)(({readOnly:e})=>({opacity:e?.5:1})),ote=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{var C;let[d,f]=l.useState(typeof t=="number"?t:""),[h,p]=l.useState(!1),[m,g]=l.useState(null),v=!!((C=u==null?void 0:u.table)!=null&&C.readonly),b=l.useCallback(w=>{f(w.target.value);let D=parseFloat(w.target.value);Number.isNaN(D)?g(new Error(`'${w.target.value}' is not a number`)):(r(D),g(null))},[r,g]),x=l.useCallback(()=>{f("0"),r(0),p(!0)},[p]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&f(t)},[t]),t===void 0?y.createElement(zn,{variant:"outline",size:"medium",id:js(e),onClick:x,disabled:v},"Set number"):y.createElement(rte,null,y.createElement(ate,{ref:E,id:Ct(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:m?"error":null,autoFocus:h,readOnly:v,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},MD=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},Ip=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],PD=(e,t)=>e&&t&&e.map(r=>t[r]),ite=_.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"}}}),lte=_.span({"[aria-readonly=true] &":{opacity:.5}}),ste=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),F3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var p;if(!t)return fm.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=Ip(r,t),[s,u]=l.useState(i),d=!!((p=o==null?void 0:o.table)!=null&&p.readonly),f=m=>{let g=m.target.value,v=[...s];v.includes(g)?v.splice(v.indexOf(g),1):v.push(g),n(PD(v,t)),u(v)};l.useEffect(()=>{u(Ip(r,t))},[r]);let h=Ct(e);return y.createElement(ite,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,g)=>{let v=`${h}-${g}`;return y.createElement(ste,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:f,checked:s==null?void 0:s.includes(m)}),y.createElement(lte,null,m))}))},ute=_.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"}}}),cte=_.span({"[aria-readonly=true] &":{opacity:.5}}),dte=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),I3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return fm.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=MD(r,t),s=Ct(e),u=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return y.createElement(ute,{"aria-readonly":u,isInline:a},Object.keys(t).map((f,h)=>{let p=`${s}-${h}`;return y.createElement(dte,{key:p,htmlFor:p},y.createElement("input",{type:"radio",id:p,name:s,disabled:u,value:f,onChange:m=>n(t[m.currentTarget.value]),checked:f===i}),y.createElement(cte,null,f))}))},pte={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},ND=_.select(pte,({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}}})),HD=_.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}}})),T3="Choose option...",fte=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{n(r[f.currentTarget.value])},i=MD(t,r)||T3,s=Ct(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(HD,null,y.createElement(wC,null),y.createElement(ND,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},T3),Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},hte=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{let h=Array.from(f.currentTarget.options).filter(p=>p.selected).map(p=>p.value);n(PD(h,r))},i=Ip(t,r),s=Ct(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(HD,null,y.createElement(ND,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},R3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(hte,{...e}):y.createElement(fte,{...e}):(fm.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},mte=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,gte={check:F3,"inline-check":F3,radio:I3,"inline-radio":I3,select:R3,"multi-select":R3},Yn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?mte(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=gte[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},vte="Error",yte="Object",bte="Array",wte="String",Ete="Number",xte="Boolean",Cte="Date",Dte="Null",Ste="Undefined",Ate="Function",kte="Symbol",jD="ADD_DELTA_TYPE",VD="REMOVE_DELTA_TYPE",UD="UPDATE_DELTA_TYPE",mm="value",_te="key";function hn(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 qD(e,t){let r=hn(e),n=hn(t);return(r==="Function"||n==="Function")&&n!==r}var gm=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(mm,o,i),f=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let p=a(_te,o,i);h=l.cloneElement(p,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,f,u,s)}};gm.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var WD=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:VD};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:jD,keyPath:r,deep:n,key:i.length-1,newValue:e})}).catch(o.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:UD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=i(e,t,r,n,s),h=o(e,t,r,n,s),p=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&p)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:T,ul:R,addForm:L}=f(e,t,r,n,h),z=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),$=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k});return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"["),!a&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map((M,j)=>y.createElement(Ju,{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:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:L},y.createElement(gm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"]"),!z&&$)}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)}};WD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var GD=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(()=>{qD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,textareaElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=null,x=null,E=s(e,i,n,a,u);if(r&&!E){let C=p(mm,g,a,e,i,u),w=l.cloneElement(f,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(C,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:v.editForm},S," ",D,w),x=null}else{b=y.createElement("span",{className:"rejt-value",style:v.value,onClick:E?null:this.handleEditMode},t);let C=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});x=E?null:C}return y.createElement("li",{className:"rejt-function-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," :"," "),b,x)}};GD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Ju=class extends l.Component{constructor(e){super(e),this.state={data:e.data,name:e.name,keyPath:e.keyPath,deep:e.deep}}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}render(){let{data:e,name:t,keyPath:r,deep:n}=this.state,{isCollapsed:a,handleRemove:o,handleUpdateValue:i,onUpdate:s,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=hn(e);switch(k){case vte: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:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case yte: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:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case bte:return y.createElement(WD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case wte:return y.createElement(Cr,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Ete:return y.createElement(Cr,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case xte: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:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Cte:return y.createElement(Cr,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Dte:return y.createElement(Cr,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Ste:return y.createElement(Cr,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case Ate:return y.createElement(GD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,textareaElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case kte:return y.createElement(Cr,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Ju.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:jD,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:VD};delete n[e],this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:UD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),p=o(e,n,t,r,i),m=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!p&&m)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:T,ul:R,delimiter:L}=f(e,t,r,n,h),z=Object.getOwnPropertyNames(t),O=d(e,t,r,n,h),$=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),M=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k}),j=z.map(K=>y.createElement(Ju,{key:K,name:K,data:t[K],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(K),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}));return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"{"),!O&&$,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},j),!O&&o&&y.createElement("div",{className:"rejt-add-form",style:T},y.createElement(gm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"}"),!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(()=>{qD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,inputElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=s(e,i,n,a,u),x=r&&!b,E=p(mm,g,a,e,i,u),C=l.cloneElement(f,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});return y.createElement("li",{className:"rejt-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," : "),x?y.createElement("span",{className:"rejt-edit-form",style:v.editForm},D," ",w,C):y.createElement("span",{className:"rejt-value",style:v.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!x&&S)}};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," - ")};function Fte(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var Ite={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Tte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Rte={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},KD=class extends l.Component{constructor(e){super(e),this.state={data:e.data,rootName:e.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data||e.rootName!==t.rootName?{data:e.data,rootName:e.rootName}:null}onUpdate(e,t){this.setState({data:t}),this.props.onFullyUpdate(t)}removeRoot(){this.onUpdate(null,null)}render(){let{data:e,rootName:t}=this.state,{isCollapsed:r,onDeltaUpdate:n,readOnly:a,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElement:d,textareaElement:f,minusMenuElement:h,plusMenuElement:p,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x,fallback:E=null}=this.props,C=hn(e),w=a;hn(a)==="Boolean"&&(w=()=>a);let D=d;d&&hn(d)!=="Function"&&(D=()=>d);let S=f;return f&&hn(f)!=="Function"&&(S=()=>f),C==="Object"||C==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Ju,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:w,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:h,plusMenuElement:p,handleRemove:this.removeRoot,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x})):E}};KD.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return Ite;case"Array":return Tte;default:return Rte}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>Fte(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:Bte}=tt,zte=_.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}})),Rd=_.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})),$te=_(gM)(({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}})),Lte=_(vM)(({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}})),B3=_.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}`}})),Ote=_(yn)(({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}})),Mte=_($i.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"}})),Pte={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},Nte=e=>{e.currentTarget.dispatchEvent(new Bte.KeyboardEvent("keydown",Pte))},Hte=e=>{e.currentTarget.select()},jte=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),z3=({name:e,value:t,onChange:r,argType:n})=>{var C;let a=gb(),o=l.useMemo(()=>t&&lJ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,f]=l.useState(null),h=!!((C=n==null?void 0:n.table)!=null&&C.readonly),p=l.useCallback(w=>{try{w&&r(JSON.parse(w)),f(void 0)}catch(D){f(D)}},[r]),[m,g]=l.useState(!1),v=l.useCallback(()=>{r({}),g(!0)},[g]),b=l.useRef(null);if(l.useEffect(()=>{m&&b.current&&b.current.select()},[m]),!i)return y.createElement(zn,{disabled:h,id:js(e),onClick:v},"Set object");let x=y.createElement(Mte,{ref:b,id:Ct(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:w=>p(w.target.value),placeholder:"Edit JSON string...",autoFocus:m,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return y.createElement(zte,{"aria-readonly":h},E&&y.createElement(Ote,{onClick:w=>{w.preventDefault(),u(D=>!D)}},s?y.createElement(hM,null):y.createElement(fM,null),y.createElement("span",null,"RAW")),s?x:y.createElement(KD,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:jte(a),cancelButtonElement:y.createElement(Rd,{type:"button"},"Cancel"),editButtonElement:y.createElement(Rd,{type:"submit"},"Save"),addButtonElement:y.createElement(Rd,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement($te,null),minusMenuElement:y.createElement(Lte,null),inputElement:(w,D,S,A)=>A?y.createElement(B3,{onFocus:Hte,onBlur:Nte}):y.createElement(B3,null),fallback:x}))},Vte=_.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}%, ${$t(.02,e.input.background)} ${(n-t)/(r-t)*100}%, ${$t(.02,e.input.background)} 100%)`:`linear-gradient(to right, @@ -576,7 +576,7 @@ ${t}`);let r=t.match(Y$);if(!r)return y.createElement(l.Fragment,null,t);let[,n, ${$t(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${on(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${on(.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 ${Ot(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),YD=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Ute=_(YD)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),qte=_.div({display:"flex",alignItems:"center",width:"100%"});function Wte(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 Gte=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{var m;let d=g=>{r(nte(g.target.value))},f=t!==void 0,h=l.useMemo(()=>Wte(o),[o]),p=!!((m=u==null?void 0:u.table)!=null&&m.readonly);return y.createElement(qte,{"aria-readonly":p},y.createElement(YD,null,n),y.createElement(Vte,{id:Ct(e),type:"range",disabled:p,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Ute,{numberOFDecimalsPlaces:h,max:a},f?t.toFixed(h):"--"," / ",a))},Kte=_.label({display:"flex"}),Yte=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),Zte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var m;let s=g=>{r(g.target.value)},u=!!((m=i==null?void 0:i.table)!=null&&m.readonly),[d,f]=l.useState(!1),h=l.useCallback(()=>{r(""),f(!0)},[f]);if(t===void 0)return y.createElement(zn,{variant:"outline",size:"medium",disabled:u,id:js(e),onClick:h},"Set string");let p=typeof t=="string";return y.createElement(Kte,null,y.createElement($i.Textarea,{id:Ct(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),o&&y.createElement(Yte,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Jte=_($i.Input)({padding:10});function Xte(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var Qte=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var u;let o=l.useRef(null),i=(u=a==null?void 0:a.control)==null?void 0:u.readOnly;function s(d){if(!d.target.files)return;let f=Array.from(d.target.files).map(h=>URL.createObjectURL(h));e(f),Xte(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(Jte,{ref:o,id:Ct(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},ere=l.lazy(()=>Lp(()=>import("./Color-ERTF36HU-B1JHFnKk.js"),__vite__mapDeps([9,2,1,3,4,5,6,7,8]),import.meta.url)),tre=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(ere,{...e})),rre={array:z3,object:z3,boolean:Yee,color:tre,date:tte,number:ote,check:Yn,"inline-check":Yn,radio:Yn,"inline-radio":Yn,select:Yn,"multi-select":Yn,range:Gte,text:Zte,file:Qte},$3=()=>y.createElement(y.Fragment,null,"-"),nre=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var v;let{key:a,control:o}=e,[i,s]=l.useState(!1),[u,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let f=l.useCallback(b=>(d({value:b}),r({[a]:b}),b),[r,a]),h=l.useCallback(()=>s(!1),[]),p=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let b=(o==null?void 0:o.disable)!==!0&&((v=e==null?void 0:e.type)==null?void 0:v.name)!=="function";return n&&b?y.createElement(ma,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement($3,null)}let m={name:a,argType:e,value:u.value,onChange:f,onBlur:h,onFocus:p},g=rre[o.type]||$3;return y.createElement(g,{...m,...o,controlType:o.type})},are=_.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:Vr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),ore=({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(are,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)))))},Rp=8,L3=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),ire=_.span(Vr,({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}})),lre=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),sre=_.div(Vr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),ure=_.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"}})),cre=_(EM)({marginLeft:4}),dre=_(wC)({marginLeft:4}),pre=()=>y.createElement("span",null,"-"),ZD=({text:e,simple:t})=>y.createElement(ire,{simple:t},e),fre=xD(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),hre=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return VJ(t)},O3=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Rp)),r.map(n=>y.createElement(ZD,{key:n,text:n===""?'""':n}))},mre=({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(ZD,{text:u});let d=hre(u),f=d.length;return f>Rp?y.createElement(L3,{isExpanded:i},O3(d,i),y.createElement(lre,{onClick:()=>s(!i)},i?"Show less...":`Show ${f-Rp} more...`)):y.createElement(L3,null,O3(d))}return y.createElement(SL,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(ure,{width:fre(n)},y.createElement(Th,{language:"jsx",format:!1},n))},y.createElement(sre,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(cre,null):y.createElement(dre,null)))},Bd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(pre,null):y.createElement(mre,{value:e,initialExpandedArgs:t}),gre=_.span({fontWeight:"bold"}),vre=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),yre=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Vr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),bre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?4:0})),wre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),Ere=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),xre=e=>e&&{summary:typeof e=="string"?e:e.name},El=e=>{var v;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,f=n.table||{},h=f.type||xre(n.type),p=f.defaultValue||n.defaultValue,m=(v=n.type)==null?void 0:v.required,g=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(Ere,{expandable:i},y.createElement(gre,null,u),m?y.createElement(vre,{title:"Required"},"*"):null),o?null:y.createElement("td",null,g&&y.createElement(yre,null,y.createElement(vD,null,d)),f.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(wre,{hasDescription:g},y.createElement(Bd,{value:h,initialExpandedArgs:s})),y.createElement(ore,{tags:f.jsDocTags})):y.createElement(bre,{hasDescription:g},y.createElement(Bd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(Bd,{value:p,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(nre,{...e,isHovered:t})):null)},Cre=_.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"})),Dre=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),Sre=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),Are=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(Cre,{inAddonPanel:e},y.createElement(cC,{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(Dre,null,e&&y.createElement(y.Fragment,null,y.createElement(ma,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(mM,null)," Watch 5m video"),y.createElement(Sre,null),y.createElement(ma,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(Ep,null)," Read docs")),!e&&y.createElement(ma,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(Ep,null)," Learn how to set that up"))}))},kre=_(bM)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),_re=_(wM)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),Fre=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),Ire=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Tre=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Rre=_.td(()=>({position:"relative"})),Bre=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${on(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),M3=_.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"})),zd=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?Tre:Ire,u=(r==null?void 0:r.length)||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",f=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Bre,{title:f},y.createElement(s,{colSpan:1},y.createElement(M3,{onClick:h=>i(!o),tabIndex:0},f),y.createElement(Fre,null,o?y.createElement(kre,null):y.createElement(_re,null),t)),y.createElement(Rre,{colSpan:a-1},y.createElement(M3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},f),o?null:d)),o?r:null)},xl=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ye=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Te=[2,4,2,2],zre=()=>y.createElement(y.Fragment,null,y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"})))),$re=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?se(.25,e.color.defaultText):se(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),Lre=_(yn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),Ore=_.span({display:"flex",justifyContent:"space-between"}),Mre={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},Pre=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let f=d.subsections[u]||[];f.push({key:o,...i}),d.subsections[u]=f}r.sections[s]=d}else if(u){let d=r.ungroupedSubsections[u]||[];d.push({key:o,...i}),r.ungroupedSubsections[u]=d}else r.ungrouped.push({key:o,...i})});let n=Mre[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)}}),{})}},Nre=(e,t,r)=>{try{return pS(e,t,r)}catch(n){return cee.warn(n.message),!1}},Bp=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(BD,null,E," ",y.createElement(ma,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(Ep,null)," Read the docs"))}if(s)return y.createElement(zre,null);let{rows:u,args:d,globals:f}="rows"in e&&e,h=Pre(wG(u,E=>{var C;return!((C=E==null?void 0:E.table)!=null&&C.disable)&&Nre(E,d||{},f||{})}),i),p=h.ungrouped.length===0,m=Object.entries(h.sections).length===0,g=Object.entries(h.ungroupedSubsections).length===0;if(p&&m&&g)return y.createElement(Are,{inAddonPanel:a});let v=1;t&&(v+=1),n||(v+=2);let b=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(Ix,null,y.createElement($re,{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(Ore,null,"Control"," ",!s&&r&&y.createElement(Lre,{onClick:()=>r(),title:"Reset controls"},y.createElement(xM,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(El,{key:E.key,row:E,arg:d&&d[E.key],...x})),Object.entries(h.ungroupedSubsections).map(([E,C])=>y.createElement(zd,{key:E,label:E,level:"subsection",colSpan:v},C.map(w=>y.createElement(El,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...x})))),Object.entries(h.sections).map(([E,C])=>y.createElement(zd,{key:E,label:E,level:"section",colSpan:v},C.ungrouped.map(w=>y.createElement(El,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(C.subsections).map(([w,D])=>y.createElement(zd,{key:w,label:w,level:"subsection",colSpan:v},D.map(S=>y.createElement(El,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...x})))))))))},Hre=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(Bp,{...r[0][1],...t}):y.createElement(lO,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,u="div",d=a===0?t:{sort:t.sort};return y.createElement(u,{key:s,id:s,title:o},({active:f})=>f?y.createElement(Bp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(de,({theme:e})=>({...Zu(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?se(.2,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...Zu(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));_.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})=>({...Zu(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 jre=e=>`anchor--${e}`,Vre=({storyId:e,children:t})=>y.createElement("div",{id:jre(e),className:"sb-anchor"},t);tt&&tt.__DOCS_CONTEXT__===void 0&&(tt.__DOCS_CONTEXT__=l.createContext(null),tt.__DOCS_CONTEXT__.displayName="DocsContext");var rr=tt?tt.__DOCS_CONTEXT__:l.createContext(null),Mn=(e,t)=>l.useContext(rr).resolveOf(e,t),Ure=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),qre=e=>{if(e)return typeof e=="string"?e.includes("-")?Ure(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function Wre(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function JD(e){return see(e,{allowFunction:!1})}var XD=l.createContext({sources:{}}),QD="--unknown--",Gre=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:u,args:d=void 0,source:f,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,p=d?JD(d):QD;n(m=>({...m,[u]:{...m[u],[p]:{code:f,format:h}}}))};return t.on(Cm,a),()=>t.off(Cm,a)},[]),y.createElement(XD.Provider,{value:{sources:r}},e)},Kre=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[JD(t)])||(a==null?void 0:a[QD])||{code:""}},Yre=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,d;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},i=r||o.type||ec.AUTO;if(o.code!==void 0)return o.code;let s=i===ec.DYNAMIC||i===ec.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},Zre=(e,t,r)=>{var m,g,v,b;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((g=(m=n==null?void 0:n.parameters)==null?void 0:m.docs)==null?void 0:g.source)||{},{code:i}=e,s=e.format??o.format,u=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:u,dark:d};let f=t.getStoryContext(n),h=e.__forceInitialArgs?f.initialArgs:f.unmappedArgs,p=Kre(n.id,h,r);return s=p.format??((b=(v=n.parameters.docs)==null?void 0:v.source)==null?void 0:b.format)??!1,{code:Yre({snippet:p.code,storyContext:{...f,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function Jre(e,t){let r=Xre([e],t);return r&&r[0]}function Xre(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 Qre=(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},ene=(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}},tne=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(rr),r=Qre(e,t),n=Jre(r,t);if(!n)return y.createElement(LD,null);let a=ene(e,n,t);return a?y.createElement(Lee,{...a}):null},rne=e=>{var p,m,g,v,b,x,E,C,w,D;let t=l.useContext(rr),r=l.useContext(XD),{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}=Mn(n||"story",["story"]),i=Zre({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((m=(p=o.parameters.docs)==null?void 0:p.canvas)==null?void 0:m.layout)??"padded",u=e.withToolbar??((v=(g=o.parameters.docs)==null?void 0:g.canvas)==null?void 0:v.withToolbar)??!1,d=e.additionalActions??((x=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:x.additionalActions),f=e.sourceState??((C=(E=o.parameters.docs)==null?void 0:E.canvas)==null?void 0:C.sourceState)??"hidden",h=e.className??((D=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:D.className);return y.createElement(OD,{withSource:f==="none"?void 0:i,isExpanded:f==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(tne,{of:n||o.moduleExport,meta:e.meta,...e.story}))},nne=(e,t)=>{let r=ane(e,t);if(!r)throw new Error("No result when story was defined");return r},ane=(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(S3,u),()=>t.channel.off(S3,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(dee,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(pee,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]},one=(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(A3,o),()=>t.channel.off(A3,o)},[t.channel]),[n]};function ine(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var lne=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(rr),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??u.include,f=e.exclude??u.exclude,h=e.sort??u.sort,[p,m,g]=nne(n,r),[v]=one(n,r),b=D3(o,d,f);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(p).length>0?y.createElement(Bp,{rows:b,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g}):null;let x=qre(i),E=Object.fromEntries(Object.entries(s).map(([D,S])=>[D,{rows:D3(ine(S,a),d,f),sort:h}])),C={[x]:{rows:b,sort:h},...E};return y.createElement(Hre,{tabs:C,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g})},{document:eS}=tt,tS=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(Tx,null,t);let n=e&&e.split("-");return y.createElement(zD,{language:n&&n[1]||"text",format:!1,code:t,...r})};function vm(e,t){e.channel.emit(fee,t)}var zp=DO.a,sne=({hash:e,children:t})=>{let r=l.useContext(rr);return y.createElement(zp,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);eS.getElementById(a)&&vm(r,e)}},t)},rS=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(rr);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(zp,{...e}):t.startsWith("#")?y.createElement(sne,{hash:t},n):y.createElement(zp,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),vm(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},nS=["h1","h2","h3","h4","h5","h6"],une=nS.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),cne=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),dne=({as:e,id:t,children:r,...n})=>{let a=l.useContext(rr),o=une[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(cne,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{eS.getElementById(t)&&vm(a,i)}},y.createElement(yM,null)),r)},ym=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(dne,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...ce(s,t)})},aS=nS.reduce((e,t)=>({...e,[t]:r=>y.createElement(ym,{as:t,...r})}),{}),pne=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(fS`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${on(.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 ${Ot(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),YD=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Ute=_(YD)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),qte=_.div({display:"flex",alignItems:"center",width:"100%"});function Wte(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 Gte=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{var m;let d=g=>{r(nte(g.target.value))},f=t!==void 0,h=l.useMemo(()=>Wte(o),[o]),p=!!((m=u==null?void 0:u.table)!=null&&m.readonly);return y.createElement(qte,{"aria-readonly":p},y.createElement(YD,null,n),y.createElement(Vte,{id:Ct(e),type:"range",disabled:p,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Ute,{numberOFDecimalsPlaces:h,max:a},f?t.toFixed(h):"--"," / ",a))},Kte=_.label({display:"flex"}),Yte=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),Zte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var m;let s=g=>{r(g.target.value)},u=!!((m=i==null?void 0:i.table)!=null&&m.readonly),[d,f]=l.useState(!1),h=l.useCallback(()=>{r(""),f(!0)},[f]);if(t===void 0)return y.createElement(zn,{variant:"outline",size:"medium",disabled:u,id:js(e),onClick:h},"Set string");let p=typeof t=="string";return y.createElement(Kte,null,y.createElement($i.Textarea,{id:Ct(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),o&&y.createElement(Yte,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Jte=_($i.Input)({padding:10});function Xte(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var Qte=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var u;let o=l.useRef(null),i=(u=a==null?void 0:a.control)==null?void 0:u.readOnly;function s(d){if(!d.target.files)return;let f=Array.from(d.target.files).map(h=>URL.createObjectURL(h));e(f),Xte(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(Jte,{ref:o,id:Ct(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},ere=l.lazy(()=>Lp(()=>import("./Color-ERTF36HU-Do5AllBJ.js"),__vite__mapDeps([9,2,1,3,4,5,6,7,8]),import.meta.url)),tre=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(ere,{...e})),rre={array:z3,object:z3,boolean:Yee,color:tre,date:tte,number:ote,check:Yn,"inline-check":Yn,radio:Yn,"inline-radio":Yn,select:Yn,"multi-select":Yn,range:Gte,text:Zte,file:Qte},$3=()=>y.createElement(y.Fragment,null,"-"),nre=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var v;let{key:a,control:o}=e,[i,s]=l.useState(!1),[u,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let f=l.useCallback(b=>(d({value:b}),r({[a]:b}),b),[r,a]),h=l.useCallback(()=>s(!1),[]),p=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let b=(o==null?void 0:o.disable)!==!0&&((v=e==null?void 0:e.type)==null?void 0:v.name)!=="function";return n&&b?y.createElement(ma,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement($3,null)}let m={name:a,argType:e,value:u.value,onChange:f,onBlur:h,onFocus:p},g=rre[o.type]||$3;return y.createElement(g,{...m,...o,controlType:o.type})},are=_.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:Vr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),ore=({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(are,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)))))},Rp=8,L3=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),ire=_.span(Vr,({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}})),lre=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),sre=_.div(Vr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),ure=_.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"}})),cre=_(EM)({marginLeft:4}),dre=_(wC)({marginLeft:4}),pre=()=>y.createElement("span",null,"-"),ZD=({text:e,simple:t})=>y.createElement(ire,{simple:t},e),fre=xD(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),hre=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return VJ(t)},O3=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Rp)),r.map(n=>y.createElement(ZD,{key:n,text:n===""?'""':n}))},mre=({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(ZD,{text:u});let d=hre(u),f=d.length;return f>Rp?y.createElement(L3,{isExpanded:i},O3(d,i),y.createElement(lre,{onClick:()=>s(!i)},i?"Show less...":`Show ${f-Rp} more...`)):y.createElement(L3,null,O3(d))}return y.createElement(SL,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(ure,{width:fre(n)},y.createElement(Th,{language:"jsx",format:!1},n))},y.createElement(sre,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(cre,null):y.createElement(dre,null)))},Bd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(pre,null):y.createElement(mre,{value:e,initialExpandedArgs:t}),gre=_.span({fontWeight:"bold"}),vre=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),yre=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Vr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),bre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?4:0})),wre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),Ere=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),xre=e=>e&&{summary:typeof e=="string"?e:e.name},El=e=>{var v;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,f=n.table||{},h=f.type||xre(n.type),p=f.defaultValue||n.defaultValue,m=(v=n.type)==null?void 0:v.required,g=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(Ere,{expandable:i},y.createElement(gre,null,u),m?y.createElement(vre,{title:"Required"},"*"):null),o?null:y.createElement("td",null,g&&y.createElement(yre,null,y.createElement(vD,null,d)),f.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(wre,{hasDescription:g},y.createElement(Bd,{value:h,initialExpandedArgs:s})),y.createElement(ore,{tags:f.jsDocTags})):y.createElement(bre,{hasDescription:g},y.createElement(Bd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(Bd,{value:p,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(nre,{...e,isHovered:t})):null)},Cre=_.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"})),Dre=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),Sre=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),Are=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(Cre,{inAddonPanel:e},y.createElement(cC,{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(Dre,null,e&&y.createElement(y.Fragment,null,y.createElement(ma,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(mM,null)," Watch 5m video"),y.createElement(Sre,null),y.createElement(ma,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(Ep,null)," Read docs")),!e&&y.createElement(ma,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(Ep,null)," Learn how to set that up"))}))},kre=_(bM)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),_re=_(wM)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),Fre=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),Ire=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Tre=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Rre=_.td(()=>({position:"relative"})),Bre=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${on(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),M3=_.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"})),zd=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?Tre:Ire,u=(r==null?void 0:r.length)||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",f=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Bre,{title:f},y.createElement(s,{colSpan:1},y.createElement(M3,{onClick:h=>i(!o),tabIndex:0},f),y.createElement(Fre,null,o?y.createElement(kre,null):y.createElement(_re,null),t)),y.createElement(Rre,{colSpan:a-1},y.createElement(M3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},f),o?null:d)),o?r:null)},xl=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ye=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Te=[2,4,2,2],zre=()=>y.createElement(y.Fragment,null,y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(xl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"})))),$re=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?se(.25,e.color.defaultText):se(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),Lre=_(yn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),Ore=_.span({display:"flex",justifyContent:"space-between"}),Mre={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},Pre=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let f=d.subsections[u]||[];f.push({key:o,...i}),d.subsections[u]=f}r.sections[s]=d}else if(u){let d=r.ungroupedSubsections[u]||[];d.push({key:o,...i}),r.ungroupedSubsections[u]=d}else r.ungrouped.push({key:o,...i})});let n=Mre[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)}}),{})}},Nre=(e,t,r)=>{try{return pS(e,t,r)}catch(n){return cee.warn(n.message),!1}},Bp=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(BD,null,E," ",y.createElement(ma,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(Ep,null)," Read the docs"))}if(s)return y.createElement(zre,null);let{rows:u,args:d,globals:f}="rows"in e&&e,h=Pre(wG(u,E=>{var C;return!((C=E==null?void 0:E.table)!=null&&C.disable)&&Nre(E,d||{},f||{})}),i),p=h.ungrouped.length===0,m=Object.entries(h.sections).length===0,g=Object.entries(h.ungroupedSubsections).length===0;if(p&&m&&g)return y.createElement(Are,{inAddonPanel:a});let v=1;t&&(v+=1),n||(v+=2);let b=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(Ix,null,y.createElement($re,{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(Ore,null,"Control"," ",!s&&r&&y.createElement(Lre,{onClick:()=>r(),title:"Reset controls"},y.createElement(xM,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(El,{key:E.key,row:E,arg:d&&d[E.key],...x})),Object.entries(h.ungroupedSubsections).map(([E,C])=>y.createElement(zd,{key:E,label:E,level:"subsection",colSpan:v},C.map(w=>y.createElement(El,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...x})))),Object.entries(h.sections).map(([E,C])=>y.createElement(zd,{key:E,label:E,level:"section",colSpan:v},C.ungrouped.map(w=>y.createElement(El,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(C.subsections).map(([w,D])=>y.createElement(zd,{key:w,label:w,level:"subsection",colSpan:v},D.map(S=>y.createElement(El,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...x})))))))))},Hre=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(Bp,{...r[0][1],...t}):y.createElement(lO,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,u="div",d=a===0?t:{sort:t.sort};return y.createElement(u,{key:s,id:s,title:o},({active:f})=>f?y.createElement(Bp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(de,({theme:e})=>({...Zu(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?se(.2,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...Zu(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));_.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})=>({...Zu(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 jre=e=>`anchor--${e}`,Vre=({storyId:e,children:t})=>y.createElement("div",{id:jre(e),className:"sb-anchor"},t);tt&&tt.__DOCS_CONTEXT__===void 0&&(tt.__DOCS_CONTEXT__=l.createContext(null),tt.__DOCS_CONTEXT__.displayName="DocsContext");var rr=tt?tt.__DOCS_CONTEXT__:l.createContext(null),Mn=(e,t)=>l.useContext(rr).resolveOf(e,t),Ure=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),qre=e=>{if(e)return typeof e=="string"?e.includes("-")?Ure(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function Wre(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function JD(e){return see(e,{allowFunction:!1})}var XD=l.createContext({sources:{}}),QD="--unknown--",Gre=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:u,args:d=void 0,source:f,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,p=d?JD(d):QD;n(m=>({...m,[u]:{...m[u],[p]:{code:f,format:h}}}))};return t.on(Cm,a),()=>t.off(Cm,a)},[]),y.createElement(XD.Provider,{value:{sources:r}},e)},Kre=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[JD(t)])||(a==null?void 0:a[QD])||{code:""}},Yre=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,d;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},i=r||o.type||ec.AUTO;if(o.code!==void 0)return o.code;let s=i===ec.DYNAMIC||i===ec.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},Zre=(e,t,r)=>{var m,g,v,b;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((g=(m=n==null?void 0:n.parameters)==null?void 0:m.docs)==null?void 0:g.source)||{},{code:i}=e,s=e.format??o.format,u=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:u,dark:d};let f=t.getStoryContext(n),h=e.__forceInitialArgs?f.initialArgs:f.unmappedArgs,p=Kre(n.id,h,r);return s=p.format??((b=(v=n.parameters.docs)==null?void 0:v.source)==null?void 0:b.format)??!1,{code:Yre({snippet:p.code,storyContext:{...f,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function Jre(e,t){let r=Xre([e],t);return r&&r[0]}function Xre(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 Qre=(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},ene=(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}},tne=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(rr),r=Qre(e,t),n=Jre(r,t);if(!n)return y.createElement(LD,null);let a=ene(e,n,t);return a?y.createElement(Lee,{...a}):null},rne=e=>{var p,m,g,v,b,x,E,C,w,D;let t=l.useContext(rr),r=l.useContext(XD),{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}=Mn(n||"story",["story"]),i=Zre({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((m=(p=o.parameters.docs)==null?void 0:p.canvas)==null?void 0:m.layout)??"padded",u=e.withToolbar??((v=(g=o.parameters.docs)==null?void 0:g.canvas)==null?void 0:v.withToolbar)??!1,d=e.additionalActions??((x=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:x.additionalActions),f=e.sourceState??((C=(E=o.parameters.docs)==null?void 0:E.canvas)==null?void 0:C.sourceState)??"hidden",h=e.className??((D=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:D.className);return y.createElement(OD,{withSource:f==="none"?void 0:i,isExpanded:f==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(tne,{of:n||o.moduleExport,meta:e.meta,...e.story}))},nne=(e,t)=>{let r=ane(e,t);if(!r)throw new Error("No result when story was defined");return r},ane=(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(S3,u),()=>t.channel.off(S3,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(dee,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(pee,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]},one=(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(A3,o),()=>t.channel.off(A3,o)},[t.channel]),[n]};function ine(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var lne=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(rr),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??u.include,f=e.exclude??u.exclude,h=e.sort??u.sort,[p,m,g]=nne(n,r),[v]=one(n,r),b=D3(o,d,f);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(p).length>0?y.createElement(Bp,{rows:b,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g}):null;let x=qre(i),E=Object.fromEntries(Object.entries(s).map(([D,S])=>[D,{rows:D3(ine(S,a),d,f),sort:h}])),C={[x]:{rows:b,sort:h},...E};return y.createElement(Hre,{tabs:C,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g})},{document:eS}=tt,tS=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(Tx,null,t);let n=e&&e.split("-");return y.createElement(zD,{language:n&&n[1]||"text",format:!1,code:t,...r})};function vm(e,t){e.channel.emit(fee,t)}var zp=DO.a,sne=({hash:e,children:t})=>{let r=l.useContext(rr);return y.createElement(zp,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);eS.getElementById(a)&&vm(r,e)}},t)},rS=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(rr);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(zp,{...e}):t.startsWith("#")?y.createElement(sne,{hash:t},n):y.createElement(zp,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),vm(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},nS=["h1","h2","h3","h4","h5","h6"],une=nS.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),cne=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),dne=({as:e,id:t,children:r,...n})=>{let a=l.useContext(rr),o=une[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(cne,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{eS.getElementById(t)&&vm(a,i)}},y.createElement(yM,null)),r)},ym=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(dne,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...ce(s,t)})},aS=nS.reduce((e,t)=>({...e,[t]:r=>y.createElement(ym,{as:t,...r})}),{}),pne=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(fS`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/DropDownMenu.stories-Brl8xCVF.js b/assets/DropDownMenu.stories-BREYwaRV.js similarity index 93% rename from assets/DropDownMenu.stories-Brl8xCVF.js rename to assets/DropDownMenu.stories-BREYwaRV.js index 2945a20..fd6c722 100644 --- a/assets/DropDownMenu.stories-Brl8xCVF.js +++ b/assets/DropDownMenu.stories-BREYwaRV.js @@ -1,4 +1,4 @@ -import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{D as a,M as n}from"./Graph-DpGUcQhO.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const l={title:"DropDownMenu",component:a,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}}},r={render:()=>e.jsxs(a,{children:[e.jsx(n,{children:"Disease/Trait"}),e.jsx(n,{children:"Gene/b-cCRE"}),e.jsx(n,{children:"SNP/QTL"}),e.jsx(n,{children:"Single-Cell"})]})};var t,o,s;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ +import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{D as a,M as n}from"./Graph-YQGnloR9.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const l={title:"DropDownMenu",component:a,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}}},r={render:()=>e.jsxs(a,{children:[e.jsx(n,{children:"Disease/Trait"}),e.jsx(n,{children:"Gene/b-cCRE"}),e.jsx(n,{children:"SNP/QTL"}),e.jsx(n,{children:"Single-Cell"})]})};var t,o,s;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ render: () => Disease/Trait Gene/b-cCRE diff --git a/assets/Graph-DpGUcQhO.js b/assets/Graph-YQGnloR9.js similarity index 99% rename from assets/Graph-DpGUcQhO.js rename to assets/Graph-YQGnloR9.js index c2cdea2..c93d349 100644 --- a/assets/Graph-DpGUcQhO.js +++ b/assets/Graph-YQGnloR9.js @@ -140,18 +140,24 @@ To suppress this warning, you need to explicitly provide the \`palette.${e}Chann }`,signature:{properties:[{key:"value",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"helperText",value:{name:"string",required:!0}}]}},name:"option"}],return:{name:"void"}}},description:""},onSearchChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""},reactiveThreshold:{required:!1,tsType:{name:"number"},description:""},reactiveWidth:{required:!1,tsType:{name:"number"},description:""},containerWidth:{required:!1,tsType:{name:"number"},description:""}}};function DL(t){return`${t}`}const RL=t=>{const[e,r]=Cr.useState([t.defaultStart||t.value&&t.value[0]||-10,t.defaultEnd||t.value&&t.value[1]||10]);O.useEffect(()=>{t.value&&(r(t.value),s(t.value))},[t.value]),O.useEffect(()=>{t.onSliderChange&&t.onSliderChange(e)});const n=t.min?t.min:0,A=t.max?t.max:100,a=t.step?t.step:.01,i=t.minDistance?t.minDistance:0,[o,s]=Cr.useState([e[0],e[1]]),l=m=>{s([m.target.value,e[1]])},u=m=>{s([e[0],m.target.value])},c=(m,B,v)=>{Array.isArray(B)&&(v===0?(r([Number(Math.min(B[0],e[1]-i).toFixed(5)),e[1]]),s([Number(Math.min(B[0],e[1]-i).toFixed(5)),e[1]])):(r([e[0],Number(Math.max(B[1],e[0]+i).toFixed(5))]),s([e[0],Number(Math.max(B[1],e[0]+i).toFixed(5))])))},d=()=>{t.onSliderChangeCommitted&&t.onSliderChangeCommitted(e)},h=m=>{const B=Number(o[0]),v=e[1];m.key=="Enter"&&(B<=v-i&&B>=n&&r([B,v]),B>v-i&&s([e[0],v]),B{const m=Number(o[0]),B=e[1];m<=B-i&&m>=n&&r([m,B]),m>B-i&&s([e[0],B]),m{const B=e[0],v=Number(o[1]);m.key=="Enter"&&(v>=B+i&&v<=A&&r([B,v]),vA&&s([B,e[1]]))},g=()=>{const m=e[0],B=Number(o[1]);B>=m+i&&B<=A&&r([m,B]),BA&&s([m,e[1]])};return I.jsxs(tc,{sx:{width:t.width},children:[I.jsx(Bt,{children:t.title}),I.jsx(hI,{getAriaLabel:()=>"Minimum distance",value:e,onChange:c,onChangeCommitted:d,valueLabelDisplay:"auto",getAriaValueText:DL,disableSwap:!0,min:n,max:A,step:a,sx:{height:2}}),I.jsxs(ws,{container:!0,spacing:1,children:[I.jsx(ws,{size:5.5,children:I.jsx(Zf,{value:o[0],size:"small",fullWidth:!0,variant:"outlined",onChange:l,onBlur:f,onKeyDown:h,inputProps:{variant:"outlined",type:"text","aria-labelledby":"input-slider"}})}),I.jsx(ws,{sx:{display:"inline-grid",alignItems:"center"},size:1,children:I.jsx(Bt,{sx:{justifySelf:"center"},children:"–"})}),I.jsx(ws,{size:5.5,children:I.jsx(Zf,{value:o[1],size:"small",fullWidth:!0,variant:"outlined",onChange:u,onBlur:g,onKeyDown:p,inputProps:{type:"text","aria-labelledby":"input-slider"}})})]})]})};RL.__docgenInfo={description:"",methods:[],displayName:"RangeSlider",props:{title:{required:!0,tsType:{name:"string"},description:""},width:{required:!0,tsType:{name:"union",raw:"number | string",elements:[{name:"number"},{name:"string"}]},description:""},defaultStart:{required:!1,tsType:{name:"number"},description:""},defaultEnd:{required:!1,tsType:{name:"number"},description:""},minDistance:{required:!1,tsType:{name:"number"},description:""},onSliderChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"number"}],raw:"number[]"},name:"value"}],return:{name:"void"}}},description:""},onSliderChangeCommitted:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"number"}],raw:"number[]"},name:"value"}],return:{name:"void"}}},description:""},value:{required:!1,tsType:{name:"Array",elements:[{name:"number"}],raw:"number[]"},description:""}}};function bg(t){const e=parseFloat(t);return!isNaN(e)&&isFinite(e)}function ML(t,e){return bg(t)&&bg(e)?parseFloat(t)-parseFloat(e):t.localeCompare?t.localeCompare(e):0}function OL(t,e){switch(e.type){case"pageChanged":return{...t,page:e.page};case"searchChanged":return{...t,page:0,filter:e.value};case"sortChanged":return{...t,sort:{column:e.sortColumn,asc:e.sortColumn===t.sort.column?!t.sort.asc:!0}};case"modalChanged":return{...t,showAddColumnsModal:e.showAddColumnsModal};case"columnsChanged":return{...t,columns:e.columns};case"mousedOver":return console.log("moused over"),{...t,mousedOver:e.index}}}const S0=vt(I.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),HL=vt(I.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),U0=vt(I.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),kL=vt(I.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),PL=vt(I.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),NL=vt(I.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),KL=vt(I.jsx("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew"),GL=me("div")(({theme:t})=>({position:"relative",borderRadius:t.shape.borderRadius,backgroundColor:dt(t.palette.common.white,.75),"&:hover":{backgroundColor:dt(t.palette.common.white,.95)},marginLeft:0,width:"100%",[t.breakpoints.up("sm")]:{marginLeft:t.spacing(1),width:"auto"}})),VL=me("div")(({theme:t})=>({padding:t.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"})),$L=me(Jo)(({theme:t})=>({color:"inherit","& .MuiInputBase-input":{padding:t.spacing(1,1,1,0),paddingLeft:`calc(1em + ${t.spacing(4)})`,transition:t.transitions.create("width"),width:"100%",[t.breakpoints.up("sm")]:{width:"12ch","&:focus":{width:"20ch"}}}})),zL={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:400,bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4},WL=t=>{var C,F,w;const[e,r]=O.useState(t.page||0),[n,A]=O.useState(()=>Array.isArray(t.itemsPerPage)?t.itemsPerPage[0]:typeof t.itemsPerPage=="number"?t.itemsPerPage:5),a=x=>{r(x)},i=x=>{A(+x.target.value),r(0)},o=x=>{const Q=[];for(let S=1;S{JSON.stringify(x)===JSON.stringify(S)&&(Q=!0)}),!!Q):JSON.stringify(x)===JSON.stringify(t.highlighted)}const l=O.useMemo(()=>t.noOfDefaultColumns||t.columns.length,[t.noOfDefaultColumns,t.columns]),[u,c]=O.useReducer(OL,{sort:{column:t.sortColumn||0,asc:!!t.sortDescending},filter:"",page:0,columns:t.columns.length<=l?t.columns:t.defaultColumnsToShow?t.columns.filter(x=>{var Q;return(Q=t.defaultColumnsToShow)==null?void 0:Q.includes(x.header)}):t.columns.slice(0,l),showAddColumnsModal:!1}),d=O.useCallback((x,Q)=>{for(const S in u.columns){const T=u.columns[S];if(T.unsearchable)continue;if(T.search&&T.search(x)||T.value(x).toString().toLowerCase().includes(Q.toLowerCase()))return!0}return!1},[u.columns]),h=O.useCallback(x=>{const Q=u.columns[u.sort.column].sort||((T,U)=>ML(u.columns[u.sort.column].value(T),u.columns[u.sort.column].value(U))),S=x.sort(Q);return u.sort.asc||S.reverse(),S},[u.columns,u.sort]),f=O.useCallback((x,Q)=>Q===""?[...x]:x.filter(S=>d(S,Q)),[d]),p=O.useMemo(()=>h(f(t.rows,u.filter||t.search||"")),[f,h,u.filter,t.rows,t.search]),g=O.useMemo(()=>{var Q;const x=p.slice(e*n,(e+1)*n);return(Q=t.onDisplayedRowsChange)==null||Q.call(t,e,x),x},[p,e,n,t.onDisplayedRowsChange]),m=e>0?Math.max(0,(1+e)*n-t.rows.length):0,B=O.useCallback(()=>{const x=u.columns.map(U=>U.header).join(" ")+` `+p.map(U=>u.columns.map(L=>L.value(U)).join(" ")).join(` `)+` -`,Q=document.createElement("a");document.body.appendChild(Q),Q.setAttribute("style","display: none");const S=new Blob([x],{type:"text/plain"}),T=window.URL.createObjectURL(S);Q.href=T,Q.download=t.downloadFileName||"table.tsv",Q.click(),window.URL.revokeObjectURL(T),Q.remove()},[u.columns,p,t.downloadFileName]),v=O.useRef(null),y=O.useRef(null),b=O.useRef(null),E=(x,Q,S)=>{if(x.current&&Q.current&&S.current){const T=x.current.scrollWidth>x.current.clientWidth,U=x.current.scrollLeft>0,L=x.current.scrollLeft+1{v.current!==null&&(v.current.addEventListener("scroll",()=>E(v,y,b)),new ResizeObserver(()=>{E(v,y,b)}).observe(v.current))},[v,b,y]),console.log((C=document.getElementById("row0"))==null?void 0:C.offsetHeight),I.jsxs(Ai,{elevation:3,sx:{"& .MuiToolbar-root":{pl:2},position:"relative"},children:[I.jsxs(Ac,{sx:{backgroundColor:`${t.headerColor?t.headerColor.backgroundColor:"transparent"}`,borderTopLeftRadius:4,borderTopRightRadius:4},children:[I.jsxs(Bt,{variant:"h5",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"none",sm:"block"},fontWeight:"normal",color:`${t.headerColor?t.headerColor.textColor:"inherit"}`},children:[t.tableTitle,t.titleHoverInfo&&I.jsx(IA,{title:t.titleHoverInfo,color:"primary",sx:{ml:1},placement:"right-start",children:I.jsx(U0,{})})]}),t.showMoreColumns&&t.columns.length>(t.noOfDefaultColumns||5)&&I.jsxs(qn,{variant:"outlined",size:"small",color:"primary",sx:{textTransform:"none"},onClick:()=>c({type:"modalChanged",showAddColumnsModal:!0}),children:[I.jsx(HL,{fontSize:"small"}),"Manage Columns"]}),t.searchable&&I.jsxs(GL,{children:[I.jsx(VL,{children:I.jsx(PL,{})}),I.jsx($L,{id:"table-search",placeholder:"Filter Items",inputProps:{"aria-label":"search"},onChange:x=>{c({type:"searchChanged",value:x.target.value}),r(0)}})]}),I.jsx(TA,{onClick:B,children:I.jsx(S0,{htmlColor:`${((F=t.headerColor)==null?void 0:F.textColor)||"inherit"}`})})]}),I.jsxs(p0,{ref:v,sx:{maxHeight:t.maxHeight?t.maxHeight:"none"},children:[I.jsxs(d0,{stickyHeader:!0,"aria-label":"sticky table",padding:t.dense?"checkbox":"normal",children:[!t.hideHeader&&I.jsx(g0,{children:I.jsx(Qa,{children:u.columns.map((x,Q)=>I.jsx(gn,{sx:Q!==u.columns.length-1?{pr:0}:{},onClick:()=>{x.unsortable||c({type:"sortChanged",sortColumn:Q}),r(0)},children:I.jsxs(uL,{active:Q===u.sort.column,direction:u.sort.asc?"asc":"desc",hideSortIcon:!0,children:[x.HeaderRender?I.jsx(x.HeaderRender,{}):x.header,x.tooltip?I.jsx(IA,{title:x.tooltip,color:"primary",sx:{ml:.5},placement:"right-start",children:I.jsx(kL,{fontSize:"small"})}):null]})},`${x.header}${Q}`))})}),I.jsx(h0,{children:t.rows.length===0?I.jsxs(Qa,{children:[I.jsx(gn,{children:t.emptyText||"No data available."}),o(t.columns.length)]}):I.jsxs(I.Fragment,{children:[g.map((x,Q)=>I.jsx(Qa,{selected:t.highlighted?s(x):!1,hover:!0,id:"row"+Q,onClick:()=>t.onRowClick&&t.onRowClick(x,Q+e*n),sx:{cursor:t.onRowClick?"pointer":"auto"},onMouseEnter:()=>t.onRowMouseEnter&&t.onRowMouseEnter(x,Q+e*n),onMouseLeave:()=>t.onRowMouseLeave&&t.onRowMouseLeave(),children:u.columns.map((S,T)=>I.jsx(gn,{sx:T!==u.columns.length-1?{pr:0}:{},onMouseEnter:()=>t.onCellMouseEnter&&t.onCellMouseEnter(S.value(x),Q,T),onMouseLeave:()=>t.onCellMouseLeave&&t.onCellMouseLeave(),children:S.FunctionalRender?I.jsx(S.FunctionalRender,{row:x}):S.render?S.render(x):S.value(x)},S.header+"Row"+Q+"Column"+T))},"row"+Q)),m>0&&I.jsx(Qa,{style:{height:(((w=document.getElementById("row0"))==null?void 0:w.offsetHeight)??(t.dense?33:53))*m},children:I.jsx(gn,{colSpan:6})})]})})]}),I.jsx(TA,{ref:b,sx:{position:"absolute",top:"50%",left:"10px",background:"rgba(0,0,0,0.15)",visibility:"hidden"},onClick:()=>{v.current&&(v.current.scrollLeft=0)},children:I.jsx(KL,{})}),I.jsx(TA,{ref:y,sx:{position:"absolute",top:"50%",right:"10px",background:"rgba(0,0,0,0.15)",visibility:"hidden"},onClick:()=>{v.current&&(v.current.scrollLeft=v.current.scrollWidth-v.current.clientWidth)},children:I.jsx(NL,{})})]}),!t.hidePageMenu&&I.jsxs(Fo,{direction:"column",useFlexGap:!0,justifyContent:"space-between",children:[I.jsx(Bt,{pl:t.dense?"4px":2,sx:{mt:"auto",mb:"auto"},children:p.length!==t.rows.length&&`Showing ${p.length} matching rows of ${t.rows.length} total.`}),I.jsx(v0,{rowsPerPageOptions:t.itemsPerPage?Array.isArray(t.itemsPerPage)?t.itemsPerPage:[t.itemsPerPage]:[5,10,25,100],component:"div",count:p.length,rowsPerPage:n,page:e,onPageChange:(x,Q)=>a(Q),onRowsPerPageChange:i,showFirstButton:!t.dense,showLastButton:!t.dense,labelRowsPerPage:t.dense?"Rows:":void 0,sx:t.dense?{"& .MuiTablePagination-toolbar":{pl:"6px"},"& .css-h0cf5v-MuiInputBase-root-MuiTablePagination-select":{mr:"6px",ml:"0px"},"& .MuiTablePagination-actions":{ml:"4px !important"}}:void 0})]}),I.jsx(A0,{open:u.showAddColumnsModal,onClose:()=>c({type:"modalChanged",showAddColumnsModal:!1}),children:I.jsxs(tc,{sx:zL,children:[I.jsx(Bt,{variant:"h4",children:"Add Columns"}),(t.defaultColumnsToShow?t.columns.filter(x=>{var Q;return!((Q=t.defaultColumnsToShow)!=null&&Q.includes(x.header))}):t.columns.slice(t.noOfDefaultColumns||5,t.columns.length)).map((x,Q)=>I.jsxs(O.Fragment,{children:[I.jsx(wU,{control:I.jsx(gl,{checked:u.columns.find(S=>S.header===x.header)!==void 0,onChange:S=>{S.target.checked&&t.columns.find(T=>T.header===x.header)?c({type:"columnsChanged",columns:[...u.columns,x]}):c({type:"columnsChanged",columns:u.columns.filter(T=>T.header!==x.header)})}}),label:x.header}),I.jsx("br",{})]},Q)),I.jsx(qn,{onClick:()=>c({type:"modalChanged",showAddColumnsModal:!1}),children:"Cancel"})]})})]})};WL.__docgenInfo={description:"",methods:[],displayName:"DataTable",props:{columns:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ +`,Q=document.createElement("a");document.body.appendChild(Q),Q.setAttribute("style","display: none");const S=new Blob([x],{type:"text/plain"}),T=window.URL.createObjectURL(S);Q.href=T,Q.download=t.downloadFileName||"table.tsv",Q.click(),window.URL.revokeObjectURL(T),Q.remove()},[u.columns,p,t.downloadFileName]),v=O.useRef(null),y=O.useRef(null),b=O.useRef(null),E=(x,Q,S)=>{if(x.current&&Q.current&&S.current){const T=x.current.scrollWidth>x.current.clientWidth,U=x.current.scrollLeft>0,L=x.current.scrollLeft+1{v.current!==null&&(v.current.addEventListener("scroll",()=>E(v,y,b)),new ResizeObserver(()=>{E(v,y,b)}).observe(v.current))},[v,b,y]),console.log((C=document.getElementById("row0"))==null?void 0:C.offsetHeight),I.jsxs(Ai,{elevation:3,sx:{"& .MuiToolbar-root":{pl:2},position:"relative"},children:[I.jsxs(Ac,{sx:{backgroundColor:`${t.headerColor?t.headerColor.backgroundColor:"transparent"}`,borderTopLeftRadius:4,borderTopRightRadius:4},children:[I.jsxs(Bt,{variant:"h5",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"none",sm:"block"},fontWeight:"normal",color:`${t.headerColor?t.headerColor.textColor:"inherit"}`},children:[t.tableTitle,t.titleHoverInfo&&I.jsx(IA,{title:t.titleHoverInfo,color:"primary",sx:{ml:1},placement:"right-start",children:I.jsx(U0,{})})]}),t.showMoreColumns&&t.columns.length>(t.noOfDefaultColumns||5)&&I.jsxs(qn,{variant:"outlined",size:"small",color:"primary",sx:{textTransform:"none"},onClick:()=>c({type:"modalChanged",showAddColumnsModal:!0}),children:[I.jsx(HL,{fontSize:"small"}),"Manage Columns"]}),t.searchable&&I.jsxs(GL,{children:[I.jsx(VL,{children:I.jsx(PL,{})}),I.jsx($L,{id:"table-search",placeholder:"Filter Items",inputProps:{"aria-label":"search"},onChange:x=>{c({type:"searchChanged",value:x.target.value}),r(0)}})]}),I.jsx(TA,{onClick:B,children:I.jsx(S0,{htmlColor:`${((F=t.headerColor)==null?void 0:F.textColor)||"inherit"}`})})]}),I.jsxs(p0,{ref:v,sx:{maxHeight:t.maxHeight?t.maxHeight:"none"},children:[I.jsxs(d0,{stickyHeader:!0,"aria-label":"sticky table",padding:t.dense?"checkbox":"normal",children:[!t.hideHeader&&I.jsx(g0,{children:I.jsx(Qa,{children:u.columns.map((x,Q)=>I.jsx(gn,{sx:Q!==u.columns.length-1?{pr:0}:{},onClick:()=>{x.unsortable||c({type:"sortChanged",sortColumn:Q}),r(0)},children:I.jsxs(uL,{active:Q===u.sort.column,direction:u.sort.asc?"asc":"desc",hideSortIcon:!0,children:[x.HeaderRender?I.jsx(x.HeaderRender,{}):x.header,x.tooltip?I.jsx(IA,{title:x.tooltip,color:"primary",sx:{ml:.5},placement:"right-start",children:I.jsx(kL,{fontSize:"small"})}):null]})},`${x.header}${Q}`))})}),I.jsx(h0,{children:t.rows.length===0?I.jsxs(Qa,{children:[I.jsx(gn,{children:t.emptyText||"No data available."}),o(t.columns.length)]}):I.jsxs(I.Fragment,{children:[g.map((x,Q)=>I.jsx(Qa,{selected:t.highlighted?s(x):!1,hover:!0,id:"row"+Q,onClick:()=>t.onRowClick&&t.onRowClick(x,Q+e*n),sx:{cursor:t.onRowClick?"pointer":"auto"},onMouseEnter:()=>t.onRowMouseEnter&&t.onRowMouseEnter(x,Q+e*n),onMouseLeave:()=>t.onRowMouseLeave&&t.onRowMouseLeave(),children:u.columns.map((S,T)=>I.jsx(gn,{sx:T!==u.columns.length-1?{pr:0}:{},onMouseEnter:()=>t.onCellMouseEnter&&t.onCellMouseEnter(S.value(x),Q,T),onMouseLeave:()=>t.onCellMouseLeave&&t.onCellMouseLeave(),children:S.FunctionalRender?S.FunctionalRender(x):S.render?S.render(x):S.value(x)},S.header+"Row"+Q+"Column"+T))},"row"+Q)),m>0&&I.jsx(Qa,{style:{height:(((w=document.getElementById("row0"))==null?void 0:w.offsetHeight)??(t.dense?33:53))*m},children:I.jsx(gn,{colSpan:6})})]})})]}),I.jsx(TA,{ref:b,sx:{position:"absolute",top:"50%",left:"10px",background:"rgba(0,0,0,0.15)",visibility:"hidden"},onClick:()=>{v.current&&(v.current.scrollLeft=0)},children:I.jsx(KL,{})}),I.jsx(TA,{ref:y,sx:{position:"absolute",top:"50%",right:"10px",background:"rgba(0,0,0,0.15)",visibility:"hidden"},onClick:()=>{v.current&&(v.current.scrollLeft=v.current.scrollWidth-v.current.clientWidth)},children:I.jsx(NL,{})})]}),!t.hidePageMenu&&I.jsxs(Fo,{direction:"column",useFlexGap:!0,justifyContent:"space-between",children:[I.jsx(Bt,{pl:t.dense?"4px":2,sx:{mt:"auto",mb:"auto"},children:p.length!==t.rows.length&&`Showing ${p.length} matching rows of ${t.rows.length} total.`}),I.jsx(v0,{rowsPerPageOptions:t.itemsPerPage?Array.isArray(t.itemsPerPage)?t.itemsPerPage:[t.itemsPerPage]:[5,10,25,100],component:"div",count:p.length,rowsPerPage:n,page:e,onPageChange:(x,Q)=>a(Q),onRowsPerPageChange:i,showFirstButton:!t.dense,showLastButton:!t.dense,labelRowsPerPage:t.dense?"Rows:":void 0,sx:t.dense?{"& .MuiTablePagination-toolbar":{pl:"6px"},"& .css-h0cf5v-MuiInputBase-root-MuiTablePagination-select":{mr:"6px",ml:"0px"},"& .MuiTablePagination-actions":{ml:"4px !important"}}:void 0})]}),I.jsx(A0,{open:u.showAddColumnsModal,onClose:()=>c({type:"modalChanged",showAddColumnsModal:!1}),children:I.jsxs(tc,{sx:zL,children:[I.jsx(Bt,{variant:"h4",children:"Add Columns"}),(t.defaultColumnsToShow?t.columns.filter(x=>{var Q;return!((Q=t.defaultColumnsToShow)!=null&&Q.includes(x.header))}):t.columns.slice(t.noOfDefaultColumns||5,t.columns.length)).map((x,Q)=>I.jsxs(O.Fragment,{children:[I.jsx(wU,{control:I.jsx(gl,{checked:u.columns.find(S=>S.header===x.header)!==void 0,onChange:S=>{S.target.checked&&t.columns.find(T=>T.header===x.header)?c({type:"columnsChanged",columns:[...u.columns,x]}):c({type:"columnsChanged",columns:u.columns.filter(T=>T.header!==x.header)})}}),label:x.header}),I.jsx("br",{})]},Q)),I.jsx(qn,{onClick:()=>c({type:"modalChanged",showAddColumnsModal:!1}),children:"Cancel"})]})})]})};WL.__docgenInfo={description:"",methods:[],displayName:"DataTable",props:{columns:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:`{ tooltip?: string header: string - HeaderRender?: React.FC + /** + * Custom render function for the column header + */ + HeaderRender?: () => JSX.Element; value: (row: T) => string | number search?: (row: T) => boolean unsearchable?: boolean render?: (row: T) => string | JSX.Element - FunctionalRender?: (props: { row: T }) => JSX.Element; + /** + * Custom render function for the row + */ + FunctionalRender?: (row: T) => JSX.Element; sort?: (a: T, b: T) => number unsortable?: boolean -}`,signature:{properties:[{key:"tooltip",value:{name:"string",required:!1}},{key:"header",value:{name:"string",required:!0}},{key:"HeaderRender",value:{name:"ReactFC",raw:"React.FC",required:!1}},{key:"value",value:{name:"signature",type:"function",raw:"(row: T) => string | number",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}},required:!0}},{key:"search",value:{name:"signature",type:"function",raw:"(row: T) => boolean",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"boolean"}},required:!1}},{key:"unsearchable",value:{name:"boolean",required:!1}},{key:"render",value:{name:"signature",type:"function",raw:"(row: T) => string | JSX.Element",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"union",raw:"string | JSX.Element",elements:[{name:"string"},{name:"JSX.Element"}]}},required:!1}},{key:"FunctionalRender",value:{name:"signature",type:"function",raw:"(props: { row: T }) => JSX.Element",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ row: T }",signature:{properties:[{key:"row",value:{name:"T",required:!0}}]}},name:"props"}],return:{name:"JSX.Element"}},required:!1}},{key:"sort",value:{name:"signature",type:"function",raw:"(a: T, b: T) => number",signature:{arguments:[{type:{name:"T"},name:"a"},{type:{name:"T"},name:"b"}],return:{name:"number"}},required:!1}},{key:"unsortable",value:{name:"boolean",required:!1}}]}}],raw:"DataTableColumn[]"},description:""},rows:{required:!0,tsType:{name:"Array",elements:[{name:"T"}],raw:"T[]"},description:""},itemsPerPage:{required:!1,tsType:{name:"union",raw:"number | number[]",elements:[{name:"number"},{name:"Array",elements:[{name:"number"}],raw:"number[]"}]},description:`Sets the number of items on each page. +}`,signature:{properties:[{key:"tooltip",value:{name:"string",required:!1}},{key:"header",value:{name:"string",required:!0}},{key:"HeaderRender",value:{name:"signature",type:"function",raw:"() => JSX.Element",signature:{arguments:[],return:{name:"JSX.Element"}},required:!1},description:"Custom render function for the column header"},{key:"value",value:{name:"signature",type:"function",raw:"(row: T) => string | number",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}},required:!0}},{key:"search",value:{name:"signature",type:"function",raw:"(row: T) => boolean",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"boolean"}},required:!1}},{key:"unsearchable",value:{name:"boolean",required:!1}},{key:"render",value:{name:"signature",type:"function",raw:"(row: T) => string | JSX.Element",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"union",raw:"string | JSX.Element",elements:[{name:"string"},{name:"JSX.Element"}]}},required:!1}},{key:"FunctionalRender",value:{name:"signature",type:"function",raw:"(row: T) => JSX.Element",signature:{arguments:[{type:{name:"T"},name:"row"}],return:{name:"JSX.Element"}},required:!1},description:"Custom render function for the row"},{key:"sort",value:{name:"signature",type:"function",raw:"(a: T, b: T) => number",signature:{arguments:[{type:{name:"T"},name:"a"},{type:{name:"T"},name:"b"}],return:{name:"number"}},required:!1}},{key:"unsortable",value:{name:"boolean",required:!1}}]}}],raw:"DataTableColumn[]"},description:""},rows:{required:!0,tsType:{name:"Array",elements:[{name:"T"}],raw:"T[]"},description:""},itemsPerPage:{required:!1,tsType:{name:"union",raw:"number | number[]",elements:[{name:"number"},{name:"Array",elements:[{name:"number"}],raw:"number[]"}]},description:`Sets the number of items on each page. If one number specified, the rows per page selection is hidden. Specify an array to provide user-selectable options diff --git a/assets/Graph.stories-Dy-h0jD6.js b/assets/Graph.stories-C6zF8OPI.js similarity index 99% rename from assets/Graph.stories-Dy-h0jD6.js rename to assets/Graph.stories-C6zF8OPI.js index 3ed54a0..3bceff4 100644 --- a/assets/Graph.stories-Dy-h0jD6.js +++ b/assets/Graph.stories-C6zF8OPI.js @@ -1,4 +1,4 @@ -import{w as B}from"./Graph-DpGUcQhO.js";/* empty css */import"./assertThisInitialized-DaBLapIa.js";import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const G={edge:[{from:"node_1",to:"node_2",effectSize:.1134,category:"hello",id:1},{from:"node_3",to:"node_2",effectSize:.5,category:"hi",id:2}],node:[{id:"node_1",category:"R"},{id:"node_2",category:"B"},{id:"node_3",category:"P"}]},_={data:G},k={edge:[{from:"EH38E3291096",to:"EH38E1939823",effectSize:.1134,category:"lower-expression",id:1},{from:"EH38E1939823",to:"EH38E1939823",effectSize:.1933,category:"lower-expression",id:2},{from:"EH38E3291121",to:"EH38E1939823",effectSize:.0545,category:"lower-expression",id:3},{from:"EH38E3291122",to:"EH38E1939823",effectSize:.0665,category:"lower-expression",id:4},{from:"EH38E3291358",to:"EH38E1939823",effectSize:.0674,category:"lower-expression",id:5},{from:"EH38E3291271",to:"EH38E3291279",effectSize:.0381,category:"lower-expression",id:6},{from:"EH38E3291279",to:"EH38E3291279",effectSize:.1667,category:"lower-expression",id:7},{from:"EH38E3291358",to:"EH38E3291279",effectSize:.0478,category:"lower-expression",id:8},{from:"EH38E3291174",to:"EH38E3291410",effectSize:.0504,category:"lower-expression",id:9},{from:"EH38E4193273",to:"EH38E3291410",effectSize:.0507,category:"lower-expression",id:10},{from:"EH38E3291358",to:"EH38E3291410",effectSize:.0895,category:"lower-expression",id:11},{from:"EH38E3291392",to:"EH38E3291410",effectSize:.0352,category:"lower-expression",id:12},{from:"EH38E3291410",to:"EH38E3291410",effectSize:.2538,category:"lower-expression",id:13},{from:"EH38E3291174",to:"EH38E4193228",effectSize:.0211,category:"lower-expression",id:14},{from:"EH38E3291218",to:"EH38E4193228",effectSize:.0477,category:"lower-expression",id:15},{from:"EH38E3291222",to:"EH38E4193228",effectSize:.0627,category:"lower-expression",id:16},{from:"EH38E3291226",to:"EH38E4193228",effectSize:.0448,category:"lower-expression",id:17},{from:"EH38E4193211",to:"EH38E4193228",effectSize:.0454,category:"lower-expression",id:18},{from:"EH38E3291232",to:"EH38E4193228",effectSize:.0311,category:"lower-expression",id:19},{from:"EH38E3291249",to:"EH38E4193228",effectSize:.0593,category:"higher-expression",id:20},{from:"EH38E3291263",to:"EH38E4193228",effectSize:.1136,category:"lower-expression",id:21},{from:"EH38E3291271",to:"EH38E4193228",effectSize:.4097,category:"lower-expression",id:22},{from:"EH38E3291279",to:"EH38E4193228",effectSize:.1077,category:"lower-expression",id:23},{from:"EH38E4193243",to:"EH38E4193228",effectSize:.026,category:"higher-expression",id:24},{from:"EH38E3291318",to:"EH38E4193228",effectSize:.0297,category:"higher-expression",id:25},{from:"EH38E4193273",to:"EH38E4193228",effectSize:.0405,category:"lower-expression",id:26},{from:"EH38E3291358",to:"EH38E4193228",effectSize:.0918,category:"lower-expression",id:27},{from:"EH38E3291779",to:"EH38E4193228",effectSize:.0263,category:"higher-expression",id:28},{from:"EH38E4193467",to:"EH38E4193228",effectSize:.0374,category:"higher-expression",id:29},{from:"EH38E1960374",to:"EH38E1960374",effectSize:.1853,category:"lower-expression",id:30},{from:"EH38E3312736",to:"EH38E1960374",effectSize:.0698,category:"lower-expression",id:31},{from:"EH38E1960377",to:"EH38E1960374",effectSize:.1479,category:"lower-expression",id:32},{from:"EH38E4201343",to:"EH38E1960374",effectSize:.1042,category:"lower-expression",id:33},{from:"EH38E1960374",to:"EH38E3312774",effectSize:.143,category:"higher-expression",id:34},{from:"EH38E3312736",to:"EH38E3312774",effectSize:.0864,category:"higher-expression",id:35},{from:"EH38E1960377",to:"EH38E3312774",effectSize:.1641,category:"higher-expression",id:36},{from:"EH38E4201343",to:"EH38E3312774",effectSize:.0652,category:"higher-expression",id:37},{from:"EH38E3312746",to:"EH38E3312774",effectSize:.0835,category:"lower-expression",id:38},{from:"EH38E3312765",to:"EH38E3312774",effectSize:.0386,category:"lower-expression",id:39},{from:"EH38E3312774",to:"EH38E3312774",effectSize:.3507,category:"lower-expression",id:40},{from:"EH38E3312787",to:"EH38E3312774",effectSize:.0959,category:"lower-expression",id:41},{from:"EH38E1940335",to:"EH38E3291664",effectSize:.0701,category:"lower-expression",id:42},{from:"EH38E3291664",to:"EH38E3291664",effectSize:.3563,category:"lower-expression",id:43},{from:"EH38E3291668",to:"EH38E3291664",effectSize:.1181,category:"lower-expression",id:44},{from:"EH38E3291318",to:"EH38E3291358",effectSize:.0369,category:"lower-expression",id:45},{from:"EH38E3291346",to:"EH38E3291358",effectSize:.108,category:"lower-expression",id:46},{from:"EH38E4193273",to:"EH38E3291358",effectSize:.2005,category:"lower-expression",id:47},{from:"EH38E3291358",to:"EH38E3291358",effectSize:.441,category:"lower-expression",id:48},{from:"EH38E3291364",to:"EH38E3291358",effectSize:.0862,category:"lower-expression",id:49},{from:"EH38E3291374",to:"EH38E3291358",effectSize:.0278,category:"higher-expression",id:50},{from:"EH38E3291664",to:"EH38E3291358",effectSize:.0291,category:"higher-expression",id:51},{from:"EH38E1939855",to:"EH38E3291249",effectSize:.0684,category:"higher-expression",id:52},{from:"EH38E4193211",to:"EH38E3291249",effectSize:.0354,category:"lower-expression",id:53},{from:"EH38E3291232",to:"EH38E3291249",effectSize:.0767,category:"lower-expression",id:54},{from:"EH38E3291244",to:"EH38E3291249",effectSize:.0883,category:"lower-expression",id:55},{from:"EH38E3291249",to:"EH38E3291249",effectSize:.1514,category:"lower-expression",id:56},{from:"EH38E3291358",to:"EH38E3291249",effectSize:.0378,category:"lower-expression",id:57},{from:"EH38E3291664",to:"EH38E3291249",effectSize:.0276,category:"higher-expression",id:58}],node:[{id:"EH38E1939823",category:"PLS"},{id:"EH38E1939855",category:"CA-CTCF"},{id:"EH38E1940335",category:"dELS"},{id:"EH38E1960374",category:"PLS"},{id:"EH38E1960377",category:"pELS"},{id:"EH38E3291096",category:"PLS"},{id:"EH38E3291121",category:"PLS"},{id:"EH38E3291122",category:"PLS"},{id:"EH38E3291174",category:"PLS"},{id:"EH38E3291218",category:"PLS"},{id:"EH38E3291222",category:"dELS"},{id:"EH38E3291226",category:"dELS"},{id:"EH38E3291232",category:"pELS"},{id:"EH38E3291244",category:"pELS"},{id:"EH38E3291249",category:"PLS"},{id:"EH38E3291263",category:"pELS"},{id:"EH38E3291271",category:"PLS"},{id:"EH38E3291279",category:"PLS"},{id:"EH38E3291318",category:"CA-CTCF"},{id:"EH38E3291346",category:"PLS"},{id:"EH38E3291358",category:"PLS"},{id:"EH38E3291364",category:"PLS"},{id:"EH38E3291374",category:"CA-TF"},{id:"EH38E3291392",category:"PLS"},{id:"EH38E3291410",category:"PLS"},{id:"EH38E3291664",category:"PLS"},{id:"EH38E3291668",category:"pELS"},{id:"EH38E3291779",category:"CA-CTCF"},{id:"EH38E3312736",category:"pELS"},{id:"EH38E3312746",category:"dELS"},{id:"EH38E3312765",category:"CA-TF"},{id:"EH38E3312774",category:"PLS"},{id:"EH38E3312787",category:"CA-TF"},{id:"EH38E4193211",category:"pELS"},{id:"EH38E4193228",category:"PLS"},{id:"EH38E4193243",category:"CA-H3K4me3"},{id:"EH38E4193273",category:"pELS"},{id:"EH38E4193467",category:"CA-CTCF"},{id:"EH38E4201343",category:"pELS"}]},f={data:k},I={edge:[{from:"EH38E3291096",to:"EH38E1939823",effectSize:.1134,category:"lower-expression",id:1},{from:"EH38E1939823",to:"EH38E1939823",effectSize:.1933,category:"lower-expression",id:2},{from:"EH38E3291121",to:"EH38E1939823",effectSize:.0545,category:"lower-expression",id:3},{from:"EH38E3291122",to:"EH38E1939823",effectSize:.0665,category:"lower-expression",id:4},{from:"EH38E3291358",to:"EH38E1939823",effectSize:.0674,category:"lower-expression",id:5},{from:"EH38E3291271",to:"EH38E3291279",effectSize:.0381,category:"lower-expression",id:6},{from:"EH38E3291279",to:"EH38E3291279",effectSize:.1667,category:"lower-expression",id:7},{from:"EH38E3291358",to:"EH38E3291279",effectSize:.0478,category:"lower-expression",id:8},{from:"EH38E3291174",to:"EH38E3291410",effectSize:.0504,category:"lower-expression",id:9},{from:"EH38E4193273",to:"EH38E3291410",effectSize:.0507,category:"lower-expression",id:10},{from:"EH38E3291358",to:"EH38E3291410",effectSize:.0895,category:"lower-expression",id:11},{from:"EH38E3291392",to:"EH38E3291410",effectSize:.0352,category:"lower-expression",id:12},{from:"EH38E3291410",to:"EH38E3291410",effectSize:.2538,category:"lower-expression",id:13},{from:"EH38E3291174",to:"EH38E4193228",effectSize:.0211,category:"lower-expression",id:14},{from:"EH38E3291218",to:"EH38E4193228",effectSize:.0477,category:"lower-expression",id:15},{from:"EH38E3291222",to:"EH38E4193228",effectSize:.0627,category:"lower-expression",id:16},{from:"EH38E3291226",to:"EH38E4193228",effectSize:.0448,category:"lower-expression",id:17},{from:"EH38E4193211",to:"EH38E4193228",effectSize:.0454,category:"lower-expression",id:18},{from:"EH38E3291232",to:"EH38E4193228",effectSize:.0311,category:"lower-expression",id:19},{from:"EH38E3291249",to:"EH38E4193228",effectSize:.0593,category:"higher-expression",id:20},{from:"EH38E3291263",to:"EH38E4193228",effectSize:.1136,category:"lower-expression",id:21},{from:"EH38E3291271",to:"EH38E4193228",effectSize:.4097,category:"lower-expression",id:22},{from:"EH38E3291279",to:"EH38E4193228",effectSize:.1077,category:"lower-expression",id:23},{from:"EH38E4193243",to:"EH38E4193228",effectSize:.026,category:"higher-expression",id:24},{from:"EH38E3291318",to:"EH38E4193228",effectSize:.0297,category:"higher-expression",id:25},{from:"EH38E4193273",to:"EH38E4193228",effectSize:.0405,category:"lower-expression",id:26},{from:"EH38E3291358",to:"EH38E4193228",effectSize:.0918,category:"lower-expression",id:27},{from:"EH38E3291779",to:"EH38E4193228",effectSize:.0263,category:"higher-expression",id:28},{from:"EH38E4193467",to:"EH38E4193228",effectSize:.0374,category:"higher-expression",id:29},{from:"EH38E1960374",to:"EH38E1960374",effectSize:.1853,category:"lower-expression",id:30},{from:"EH38E3312736",to:"EH38E1960374",effectSize:.0698,category:"lower-expression",id:31},{from:"EH38E1960377",to:"EH38E1960374",effectSize:.1479,category:"lower-expression",id:32},{from:"EH38E4201343",to:"EH38E1960374",effectSize:.1042,category:"lower-expression",id:33},{from:"EH38E1960374",to:"EH38E3312774",effectSize:.143,category:"higher-expression",id:34},{from:"EH38E3312736",to:"EH38E3312774",effectSize:.0864,category:"higher-expression",id:35},{from:"EH38E1960377",to:"EH38E3312774",effectSize:.1641,category:"higher-expression",id:36},{from:"EH38E4201343",to:"EH38E3312774",effectSize:.0652,category:"higher-expression",id:37},{from:"EH38E3312746",to:"EH38E3312774",effectSize:.0835,category:"lower-expression",id:38},{from:"EH38E3312765",to:"EH38E3312774",effectSize:.0386,category:"lower-expression",id:39},{from:"EH38E3312774",to:"EH38E3312774",effectSize:.3507,category:"lower-expression",id:40},{from:"EH38E3312787",to:"EH38E3312774",effectSize:.0959,category:"lower-expression",id:41},{from:"EH38E1940335",to:"EH38E3291664",effectSize:.0701,category:"lower-expression",id:42},{from:"EH38E3291664",to:"EH38E3291664",effectSize:.3563,category:"lower-expression",id:43},{from:"EH38E3291668",to:"EH38E3291664",effectSize:.1181,category:"lower-expression",id:44},{from:"EH38E3291318",to:"EH38E3291358",effectSize:.0369,category:"lower-expression",id:45},{from:"EH38E3291346",to:"EH38E3291358",effectSize:.108,category:"lower-expression",id:46},{from:"EH38E4193273",to:"EH38E3291358",effectSize:.2005,category:"lower-expression",id:47},{from:"EH38E3291358",to:"EH38E3291358",effectSize:.441,category:"lower-expression",id:48},{from:"EH38E3291364",to:"EH38E3291358",effectSize:.0862,category:"lower-expression",id:49},{from:"EH38E3291374",to:"EH38E3291358",effectSize:.0278,category:"higher-expression",id:50},{from:"EH38E3291664",to:"EH38E3291358",effectSize:.0291,category:"higher-expression",id:51},{from:"EH38E1939855",to:"EH38E3291249",effectSize:.0684,category:"higher-expression",id:52},{from:"EH38E4193211",to:"EH38E3291249",effectSize:.0354,category:"lower-expression",id:53},{from:"EH38E3291232",to:"EH38E3291249",effectSize:.0767,category:"lower-expression",id:54},{from:"EH38E3291244",to:"EH38E3291249",effectSize:.0883,category:"lower-expression",id:55},{from:"EH38E3291249",to:"EH38E3291249",effectSize:.1514,category:"lower-expression",id:56},{from:"EH38E3291358",to:"EH38E3291249",effectSize:.0378,category:"lower-expression",id:57},{from:"EH38E3291664",to:"EH38E3291249",effectSize:.0276,category:"higher-expression",id:58}],node:[{id:"EH38E1939823",category:"PLS"},{id:"EH38E1939855",category:"CA-CTCF"},{id:"EH38E1940335",category:"dELS"},{id:"EH38E1960374",category:"PLS"},{id:"EH38E1960377",category:"pELS"},{id:"EH38E3291096",category:"PLS"},{id:"EH38E3291121",category:"PLS"},{id:"EH38E3291122",category:"PLS"},{id:"EH38E3291174",category:"PLS"},{id:"EH38E3291218",category:"PLS"},{id:"EH38E3291222",category:"dELS"},{id:"EH38E3291226",category:"dELS"},{id:"EH38E3291232",category:"pELS"},{id:"EH38E3291244",category:"pELS"},{id:"EH38E3291249",category:"PLS"},{id:"EH38E3291263",category:"pELS"},{id:"EH38E3291271",category:"PLS"},{id:"EH38E3291279",category:"PLS"},{id:"EH38E3291318",category:"CA-CTCF"},{id:"EH38E3291346",category:"PLS"},{id:"EH38E3291358",category:"PLS"},{id:"EH38E3291364",category:"PLS"},{id:"EH38E3291374",category:"CA-TF"},{id:"EH38E3291392",category:"PLS"},{id:"EH38E3291410",category:"PLS"},{id:"EH38E3291664",category:"PLS"},{id:"EH38E3291668",category:"pELS"},{id:"EH38E3291779",category:"CA-CTCF"},{id:"EH38E3312736",category:"pELS"},{id:"EH38E3312746",category:"dELS"},{id:"EH38E3312765",category:"CA-TF"},{id:"EH38E3312774",category:"PLS"},{id:"EH38E3312787",category:"CA-TF"},{id:"EH38E4193211",category:"pELS"},{id:"EH38E4193228",category:"PLS"},{id:"EH38E4193243",category:"CA-H3K4me3"},{id:"EH38E4193273",category:"pELS"},{id:"EH38E4193467",category:"CA-CTCF"},{id:"EH38E4201343",category:"pELS"}],centered:{id:"EH38E4193211"}},g={data:I};function r(e){if(e.category!==void 0)switch(e.category){case"PLS":return"#FF0000";case"dELS":return"#FFCD00";case"pELS":return"#FFA700";case"CA-CTCF":return"#00B0F0";case"CA-H3K4me3":return"#ffaaaa";case"CA-TF":return"#be28e5";case"Low-DNase":return"#e1e1e1";case"lower-expression":return"rgb(0,0,0)";case"higher-expression":return"rgb(0,0,225)";default:return"grey"}return"grey"}function $(e){if(e.category!==void 0)switch(e.category){case"PLS":return"red";case"dELS":return"orange";case"pELS":return"yellow";case"CA-CTCF":return"green";case"CA-H3K4me3":return"blue";case"CA-TF":return"purple";case"Low-DNase":return"pink";case"lower-expression":return"black";case"higher-expression":return"purple";default:return"grey"}return"grey"}function O(e){if(e&&e.category!==void 0)switch(e.category){case"R":return"red";case"P":return"purple";case"B":return"blue";case"hello":return"pink";case"hi":return"green";default:return"grey"}else return"grey"}function o(e){if(e.category)switch(e.category){case"PLS":return"Promoter";case"dELS":return"Distal Enhancer";case"pELS":return"Proximal Enhancer";case"CA-CTCF":return"Chromatin Accessible + CTCF";case"CA-H3K4me3":return"Chromatin Accessible + H3K4me3";case"CA-TF":return"Chromatin Accessible + Transcription Factor";case"Low-DNase":return"Low DNase";case"CA-only":return"Chromatin Accessible";case"lower-expression":return"Lower-Expression";case"higher-expression":return"Higher-Expression";default:return e.category}return"Edge"}function j(e){if(e.category!==void 0)switch(e.category){case"R":return"red nodes";case"B":return"blue nodes";case"P":return"purple nodes";default:return e.category}return"Edge"}const V={title:"Graph",tags:["autodocs"],component:B},t={args:{data:_.data,title:"Sample Graph (non-cCRE)",id:"Sample",scale:e=>10*e,getColor:O,legendToggle:j,order:["P","R","B"],onNodeClick:e=>console.log("Accession: "+e.accession)}},E={args:{data:g.data,title:"cCRE Impact With Pilot Data With Centered cCRE",id:"PilotWithCentered",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",order:["PLS","pELS","dELS","CA-H3K4me3","CA-CTCF","CA-TF","CA","TF","Low DNase"],fontFamily:"Times New Roman",directional:!0}},i={args:{data:g.data,title:"50% Width and Height",id:"50Percent",width:"50%",height:"50%",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",directional:!0}},a={args:{data:f.data,title:"cCRE Impact With Pilot Data Without Centered cCRE",id:"PilotNoCentered",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",directional:!0}},c={args:{data:f.data,title:"Different Label",id:"diffLabel",getLabel:e=>e.category,getColor:r,legendToggle:o,legendNodeLabel:"Different Node Label",legendEdgeLabel:"Different Edge Label",directional:!0}},s={args:{data:f.data,title:"Different Color",id:"diffColor",getColor:$,legendToggle:o}},n={args:{data:_.data,title:"No Legend Toggle",id:"noLegendToggle",scale:e=>10*e,getColor:O}},d={args:{data:g.data,title:"Different Order",id:"diffOrder",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",order:["Low DNase","PLS","dELS","TF","pELS","CA-CTCF","CA","CA-H3K4me3","CA-TF"],directional:!0}};var H,l,p;t.parameters={...t.parameters,docs:{...(H=t.parameters)==null?void 0:H.docs,source:{originalSource:`{ +import{w as B}from"./Graph-YQGnloR9.js";/* empty css */import"./assertThisInitialized-DaBLapIa.js";import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const G={edge:[{from:"node_1",to:"node_2",effectSize:.1134,category:"hello",id:1},{from:"node_3",to:"node_2",effectSize:.5,category:"hi",id:2}],node:[{id:"node_1",category:"R"},{id:"node_2",category:"B"},{id:"node_3",category:"P"}]},_={data:G},k={edge:[{from:"EH38E3291096",to:"EH38E1939823",effectSize:.1134,category:"lower-expression",id:1},{from:"EH38E1939823",to:"EH38E1939823",effectSize:.1933,category:"lower-expression",id:2},{from:"EH38E3291121",to:"EH38E1939823",effectSize:.0545,category:"lower-expression",id:3},{from:"EH38E3291122",to:"EH38E1939823",effectSize:.0665,category:"lower-expression",id:4},{from:"EH38E3291358",to:"EH38E1939823",effectSize:.0674,category:"lower-expression",id:5},{from:"EH38E3291271",to:"EH38E3291279",effectSize:.0381,category:"lower-expression",id:6},{from:"EH38E3291279",to:"EH38E3291279",effectSize:.1667,category:"lower-expression",id:7},{from:"EH38E3291358",to:"EH38E3291279",effectSize:.0478,category:"lower-expression",id:8},{from:"EH38E3291174",to:"EH38E3291410",effectSize:.0504,category:"lower-expression",id:9},{from:"EH38E4193273",to:"EH38E3291410",effectSize:.0507,category:"lower-expression",id:10},{from:"EH38E3291358",to:"EH38E3291410",effectSize:.0895,category:"lower-expression",id:11},{from:"EH38E3291392",to:"EH38E3291410",effectSize:.0352,category:"lower-expression",id:12},{from:"EH38E3291410",to:"EH38E3291410",effectSize:.2538,category:"lower-expression",id:13},{from:"EH38E3291174",to:"EH38E4193228",effectSize:.0211,category:"lower-expression",id:14},{from:"EH38E3291218",to:"EH38E4193228",effectSize:.0477,category:"lower-expression",id:15},{from:"EH38E3291222",to:"EH38E4193228",effectSize:.0627,category:"lower-expression",id:16},{from:"EH38E3291226",to:"EH38E4193228",effectSize:.0448,category:"lower-expression",id:17},{from:"EH38E4193211",to:"EH38E4193228",effectSize:.0454,category:"lower-expression",id:18},{from:"EH38E3291232",to:"EH38E4193228",effectSize:.0311,category:"lower-expression",id:19},{from:"EH38E3291249",to:"EH38E4193228",effectSize:.0593,category:"higher-expression",id:20},{from:"EH38E3291263",to:"EH38E4193228",effectSize:.1136,category:"lower-expression",id:21},{from:"EH38E3291271",to:"EH38E4193228",effectSize:.4097,category:"lower-expression",id:22},{from:"EH38E3291279",to:"EH38E4193228",effectSize:.1077,category:"lower-expression",id:23},{from:"EH38E4193243",to:"EH38E4193228",effectSize:.026,category:"higher-expression",id:24},{from:"EH38E3291318",to:"EH38E4193228",effectSize:.0297,category:"higher-expression",id:25},{from:"EH38E4193273",to:"EH38E4193228",effectSize:.0405,category:"lower-expression",id:26},{from:"EH38E3291358",to:"EH38E4193228",effectSize:.0918,category:"lower-expression",id:27},{from:"EH38E3291779",to:"EH38E4193228",effectSize:.0263,category:"higher-expression",id:28},{from:"EH38E4193467",to:"EH38E4193228",effectSize:.0374,category:"higher-expression",id:29},{from:"EH38E1960374",to:"EH38E1960374",effectSize:.1853,category:"lower-expression",id:30},{from:"EH38E3312736",to:"EH38E1960374",effectSize:.0698,category:"lower-expression",id:31},{from:"EH38E1960377",to:"EH38E1960374",effectSize:.1479,category:"lower-expression",id:32},{from:"EH38E4201343",to:"EH38E1960374",effectSize:.1042,category:"lower-expression",id:33},{from:"EH38E1960374",to:"EH38E3312774",effectSize:.143,category:"higher-expression",id:34},{from:"EH38E3312736",to:"EH38E3312774",effectSize:.0864,category:"higher-expression",id:35},{from:"EH38E1960377",to:"EH38E3312774",effectSize:.1641,category:"higher-expression",id:36},{from:"EH38E4201343",to:"EH38E3312774",effectSize:.0652,category:"higher-expression",id:37},{from:"EH38E3312746",to:"EH38E3312774",effectSize:.0835,category:"lower-expression",id:38},{from:"EH38E3312765",to:"EH38E3312774",effectSize:.0386,category:"lower-expression",id:39},{from:"EH38E3312774",to:"EH38E3312774",effectSize:.3507,category:"lower-expression",id:40},{from:"EH38E3312787",to:"EH38E3312774",effectSize:.0959,category:"lower-expression",id:41},{from:"EH38E1940335",to:"EH38E3291664",effectSize:.0701,category:"lower-expression",id:42},{from:"EH38E3291664",to:"EH38E3291664",effectSize:.3563,category:"lower-expression",id:43},{from:"EH38E3291668",to:"EH38E3291664",effectSize:.1181,category:"lower-expression",id:44},{from:"EH38E3291318",to:"EH38E3291358",effectSize:.0369,category:"lower-expression",id:45},{from:"EH38E3291346",to:"EH38E3291358",effectSize:.108,category:"lower-expression",id:46},{from:"EH38E4193273",to:"EH38E3291358",effectSize:.2005,category:"lower-expression",id:47},{from:"EH38E3291358",to:"EH38E3291358",effectSize:.441,category:"lower-expression",id:48},{from:"EH38E3291364",to:"EH38E3291358",effectSize:.0862,category:"lower-expression",id:49},{from:"EH38E3291374",to:"EH38E3291358",effectSize:.0278,category:"higher-expression",id:50},{from:"EH38E3291664",to:"EH38E3291358",effectSize:.0291,category:"higher-expression",id:51},{from:"EH38E1939855",to:"EH38E3291249",effectSize:.0684,category:"higher-expression",id:52},{from:"EH38E4193211",to:"EH38E3291249",effectSize:.0354,category:"lower-expression",id:53},{from:"EH38E3291232",to:"EH38E3291249",effectSize:.0767,category:"lower-expression",id:54},{from:"EH38E3291244",to:"EH38E3291249",effectSize:.0883,category:"lower-expression",id:55},{from:"EH38E3291249",to:"EH38E3291249",effectSize:.1514,category:"lower-expression",id:56},{from:"EH38E3291358",to:"EH38E3291249",effectSize:.0378,category:"lower-expression",id:57},{from:"EH38E3291664",to:"EH38E3291249",effectSize:.0276,category:"higher-expression",id:58}],node:[{id:"EH38E1939823",category:"PLS"},{id:"EH38E1939855",category:"CA-CTCF"},{id:"EH38E1940335",category:"dELS"},{id:"EH38E1960374",category:"PLS"},{id:"EH38E1960377",category:"pELS"},{id:"EH38E3291096",category:"PLS"},{id:"EH38E3291121",category:"PLS"},{id:"EH38E3291122",category:"PLS"},{id:"EH38E3291174",category:"PLS"},{id:"EH38E3291218",category:"PLS"},{id:"EH38E3291222",category:"dELS"},{id:"EH38E3291226",category:"dELS"},{id:"EH38E3291232",category:"pELS"},{id:"EH38E3291244",category:"pELS"},{id:"EH38E3291249",category:"PLS"},{id:"EH38E3291263",category:"pELS"},{id:"EH38E3291271",category:"PLS"},{id:"EH38E3291279",category:"PLS"},{id:"EH38E3291318",category:"CA-CTCF"},{id:"EH38E3291346",category:"PLS"},{id:"EH38E3291358",category:"PLS"},{id:"EH38E3291364",category:"PLS"},{id:"EH38E3291374",category:"CA-TF"},{id:"EH38E3291392",category:"PLS"},{id:"EH38E3291410",category:"PLS"},{id:"EH38E3291664",category:"PLS"},{id:"EH38E3291668",category:"pELS"},{id:"EH38E3291779",category:"CA-CTCF"},{id:"EH38E3312736",category:"pELS"},{id:"EH38E3312746",category:"dELS"},{id:"EH38E3312765",category:"CA-TF"},{id:"EH38E3312774",category:"PLS"},{id:"EH38E3312787",category:"CA-TF"},{id:"EH38E4193211",category:"pELS"},{id:"EH38E4193228",category:"PLS"},{id:"EH38E4193243",category:"CA-H3K4me3"},{id:"EH38E4193273",category:"pELS"},{id:"EH38E4193467",category:"CA-CTCF"},{id:"EH38E4201343",category:"pELS"}]},f={data:k},I={edge:[{from:"EH38E3291096",to:"EH38E1939823",effectSize:.1134,category:"lower-expression",id:1},{from:"EH38E1939823",to:"EH38E1939823",effectSize:.1933,category:"lower-expression",id:2},{from:"EH38E3291121",to:"EH38E1939823",effectSize:.0545,category:"lower-expression",id:3},{from:"EH38E3291122",to:"EH38E1939823",effectSize:.0665,category:"lower-expression",id:4},{from:"EH38E3291358",to:"EH38E1939823",effectSize:.0674,category:"lower-expression",id:5},{from:"EH38E3291271",to:"EH38E3291279",effectSize:.0381,category:"lower-expression",id:6},{from:"EH38E3291279",to:"EH38E3291279",effectSize:.1667,category:"lower-expression",id:7},{from:"EH38E3291358",to:"EH38E3291279",effectSize:.0478,category:"lower-expression",id:8},{from:"EH38E3291174",to:"EH38E3291410",effectSize:.0504,category:"lower-expression",id:9},{from:"EH38E4193273",to:"EH38E3291410",effectSize:.0507,category:"lower-expression",id:10},{from:"EH38E3291358",to:"EH38E3291410",effectSize:.0895,category:"lower-expression",id:11},{from:"EH38E3291392",to:"EH38E3291410",effectSize:.0352,category:"lower-expression",id:12},{from:"EH38E3291410",to:"EH38E3291410",effectSize:.2538,category:"lower-expression",id:13},{from:"EH38E3291174",to:"EH38E4193228",effectSize:.0211,category:"lower-expression",id:14},{from:"EH38E3291218",to:"EH38E4193228",effectSize:.0477,category:"lower-expression",id:15},{from:"EH38E3291222",to:"EH38E4193228",effectSize:.0627,category:"lower-expression",id:16},{from:"EH38E3291226",to:"EH38E4193228",effectSize:.0448,category:"lower-expression",id:17},{from:"EH38E4193211",to:"EH38E4193228",effectSize:.0454,category:"lower-expression",id:18},{from:"EH38E3291232",to:"EH38E4193228",effectSize:.0311,category:"lower-expression",id:19},{from:"EH38E3291249",to:"EH38E4193228",effectSize:.0593,category:"higher-expression",id:20},{from:"EH38E3291263",to:"EH38E4193228",effectSize:.1136,category:"lower-expression",id:21},{from:"EH38E3291271",to:"EH38E4193228",effectSize:.4097,category:"lower-expression",id:22},{from:"EH38E3291279",to:"EH38E4193228",effectSize:.1077,category:"lower-expression",id:23},{from:"EH38E4193243",to:"EH38E4193228",effectSize:.026,category:"higher-expression",id:24},{from:"EH38E3291318",to:"EH38E4193228",effectSize:.0297,category:"higher-expression",id:25},{from:"EH38E4193273",to:"EH38E4193228",effectSize:.0405,category:"lower-expression",id:26},{from:"EH38E3291358",to:"EH38E4193228",effectSize:.0918,category:"lower-expression",id:27},{from:"EH38E3291779",to:"EH38E4193228",effectSize:.0263,category:"higher-expression",id:28},{from:"EH38E4193467",to:"EH38E4193228",effectSize:.0374,category:"higher-expression",id:29},{from:"EH38E1960374",to:"EH38E1960374",effectSize:.1853,category:"lower-expression",id:30},{from:"EH38E3312736",to:"EH38E1960374",effectSize:.0698,category:"lower-expression",id:31},{from:"EH38E1960377",to:"EH38E1960374",effectSize:.1479,category:"lower-expression",id:32},{from:"EH38E4201343",to:"EH38E1960374",effectSize:.1042,category:"lower-expression",id:33},{from:"EH38E1960374",to:"EH38E3312774",effectSize:.143,category:"higher-expression",id:34},{from:"EH38E3312736",to:"EH38E3312774",effectSize:.0864,category:"higher-expression",id:35},{from:"EH38E1960377",to:"EH38E3312774",effectSize:.1641,category:"higher-expression",id:36},{from:"EH38E4201343",to:"EH38E3312774",effectSize:.0652,category:"higher-expression",id:37},{from:"EH38E3312746",to:"EH38E3312774",effectSize:.0835,category:"lower-expression",id:38},{from:"EH38E3312765",to:"EH38E3312774",effectSize:.0386,category:"lower-expression",id:39},{from:"EH38E3312774",to:"EH38E3312774",effectSize:.3507,category:"lower-expression",id:40},{from:"EH38E3312787",to:"EH38E3312774",effectSize:.0959,category:"lower-expression",id:41},{from:"EH38E1940335",to:"EH38E3291664",effectSize:.0701,category:"lower-expression",id:42},{from:"EH38E3291664",to:"EH38E3291664",effectSize:.3563,category:"lower-expression",id:43},{from:"EH38E3291668",to:"EH38E3291664",effectSize:.1181,category:"lower-expression",id:44},{from:"EH38E3291318",to:"EH38E3291358",effectSize:.0369,category:"lower-expression",id:45},{from:"EH38E3291346",to:"EH38E3291358",effectSize:.108,category:"lower-expression",id:46},{from:"EH38E4193273",to:"EH38E3291358",effectSize:.2005,category:"lower-expression",id:47},{from:"EH38E3291358",to:"EH38E3291358",effectSize:.441,category:"lower-expression",id:48},{from:"EH38E3291364",to:"EH38E3291358",effectSize:.0862,category:"lower-expression",id:49},{from:"EH38E3291374",to:"EH38E3291358",effectSize:.0278,category:"higher-expression",id:50},{from:"EH38E3291664",to:"EH38E3291358",effectSize:.0291,category:"higher-expression",id:51},{from:"EH38E1939855",to:"EH38E3291249",effectSize:.0684,category:"higher-expression",id:52},{from:"EH38E4193211",to:"EH38E3291249",effectSize:.0354,category:"lower-expression",id:53},{from:"EH38E3291232",to:"EH38E3291249",effectSize:.0767,category:"lower-expression",id:54},{from:"EH38E3291244",to:"EH38E3291249",effectSize:.0883,category:"lower-expression",id:55},{from:"EH38E3291249",to:"EH38E3291249",effectSize:.1514,category:"lower-expression",id:56},{from:"EH38E3291358",to:"EH38E3291249",effectSize:.0378,category:"lower-expression",id:57},{from:"EH38E3291664",to:"EH38E3291249",effectSize:.0276,category:"higher-expression",id:58}],node:[{id:"EH38E1939823",category:"PLS"},{id:"EH38E1939855",category:"CA-CTCF"},{id:"EH38E1940335",category:"dELS"},{id:"EH38E1960374",category:"PLS"},{id:"EH38E1960377",category:"pELS"},{id:"EH38E3291096",category:"PLS"},{id:"EH38E3291121",category:"PLS"},{id:"EH38E3291122",category:"PLS"},{id:"EH38E3291174",category:"PLS"},{id:"EH38E3291218",category:"PLS"},{id:"EH38E3291222",category:"dELS"},{id:"EH38E3291226",category:"dELS"},{id:"EH38E3291232",category:"pELS"},{id:"EH38E3291244",category:"pELS"},{id:"EH38E3291249",category:"PLS"},{id:"EH38E3291263",category:"pELS"},{id:"EH38E3291271",category:"PLS"},{id:"EH38E3291279",category:"PLS"},{id:"EH38E3291318",category:"CA-CTCF"},{id:"EH38E3291346",category:"PLS"},{id:"EH38E3291358",category:"PLS"},{id:"EH38E3291364",category:"PLS"},{id:"EH38E3291374",category:"CA-TF"},{id:"EH38E3291392",category:"PLS"},{id:"EH38E3291410",category:"PLS"},{id:"EH38E3291664",category:"PLS"},{id:"EH38E3291668",category:"pELS"},{id:"EH38E3291779",category:"CA-CTCF"},{id:"EH38E3312736",category:"pELS"},{id:"EH38E3312746",category:"dELS"},{id:"EH38E3312765",category:"CA-TF"},{id:"EH38E3312774",category:"PLS"},{id:"EH38E3312787",category:"CA-TF"},{id:"EH38E4193211",category:"pELS"},{id:"EH38E4193228",category:"PLS"},{id:"EH38E4193243",category:"CA-H3K4me3"},{id:"EH38E4193273",category:"pELS"},{id:"EH38E4193467",category:"CA-CTCF"},{id:"EH38E4201343",category:"pELS"}],centered:{id:"EH38E4193211"}},g={data:I};function r(e){if(e.category!==void 0)switch(e.category){case"PLS":return"#FF0000";case"dELS":return"#FFCD00";case"pELS":return"#FFA700";case"CA-CTCF":return"#00B0F0";case"CA-H3K4me3":return"#ffaaaa";case"CA-TF":return"#be28e5";case"Low-DNase":return"#e1e1e1";case"lower-expression":return"rgb(0,0,0)";case"higher-expression":return"rgb(0,0,225)";default:return"grey"}return"grey"}function $(e){if(e.category!==void 0)switch(e.category){case"PLS":return"red";case"dELS":return"orange";case"pELS":return"yellow";case"CA-CTCF":return"green";case"CA-H3K4me3":return"blue";case"CA-TF":return"purple";case"Low-DNase":return"pink";case"lower-expression":return"black";case"higher-expression":return"purple";default:return"grey"}return"grey"}function O(e){if(e&&e.category!==void 0)switch(e.category){case"R":return"red";case"P":return"purple";case"B":return"blue";case"hello":return"pink";case"hi":return"green";default:return"grey"}else return"grey"}function o(e){if(e.category)switch(e.category){case"PLS":return"Promoter";case"dELS":return"Distal Enhancer";case"pELS":return"Proximal Enhancer";case"CA-CTCF":return"Chromatin Accessible + CTCF";case"CA-H3K4me3":return"Chromatin Accessible + H3K4me3";case"CA-TF":return"Chromatin Accessible + Transcription Factor";case"Low-DNase":return"Low DNase";case"CA-only":return"Chromatin Accessible";case"lower-expression":return"Lower-Expression";case"higher-expression":return"Higher-Expression";default:return e.category}return"Edge"}function j(e){if(e.category!==void 0)switch(e.category){case"R":return"red nodes";case"B":return"blue nodes";case"P":return"purple nodes";default:return e.category}return"Edge"}const V={title:"Graph",tags:["autodocs"],component:B},t={args:{data:_.data,title:"Sample Graph (non-cCRE)",id:"Sample",scale:e=>10*e,getColor:O,legendToggle:j,order:["P","R","B"],onNodeClick:e=>console.log("Accession: "+e.accession)}},E={args:{data:g.data,title:"cCRE Impact With Pilot Data With Centered cCRE",id:"PilotWithCentered",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",order:["PLS","pELS","dELS","CA-H3K4me3","CA-CTCF","CA-TF","CA","TF","Low DNase"],fontFamily:"Times New Roman",directional:!0}},i={args:{data:g.data,title:"50% Width and Height",id:"50Percent",width:"50%",height:"50%",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",directional:!0}},a={args:{data:f.data,title:"cCRE Impact With Pilot Data Without Centered cCRE",id:"PilotNoCentered",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",directional:!0}},c={args:{data:f.data,title:"Different Label",id:"diffLabel",getLabel:e=>e.category,getColor:r,legendToggle:o,legendNodeLabel:"Different Node Label",legendEdgeLabel:"Different Edge Label",directional:!0}},s={args:{data:f.data,title:"Different Color",id:"diffColor",getColor:$,legendToggle:o}},n={args:{data:_.data,title:"No Legend Toggle",id:"noLegendToggle",scale:e=>10*e,getColor:O}},d={args:{data:g.data,title:"Different Order",id:"diffOrder",getColor:r,legendToggle:o,legendNodeLabel:"cCRE Type",order:["Low DNase","PLS","dELS","TF","pELS","CA-CTCF","CA","CA-H3K4me3","CA-TF"],directional:!0}};var H,l,p;t.parameters={...t.parameters,docs:{...(H=t.parameters)==null?void 0:H.docs,source:{originalSource:`{ args: { data: data2.data, title: 'Sample Graph (non-cCRE)', diff --git a/assets/SearchBox.stories-2boxrtuV.js b/assets/SearchBox.stories-DhMpJOil.js similarity index 97% rename from assets/SearchBox.stories-2boxrtuV.js rename to assets/SearchBox.stories-DhMpJOil.js index d82aef6..7da79f9 100644 --- a/assets/SearchBox.stories-2boxrtuV.js +++ b/assets/SearchBox.stories-DhMpJOil.js @@ -1,4 +1,4 @@ -import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{r as o}from"./index-uubelm5h.js";import{S as v,G as i,b as c}from"./Graph-DpGUcQhO.js";/* empty css */import"./index-CfOt2XX2.js";function d(){const{innerWidth:t,innerHeight:r}=window;return{width:t,height:r}}function f(){const[t,r]=o.useState(d());return o.useEffect(()=>{const a=()=>{r(d())};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),t}const W=()=>{console.log("on search ")},h=[{name:"Disease/Trait",value:"disease",helperText:"e.g. schizophrenia, years of education"},{name:"Gene/b-cCRE",value:"gene",helperText:"e.g. APOE, PPIF1"},{name:"SNP/QTL",value:"SNP",helperText:"e.g. rs2836883, rs7690700"}],y={title:"SearchBox",component:v,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}}},s={args:{onSearchButtonClick:W}},n={args:{},render:t=>{const{width:r}=f();return e.jsxs(i,{container:!0,children:[e.jsxs(i,{size:6,children:[e.jsx("strong",{children:"Non-Reactive"}),e.jsx("br",{}),e.jsx(c,{selectOptions:h,label:"What can we help you find?",variant:"standard",...t})]}),e.jsxs(i,{size:6,children:[e.jsxs("strong",{children:["Reactive (at width <800px; current width is ",r/2,")"]}),e.jsx("br",{}),e.jsx(c,{selectOptions:h,label:"What can we help you find?",variant:"standard",reactiveThreshold:800,reactiveWidth:305,containerWidth:r/2,...t})]})]})}};var l,p,u;s.parameters={...s.parameters,docs:{...(l=s.parameters)==null?void 0:l.docs,source:{originalSource:`{ +import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{r as o}from"./index-uubelm5h.js";import{S as v,G as i,b as c}from"./Graph-YQGnloR9.js";/* empty css */import"./index-CfOt2XX2.js";function d(){const{innerWidth:t,innerHeight:r}=window;return{width:t,height:r}}function f(){const[t,r]=o.useState(d());return o.useEffect(()=>{const a=()=>{r(d())};return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),t}const W=()=>{console.log("on search ")},h=[{name:"Disease/Trait",value:"disease",helperText:"e.g. schizophrenia, years of education"},{name:"Gene/b-cCRE",value:"gene",helperText:"e.g. APOE, PPIF1"},{name:"SNP/QTL",value:"SNP",helperText:"e.g. rs2836883, rs7690700"}],y={title:"SearchBox",component:v,tags:["autodocs"],argTypes:{children:{control:{type:"text"}}},parameters:{controls:{expanded:!0}}},s={args:{onSearchButtonClick:W}},n={args:{},render:t=>{const{width:r}=f();return e.jsxs(i,{container:!0,children:[e.jsxs(i,{size:6,children:[e.jsx("strong",{children:"Non-Reactive"}),e.jsx("br",{}),e.jsx(c,{selectOptions:h,label:"What can we help you find?",variant:"standard",...t})]}),e.jsxs(i,{size:6,children:[e.jsxs("strong",{children:["Reactive (at width <800px; current width is ",r/2,")"]}),e.jsx("br",{}),e.jsx(c,{selectOptions:h,label:"What can we help you find?",variant:"standard",reactiveThreshold:800,reactiveWidth:305,containerWidth:r/2,...t})]})]})}};var l,p,u;s.parameters={...s.parameters,docs:{...(l=s.parameters)==null?void 0:l.docs,source:{originalSource:`{ args: { onSearchButtonClick: onSearch } diff --git a/assets/Select.stories-BF9s_cEH.js b/assets/Select.stories-C0Dmr7j1.js similarity index 94% rename from assets/Select.stories-BF9s_cEH.js rename to assets/Select.stories-C0Dmr7j1.js index 2f15c97..f49c4e8 100644 --- a/assets/Select.stories-BF9s_cEH.js +++ b/assets/Select.stories-C0Dmr7j1.js @@ -1,4 +1,4 @@ -import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{c as l,M as t}from"./Graph-DpGUcQhO.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const m={title:"Select",component:l,tags:["autodocs"],parameters:{controls:{expanded:!0}}},a={args:{},render:()=>e.jsxs(l,{variant:"standard",defaultValue:"disease/trait",children:[e.jsx(t,{value:"disease/trait",children:"Disease/Trait"}),e.jsx(t,{value:"gene/bcre",children:"Gene/b-cCRE"}),e.jsx(t,{value:"snp/qtl",children:"SNP/QTL"}),e.jsx(t,{value:"single-cell",children:"Single Cell"})]})};var r,s,n;a.parameters={...a.parameters,docs:{...(r=a.parameters)==null?void 0:r.docs,source:{originalSource:`{ +import{j as e}from"./assertThisInitialized-DaBLapIa.js";import{c as l,M as t}from"./Graph-YQGnloR9.js";/* empty css */import"./index-uubelm5h.js";import"./index-CfOt2XX2.js";const m={title:"Select",component:l,tags:["autodocs"],parameters:{controls:{expanded:!0}}},a={args:{},render:()=>e.jsxs(l,{variant:"standard",defaultValue:"disease/trait",children:[e.jsx(t,{value:"disease/trait",children:"Disease/Trait"}),e.jsx(t,{value:"gene/bcre",children:"Gene/b-cCRE"}),e.jsx(t,{value:"snp/qtl",children:"SNP/QTL"}),e.jsx(t,{value:"single-cell",children:"Single Cell"})]})};var r,s,n;a.parameters={...a.parameters,docs:{...(r=a.parameters)==null?void 0:r.docs,source:{originalSource:`{ args: {}, render: () =>