From 92ae3fffa9114105d47f5f4704d9449c3d6c34cb Mon Sep 17 00:00:00 2001 From: tiny-bot Date: Tue, 11 Jun 2024 23:41:57 +0000 Subject: [PATCH] Updates --- ...DEzluUjd.js => Color-RQJUDNI5-rLRFJ97r.js} | 2 +- ...J.js => DocsRenderer-K4EAMTCU-BQay59Xt.js} | 10 +-- assets/Editor.stories-BHq5bVbO.js | 86 ------------------- assets/Editor.stories-CKeMk9IT.js | 86 +++++++++++++++++++ ...BN.js => WithTooltip-Y7J54OF7-BylCJlCX.js} | 2 +- ...hye_.js => formatter-B5HCVTEV-D8JyHNUu.js} | 2 +- ...{iframe-KV1sE_8B.js => iframe-CQOrQh0P.js} | 4 +- ...review-LdHJIkPN.js => preview-DVb14z-z.js} | 4 +- ...=> syntaxhighlighter-JOJW2KGS-DZXWONG7.js} | 2 +- iframe.html | 2 +- project.json | 2 +- 11 files changed, 101 insertions(+), 101 deletions(-) rename assets/{Color-RQJUDNI5-DEzluUjd.js => Color-RQJUDNI5-rLRFJ97r.js} (99%) rename assets/{DocsRenderer-K4EAMTCU-CtkD0JuJ.js => DocsRenderer-K4EAMTCU-BQay59Xt.js} (99%) delete mode 100644 assets/Editor.stories-BHq5bVbO.js create mode 100644 assets/Editor.stories-CKeMk9IT.js rename assets/{WithTooltip-Y7J54OF7-BkAsHpBN.js => WithTooltip-Y7J54OF7-BylCJlCX.js} (63%) rename assets/{formatter-B5HCVTEV--eCPhye_.js => formatter-B5HCVTEV-D8JyHNUu.js} (99%) rename assets/{iframe-KV1sE_8B.js => iframe-CQOrQh0P.js} (95%) rename assets/{preview-LdHJIkPN.js => preview-DVb14z-z.js} (72%) rename assets/{syntaxhighlighter-JOJW2KGS-Z2L8ORaK.js => syntaxhighlighter-JOJW2KGS-DZXWONG7.js} (83%) diff --git a/assets/Color-RQJUDNI5-DEzluUjd.js b/assets/Color-RQJUDNI5-rLRFJ97r.js similarity index 99% rename from assets/Color-RQJUDNI5-DEzluUjd.js rename to assets/Color-RQJUDNI5-rLRFJ97r.js index 8b233e96..20b6aa2a 100644 --- a/assets/Color-RQJUDNI5-DEzluUjd.js +++ b/assets/Color-RQJUDNI5-rLRFJ97r.js @@ -1 +1 @@ -import{n as M,d as ue,T as Me,F as Ce,M as $e,g as Ne}from"./DocsRenderer-K4EAMTCU-CtkD0JuJ.js";import{R as h,r as b,g as fe}from"./index-BBkUAzwr.js";import{_ as Oe,i as J,a as Ie}from"./_getPrototype-QNcgTGLk.js";import"./iframe-KV1sE_8B.js";import"../sb-preview/runtime.js";import"./react-18-DHj1n7xi.js";import"./index-B_J8iUie.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=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(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["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},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?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}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=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?Fe({h:Te(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}},Fe=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}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h: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)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=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}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.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}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["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(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;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 c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*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 Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(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,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-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,i[c]=s*255;return i};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),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,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 i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*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,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(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,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*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 i=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 i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*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 B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(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{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.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"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.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})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({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||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\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,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.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{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.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}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{onClick:k}):null)},fn=tn;export{tn as ColorControl,fn as default}; +import{n as M,d as ue,T as Me,F as Ce,M as $e,g as Ne}from"./DocsRenderer-K4EAMTCU-BQay59Xt.js";import{R as h,r as b,g as fe}from"./index-BBkUAzwr.js";import{_ as Oe,i as J,a as Ie}from"./_getPrototype-QNcgTGLk.js";import"./iframe-CQOrQh0P.js";import"../sb-preview/runtime.js";import"./react-18-DHj1n7xi.js";import"./index-B_J8iUie.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=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(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["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},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?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}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=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?Fe({h:Te(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}},Fe=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}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h: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)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=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}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.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}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["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(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;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 c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*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 Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(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,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-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,i[c]=s*255;return i};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),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,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 i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*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,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(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,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*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 i=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 i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*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 B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(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{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.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"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.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})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({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||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\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,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.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{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.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}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{onClick:k}):null)},fn=tn;export{tn as ColorControl,fn as default}; diff --git a/assets/DocsRenderer-K4EAMTCU-CtkD0JuJ.js b/assets/DocsRenderer-K4EAMTCU-BQay59Xt.js similarity index 99% rename from assets/DocsRenderer-K4EAMTCU-CtkD0JuJ.js rename to assets/DocsRenderer-K4EAMTCU-BQay59Xt.js index a02e10f8..356dd7f0 100644 --- a/assets/DocsRenderer-K4EAMTCU-CtkD0JuJ.js +++ b/assets/DocsRenderer-K4EAMTCU-BQay59Xt.js @@ -1,10 +1,10 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-JOJW2KGS-Z2L8ORaK.js","./iframe-KV1sE_8B.js","./index-BBkUAzwr.js","./react-18-DHj1n7xi.js","./index-B_J8iUie.js","./_getPrototype-QNcgTGLk.js","./index-DrFu-skq.js","./formatter-B5HCVTEV--eCPhye_.js","./WithTooltip-Y7J54OF7-BkAsHpBN.js","./Color-RQJUDNI5-DEzluUjd.js","./index-z5U8iC57.js"] + __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-JOJW2KGS-DZXWONG7.js","./iframe-CQOrQh0P.js","./index-BBkUAzwr.js","./react-18-DHj1n7xi.js","./index-B_J8iUie.js","./_getPrototype-QNcgTGLk.js","./index-DrFu-skq.js","./formatter-B5HCVTEV-D8JyHNUu.js","./WithTooltip-Y7J54OF7-BylCJlCX.js","./Color-RQJUDNI5-rLRFJ97r.js","./index-z5U8iC57.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as vt}from"./iframe-KV1sE_8B.js";import{r as o,b as Tl,g as On,R as u,c as ta}from"./index-BBkUAzwr.js";import{a as x0,R as ed,r as td,u as rd}from"./react-18-DHj1n7xi.js";import{L as E0,O as nd}from"./index-B_J8iUie.js";import{q as S0,r as ad,s as C0,t as od,i as Tn,v as ld,w as id,x as sd,c as R0,y as I0,z as cd,A as A0,B as dd,C as ud,D as pd,E as fd,F as hd,G as gd,H as _0,I as md,J as vd,K as k0,_ as bd,L as yd,M as wd,N as ho,d as O0,O as T0,P as M0,Q as xd,R as Ed,U as Sd,e as Cd,S as Ml,k as ra}from"./_getPrototype-QNcgTGLk.js";import{d as Rd}from"./index-DrFu-skq.js";var Fe=e=>`control-${e.replace(/\s+/g,"-")}`,Mn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:Id}=__STORYBOOK_MODULE_GLOBAL__,{logger:Ad}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var _d=Object.create,$0=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,L0=Object.getOwnPropertyNames,Od=Object.getPrototypeOf,Td=Object.prototype.hasOwnProperty,go=(e,t)=>function(){return t||(0,e[L0(e)[0]])((t={exports:{}}).exports,t),t.exports},Md=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L0(t))!Td.call(e,a)&&a!==r&&$0(e,a,{get:()=>t[a],enumerable:!(n=kd(t,a))||n.enumerable});return e},z0=(e,t,r)=>(r=e!=null?_d(Od(e)):{},Md(t||!e||!e.__esModule?$0(r,"default",{value:e,enumerable:!0}):r,e));function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(e,t,r){return Bd()?sn=Reflect.construct.bind():sn=function(n,a,l){var i=[null];i.push.apply(i,a);var c=Function.bind.apply(n,i),s=new c;return l&&Ar(s,l.prototype),s},sn.apply(null,arguments)}function za(e){var t=typeof Map=="function"?new Map:void 0;return za=function(r){if(r===null||!zd(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return sn(r,arguments,La(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,r)},za(e)}var Pd={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). +import{_ as vt}from"./iframe-CQOrQh0P.js";import{r as o,b as Tl,g as On,R as u,c as ta}from"./index-BBkUAzwr.js";import{a as x0,R as ed,r as td,u as rd}from"./react-18-DHj1n7xi.js";import{L as E0,O as nd}from"./index-B_J8iUie.js";import{q as S0,r as ad,s as C0,t as od,i as Tn,v as ld,w as id,x as sd,c as R0,y as I0,z as cd,A as A0,B as dd,C as ud,D as pd,E as fd,F as hd,G as gd,H as _0,I as md,J as vd,K as k0,_ as bd,L as yd,M as wd,N as ho,d as O0,O as T0,P as M0,Q as xd,R as Ed,U as Sd,e as Cd,S as Ml,k as ra}from"./_getPrototype-QNcgTGLk.js";import{d as Rd}from"./index-DrFu-skq.js";var Fe=e=>`control-${e.replace(/\s+/g,"-")}`,Mn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:Id}=__STORYBOOK_MODULE_GLOBAL__,{logger:Ad}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var _d=Object.create,$0=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,L0=Object.getOwnPropertyNames,Od=Object.getPrototypeOf,Td=Object.prototype.hasOwnProperty,go=(e,t)=>function(){return t||(0,e[L0(e)[0]])((t={exports:{}}).exports,t),t.exports},Md=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L0(t))!Td.call(e,a)&&a!==r&&$0(e,a,{get:()=>t[a],enumerable:!(n=kd(t,a))||n.enumerable});return e},z0=(e,t,r)=>(r=e!=null?_d(Od(e)):{},Md(t||!e||!e.__esModule?$0(r,"default",{value:e,enumerable:!0}):r,e));function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(e,t,r){return Bd()?sn=Reflect.construct.bind():sn=function(n,a,l){var i=[null];i.push.apply(i,a);var c=Function.bind.apply(n,i),s=new c;return l&&Ar(s,l.prototype),s},sn.apply(null,arguments)}function za(e){var t=typeof Map=="function"?new Map:void 0;return za=function(r){if(r===null||!zd(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return sn(r,arguments,La(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,r)},za(e)}var Pd={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). `,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }). @@ -370,9 +370,9 @@ To pass a single animation please supply them in simple values, e.g. animation(' `,77:`remToPx expects a value in "rem" but you provided it in "%s". `,78:`base must be set in "px" or "%" but you set it in "%s". -`};function r3(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(c=l,s=i):a>=1&&a<2?(c=i,s=l):a>=2&&a<3?(s=l,d=i):a>=3&&a<4?(s=i,d=l):a>=4&&a<5?(c=i,d=l):a>=5&&a<6&&(c=l,d=i);var p=r-l/2,h=c+p,m=s+p,f=d+p;return n(h,m,f)}var xi={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function a3(e){if(typeof e!="string")return e;var t=e.toLowerCase();return xi[t]?"#"+xi[t]:e}var o3=/^#[a-fA-F0-9]{6}$/,l3=/^#[a-fA-F0-9]{8}$/,i3=/^#[a-fA-F0-9]{3}$/,s3=/^#[a-fA-F0-9]{4}$/,ga=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,c3=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,d3=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,u3=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Yo(e){if(typeof e!="string")throw new tt(3);var t=a3(e);if(t.match(o3))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(l3)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(i3))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(s3)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ga.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var l=c3.exec(t.substring(0,50));if(l)return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])};var i=d3.exec(t);if(i){var c=parseInt(""+i[1],10),s=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,p="rgb("+Pr(c,s,d)+")",h=ga.exec(p);if(!h)throw new tt(4,t,p);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var m=u3.exec(t.substring(0,50));if(m){var f=parseInt(""+m[1],10),v=parseInt(""+m[2],10)/100,g=parseInt(""+m[3],10)/100,E="rgb("+Pr(f,v,g)+")",x=ga.exec(E);if(!x)throw new tt(4,t,E);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+m[4])>1?parseFloat(""+m[4])/100:parseFloat(""+m[4])}}throw new tt(5)}function p3(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),l=Math.min(t,r,n),i=(a+l)/2;if(a===l)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var c,s=a-l,d=i>.5?s/(2-a-l):s/(a+l);switch(a){case t:c=(r-n)/s+(r=1?Rn(e,t,r):"rgba("+Pr(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Rn(e.hue,e.saturation,e.lightness):"rgba("+Pr(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new tt(2)}function Ja(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return Za("#"+kt(e)+kt(t)+kt(r));if(typeof e=="object"&&t===void 0&&r===void 0)return Za("#"+kt(e.red)+kt(e.green)+kt(e.blue));throw new tt(6)}function In(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=Yo(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?Ja(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Ja(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new tt(7)}var v3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},b3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},y3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},w3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function oc(e){if(typeof e!="object")throw new tt(8);if(b3(e))return In(e);if(v3(e))return Ja(e);if(w3(e))return m3(e);if(y3(e))return g3(e);throw new tt(8)}function lc(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):lc(e,t,n)}}function Ko(e){return lc(e,e.length,[])}function Xo(e,t,r){return Math.max(e,Math.min(t,r))}function x3(e,t){if(t==="transparent")return t;var r=ac(t);return oc(G({},r,{lightness:Xo(0,1,r.lightness-parseFloat(e))}))}var E3=Ko(x3),Zt=E3;function S3(e,t){if(t==="transparent")return t;var r=ac(t);return oc(G({},r,{lightness:Xo(0,1,r.lightness+parseFloat(e))}))}var C3=Ko(S3),Ei=C3;function R3(e,t){if(t==="transparent")return t;var r=Yo(t),n=typeof r.alpha=="number"?r.alpha:1,a=G({},r,{alpha:Xo(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return In(a)}var I3=Ko(R3),ke=I3,ur=({theme:e})=>({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"},"& tt, & code":{fontSize:"inherit"}}),ut=({theme:e})=>({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"?ke(.1,e.color.defaultText):ke(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border}),re=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"}),Ut={margin:"16px 0"},A3=({href:e,...t})=>{let r=/^\//.test(e)?`./?path=${e}`:e,n=/^#.*/.test(e)?"_self":"_top";return u.createElement("a",{href:r,target:n,...t})},ic=A(A3)(re,({theme:e})=>({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}})),sc=A.blockquote(re,Ut,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),_3=e=>typeof e=="string",k3=/[\n\r]/g,O3=A.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"}),ut),T3=A(Po)(({theme:e})=>({fontFamily:e.typography.fonts.mono,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"}})),Zo=({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=o.Children.toArray(t);return a.filter(_3).some(l=>l.match(k3))?u.createElement(T3,{bordered:!0,copyable:!0,language:(n==null?void 0:n[1])??"text",format:!1,...r},t):u.createElement(O3,{...r,className:e},a)},cc=A.div(re),dc=A.dl(re,Ut,{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}}),uc=A.h1(re,ur,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),Jo=A.h2(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),Qo=A.h3(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),pc=A.h4(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),fc=A.h5(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),hc=A.h6(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),gc=A.hr(({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),mc=A.img({maxWidth:"100%"}),vc=A.li(re,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":ut({theme:e})})),M3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},bc=A.ol(re,Ut,M3,{listStyle:"decimal"}),yc=A.p(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":ut({theme:e})})),wc=A.pre(re,Ut,({theme:e})=>({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"}})),xc=A.span(re,({theme:e})=>({"&.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"}}})),Ec=A.table(re,Ut,({theme:e})=>({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}})),Sc=A.title(ut),$3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},Cc=A.ul(re,Ut,$3,{listStyle:"disc"}),el=A.div(re),Rc={h1:e=>u.createElement(uc,{...te(e,"h1")}),h2:e=>u.createElement(Jo,{...te(e,"h2")}),h3:e=>u.createElement(Qo,{...te(e,"h3")}),h4:e=>u.createElement(pc,{...te(e,"h4")}),h5:e=>u.createElement(fc,{...te(e,"h5")}),h6:e=>u.createElement(hc,{...te(e,"h6")}),pre:e=>u.createElement(wc,{...te(e,"pre")}),a:e=>u.createElement(ic,{...te(e,"a")}),hr:e=>u.createElement(gc,{...te(e,"hr")}),dl:e=>u.createElement(dc,{...te(e,"dl")}),blockquote:e=>u.createElement(sc,{...te(e,"blockquote")}),table:e=>u.createElement(Ec,{...te(e,"table")}),img:e=>u.createElement(mc,{...te(e,"img")}),div:e=>u.createElement(cc,{...te(e,"div")}),span:e=>u.createElement(xc,{...te(e,"span")}),li:e=>u.createElement(vc,{...te(e,"li")}),ul:e=>u.createElement(Cc,{...te(e,"ul")}),ol:e=>u.createElement(bc,{...te(e,"ol")}),p:e=>u.createElement(yc,{...te(e,"p")}),code:e=>u.createElement(Zo,{...te(e,"code")}),tt:e=>u.createElement(Sc,{...te(e,"tt")}),resetwrapper:e=>u.createElement(el,{...te(e,"resetwrapper")})},L3=A.div(({theme:e})=>({display:"inline-block",fontSize:11,lineHeight:"12px",alignSelf:"center",padding:"4px 12px",borderRadius:"3em",fontWeight:e.typography.weight.bold}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.color.dark,background:e.color.mediumlight,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.dark)}`:"none"};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.positiveText)}`:"none"};default:return{}}}),z3=({...e})=>u.createElement(L3,{...e}),B3=0,P3=e=>e.button===B3&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,H3=(e,t)=>{P3(e)&&(e.preventDefault(),t(e))},F3=A.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),j3=A.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Zt(.07,e.color.secondary),"svg path:not([fill])":{fill:Zt(.07,e.color.secondary)}},"&:active":{color:Zt(.1,e.color.secondary),"svg path:not([fill])":{fill:Zt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Pt=({cancel:e=!0,children:t,onClick:r=void 0,withArrow:n=!1,containsIcon:a=!1,className:l=void 0,style:i=void 0,...c})=>u.createElement(j3,{...c,onClick:r&&e?s=>H3(s,r):r,className:l},u.createElement(F3,{withArrow:n,containsIcon:a},t,n&&u.createElement(qo,null))),N3=A.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.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"}},"span.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"}},"span.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"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Ht=[],lr=null,D3=o.lazy(async()=>{let{SyntaxHighlighter:e}=await vt(()=>import("./syntaxhighlighter-JOJW2KGS-Z2L8ORaK.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);return Ht.length>0&&(Ht.forEach(t=>{e.registerLanguage(...t)}),Ht=[]),lr===null&&(lr=e),{default:t=>u.createElement(e,{...t})}}),V3=o.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([vt(()=>import("./syntaxhighlighter-JOJW2KGS-Z2L8ORaK.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),vt(()=>import("./formatter-B5HCVTEV--eCPhye_.js"),__vite__mapDeps([7,1,2,3,4,5,6]),import.meta.url)]);return Ht.length>0&&(Ht.forEach(r=>{e.registerLanguage(...r)}),Ht=[]),lr===null&&(lr=e),{default:r=>u.createElement(e,{...r,formatter:t})}}),Wn=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},e.format!==!1?u.createElement(V3,{...e}):u.createElement(D3,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Ht.push(e)};var U3=e=>typeof e=="number"?e:Number(e),W3=A.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Da}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Da}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),q3=({col:e,row:t,outer:r,children:n,...a})=>{let l=U3(typeof r=="number"||!r?r:e||t);return u.createElement(W3,{col:e,row:t,outer:l,...a},n)},G3=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),Y3=A.div(),K3=A.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),X3=({children:e,...t})=>{let[r,n]=o.Children.toArray(e);return u.createElement(K3,{...t},u.createElement(G3,null,r),n&&u.createElement(Y3,null,n))};function Z3(e,t){var r=o.useRef(null),n=o.useRef(null);n.current=t;var a=o.useRef(null);o.useEffect(function(){l()});var l=o.useCallback(function(){var i=a.current,c=n.current,s=i||(c?c instanceof Element?c:c.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return o.useEffect(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),o.useCallback(function(i){a.current=i,l()},[l])}function Si(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:t==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function Ic(e){e===void 0&&(e={});var t=e.onResize,r=o.useRef(void 0);r.current=t;var n=e.round||Math.round,a=o.useRef(),l=o.useState({width:void 0,height:void 0}),i=l[0],c=l[1],s=o.useRef(!1);o.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var d=o.useRef({width:void 0,height:void 0}),p=Z3(o.useCallback(function(h){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver(function(m){var f=m[0],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Si(f,v,"inlineSize"),E=Si(f,v,"blockSize"),x=g?n(g):void 0,y=E?n(E):void 0;if(d.current.width!==x||d.current.height!==y){var b={width:x,height:y};d.current.width=x,d.current.height=y,r.current?r.current(b):s.current||c(b)}})}),a.current.instance.observe(h,{box:e.box}),function(){a.current&&a.current.instance.unobserve(h)}},[e.box,n]),e.ref);return o.useMemo(function(){return{ref:p,width:i.width,height:i.height}},[p,i.width,i.height])}var J3=A.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function Q3({scale:e,children:t}){let r=o.useRef(null),[n,a]=o.useState(0),l=o.useCallback(({height:i})=>{i&&a(i/e)},[e]);return o.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),Ic({ref:r,onResize:l}),u.createElement(J3,{scale:e,elementHeight:n},u.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var e7=class extends o.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return u.createElement(u.Fragment,null,e)}},Ac={Element:Q3,IFrame:e7},{document:t7}=Kv,r7=A.strong(({theme:e})=>({color:e.color.orange})),n7=A.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Ci=A.em(({theme:e})=>({color:e.textMutedColor})),a7=/(Error): (.*)\n/,o7=/at (?:(.*) )?\(?(.+)\)?/,l7=/([^@]+)?(?:\/<)?@(.+)?/,i7=/([^@]+)?@(.+)?/,_c=({error:e})=>{if(!e)return u.createElement(o.Fragment,null,"This error has no stack or message");if(!e.stack)return u.createElement(o.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} +`};function r3(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(c=l,s=i):a>=1&&a<2?(c=i,s=l):a>=2&&a<3?(s=l,d=i):a>=3&&a<4?(s=i,d=l):a>=4&&a<5?(c=i,d=l):a>=5&&a<6&&(c=l,d=i);var p=r-l/2,h=c+p,m=s+p,f=d+p;return n(h,m,f)}var xi={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function a3(e){if(typeof e!="string")return e;var t=e.toLowerCase();return xi[t]?"#"+xi[t]:e}var o3=/^#[a-fA-F0-9]{6}$/,l3=/^#[a-fA-F0-9]{8}$/,i3=/^#[a-fA-F0-9]{3}$/,s3=/^#[a-fA-F0-9]{4}$/,ga=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,c3=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,d3=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,u3=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Yo(e){if(typeof e!="string")throw new tt(3);var t=a3(e);if(t.match(o3))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(l3)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(i3))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(s3)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ga.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var l=c3.exec(t.substring(0,50));if(l)return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])};var i=d3.exec(t);if(i){var c=parseInt(""+i[1],10),s=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,p="rgb("+Pr(c,s,d)+")",h=ga.exec(p);if(!h)throw new tt(4,t,p);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var m=u3.exec(t.substring(0,50));if(m){var f=parseInt(""+m[1],10),v=parseInt(""+m[2],10)/100,g=parseInt(""+m[3],10)/100,E="rgb("+Pr(f,v,g)+")",x=ga.exec(E);if(!x)throw new tt(4,t,E);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+m[4])>1?parseFloat(""+m[4])/100:parseFloat(""+m[4])}}throw new tt(5)}function p3(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),l=Math.min(t,r,n),i=(a+l)/2;if(a===l)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var c,s=a-l,d=i>.5?s/(2-a-l):s/(a+l);switch(a){case t:c=(r-n)/s+(r=1?Rn(e,t,r):"rgba("+Pr(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Rn(e.hue,e.saturation,e.lightness):"rgba("+Pr(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new tt(2)}function Ja(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return Za("#"+kt(e)+kt(t)+kt(r));if(typeof e=="object"&&t===void 0&&r===void 0)return Za("#"+kt(e.red)+kt(e.green)+kt(e.blue));throw new tt(6)}function In(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=Yo(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?Ja(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Ja(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new tt(7)}var v3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},b3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},y3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},w3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function oc(e){if(typeof e!="object")throw new tt(8);if(b3(e))return In(e);if(v3(e))return Ja(e);if(w3(e))return m3(e);if(y3(e))return g3(e);throw new tt(8)}function lc(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):lc(e,t,n)}}function Ko(e){return lc(e,e.length,[])}function Xo(e,t,r){return Math.max(e,Math.min(t,r))}function x3(e,t){if(t==="transparent")return t;var r=ac(t);return oc(G({},r,{lightness:Xo(0,1,r.lightness-parseFloat(e))}))}var E3=Ko(x3),Zt=E3;function S3(e,t){if(t==="transparent")return t;var r=ac(t);return oc(G({},r,{lightness:Xo(0,1,r.lightness+parseFloat(e))}))}var C3=Ko(S3),Ei=C3;function R3(e,t){if(t==="transparent")return t;var r=Yo(t),n=typeof r.alpha=="number"?r.alpha:1,a=G({},r,{alpha:Xo(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return In(a)}var I3=Ko(R3),ke=I3,ur=({theme:e})=>({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"},"& tt, & code":{fontSize:"inherit"}}),ut=({theme:e})=>({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"?ke(.1,e.color.defaultText):ke(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border}),re=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"}),Ut={margin:"16px 0"},A3=({href:e,...t})=>{let r=/^\//.test(e)?`./?path=${e}`:e,n=/^#.*/.test(e)?"_self":"_top";return u.createElement("a",{href:r,target:n,...t})},ic=A(A3)(re,({theme:e})=>({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}})),sc=A.blockquote(re,Ut,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),_3=e=>typeof e=="string",k3=/[\n\r]/g,O3=A.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"}),ut),T3=A(Po)(({theme:e})=>({fontFamily:e.typography.fonts.mono,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"}})),Zo=({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=o.Children.toArray(t);return a.filter(_3).some(l=>l.match(k3))?u.createElement(T3,{bordered:!0,copyable:!0,language:(n==null?void 0:n[1])??"text",format:!1,...r},t):u.createElement(O3,{...r,className:e},a)},cc=A.div(re),dc=A.dl(re,Ut,{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}}),uc=A.h1(re,ur,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),Jo=A.h2(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),Qo=A.h3(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),pc=A.h4(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),fc=A.h5(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),hc=A.h6(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),gc=A.hr(({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),mc=A.img({maxWidth:"100%"}),vc=A.li(re,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":ut({theme:e})})),M3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},bc=A.ol(re,Ut,M3,{listStyle:"decimal"}),yc=A.p(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":ut({theme:e})})),wc=A.pre(re,Ut,({theme:e})=>({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"}})),xc=A.span(re,({theme:e})=>({"&.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"}}})),Ec=A.table(re,Ut,({theme:e})=>({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}})),Sc=A.title(ut),$3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},Cc=A.ul(re,Ut,$3,{listStyle:"disc"}),el=A.div(re),Rc={h1:e=>u.createElement(uc,{...te(e,"h1")}),h2:e=>u.createElement(Jo,{...te(e,"h2")}),h3:e=>u.createElement(Qo,{...te(e,"h3")}),h4:e=>u.createElement(pc,{...te(e,"h4")}),h5:e=>u.createElement(fc,{...te(e,"h5")}),h6:e=>u.createElement(hc,{...te(e,"h6")}),pre:e=>u.createElement(wc,{...te(e,"pre")}),a:e=>u.createElement(ic,{...te(e,"a")}),hr:e=>u.createElement(gc,{...te(e,"hr")}),dl:e=>u.createElement(dc,{...te(e,"dl")}),blockquote:e=>u.createElement(sc,{...te(e,"blockquote")}),table:e=>u.createElement(Ec,{...te(e,"table")}),img:e=>u.createElement(mc,{...te(e,"img")}),div:e=>u.createElement(cc,{...te(e,"div")}),span:e=>u.createElement(xc,{...te(e,"span")}),li:e=>u.createElement(vc,{...te(e,"li")}),ul:e=>u.createElement(Cc,{...te(e,"ul")}),ol:e=>u.createElement(bc,{...te(e,"ol")}),p:e=>u.createElement(yc,{...te(e,"p")}),code:e=>u.createElement(Zo,{...te(e,"code")}),tt:e=>u.createElement(Sc,{...te(e,"tt")}),resetwrapper:e=>u.createElement(el,{...te(e,"resetwrapper")})},L3=A.div(({theme:e})=>({display:"inline-block",fontSize:11,lineHeight:"12px",alignSelf:"center",padding:"4px 12px",borderRadius:"3em",fontWeight:e.typography.weight.bold}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.color.dark,background:e.color.mediumlight,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.dark)}`:"none"};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:e.base==="light"?`inset 0 0 0 1px ${ke(.9,e.color.positiveText)}`:"none"};default:return{}}}),z3=({...e})=>u.createElement(L3,{...e}),B3=0,P3=e=>e.button===B3&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,H3=(e,t)=>{P3(e)&&(e.preventDefault(),t(e))},F3=A.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),j3=A.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Zt(.07,e.color.secondary),"svg path:not([fill])":{fill:Zt(.07,e.color.secondary)}},"&:active":{color:Zt(.1,e.color.secondary),"svg path:not([fill])":{fill:Zt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Pt=({cancel:e=!0,children:t,onClick:r=void 0,withArrow:n=!1,containsIcon:a=!1,className:l=void 0,style:i=void 0,...c})=>u.createElement(j3,{...c,onClick:r&&e?s=>H3(s,r):r,className:l},u.createElement(F3,{withArrow:n,containsIcon:a},t,n&&u.createElement(qo,null))),N3=A.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.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"}},"span.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"}},"span.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"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Ht=[],lr=null,D3=o.lazy(async()=>{let{SyntaxHighlighter:e}=await vt(()=>import("./syntaxhighlighter-JOJW2KGS-DZXWONG7.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);return Ht.length>0&&(Ht.forEach(t=>{e.registerLanguage(...t)}),Ht=[]),lr===null&&(lr=e),{default:t=>u.createElement(e,{...t})}}),V3=o.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([vt(()=>import("./syntaxhighlighter-JOJW2KGS-DZXWONG7.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),vt(()=>import("./formatter-B5HCVTEV-D8JyHNUu.js"),__vite__mapDeps([7,1,2,3,4,5,6]),import.meta.url)]);return Ht.length>0&&(Ht.forEach(r=>{e.registerLanguage(...r)}),Ht=[]),lr===null&&(lr=e),{default:r=>u.createElement(e,{...r,formatter:t})}}),Wn=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},e.format!==!1?u.createElement(V3,{...e}):u.createElement(D3,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Ht.push(e)};var U3=e=>typeof e=="number"?e:Number(e),W3=A.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Da}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Da}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),q3=({col:e,row:t,outer:r,children:n,...a})=>{let l=U3(typeof r=="number"||!r?r:e||t);return u.createElement(W3,{col:e,row:t,outer:l,...a},n)},G3=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),Y3=A.div(),K3=A.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),X3=({children:e,...t})=>{let[r,n]=o.Children.toArray(e);return u.createElement(K3,{...t},u.createElement(G3,null,r),n&&u.createElement(Y3,null,n))};function Z3(e,t){var r=o.useRef(null),n=o.useRef(null);n.current=t;var a=o.useRef(null);o.useEffect(function(){l()});var l=o.useCallback(function(){var i=a.current,c=n.current,s=i||(c?c instanceof Element?c:c.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return o.useEffect(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),o.useCallback(function(i){a.current=i,l()},[l])}function Si(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:t==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function Ic(e){e===void 0&&(e={});var t=e.onResize,r=o.useRef(void 0);r.current=t;var n=e.round||Math.round,a=o.useRef(),l=o.useState({width:void 0,height:void 0}),i=l[0],c=l[1],s=o.useRef(!1);o.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var d=o.useRef({width:void 0,height:void 0}),p=Z3(o.useCallback(function(h){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver(function(m){var f=m[0],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Si(f,v,"inlineSize"),E=Si(f,v,"blockSize"),x=g?n(g):void 0,y=E?n(E):void 0;if(d.current.width!==x||d.current.height!==y){var b={width:x,height:y};d.current.width=x,d.current.height=y,r.current?r.current(b):s.current||c(b)}})}),a.current.instance.observe(h,{box:e.box}),function(){a.current&&a.current.instance.unobserve(h)}},[e.box,n]),e.ref);return o.useMemo(function(){return{ref:p,width:i.width,height:i.height}},[p,i.width,i.height])}var J3=A.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function Q3({scale:e,children:t}){let r=o.useRef(null),[n,a]=o.useState(0),l=o.useCallback(({height:i})=>{i&&a(i/e)},[e]);return o.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),Ic({ref:r,onResize:l}),u.createElement(J3,{scale:e,elementHeight:n},u.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var e7=class extends o.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return u.createElement(u.Fragment,null,e)}},Ac={Element:Q3,IFrame:e7},{document:t7}=Kv,r7=A.strong(({theme:e})=>({color:e.color.orange})),n7=A.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Ci=A.em(({theme:e})=>({color:e.textMutedColor})),a7=/(Error): (.*)\n/,o7=/at (?:(.*) )?\(?(.+)\)?/,l7=/([^@]+)?(?:\/<)?@(.+)?/,i7=/([^@]+)?@(.+)?/,_c=({error:e})=>{if(!e)return u.createElement(o.Fragment,null,"This error has no stack or message");if(!e.stack)return u.createElement(o.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} -${t}`);let r=t.match(a7);if(!r)return u.createElement(o.Fragment,null,t);let[,n,a]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(c=>{let s=c.match(o7)||c.match(l7)||c.match(i7);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(t7.location.origin,"")}:null}).filter(Boolean);return u.createElement(o.Fragment,null,u.createElement("span",null,n),": ",u.createElement(r7,null,a),u.createElement("br",null),i.map((c,s)=>c.name?u.createElement(o.Fragment,{key:s}," ","at ",u.createElement(n7,null,c.name)," (",u.createElement(Ci,null,c.location),")",u.createElement("br",null)):u.createElement(o.Fragment,{key:s}," ","at ",u.createElement(Ci,null,c.location),u.createElement("br",null))))},xt=o.forwardRef(({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:l=!1,active:i=!1,onClick:c,...s},d)=>{let p="button";s.isLink&&(p="a"),e&&(p=ko);let h=n,m=r,[f,v]=o.useState(!1),g=E=>{c&&c(E),t!=="none"&&v(!0)};if(o.useEffect(()=>{let E=setTimeout(()=>{f&&v(!1)},1e3);return()=>clearTimeout(E)},[f]),s.primary&&(h="solid",m="medium"),(s.secondary||s.tertiary||s.gray||s.outline||s.inForm)&&(h="outline",m="medium"),s.small||s.isLink||s.primary||s.secondary||s.tertiary||s.gray||s.outline||s.inForm||s.containsIcon){let E=u.Children.toArray(s.children).filter(x=>typeof x=="string"&&x!=="");nc(`Use of deprecated props in the button ${E.length>0?`"${E.join(" ")}"`:"component"} detected, see the migration notes at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-ui-and-props-for-button-and-iconbutton-components`)}return u.createElement(s7,{as:p,ref:d,variant:h,size:m,padding:a,disabled:l,active:i,animating:f,animation:t,onClick:g,...s})});xt.displayName="Button";var s7=A("button",{shouldForwardProp:e=>vo(e)})(({theme:e,variant:t,size:r,disabled:n,active:a,animating:l,animation:i,padding:c})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:c==="small"&&r==="small"?"0 7px":c==="small"&&r==="medium"?"0 9px":r==="small"?"0 10px":r==="medium"?"0 12px":0,height:r==="small"?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:t==="solid"?e.color.secondary:t==="outline"?e.button.background:t==="ghost"&&a?e.background.hoverable:"transparent",...t==="ghost"?{".sb-bar &":{background:a?ke(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:ke(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:ke(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${In(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:t==="solid"?e.color.lightest:t==="outline"?e.input.color:t==="ghost"&&a?e.color.secondary:t==="ghost"?e.color.mediumdark:e.input.color,boxShadow:t==="outline"?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?ke(.86,e.color.secondary):e.base==="light"?Zt(.02,s):Ei(.03,s)})()},"&:active":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?e.background.hoverable:e.base==="light"?Zt(.02,s):Ei(.03,s)})()},"&:focus":{boxShadow:`${In(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:l&&i!=="none"?`${e.animation[i]} 1000ms ease-out`:""}})),Ft=o.forwardRef(({padding:e="small",variant:t="ghost",...r},n)=>u.createElement(xt,{padding:e,variant:t,ref:n,...r}));Ft.displayName="IconButton";var c7=A.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),d7=A.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),kc=({label:e,children:t,...r})=>u.createElement(c7,{...r},e?u.createElement(d7,null,u.createElement("span",null,e)):null,t);kc.defaultProps={label:void 0};var u7=o.useLayoutEffect,p7=u7,f7=function(e){var t=o.useRef(e);return p7(function(){t.current=e}),t},Ri=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},h7=function(e,t){var r=o.useRef();return o.useCallback(function(n){e.current=n,r.current&&Ri(r.current,null),r.current=t,t&&Ri(t,n)},[t])},g7=h7,Ii={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},m7=function(e){Object.keys(Ii).forEach(function(t){e.style.setProperty(t,Ii[t],"important")})},Ai=m7,ye=null,_i=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function v7(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ye||(ye=document.createElement("textarea"),ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),Ai(ye)),ye.parentNode===null&&document.body.appendChild(ye);var a=e.paddingSize,l=e.borderSize,i=e.sizingStyle,c=i.boxSizing;Object.keys(i).forEach(function(m){var f=m;ye.style[f]=i[f]}),Ai(ye),ye.value=t;var s=_i(ye,e);ye.value=t,s=_i(ye,e),ye.value="x";var d=ye.scrollHeight-a,p=d*r;c==="border-box"&&(p=p+a+l),s=Math.max(p,s);var h=d*n;return c==="border-box"&&(h=h+a+l),s=Math.min(h,s),[s,d]}var ki=function(){},b7=function(e,t){return e.reduce(function(r,n){return r[n]=t[n],r},{})},y7=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],w7=!!document.documentElement.currentStyle,x7=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=b7(y7,t),n=r.boxSizing;if(n==="")return null;w7&&n==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},E7=x7;function Oc(e,t,r){var n=f7(r);o.useLayoutEffect(function(){var a=function(l){return n.current(l)};if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}},[])}var S7=function(e){Oc(window,"resize",e)},C7=function(e){Oc(document.fonts,"loadingdone",e)},R7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],I7=function(e,t){var r=e.cacheMeasurements,n=e.maxRows,a=e.minRows,l=e.onChange,i=l===void 0?ki:l,c=e.onHeightChange,s=c===void 0?ki:c,d=Io(e,R7),p=d.value!==void 0,h=o.useRef(null),m=g7(h,t),f=o.useRef(0),v=o.useRef(),g=function(){var x=h.current,y=r&&v.current?v.current:E7(x);if(y){v.current=y;var b=v7(y,x.value||x.placeholder||"x",a,n),w=b[0],S=b[1];f.current!==w&&(f.current=w,x.style.setProperty("height",w+"px","important"),s(w,{rowHeight:S}))}},E=function(x){p||g(),i(x)};return o.useLayoutEffect(g),S7(g),C7(g),o.createElement("textarea",G({},d,{onChange:E,ref:m}))},A7=o.forwardRef(I7),_7={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},tl=({theme:e})=>({..._7,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),rl=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},Tc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},nl=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},k7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return u.createElement("input",{...n,ref:a})}))(tl,rl,Tc,nl,{minHeight:32}),{displayName:"Input"}),O7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return u.createElement("select",{...n,ref:a})}))(tl,rl,nl,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),T7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return u.createElement(A7,{...n,ref:a})}))(tl,rl,Tc,nl,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),Nt=Object.assign(A.form({boxSizing:"border-box",width:"100%"}),{Field:kc,Input:k7,Select:O7,Textarea:T7,Button:xt}),M7=o.lazy(()=>vt(()=>import("./WithTooltip-Y7J54OF7-BkAsHpBN.js"),__vite__mapDeps([8,1,2,3,4,5,6]),import.meta.url).then(e=>({default:e.WithTooltip}))),$7=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},u.createElement(M7,{...e})),L7=o.lazy(()=>vt(()=>import("./WithTooltip-Y7J54OF7-BkAsHpBN.js"),__vite__mapDeps([8,1,2,3,4,5,6]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),Mc=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},u.createElement(L7,{...e})),z7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),B7=A.span(),P7=A.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),H7=A.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),F7=A.div({padding:15,width:280,boxSizing:"border-box"}),$c=({title:e,desc:t,links:r})=>u.createElement(F7,null,u.createElement(H7,null,e&&u.createElement(z7,null,e),t&&u.createElement(B7,null,t)),r&&u.createElement(P7,null,r.map(({title:n,...a})=>u.createElement(Pt,{...a,key:n},n))));$c.defaultProps={title:null,desc:null,links:null};var j7=A.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),N7=({note:e,...t})=>u.createElement(j7,{...t},e),D7=A(({active:e,loading:t,disabled:r,...n})=>u.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:ke(.7,t.color.defaultText)}:{}),V7=A.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),U7=A.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),W7=A.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),q7=A.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:"flex",maxWidth:14})),G7=A.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),Y7=Dt(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Lc=({loading:e,title:t,center:r,right:n,icon:a,active:l,disabled:i,isIndented:c,href:s,onClick:d,LinkWrapper:p,...h})=>{let m=Y7(d,s,p),f={active:l,disabled:i};return u.createElement(G7,{...f,...h,...m},a&&u.createElement(q7,{...f},a),t||r?u.createElement(U7,{isIndented:!a&&c},t&&u.createElement(D7,{...f,loading:e},t),r&&u.createElement(W7,{...f},r)):null,n&&u.createElement(V7,{...f},n))};Lc.defaultProps={loading:!1,title:u.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var al=Lc,K7=A.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),X7=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...l}=e,{title:i,href:c,active:s}=l,d=o.useCallback(h=>{r(h,l)},[r]),p=!!r;return u.createElement(al,{title:i,active:s,href:c,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...l,...p?{onClick:d}:{}})},ol=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.icon);return u.createElement(K7,null,e.map(({isGatsby:n,...a})=>u.createElement(X7,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};ol.defaultProps={LinkWrapper:al.defaultProps.LinkWrapper};var Z7=e=>typeof e.props.href=="string",J7=e=>typeof e.props.href!="string";function Q7({children:e,...t},r){let n={props:t,ref:r};if(Z7(n))return u.createElement("a",{ref:n.ref,...n.props},e);if(J7(n))return u.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}var zc=o.forwardRef(Q7);zc.displayName="ButtonOrLink";var Gr=A(zc,{shouldForwardProp:vo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}});Gr.displayName="TabButton";var eb=A.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),tb=A.div(()=>({marginTop:6,padding:7,height:28})),rb=()=>u.createElement(tb,null,u.createElement(eb,null)),Qa=A.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});Qa.displayName="Side";var nb=({children:e,className:t,scrollable:r})=>r?u.createElement(Bo,{vertical:!1,className:t},e):u.createElement("div",{className:t},e),ll=A(nb)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});ll.displayName="Bar";var ab=A.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),qn=({children:e,backgroundColor:t,className:r,...n})=>{let[a,l]=o.Children.toArray(e);return u.createElement(ll,{className:`sb-bar ${r}`,...n},u.createElement(ab,{bgColor:t},u.createElement(Qa,{scrollable:n.scrollable,left:!0},a),l?u.createElement(Qa,{right:!0},l):null))};qn.displayName="FlexBar";var Bc=A.div(({active:e})=>e?{display:"block"}:{display:"none"}),Oi=e=>o.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let l=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>u.createElement(Bc,{active:i,role:"tabpanel"},l)}}),ob=A.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),lb=A(Gr)(({active:e,theme:t,preActive:r})=>` +${t}`);let r=t.match(a7);if(!r)return u.createElement(o.Fragment,null,t);let[,n,a]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(c=>{let s=c.match(o7)||c.match(l7)||c.match(i7);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(t7.location.origin,"")}:null}).filter(Boolean);return u.createElement(o.Fragment,null,u.createElement("span",null,n),": ",u.createElement(r7,null,a),u.createElement("br",null),i.map((c,s)=>c.name?u.createElement(o.Fragment,{key:s}," ","at ",u.createElement(n7,null,c.name)," (",u.createElement(Ci,null,c.location),")",u.createElement("br",null)):u.createElement(o.Fragment,{key:s}," ","at ",u.createElement(Ci,null,c.location),u.createElement("br",null))))},xt=o.forwardRef(({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:l=!1,active:i=!1,onClick:c,...s},d)=>{let p="button";s.isLink&&(p="a"),e&&(p=ko);let h=n,m=r,[f,v]=o.useState(!1),g=E=>{c&&c(E),t!=="none"&&v(!0)};if(o.useEffect(()=>{let E=setTimeout(()=>{f&&v(!1)},1e3);return()=>clearTimeout(E)},[f]),s.primary&&(h="solid",m="medium"),(s.secondary||s.tertiary||s.gray||s.outline||s.inForm)&&(h="outline",m="medium"),s.small||s.isLink||s.primary||s.secondary||s.tertiary||s.gray||s.outline||s.inForm||s.containsIcon){let E=u.Children.toArray(s.children).filter(x=>typeof x=="string"&&x!=="");nc(`Use of deprecated props in the button ${E.length>0?`"${E.join(" ")}"`:"component"} detected, see the migration notes at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-ui-and-props-for-button-and-iconbutton-components`)}return u.createElement(s7,{as:p,ref:d,variant:h,size:m,padding:a,disabled:l,active:i,animating:f,animation:t,onClick:g,...s})});xt.displayName="Button";var s7=A("button",{shouldForwardProp:e=>vo(e)})(({theme:e,variant:t,size:r,disabled:n,active:a,animating:l,animation:i,padding:c})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:c==="small"&&r==="small"?"0 7px":c==="small"&&r==="medium"?"0 9px":r==="small"?"0 10px":r==="medium"?"0 12px":0,height:r==="small"?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:t==="solid"?e.color.secondary:t==="outline"?e.button.background:t==="ghost"&&a?e.background.hoverable:"transparent",...t==="ghost"?{".sb-bar &":{background:a?ke(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:ke(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:ke(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${In(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:t==="solid"?e.color.lightest:t==="outline"?e.input.color:t==="ghost"&&a?e.color.secondary:t==="ghost"?e.color.mediumdark:e.input.color,boxShadow:t==="outline"?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?ke(.86,e.color.secondary):e.base==="light"?Zt(.02,s):Ei(.03,s)})()},"&:active":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?e.background.hoverable:e.base==="light"?Zt(.02,s):Ei(.03,s)})()},"&:focus":{boxShadow:`${In(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:l&&i!=="none"?`${e.animation[i]} 1000ms ease-out`:""}})),Ft=o.forwardRef(({padding:e="small",variant:t="ghost",...r},n)=>u.createElement(xt,{padding:e,variant:t,ref:n,...r}));Ft.displayName="IconButton";var c7=A.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),d7=A.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),kc=({label:e,children:t,...r})=>u.createElement(c7,{...r},e?u.createElement(d7,null,u.createElement("span",null,e)):null,t);kc.defaultProps={label:void 0};var u7=o.useLayoutEffect,p7=u7,f7=function(e){var t=o.useRef(e);return p7(function(){t.current=e}),t},Ri=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},h7=function(e,t){var r=o.useRef();return o.useCallback(function(n){e.current=n,r.current&&Ri(r.current,null),r.current=t,t&&Ri(t,n)},[t])},g7=h7,Ii={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},m7=function(e){Object.keys(Ii).forEach(function(t){e.style.setProperty(t,Ii[t],"important")})},Ai=m7,ye=null,_i=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function v7(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ye||(ye=document.createElement("textarea"),ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),Ai(ye)),ye.parentNode===null&&document.body.appendChild(ye);var a=e.paddingSize,l=e.borderSize,i=e.sizingStyle,c=i.boxSizing;Object.keys(i).forEach(function(m){var f=m;ye.style[f]=i[f]}),Ai(ye),ye.value=t;var s=_i(ye,e);ye.value=t,s=_i(ye,e),ye.value="x";var d=ye.scrollHeight-a,p=d*r;c==="border-box"&&(p=p+a+l),s=Math.max(p,s);var h=d*n;return c==="border-box"&&(h=h+a+l),s=Math.min(h,s),[s,d]}var ki=function(){},b7=function(e,t){return e.reduce(function(r,n){return r[n]=t[n],r},{})},y7=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],w7=!!document.documentElement.currentStyle,x7=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=b7(y7,t),n=r.boxSizing;if(n==="")return null;w7&&n==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},E7=x7;function Oc(e,t,r){var n=f7(r);o.useLayoutEffect(function(){var a=function(l){return n.current(l)};if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}},[])}var S7=function(e){Oc(window,"resize",e)},C7=function(e){Oc(document.fonts,"loadingdone",e)},R7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],I7=function(e,t){var r=e.cacheMeasurements,n=e.maxRows,a=e.minRows,l=e.onChange,i=l===void 0?ki:l,c=e.onHeightChange,s=c===void 0?ki:c,d=Io(e,R7),p=d.value!==void 0,h=o.useRef(null),m=g7(h,t),f=o.useRef(0),v=o.useRef(),g=function(){var x=h.current,y=r&&v.current?v.current:E7(x);if(y){v.current=y;var b=v7(y,x.value||x.placeholder||"x",a,n),w=b[0],S=b[1];f.current!==w&&(f.current=w,x.style.setProperty("height",w+"px","important"),s(w,{rowHeight:S}))}},E=function(x){p||g(),i(x)};return o.useLayoutEffect(g),S7(g),C7(g),o.createElement("textarea",G({},d,{onChange:E,ref:m}))},A7=o.forwardRef(I7),_7={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},tl=({theme:e})=>({..._7,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),rl=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},Tc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},nl=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},k7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return u.createElement("input",{...n,ref:a})}))(tl,rl,Tc,nl,{minHeight:32}),{displayName:"Input"}),O7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return u.createElement("select",{...n,ref:a})}))(tl,rl,nl,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),T7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return u.createElement(A7,{...n,ref:a})}))(tl,rl,Tc,nl,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),Nt=Object.assign(A.form({boxSizing:"border-box",width:"100%"}),{Field:kc,Input:k7,Select:O7,Textarea:T7,Button:xt}),M7=o.lazy(()=>vt(()=>import("./WithTooltip-Y7J54OF7-BylCJlCX.js"),__vite__mapDeps([8,1,2,3,4,5,6]),import.meta.url).then(e=>({default:e.WithTooltip}))),$7=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},u.createElement(M7,{...e})),L7=o.lazy(()=>vt(()=>import("./WithTooltip-Y7J54OF7-BylCJlCX.js"),__vite__mapDeps([8,1,2,3,4,5,6]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),Mc=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},u.createElement(L7,{...e})),z7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),B7=A.span(),P7=A.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),H7=A.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),F7=A.div({padding:15,width:280,boxSizing:"border-box"}),$c=({title:e,desc:t,links:r})=>u.createElement(F7,null,u.createElement(H7,null,e&&u.createElement(z7,null,e),t&&u.createElement(B7,null,t)),r&&u.createElement(P7,null,r.map(({title:n,...a})=>u.createElement(Pt,{...a,key:n},n))));$c.defaultProps={title:null,desc:null,links:null};var j7=A.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),N7=({note:e,...t})=>u.createElement(j7,{...t},e),D7=A(({active:e,loading:t,disabled:r,...n})=>u.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:ke(.7,t.color.defaultText)}:{}),V7=A.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),U7=A.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),W7=A.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),q7=A.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:"flex",maxWidth:14})),G7=A.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),Y7=Dt(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Lc=({loading:e,title:t,center:r,right:n,icon:a,active:l,disabled:i,isIndented:c,href:s,onClick:d,LinkWrapper:p,...h})=>{let m=Y7(d,s,p),f={active:l,disabled:i};return u.createElement(G7,{...f,...h,...m},a&&u.createElement(q7,{...f},a),t||r?u.createElement(U7,{isIndented:!a&&c},t&&u.createElement(D7,{...f,loading:e},t),r&&u.createElement(W7,{...f},r)):null,n&&u.createElement(V7,{...f},n))};Lc.defaultProps={loading:!1,title:u.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var al=Lc,K7=A.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),X7=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...l}=e,{title:i,href:c,active:s}=l,d=o.useCallback(h=>{r(h,l)},[r]),p=!!r;return u.createElement(al,{title:i,active:s,href:c,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...l,...p?{onClick:d}:{}})},ol=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.icon);return u.createElement(K7,null,e.map(({isGatsby:n,...a})=>u.createElement(X7,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};ol.defaultProps={LinkWrapper:al.defaultProps.LinkWrapper};var Z7=e=>typeof e.props.href=="string",J7=e=>typeof e.props.href!="string";function Q7({children:e,...t},r){let n={props:t,ref:r};if(Z7(n))return u.createElement("a",{ref:n.ref,...n.props},e);if(J7(n))return u.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}var zc=o.forwardRef(Q7);zc.displayName="ButtonOrLink";var Gr=A(zc,{shouldForwardProp:vo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}});Gr.displayName="TabButton";var eb=A.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),tb=A.div(()=>({marginTop:6,padding:7,height:28})),rb=()=>u.createElement(tb,null,u.createElement(eb,null)),Qa=A.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});Qa.displayName="Side";var nb=({children:e,className:t,scrollable:r})=>r?u.createElement(Bo,{vertical:!1,className:t},e):u.createElement("div",{className:t},e),ll=A(nb)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});ll.displayName="Bar";var ab=A.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),qn=({children:e,backgroundColor:t,className:r,...n})=>{let[a,l]=o.Children.toArray(e);return u.createElement(ll,{className:`sb-bar ${r}`,...n},u.createElement(ab,{bgColor:t},u.createElement(Qa,{scrollable:n.scrollable,left:!0},a),l?u.createElement(Qa,{right:!0},l):null))};qn.displayName="FlexBar";var Bc=A.div(({active:e})=>e?{display:"block"}:{display:"none"}),Oi=e=>o.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let l=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>u.createElement(Bc,{active:i,role:"tabpanel"},l)}}),ob=A.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),lb=A(Gr)(({active:e,theme:t,preActive:r})=>` color: ${r||e?t.barSelectedColor:t.barTextColor}; .addon-collapsible-icon { color: ${r||e?t.barSelectedColor:t.barTextColor}; @@ -463,7 +463,7 @@ ${t}`);let r=t.match(a7);if(!r)return u.createElement(o.Fragment,null,t);let[,n, ${Ye(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Tt(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Tt(.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 ${Je(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),D1=A.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),qR=A(D1)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),GR=A.div({display:"flex",alignItems:"center",width:"100%"});function YR(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 KR=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:l=1,onBlur:i,onFocus:c})=>{let s=h=>{r(lR(h.target.value))},d=t!==void 0,p=o.useMemo(()=>YR(l),[l]);return u.createElement(GR,null,u.createElement(D1,null,n),u.createElement(WR,{id:Fe(e),type:"range",onChange:s,name:e,value:t,min:n,max:a,step:l,onFocus:c,onBlur:i}),u.createElement(qR,{numberOFDecimalsPlaces:p,max:a},d?t.toFixed(p):"--"," / ",a))},XR=A.label({display:"flex"}),ZR=A.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),JR=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:l})=>{let i=h=>{r(h.target.value)},[c,s]=o.useState(!1),d=o.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return u.createElement(xt,{variant:"outline",size:"medium",id:Mn(e),onClick:d},"Set string");let p=typeof t=="string";return u.createElement(XR,null,u.createElement(Nt.Textarea,{id:Fe(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:c,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),l&&u.createElement(ZR,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},QR=A(Nt.Input)({padding:10});function eI(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var tI=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=o.useRef(null);function l(i){if(!i.target.files)return;let c=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(c),eI(n)}return o.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),u.createElement(QR,{ref:a,id:Fe(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},rI=o.lazy(()=>vt(()=>import("./Color-RQJUDNI5-DEzluUjd.js"),__vite__mapDeps([9,2,5,1,3,4,6]),import.meta.url)),nI=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},u.createElement(rI,{...e})),aI={array:b0,object:b0,boolean:JC,color:nI,date:aR,number:iR,check:Kt,"inline-check":Kt,radio:Kt,"inline-radio":Kt,select:Kt,"multi-select":Kt,range:KR,text:JR,file:tI},y0=()=>u.createElement(u.Fragment,null,"-"),oI=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var g;let{key:a,control:l}=e,[i,c]=o.useState(!1),[s,d]=o.useState({value:t});o.useEffect(()=>{i||d({value:t})},[i,t]);let p=o.useCallback(E=>(d({value:E}),r({[a]:E}),E),[r,a]),h=o.useCallback(()=>c(!1),[]),m=o.useCallback(()=>c(!0),[]);if(!l||l.disable){let E=(l==null?void 0:l.disable)!==!0&&((g=e==null?void 0:e.type)==null?void 0:g.name)!=="function";return n&&E?u.createElement(Pt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):u.createElement(y0,null)}let f={name:a,argType:e,value:s.value,onChange:p,onBlur:h,onFocus:m},v=aI[l.type]||y0;return u.createElement(v,{...f,...l,controlType:l.type})},lI=A.span({fontWeight:"bold"}),iI=A.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),sI=A.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...ut({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),cI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),dI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),uI=A.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),pI=e=>e&&{summary:typeof e=="string"?e:e.name},on=e=>{var g;let[t,r]=o.useState(!1),{row:n,updateArgs:a,compact:l,expandable:i,initialExpandedArgs:c}=e,{name:s,description:d}=n,p=n.table||{},h=p.type||pI(n.type),m=p.defaultValue||n.defaultValue,f=(g=n.type)==null?void 0:g.required,v=d!=null&&d!=="";return u.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},u.createElement(uI,{expandable:i},u.createElement(lI,null,s),f?u.createElement(iI,{title:"Required"},"*"):null),l?null:u.createElement("td",null,v&&u.createElement(sI,null,u.createElement(u1,null,d)),p.jsDocTags!=null?u.createElement(u.Fragment,null,u.createElement(dI,{hasDescription:v},u.createElement(Ta,{value:h,initialExpandedArgs:c})),u.createElement(FC,{tags:p.jsDocTags})):u.createElement(cI,{hasDescription:v},u.createElement(Ta,{value:h,initialExpandedArgs:c}))),l?null:u.createElement("td",null,u.createElement(Ta,{value:m,initialExpandedArgs:c})),a?u.createElement("td",null,u.createElement(oI,{...e,isHovered:t})):null)},fI=A(ec)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),hI=A(qo)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),gI=A.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),mI=A.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"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),vI=A.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),bI=A.td(()=>({position:"relative"})),yI=A.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Tt(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),w0=A.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"})),$a=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[l,i]=o.useState(n),c=e==="subsection"?vI:mI,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",p=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return u.createElement(u.Fragment,null,u.createElement(yI,{title:p},u.createElement(c,{colSpan:1},u.createElement(w0,{onClick:h=>i(!l),tabIndex:0},p),u.createElement(gI,null,l?u.createElement(fI,null):u.createElement(hI,null),t)),u.createElement(bI,{colSpan:a-1},u.createElement(w0,{onClick:h=>i(!l),tabIndex:-1,style:{outline:"none"}},p),l?null:d)),l?r:null)},ln=A.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),fe=A.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=A.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})),he=[2,4,2,2],wI=()=>u.createElement(u.Fragment,null,u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"}))),u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"80%"}),u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"}))),u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"80%"}),u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"}))),u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"80%"}),u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"})))),xI=A.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"})),EI=A.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),SI=A.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),CI=({inAddonPanel:e})=>{let[t,r]=o.useState(!0);return o.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:u.createElement(xI,{inAddonPanel:e},u.createElement(il,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:u.createElement(u.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:u.createElement(EI,null,e&&u.createElement(u.Fragment,null,u.createElement(Pt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},u.createElement(Xs,null)," Watch 5m video"),u.createElement(SI,null),u.createElement(Pt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},u.createElement(Cn,null)," Read docs")),!e&&u.createElement(Pt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},u.createElement(Cn,null)," Learn how to set that up"))}))},RI=A.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"?ee(.25,e.color.defaultText):ee(.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}}}}})),II=A(Ft)(({theme:e})=>({margin:"-4px -12px -4px 0"})),AI=A.span({display:"flex",justifyContent:"space-between"}),_I={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},kI=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:c,subcategory:s}=(i==null?void 0:i.table)||{};if(c){let d=r.sections[c]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:l,...i});else{let p=d.subsections[s]||[];p.push({key:l,...i}),d.subsections[s]=p}r.sections[c]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:l,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:l,...i})});let n=_I[t],a=l=>n?Object.keys(l).reduce((i,c)=>({...i,[c]:l[c].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},OI=(e,t,r)=>{try{return nd(e,t,r)}catch(n){return sC.warn(n.message),!1}},uo=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:l,sort:i="none",isLoading:c}=e;if("error"in e){let{error:y}=e;return u.createElement(I1,null,y," ",u.createElement(Pt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},u.createElement(Cn,null)," Read the docs"))}if(c)return u.createElement(wI,null);let{rows:s,args:d,globals:p}="rows"in e&&e,h=kI(h6(s,y=>{var b;return!((b=y==null?void 0:y.table)!=null&&b.disable)&&OI(y,d||{},p||{})}),i),m=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(m&&f&&v)return u.createElement(CI,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let E=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:l};return u.createElement(el,null,u.createElement(RI,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},u.createElement("thead",{className:"docblock-argstable-head"},u.createElement("tr",null,u.createElement("th",null,u.createElement("span",null,"Name")),n?null:u.createElement("th",null,u.createElement("span",null,"Description")),n?null:u.createElement("th",null,u.createElement("span",null,"Default")),t?u.createElement("th",null,u.createElement(AI,null,"Control"," ",!c&&r&&u.createElement(II,{onClick:()=>r(),title:"Reset controls"},u.createElement(rc,{"aria-hidden":!0})))):null)),u.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(y=>u.createElement(on,{key:y.key,row:y,arg:d&&d[y.key],...x})),Object.entries(h.ungroupedSubsections).map(([y,b])=>u.createElement($a,{key:y,label:y,level:"subsection",colSpan:g},b.map(w=>u.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],expandable:E,...x})))),Object.entries(h.sections).map(([y,b])=>u.createElement($a,{key:y,label:y,level:"section",colSpan:g},b.ungrouped.map(w=>u.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(b.subsections).map(([w,S])=>u.createElement($a,{key:w,label:w,level:"subsection",colSpan:g},S.map(C=>u.createElement(on,{key:C.key,row:C,arg:d&&d[C.key],expandable:E,...x})))))))))},TI=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?u.createElement(uo,{...r[0][1],...t}):u.createElement(cl,null,r.map((n,a)=>{let[l,i]=n,c=`prop_table_div_${l}`,s="div",d=a===0?t:{sort:t.sort};return u.createElement(s,{key:c,id:c,title:l},({active:p})=>p?u.createElement(uo,{key:`prop_table_${l}`,...i,...d}):null)}))};A.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});A.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});A.div(re,({theme:e})=>({...Zn(e),margin:"25px 0 40px",padding:"30px 20px"}));A.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));A.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});A.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"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));A.div({display:"flex",flexDirection:"row"});A.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));A.div(({theme:e})=>({...Zn(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"}));A.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});A.div({flex:1,display:"flex",flexDirection:"row"});A.div({display:"flex",alignItems:"flex-start"});A.div({flex:"0 0 30%"});A.div({flex:1});A.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));A.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));A.div(({theme:e})=>({...Zn(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));A.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});A.div({display:"flex",flexFlow:"row wrap"});var MI=e=>`anchor--${e}`,$I=({storyId:e,children:t})=>u.createElement("div",{id:MI(e),className:"sb-anchor"},t);Oe&&Oe.__DOCS_CONTEXT__===void 0&&(Oe.__DOCS_CONTEXT__=o.createContext(null),Oe.__DOCS_CONTEXT__.displayName="DocsContext");var Be=Oe?Oe.__DOCS_CONTEXT__:o.createContext(null),Yr=(e,t)=>o.useContext(Be).resolveOf(e,t),LI=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),zI=e=>{if(e)return typeof e=="string"?e.includes("-")?LI(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function BI(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function V1(e){return rC(e,{allowFunction:!1})}var U1=o.createContext({sources:{}}),W1="--unknown--",PI=({children:e,channel:t})=>{let[r,n]=o.useState({});return o.useEffect(()=>{let a=(l,i=null,c=!1)=>{let{id:s,args:d=void 0,source:p,format:h}=typeof l=="string"?{id:l,source:i,format:c}:l,m=d?V1(d):W1;n(f=>({...f,[s]:{...f[s],[m]:{code:p,format:h}}}))};return t.on(Ml,a),()=>t.off(Ml,a)},[]),u.createElement(U1.Provider,{value:{sources:r}},e)},HI=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[V1(t)])||(a==null?void 0:a[W1])||{code:""}},FI=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ra.AUTO;if(l.code!==void 0)return l.code;let c=i===ra.DYNAMIC||i===ra.AUTO&&e&&a?e:l.originalSource||"";return((d=n??l.transform)==null?void 0:d(c,t))||c},jI=(e,t,r)=>{var f,v,g,E;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 l=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,c=e.format??l.format,s=e.language??l.language??"jsx",d=e.dark??l.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:c,language:s,dark:d};let p=t.getStoryContext(n),h=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,m=HI(n.id,h,r);return c=m.format??((E=(g=n.parameters.docs)==null?void 0:g.source)==null?void 0:E.format)??!1,{code:FI({snippet:m.code,storyContext:{...p,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:c,language:s,dark:d}};function NI(e,t){let r=DI([e],t);return r&&r[0]}function DI(e,t){let[r,n]=o.useState({});return o.useEffect(()=>{Promise.all(e.map(async a=>{let l=await t.loadStory(a);n(i=>i[a]===l?i:{...i,[a]:l})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var VI=(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},UI=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,l=a.story||{};if(a.disable)return null;if(e.inline??l.inline??!1){let c=e.height??l.height,s=e.autoplay??l.autoplay??!1;return{story:t,inline:!0,height:c,autoplay:s,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??l.height??l.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},WI=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=o.useContext(Be),r=VI(e,t),n=NI(r,t);if(!n)return u.createElement(_1,null);let a=UI(e,n,t);return a?u.createElement(TC,{...a}):null},qI=e=>{var m,f,v,g,E,x,y,b,w,S;let t=o.useContext(Be),r=o.useContext(U1),{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:l}=Yr(n||"story",["story"]),i=jI({...a,...n&&{of:n}},t,r),c=e.layout??l.parameters.layout??((f=(m=l.parameters.docs)==null?void 0:m.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((g=(v=l.parameters.docs)==null?void 0:v.canvas)==null?void 0:g.withToolbar)??!1,d=e.additionalActions??((x=(E=l.parameters.docs)==null?void 0:E.canvas)==null?void 0:x.additionalActions),p=e.sourceState??((b=(y=l.parameters.docs)==null?void 0:y.canvas)==null?void 0:b.sourceState)??"hidden",h=e.className??((S=(w=l.parameters.docs)==null?void 0:w.canvas)==null?void 0:S.className);return u.createElement(k1,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:s,additionalActions:d,className:h,layout:c},u.createElement(WI,{of:n||l.moduleExport,meta:e.meta,...e.story}))},GI=(e,t)=>{let r=t.getStoryContext(e),[n,a]=o.useState(r.globals);return o.useEffect(()=>{let l=i=>{a(i.globals)};return t.channel.on(s0,l),()=>t.channel.off(s0,l)},[t.channel]),[n]},YI=(e,t)=>{let r=KI(e,t);if(!r)throw new Error("No result when story was defined");return r},KI=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,l]=o.useState(r.args);o.useEffect(()=>{let s=d=>{d.storyId===n&&l(d.args)};return t.channel.on(c0,s),()=>t.channel.off(c0,s)},[n,t.channel]);let i=o.useCallback(s=>t.channel.emit(cC,{storyId:n,updatedArgs:s}),[n,t.channel]),c=o.useCallback(s=>t.channel.emit(dC,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,c]};function XI(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var ZI=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=o.useContext(Be),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:l,component:i,subcomponents:c}=n,s=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??s.include,p=e.exclude??s.exclude,h=e.sort??s.sort,[m,f,v]=YI(n,r),[g]=GI(n,r),E=i0(l,d,p);if(!(c&&Object.keys(c).length>0))return Object.keys(E).length>0||Object.keys(m).length>0?u.createElement(uo,{rows:E,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v}):null;let x=zI(i),y=Object.fromEntries(Object.entries(c).map(([S,C])=>[S,{rows:i0(XI(C,a),d,p),sort:h}])),b={[x]:{rows:E,sort:h},...y};return u.createElement(TI,{tabs:b,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v})},{document:q1}=Oe,G1=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return u.createElement(Zo,null,t);let n=e&&e.split("-");return u.createElement(xl,{language:n&&n[1]||"text",format:!1,code:t,...r})};function Rl(e,t){e.channel.emit(uC,t)}var po=Fc.a,JI=({hash:e,children:t})=>{let r=o.useContext(Be);return u.createElement(po,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);q1.getElementById(a)&&Rl(r,e)}},t)},Y1=e=>{let{href:t,target:r,children:n,...a}=e,l=o.useContext(Be);if(t){if(t.startsWith("#"))return u.createElement(JI,{hash:t},n);if(r!=="_blank"&&!t.startsWith("https://"))return u.createElement(po,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),Rl(l,i.currentTarget.getAttribute("href")))},target:r,...a},n)}return u.createElement(po,{...e})},K1=["h1","h2","h3","h4","h5","h6"],QI=K1.reduce((e,t)=>({...e,[t]:A(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),eA=A.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),tA=({as:e,id:t,children:r,...n})=>{let a=o.useContext(Be),l=QI[e],i=`#${t}`;return u.createElement(l,{id:t,...n},u.createElement(eA,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:c=>{q1.getElementById(t)&&Rl(a,i)}},u.createElement(Qs,null)),r)},Il=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return u.createElement(tA,{as:t,id:r,...a},n);let l=t,{as:i,...c}=e;return u.createElement(l,{...te(c,t)})},X1=K1.reduce((e,t)=>({...e,[t]:r=>u.createElement(Il,{as:t,...r})}),{}),rA=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Rd`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${Tt(.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 ${Je(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),D1=A.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),qR=A(D1)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),GR=A.div({display:"flex",alignItems:"center",width:"100%"});function YR(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 KR=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:l=1,onBlur:i,onFocus:c})=>{let s=h=>{r(lR(h.target.value))},d=t!==void 0,p=o.useMemo(()=>YR(l),[l]);return u.createElement(GR,null,u.createElement(D1,null,n),u.createElement(WR,{id:Fe(e),type:"range",onChange:s,name:e,value:t,min:n,max:a,step:l,onFocus:c,onBlur:i}),u.createElement(qR,{numberOFDecimalsPlaces:p,max:a},d?t.toFixed(p):"--"," / ",a))},XR=A.label({display:"flex"}),ZR=A.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),JR=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:l})=>{let i=h=>{r(h.target.value)},[c,s]=o.useState(!1),d=o.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return u.createElement(xt,{variant:"outline",size:"medium",id:Mn(e),onClick:d},"Set string");let p=typeof t=="string";return u.createElement(XR,null,u.createElement(Nt.Textarea,{id:Fe(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:c,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),l&&u.createElement(ZR,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},QR=A(Nt.Input)({padding:10});function eI(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var tI=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=o.useRef(null);function l(i){if(!i.target.files)return;let c=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(c),eI(n)}return o.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),u.createElement(QR,{ref:a,id:Fe(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},rI=o.lazy(()=>vt(()=>import("./Color-RQJUDNI5-rLRFJ97r.js"),__vite__mapDeps([9,2,5,1,3,4,6]),import.meta.url)),nI=e=>u.createElement(o.Suspense,{fallback:u.createElement("div",null)},u.createElement(rI,{...e})),aI={array:b0,object:b0,boolean:JC,color:nI,date:aR,number:iR,check:Kt,"inline-check":Kt,radio:Kt,"inline-radio":Kt,select:Kt,"multi-select":Kt,range:KR,text:JR,file:tI},y0=()=>u.createElement(u.Fragment,null,"-"),oI=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var g;let{key:a,control:l}=e,[i,c]=o.useState(!1),[s,d]=o.useState({value:t});o.useEffect(()=>{i||d({value:t})},[i,t]);let p=o.useCallback(E=>(d({value:E}),r({[a]:E}),E),[r,a]),h=o.useCallback(()=>c(!1),[]),m=o.useCallback(()=>c(!0),[]);if(!l||l.disable){let E=(l==null?void 0:l.disable)!==!0&&((g=e==null?void 0:e.type)==null?void 0:g.name)!=="function";return n&&E?u.createElement(Pt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):u.createElement(y0,null)}let f={name:a,argType:e,value:s.value,onChange:p,onBlur:h,onFocus:m},v=aI[l.type]||y0;return u.createElement(v,{...f,...l,controlType:l.type})},lI=A.span({fontWeight:"bold"}),iI=A.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),sI=A.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...ut({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),cI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),dI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),uI=A.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),pI=e=>e&&{summary:typeof e=="string"?e:e.name},on=e=>{var g;let[t,r]=o.useState(!1),{row:n,updateArgs:a,compact:l,expandable:i,initialExpandedArgs:c}=e,{name:s,description:d}=n,p=n.table||{},h=p.type||pI(n.type),m=p.defaultValue||n.defaultValue,f=(g=n.type)==null?void 0:g.required,v=d!=null&&d!=="";return u.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},u.createElement(uI,{expandable:i},u.createElement(lI,null,s),f?u.createElement(iI,{title:"Required"},"*"):null),l?null:u.createElement("td",null,v&&u.createElement(sI,null,u.createElement(u1,null,d)),p.jsDocTags!=null?u.createElement(u.Fragment,null,u.createElement(dI,{hasDescription:v},u.createElement(Ta,{value:h,initialExpandedArgs:c})),u.createElement(FC,{tags:p.jsDocTags})):u.createElement(cI,{hasDescription:v},u.createElement(Ta,{value:h,initialExpandedArgs:c}))),l?null:u.createElement("td",null,u.createElement(Ta,{value:m,initialExpandedArgs:c})),a?u.createElement("td",null,u.createElement(oI,{...e,isHovered:t})):null)},fI=A(ec)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),hI=A(qo)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),gI=A.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),mI=A.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"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),vI=A.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),bI=A.td(()=>({position:"relative"})),yI=A.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Tt(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),w0=A.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"})),$a=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[l,i]=o.useState(n),c=e==="subsection"?vI:mI,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",p=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return u.createElement(u.Fragment,null,u.createElement(yI,{title:p},u.createElement(c,{colSpan:1},u.createElement(w0,{onClick:h=>i(!l),tabIndex:0},p),u.createElement(gI,null,l?u.createElement(fI,null):u.createElement(hI,null),t)),u.createElement(bI,{colSpan:a-1},u.createElement(w0,{onClick:h=>i(!l),tabIndex:-1,style:{outline:"none"}},p),l?null:d)),l?r:null)},ln=A.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),fe=A.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=A.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})),he=[2,4,2,2],wI=()=>u.createElement(u.Fragment,null,u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"}))),u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"80%"}),u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"}))),u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"80%"}),u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"}))),u.createElement(ln,null,u.createElement(fe,{numColumn:he[0]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[1]},u.createElement(ie,{width:"80%"}),u.createElement(ie,{width:"30%"})),u.createElement(fe,{numColumn:he[2]},u.createElement(ie,{width:"60%"})),u.createElement(fe,{numColumn:he[3]},u.createElement(ie,{width:"60%"})))),xI=A.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"})),EI=A.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),SI=A.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),CI=({inAddonPanel:e})=>{let[t,r]=o.useState(!0);return o.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:u.createElement(xI,{inAddonPanel:e},u.createElement(il,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:u.createElement(u.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:u.createElement(EI,null,e&&u.createElement(u.Fragment,null,u.createElement(Pt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},u.createElement(Xs,null)," Watch 5m video"),u.createElement(SI,null),u.createElement(Pt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},u.createElement(Cn,null)," Read docs")),!e&&u.createElement(Pt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},u.createElement(Cn,null)," Learn how to set that up"))}))},RI=A.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"?ee(.25,e.color.defaultText):ee(.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}}}}})),II=A(Ft)(({theme:e})=>({margin:"-4px -12px -4px 0"})),AI=A.span({display:"flex",justifyContent:"space-between"}),_I={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},kI=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:c,subcategory:s}=(i==null?void 0:i.table)||{};if(c){let d=r.sections[c]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:l,...i});else{let p=d.subsections[s]||[];p.push({key:l,...i}),d.subsections[s]=p}r.sections[c]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:l,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:l,...i})});let n=_I[t],a=l=>n?Object.keys(l).reduce((i,c)=>({...i,[c]:l[c].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},OI=(e,t,r)=>{try{return nd(e,t,r)}catch(n){return sC.warn(n.message),!1}},uo=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:l,sort:i="none",isLoading:c}=e;if("error"in e){let{error:y}=e;return u.createElement(I1,null,y," ",u.createElement(Pt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},u.createElement(Cn,null)," Read the docs"))}if(c)return u.createElement(wI,null);let{rows:s,args:d,globals:p}="rows"in e&&e,h=kI(h6(s,y=>{var b;return!((b=y==null?void 0:y.table)!=null&&b.disable)&&OI(y,d||{},p||{})}),i),m=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(m&&f&&v)return u.createElement(CI,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let E=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:l};return u.createElement(el,null,u.createElement(RI,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},u.createElement("thead",{className:"docblock-argstable-head"},u.createElement("tr",null,u.createElement("th",null,u.createElement("span",null,"Name")),n?null:u.createElement("th",null,u.createElement("span",null,"Description")),n?null:u.createElement("th",null,u.createElement("span",null,"Default")),t?u.createElement("th",null,u.createElement(AI,null,"Control"," ",!c&&r&&u.createElement(II,{onClick:()=>r(),title:"Reset controls"},u.createElement(rc,{"aria-hidden":!0})))):null)),u.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(y=>u.createElement(on,{key:y.key,row:y,arg:d&&d[y.key],...x})),Object.entries(h.ungroupedSubsections).map(([y,b])=>u.createElement($a,{key:y,label:y,level:"subsection",colSpan:g},b.map(w=>u.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],expandable:E,...x})))),Object.entries(h.sections).map(([y,b])=>u.createElement($a,{key:y,label:y,level:"section",colSpan:g},b.ungrouped.map(w=>u.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(b.subsections).map(([w,S])=>u.createElement($a,{key:w,label:w,level:"subsection",colSpan:g},S.map(C=>u.createElement(on,{key:C.key,row:C,arg:d&&d[C.key],expandable:E,...x})))))))))},TI=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?u.createElement(uo,{...r[0][1],...t}):u.createElement(cl,null,r.map((n,a)=>{let[l,i]=n,c=`prop_table_div_${l}`,s="div",d=a===0?t:{sort:t.sort};return u.createElement(s,{key:c,id:c,title:l},({active:p})=>p?u.createElement(uo,{key:`prop_table_${l}`,...i,...d}):null)}))};A.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});A.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});A.div(re,({theme:e})=>({...Zn(e),margin:"25px 0 40px",padding:"30px 20px"}));A.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));A.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});A.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"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));A.div({display:"flex",flexDirection:"row"});A.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));A.div(({theme:e})=>({...Zn(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"}));A.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});A.div({flex:1,display:"flex",flexDirection:"row"});A.div({display:"flex",alignItems:"flex-start"});A.div({flex:"0 0 30%"});A.div({flex:1});A.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));A.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));A.div(({theme:e})=>({...Zn(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));A.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});A.div({display:"flex",flexFlow:"row wrap"});var MI=e=>`anchor--${e}`,$I=({storyId:e,children:t})=>u.createElement("div",{id:MI(e),className:"sb-anchor"},t);Oe&&Oe.__DOCS_CONTEXT__===void 0&&(Oe.__DOCS_CONTEXT__=o.createContext(null),Oe.__DOCS_CONTEXT__.displayName="DocsContext");var Be=Oe?Oe.__DOCS_CONTEXT__:o.createContext(null),Yr=(e,t)=>o.useContext(Be).resolveOf(e,t),LI=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),zI=e=>{if(e)return typeof e=="string"?e.includes("-")?LI(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function BI(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function V1(e){return rC(e,{allowFunction:!1})}var U1=o.createContext({sources:{}}),W1="--unknown--",PI=({children:e,channel:t})=>{let[r,n]=o.useState({});return o.useEffect(()=>{let a=(l,i=null,c=!1)=>{let{id:s,args:d=void 0,source:p,format:h}=typeof l=="string"?{id:l,source:i,format:c}:l,m=d?V1(d):W1;n(f=>({...f,[s]:{...f[s],[m]:{code:p,format:h}}}))};return t.on(Ml,a),()=>t.off(Ml,a)},[]),u.createElement(U1.Provider,{value:{sources:r}},e)},HI=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[V1(t)])||(a==null?void 0:a[W1])||{code:""}},FI=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ra.AUTO;if(l.code!==void 0)return l.code;let c=i===ra.DYNAMIC||i===ra.AUTO&&e&&a?e:l.originalSource||"";return((d=n??l.transform)==null?void 0:d(c,t))||c},jI=(e,t,r)=>{var f,v,g,E;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 l=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,c=e.format??l.format,s=e.language??l.language??"jsx",d=e.dark??l.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:c,language:s,dark:d};let p=t.getStoryContext(n),h=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,m=HI(n.id,h,r);return c=m.format??((E=(g=n.parameters.docs)==null?void 0:g.source)==null?void 0:E.format)??!1,{code:FI({snippet:m.code,storyContext:{...p,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:c,language:s,dark:d}};function NI(e,t){let r=DI([e],t);return r&&r[0]}function DI(e,t){let[r,n]=o.useState({});return o.useEffect(()=>{Promise.all(e.map(async a=>{let l=await t.loadStory(a);n(i=>i[a]===l?i:{...i,[a]:l})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var VI=(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},UI=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,l=a.story||{};if(a.disable)return null;if(e.inline??l.inline??!1){let c=e.height??l.height,s=e.autoplay??l.autoplay??!1;return{story:t,inline:!0,height:c,autoplay:s,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??l.height??l.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},WI=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=o.useContext(Be),r=VI(e,t),n=NI(r,t);if(!n)return u.createElement(_1,null);let a=UI(e,n,t);return a?u.createElement(TC,{...a}):null},qI=e=>{var m,f,v,g,E,x,y,b,w,S;let t=o.useContext(Be),r=o.useContext(U1),{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:l}=Yr(n||"story",["story"]),i=jI({...a,...n&&{of:n}},t,r),c=e.layout??l.parameters.layout??((f=(m=l.parameters.docs)==null?void 0:m.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((g=(v=l.parameters.docs)==null?void 0:v.canvas)==null?void 0:g.withToolbar)??!1,d=e.additionalActions??((x=(E=l.parameters.docs)==null?void 0:E.canvas)==null?void 0:x.additionalActions),p=e.sourceState??((b=(y=l.parameters.docs)==null?void 0:y.canvas)==null?void 0:b.sourceState)??"hidden",h=e.className??((S=(w=l.parameters.docs)==null?void 0:w.canvas)==null?void 0:S.className);return u.createElement(k1,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:s,additionalActions:d,className:h,layout:c},u.createElement(WI,{of:n||l.moduleExport,meta:e.meta,...e.story}))},GI=(e,t)=>{let r=t.getStoryContext(e),[n,a]=o.useState(r.globals);return o.useEffect(()=>{let l=i=>{a(i.globals)};return t.channel.on(s0,l),()=>t.channel.off(s0,l)},[t.channel]),[n]},YI=(e,t)=>{let r=KI(e,t);if(!r)throw new Error("No result when story was defined");return r},KI=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,l]=o.useState(r.args);o.useEffect(()=>{let s=d=>{d.storyId===n&&l(d.args)};return t.channel.on(c0,s),()=>t.channel.off(c0,s)},[n,t.channel]);let i=o.useCallback(s=>t.channel.emit(cC,{storyId:n,updatedArgs:s}),[n,t.channel]),c=o.useCallback(s=>t.channel.emit(dC,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,c]};function XI(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var ZI=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=o.useContext(Be),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:l,component:i,subcomponents:c}=n,s=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??s.include,p=e.exclude??s.exclude,h=e.sort??s.sort,[m,f,v]=YI(n,r),[g]=GI(n,r),E=i0(l,d,p);if(!(c&&Object.keys(c).length>0))return Object.keys(E).length>0||Object.keys(m).length>0?u.createElement(uo,{rows:E,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v}):null;let x=zI(i),y=Object.fromEntries(Object.entries(c).map(([S,C])=>[S,{rows:i0(XI(C,a),d,p),sort:h}])),b={[x]:{rows:E,sort:h},...y};return u.createElement(TI,{tabs:b,sort:h,args:m,globals:g,updateArgs:f,resetArgs:v})},{document:q1}=Oe,G1=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return u.createElement(Zo,null,t);let n=e&&e.split("-");return u.createElement(xl,{language:n&&n[1]||"text",format:!1,code:t,...r})};function Rl(e,t){e.channel.emit(uC,t)}var po=Fc.a,JI=({hash:e,children:t})=>{let r=o.useContext(Be);return u.createElement(po,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);q1.getElementById(a)&&Rl(r,e)}},t)},Y1=e=>{let{href:t,target:r,children:n,...a}=e,l=o.useContext(Be);if(t){if(t.startsWith("#"))return u.createElement(JI,{hash:t},n);if(r!=="_blank"&&!t.startsWith("https://"))return u.createElement(po,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),Rl(l,i.currentTarget.getAttribute("href")))},target:r,...a},n)}return u.createElement(po,{...e})},K1=["h1","h2","h3","h4","h5","h6"],QI=K1.reduce((e,t)=>({...e,[t]:A(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),eA=A.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),tA=({as:e,id:t,children:r,...n})=>{let a=o.useContext(Be),l=QI[e],i=`#${t}`;return u.createElement(l,{id:t,...n},u.createElement(eA,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:c=>{q1.getElementById(t)&&Rl(a,i)}},u.createElement(Qs,null)),r)},Il=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return u.createElement(tA,{as:t,id:r,...a},n);let l=t,{as:i,...c}=e;return u.createElement(l,{...te(c,t)})},X1=K1.reduce((e,t)=>({...e,[t]:r=>u.createElement(Il,{as:t,...r})}),{}),rA=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Rd`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/Editor.stories-BHq5bVbO.js b/assets/Editor.stories-BHq5bVbO.js deleted file mode 100644 index 10b6d5dc..00000000 --- a/assets/Editor.stories-BHq5bVbO.js +++ /dev/null @@ -1,86 +0,0 @@ -import{r as E,R as u}from"./index-BBkUAzwr.js";import{p as e}from"./index-_4_hgnnR.js";const oe={onActivate:e.func,onAddUndo:e.func,onBeforeAddUndo:e.func,onBeforeExecCommand:e.func,onBeforeGetContent:e.func,onBeforeRenderUI:e.func,onBeforeSetContent:e.func,onBeforePaste:e.func,onBlur:e.func,onChange:e.func,onClearUndos:e.func,onClick:e.func,onContextMenu:e.func,onCommentChange:e.func,onCompositionEnd:e.func,onCompositionStart:e.func,onCompositionUpdate:e.func,onCopy:e.func,onCut:e.func,onDblclick:e.func,onDeactivate:e.func,onDirty:e.func,onDrag:e.func,onDragDrop:e.func,onDragEnd:e.func,onDragGesture:e.func,onDragOver:e.func,onDrop:e.func,onExecCommand:e.func,onFocus:e.func,onFocusIn:e.func,onFocusOut:e.func,onGetContent:e.func,onHide:e.func,onInit:e.func,onInput:e.func,onKeyDown:e.func,onKeyPress:e.func,onKeyUp:e.func,onLoadContent:e.func,onMouseDown:e.func,onMouseEnter:e.func,onMouseLeave:e.func,onMouseMove:e.func,onMouseOut:e.func,onMouseOver:e.func,onMouseUp:e.func,onNodeChange:e.func,onObjectResizeStart:e.func,onObjectResized:e.func,onObjectSelected:e.func,onPaste:e.func,onPostProcess:e.func,onPostRender:e.func,onPreProcess:e.func,onProgressState:e.func,onRedo:e.func,onRemove:e.func,onReset:e.func,onSaveContent:e.func,onSelectionChange:e.func,onSetAttrib:e.func,onSetContent:e.func,onShow:e.func,onSubmit:e.func,onUndo:e.func,onVisualAid:e.func,onSkinLoadError:e.func,onThemeLoadError:e.func,onModelLoadError:e.func,onPluginLoadError:e.func,onIconsLoadError:e.func,onLanguageLoadError:e.func,onScriptsLoad:e.func,onScriptsLoadError:e.func},ce={apiKey:e.string,licenseKey:e.string,id:e.string,inline:e.bool,init:e.object,initialValue:e.string,onEditorChange:e.func,value:e.string,tagName:e.string,cloudChannel:e.string,plugins:e.oneOfType([e.string,e.array]),toolbar:e.oneOfType([e.string,e.array]),disabled:e.bool,textareaName:e.string,tinymceScriptSrc:e.oneOfType([e.string,e.arrayOf(e.string),e.arrayOf(e.shape({src:e.string,async:e.bool,defer:e.bool}))]),rollback:e.oneOfType([e.number,e.oneOf([!1])]),scriptLoading:e.shape({async:e.bool,defer:e.bool,delay:e.number}),...oe},w=t=>typeof t=="function",M=t=>t in oe,R=t=>t.substr(2),de=(t,n,r,i,o,s,c)=>{const l=Object.keys(o).filter(M),a=Object.keys(s).filter(M),d=l.filter(f=>s[f]===void 0),h=a.filter(f=>o[f]===void 0);d.forEach(f=>{const m=R(f),p=c[m];r(m,p),delete c[m]}),h.forEach(f=>{const m=i(t,f),p=R(f);c[p]=m,n(p,m)})},le=(t,n,r,i,o)=>de(o,t.on.bind(t),t.off.bind(t),(s,c)=>l=>{var a;return(a=s(c))==null?void 0:a(l,t)},n,r,i);let K=0;const se=t=>{const n=Date.now(),r=Math.floor(Math.random()*1e9);return K++,t+"_"+r+K+String(n)},O=t=>t!==null&&(t.tagName.toLowerCase()==="textarea"||t.tagName.toLowerCase()==="input"),P=t=>typeof t>"u"||t===""?[]:Array.isArray(t)?t:t.split(" "),ue=(t,n)=>P(t).concat(P(n)),pe=()=>window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function",fe=t=>{if(!("isConnected"in Node.prototype)){let n=t,r=t.parentNode;for(;r!=null;)n=r,r=n.parentNode;return n===t.ownerDocument}return t.isConnected},U=(t,n)=>{t!==void 0&&(t.mode!=null&&typeof t.mode=="object"&&typeof t.mode.set=="function"?t.mode.set(n):t.setMode(n))},he=(t,n,r)=>{const i=t.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=n.id,i.src=n.src,i.async=n.async??!1,i.defer=n.defer??!1;const o=()=>{i.removeEventListener("load",o),i.removeEventListener("error",s),r(n.src)},s=c=>{i.removeEventListener("load",o),i.removeEventListener("error",s),r(n.src,c)};i.addEventListener("load",o),i.addEventListener("error",s),t.head&&t.head.appendChild(i)},me=t=>{let n={};const r=(c,l)=>{const a=n[c];a.done=!0,a.error=l;for(const d of a.handlers)d(c,l);a.handlers=[]};return{loadScripts:(c,l,a)=>{const d=p=>a!==void 0?a(p):console.error(p);if(c.length===0){d(new Error("At least one script must be provided"));return}let h=0,f=!1;const m=(p,g)=>{f||(g?(f=!0,d(g)):++h===c.length&&l())};for(const p of c){const g=n[p.src];if(g)g.done?m(p.src,g.error):g.handlers.push(m);else{const B=se("tiny-");n[p.src]={id:B,src:p.src,done:!1,error:null,handlers:[m]},he(t,{id:B,...p},r)}}},deleteScripts:()=>{var c;for(const l of Object.values(n)){const a=t.getElementById(l.id);a!=null&&a.tagName==="SCRIPT"&&((c=a.parentNode)==null||c.removeChild(a))}n={}},getDocument:()=>t}},ye=()=>{const t=[],n=o=>{let s=t.find(c=>c.getDocument()===o);return s===void 0&&(s=me(o),t.push(s)),s};return{loadList:(o,s,c,l,a)=>{const d=()=>n(o).loadScripts(s,l,a);c>0?setTimeout(d,c):d()},reinitialize:()=>{for(let o=t.pop();o!=null;o=t.pop())o.deleteScripts()}}},ge=ye(),x=t=>{const n=t;return n&&n.tinymce?n.tinymce:null},T=class T extends E.Component{constructor(n){var r;super(n),this.rollbackTimer=void 0,this.valueCursor=void 0,this.rollbackChange=()=>{const i=this.editor,o=this.props.value;i&&o&&o!==this.currentContent&&i.undoManager.ignore(()=>{if(i.setContent(o),this.valueCursor&&(!this.inline||i.hasFocus()))try{i.selection.moveToBookmark(this.valueCursor)}catch{}}),this.rollbackTimer=void 0},this.handleBeforeInput=i=>{if(this.props.value!==void 0&&this.props.value===this.currentContent&&this.editor&&(!this.inline||this.editor.hasFocus()))try{this.valueCursor=this.editor.selection.getBookmark(3)}catch{}},this.handleBeforeInputSpecial=i=>{(i.key==="Enter"||i.key==="Backspace"||i.key==="Delete")&&this.handleBeforeInput(i)},this.handleEditorChange=i=>{const o=this.editor;if(o&&o.initialized){const s=o.getContent();this.props.value!==void 0&&this.props.value!==s&&this.props.rollback!==!1&&(this.rollbackTimer||(this.rollbackTimer=window.setTimeout(this.rollbackChange,typeof this.props.rollback=="number"?this.props.rollback:200))),s!==this.currentContent&&(this.currentContent=s,w(this.props.onEditorChange)&&this.props.onEditorChange(s,o))}},this.handleEditorChangeSpecial=i=>{(i.key==="Backspace"||i.key==="Delete")&&this.handleEditorChange(i)},this.initialise=(i=0)=>{var l,a;const o=this.elementRef.current;if(!o)return;if(!fe(o)){if(i===0)setTimeout(()=>this.initialise(1),1);else if(i<100)setTimeout(()=>this.initialise(i+1),100);else throw new Error("tinymce can only be initialised when in a document");return}const s=x(this.view);if(!s)throw new Error("tinymce should have been loaded into global scope");const c={...this.props.init,selector:void 0,target:o,readonly:this.props.disabled,inline:this.inline,plugins:ue((l=this.props.init)==null?void 0:l.plugins,this.props.plugins),toolbar:this.props.toolbar??((a=this.props.init)==null?void 0:a.toolbar),...this.props.licenseKey?{license_key:this.props.licenseKey}:{},setup:d=>{this.editor=d,this.bindHandlers({}),this.inline&&!O(o)&&d.once("PostRender",h=>{d.setContent(this.getInitialValue(),{no_events:!0})}),this.props.init&&w(this.props.init.setup)&&this.props.init.setup(d)},init_instance_callback:d=>{const h=this.getInitialValue();this.currentContent=this.currentContent??d.getContent(),this.currentContent!==h&&(this.currentContent=h,d.setContent(h),d.undoManager.clear(),d.undoManager.add(),d.setDirty(!1));const f=this.props.disabled??!1;U(this.editor,f?"readonly":"design"),this.props.init&&w(this.props.init.init_instance_callback)&&this.props.init.init_instance_callback(d)}};this.inline||(o.style.visibility=""),O(o)&&(o.value=this.getInitialValue()),s.init(c)},this.id=this.props.id||se("tiny-react"),this.elementRef=E.createRef(),this.inline=this.props.inline??((r=this.props.init)==null?void 0:r.inline)??!1,this.boundHandlers={}}get view(){var n;return((n=this.elementRef.current)==null?void 0:n.ownerDocument.defaultView)??window}componentDidUpdate(n){if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=this.currentContent??this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){const r=this.editor;r.undoManager.transact(()=>{let i;if(!this.inline||r.hasFocus())try{i=r.selection.getBookmark(3)}catch{}const o=this.valueCursor;if(r.setContent(this.props.value),!this.inline||r.hasFocus()){for(const s of[i,o])if(s)try{r.selection.moveToBookmark(s),this.valueCursor=s;break}catch{}}})}if(this.props.disabled!==n.disabled){const r=this.props.disabled??!1;U(this.editor,r?"readonly":"design")}}}componentDidMount(){var n,r,i,o;if(x(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(r=(n=this.props).onScriptsLoadError)==null||r.call(n,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if((i=this.elementRef.current)!=null&&i.ownerDocument){const s=()=>{var l,a;(a=(l=this.props).onScriptsLoad)==null||a.call(l),this.initialise()},c=l=>{var a,d;(d=(a=this.props).onScriptsLoadError)==null||d.call(a,l)};ge.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),((o=this.props.scriptLoading)==null?void 0:o.delay)??0,s,c)}}componentWillUnmount(){const n=this.editor;n&&(n.off(this.changeEvents(),this.handleEditorChange),n.off(this.beforeInputEvent(),this.handleBeforeInput),n.off("keypress",this.handleEditorChangeSpecial),n.off("keydown",this.handleBeforeInputSpecial),n.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(r=>{n.off(r,this.boundHandlers[r])}),this.boundHandlers={},n.remove(),this.editor=void 0)}render(){return this.inline?this.renderInline():this.renderIframe()}changeEvents(){var r,i,o;return((o=(i=(r=x(this.view))==null?void 0:r.Env)==null?void 0:i.browser)==null?void 0:o.isIE())?"change keyup compositionend setcontent CommentChange":"change input compositionend setcontent CommentChange"}beforeInputEvent(){return pe()?"beforeinput SelectionChange":"SelectionChange"}renderInline(){const{tagName:n="div"}=this.props;return E.createElement(n,{ref:this.elementRef,id:this.id})}renderIframe(){return E.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id})}getScriptSources(){var c,l;const n=(c=this.props.scriptLoading)==null?void 0:c.async,r=(l=this.props.scriptLoading)==null?void 0:l.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:n,defer:r}]:this.props.tinymceScriptSrc.map(a=>typeof a=="string"?{src:a,async:n,defer:r}:a);const i=this.props.cloudChannel;return[{src:`https://cdn.tiny.cloud/1/${this.props.apiKey?this.props.apiKey:"no-api-key"}/tinymce/${i}/tinymce.min.js`,async:n,defer:r}]}getInitialValue(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""}bindHandlers(n){if(this.editor!==void 0){le(this.editor,n,this.props,this.boundHandlers,s=>this.props[s]);const r=s=>s.onEditorChange!==void 0||s.value!==void 0,i=r(n),o=r(this.props);!i&&o?(this.editor.on(this.changeEvents(),this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):i&&!o&&(this.editor.off(this.changeEvents(),this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}}};T.propTypes=ce,T.defaultProps={cloudChannel:"7"};let y=T;y.__docgenInfo={description:"@see {@link https://www.tiny.cloud/docs/tinymce/7/react-ref/} for the TinyMCE React Technical Reference",methods:[],displayName:"Editor",props:{cloudChannel:{defaultValue:{value:"'7'",computed:!1},description:"",type:{name:"string"},required:!1},apiKey:{description:"",type:{name:"string"},required:!1},licenseKey:{description:"",type:{name:"string"},required:!1},id:{description:"",type:{name:"string"},required:!1},inline:{description:"",type:{name:"bool"},required:!1},init:{description:"",type:{name:"object"},required:!1},initialValue:{description:"",type:{name:"string"},required:!1},onEditorChange:{description:"",type:{name:"func"},required:!1},value:{description:"",type:{name:"string"},required:!1},tagName:{description:"",type:{name:"string"},required:!1},plugins:{description:"",type:{name:"union",value:[{name:"string"},{name:"array"}]},required:!1},toolbar:{description:"",type:{name:"union",value:[{name:"string"},{name:"array"}]},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},textareaName:{description:"",type:{name:"string"},required:!1},tinymceScriptSrc:{description:"",type:{name:"union",value:[{name:"string"},{name:"arrayOf",value:{name:"string"}},{name:"arrayOf",value:{name:"shape",value:{src:{name:"string",required:!1},async:{name:"bool",required:!1},defer:{name:"bool",required:!1}}}}]},required:!1},rollback:{description:"",type:{name:"union",value:[{name:"number"},{name:"enum",value:[{value:"false",computed:!1}]}]},required:!1},scriptLoading:{description:"",type:{name:"shape",value:{async:{name:"bool",required:!1},defer:{name:"bool",required:!1},delay:{name:"number",required:!1}}},required:!1},onActivate:{description:"",type:{name:"func"},required:!1},onAddUndo:{description:"",type:{name:"func"},required:!1},onBeforeAddUndo:{description:"",type:{name:"func"},required:!1},onBeforeExecCommand:{description:"",type:{name:"func"},required:!1},onBeforeGetContent:{description:"",type:{name:"func"},required:!1},onBeforeRenderUI:{description:"",type:{name:"func"},required:!1},onBeforeSetContent:{description:"",type:{name:"func"},required:!1},onBeforePaste:{description:"",type:{name:"func"},required:!1},onBlur:{description:"",type:{name:"func"},required:!1},onChange:{description:"",type:{name:"func"},required:!1},onClearUndos:{description:"",type:{name:"func"},required:!1},onClick:{description:"",type:{name:"func"},required:!1},onContextMenu:{description:"",type:{name:"func"},required:!1},onCommentChange:{description:"",type:{name:"func"},required:!1},onCompositionEnd:{description:"",type:{name:"func"},required:!1},onCompositionStart:{description:"",type:{name:"func"},required:!1},onCompositionUpdate:{description:"",type:{name:"func"},required:!1},onCopy:{description:"",type:{name:"func"},required:!1},onCut:{description:"",type:{name:"func"},required:!1},onDblclick:{description:"",type:{name:"func"},required:!1},onDeactivate:{description:"",type:{name:"func"},required:!1},onDirty:{description:"",type:{name:"func"},required:!1},onDrag:{description:"",type:{name:"func"},required:!1},onDragDrop:{description:"",type:{name:"func"},required:!1},onDragEnd:{description:"",type:{name:"func"},required:!1},onDragGesture:{description:"",type:{name:"func"},required:!1},onDragOver:{description:"",type:{name:"func"},required:!1},onDrop:{description:"",type:{name:"func"},required:!1},onExecCommand:{description:"",type:{name:"func"},required:!1},onFocus:{description:"",type:{name:"func"},required:!1},onFocusIn:{description:"",type:{name:"func"},required:!1},onFocusOut:{description:"",type:{name:"func"},required:!1},onGetContent:{description:"",type:{name:"func"},required:!1},onHide:{description:"",type:{name:"func"},required:!1},onInit:{description:"",type:{name:"func"},required:!1},onInput:{description:"",type:{name:"func"},required:!1},onKeyDown:{description:"",type:{name:"func"},required:!1},onKeyPress:{description:"",type:{name:"func"},required:!1},onKeyUp:{description:"",type:{name:"func"},required:!1},onLoadContent:{description:"",type:{name:"func"},required:!1},onMouseDown:{description:"",type:{name:"func"},required:!1},onMouseEnter:{description:"",type:{name:"func"},required:!1},onMouseLeave:{description:"",type:{name:"func"},required:!1},onMouseMove:{description:"",type:{name:"func"},required:!1},onMouseOut:{description:"",type:{name:"func"},required:!1},onMouseOver:{description:"",type:{name:"func"},required:!1},onMouseUp:{description:"",type:{name:"func"},required:!1},onNodeChange:{description:"",type:{name:"func"},required:!1},onObjectResizeStart:{description:"",type:{name:"func"},required:!1},onObjectResized:{description:"",type:{name:"func"},required:!1},onObjectSelected:{description:"",type:{name:"func"},required:!1},onPaste:{description:"",type:{name:"func"},required:!1},onPostProcess:{description:"",type:{name:"func"},required:!1},onPostRender:{description:"",type:{name:"func"},required:!1},onPreProcess:{description:"",type:{name:"func"},required:!1},onProgressState:{description:"",type:{name:"func"},required:!1},onRedo:{description:"",type:{name:"func"},required:!1},onRemove:{description:"",type:{name:"func"},required:!1},onReset:{description:"",type:{name:"func"},required:!1},onSaveContent:{description:"",type:{name:"func"},required:!1},onSelectionChange:{description:"",type:{name:"func"},required:!1},onSetAttrib:{description:"",type:{name:"func"},required:!1},onSetContent:{description:"",type:{name:"func"},required:!1},onShow:{description:"",type:{name:"func"},required:!1},onSubmit:{description:"",type:{name:"func"},required:!1},onUndo:{description:"",type:{name:"func"},required:!1},onVisualAid:{description:"",type:{name:"func"},required:!1},onSkinLoadError:{description:"",type:{name:"func"},required:!1},onThemeLoadError:{description:"",type:{name:"func"},required:!1},onModelLoadError:{description:"",type:{name:"func"},required:!1},onPluginLoadError:{description:"",type:{name:"func"},required:!1},onIconsLoadError:{description:"",type:{name:"func"},required:!1},onLanguageLoadError:{description:"",type:{name:"func"},required:!1},onScriptsLoad:{description:"",type:{name:"func"},required:!1},onScriptsLoadError:{description:"",type:{name:"func"},required:!1}},composes:["Partial"]};const v="qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc",C=` -

Full-featured rich text editing experience

-

No matter what you're building, TinyMCE has got you covered.

-`.trim(),ae={plugins:{control:{type:"text"}},toolbar:{control:{type:"text"}},cloudChannel:{control:{type:"text"}},rollback:{control:{type:"number"}}},Ee={title:"Editor",component:y,parameters:{actions:{disable:!0}}},b={args:{apiKey:v,initialValue:C},argTypes:ae},q={args:{apiKey:v,initialValue:C,inline:!0},argTypes:ae,render:t=>u.createElement("div",{style:{paddingTop:"100px"}},u.createElement(y,{...t}))},S={render:()=>{const[t,n]=u.useState(C);return u.createElement("div",null,u.createElement(y,{apiKey:v,value:t,onEditorChange:r=>n(r)}),u.createElement("textarea",{style:{width:"100%",height:"200px"},value:t,onChange:r=>n(r.target.value)}))}},k={render:()=>u.createElement(y,{apiKey:v,value:"

This value is fixed and can not be changed.

"})},L={render:()=>{const[n,r]=u.useState("

This field can only take 50 characters.

"),[i,o]=u.useState(0),s=(a,d)=>{o(d.getContent({format:"text"}).length)},c=(a,d)=>{const h=d.getContent({format:"text"}).length;h<=50&&(r(a),o(h))},l=(a,d)=>{d.getContent({format:"text"}).length>50&&a.preventDefault()};return u.createElement("div",null,u.createElement(y,{apiKey:v,value:n,onEditorChange:c,onBeforeAddUndo:l,onInit:s}),u.createElement("p",null,"Remaining: ",50-i))}},D={render:()=>{const[t,n]=u.useState(!0),r=()=>n(i=>!i);return u.createElement("div",null,u.createElement(y,{apiKey:v,initialValue:C,disabled:t}),u.createElement("button",{onClick:r},t?"Enable Editor":"Disable Editor"))}},I={name:'Cloud Channel Set To "6-dev"',render:()=>u.createElement("div",null,u.createElement(y,{apiKey:v,cloudChannel:"6-dev",initialValue:C}),u.createElement("p",null,'Refresh the page to ensure a load from the "6-dev" channel'))};var V,A,N;b.parameters={...b.parameters,docs:{...(V=b.parameters)==null?void 0:V.docs,source:{originalSource:`{ - args: { - apiKey, - initialValue - }, - argTypes -}`,...(N=(A=b.parameters)==null?void 0:A.docs)==null?void 0:N.source}}};var z,j,H;q.parameters={...q.parameters,docs:{...(z=q.parameters)==null?void 0:z.docs,source:{originalSource:`{ - args: { - apiKey, - initialValue, - inline: true - }, - argTypes, - render: args =>
- -
-}`,...(H=(j=q.parameters)==null?void 0:j.docs)==null?void 0:H.source}}};var _,F,G;S.parameters={...S.parameters,docs:{...(_=S.parameters)==null?void 0:_.docs,source:{originalSource:`{ - render: () => { - const [data, setData] = React.useState(initialValue); - return
- setData(e)} /> -