Anvil/sb-manager/chunk-VQTIH3SE.js

187 lines
368 KiB
JavaScript
Raw Normal View History

2024-07-05 09:29:52 +02:00
import{ARGTYPES_INFO_REQUEST,ARGTYPES_INFO_RESPONSE,Addon_TypesEnum,AlertIcon,ArrowLeftIcon,Badge,BottomBarIcon,BottomBarToggleIcon,Button,CREATE_NEW_STORYFILE_REQUEST,CREATE_NEW_STORYFILE_RESPONSE,CheckIcon,ChevronDownIcon,ChevronRightIcon,CircleIcon,CloseAltIcon,CloseIcon,CogIcon,CollapseIcon,ComponentIcon,DocumentIcon,EmptyTabContent,ErrorFormatter,ExpandAltIcon,ExpandIcon,EyeCloseIcon,EyeIcon,FILE_COMPONENT_SEARCH_REQUEST,FILE_COMPONENT_SEARCH_RESPONSE,FORCE_REMOUNT,Form,GithubIcon,GlobeIcon,HeartIcon,IconButton,Icons,InfoIcon,LightningIcon,Link2,Link22,LinkIcon,Loader,Location,LocationProvider,LockIcon,ManagerConsumer,ManagerProvider,Match,MenuIcon,Modal,PRELOAD_ENTRIES,PREVIEW_BUILDER_PROGRESS,PlusIcon,ProviderDoesNotExtendBaseProviderError,Route2,SAVE_STORY_REQUEST,SAVE_STORY_RESPONSE,SET_CURRENT_STORY,STORIES_COLLAPSE_ALL,STORIES_EXPAND_ALL,SearchIcon,Separator,ShareAltIcon,SidebarAltIcon,Spaced,StorybookIcon,StorybookLogo,SyncIcon,TabBar,TabButton,Tabs,TimeIcon,TooltipLinkList,TooltipNote,TrashIcon,WandIcon,WithTooltip,Zoom,ZoomIcon,ZoomOutIcon,ZoomResetIcon,__assign,addons,eventToShortcut,experimental_requestResponse,getStoryHref,merge_default,require_isObject,require_isSymbol,require_lib,require_root,require_store2,shortcutMatchesShortcut,shortcutToHumanString,typesX,useNavigate2,useStorybookApi,useStorybookState}from"./chunk-2IOEGHGR.js";import{ScrollArea,_extends}from"./chunk-GUVK2GTO.js";import{Global,ThemeProvider,createGlobal,ensure,keyframes,logger,newStyled,require_react,require_react_dom,scope,useTheme,withTheme}from"./chunk-B3YDJJJH.js";import{__commonJS,__toESM,require_memoizerific}from"./chunk-ZR5JZWHI.js";var require_client=__commonJS({"../../node_modules/react-dom/client.js"(exports){"use strict";var m2=require_react_dom();i2=m2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,exports.createRoot=function(c2,o3){i2.usingClientEntryPoint=!0;try{return m2.createRoot(c2,o3)}finally{i2.usingClientEntryPoint=!1}},exports.hydrateRoot=function(c2,h2,o3){i2.usingClientEntryPoint=!0;try{return m2.hydrateRoot(c2,h2,o3)}finally{i2.usingClientEntryPoint=!1}};var i2}});var require_react_is_development=__commonJS({"../../node_modules/react-is/cjs/react-is.development.js"(exports){"use strict";(function(){"use strict";var hasSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=hasSymbol?Symbol.for("react.element"):60103,REACT_PORTAL_TYPE=hasSymbol?Symbol.for("react.portal"):60106,REACT_FRAGMENT_TYPE=hasSymbol?Symbol.for("react.fragment"):60107,REACT_STRICT_MODE_TYPE=hasSymbol?Symbol.for("react.strict_mode"):60108,REACT_PROFILER_TYPE=hasSymbol?Symbol.for("react.profiler"):60114,REACT_PROVIDER_TYPE=hasSymbol?Symbol.for("react.provider"):60109,REACT_CONTEXT_TYPE=hasSymbol?Symbol.for("react.context"):60110,REACT_ASYNC_MODE_TYPE=hasSymbol?Symbol.for("react.async_mode"):60111,REACT_CONCURRENT_MODE_TYPE=hasSymbol?Symbol.for("react.concurrent_mode"):60111,REACT_FORWARD_REF_TYPE=hasSymbol?Symbol.for("react.forward_ref"):60112,REACT_SUSPENSE_TYPE=hasSymbol?Symbol.for("react.suspense"):60113,REACT_SUSPENSE_LIST_TYPE=hasSymbol?Symbol.for("react.suspense_list"):60120,REACT_MEMO_TYPE=hasSymbol?Symbol.for("react.memo"):60115,REACT_LAZY_TYPE=hasSymbol?Symbol.for("react.lazy"):60116,REACT_BLOCK_TYPE=hasSymbol?Symbol.for("react.block"):60121,REACT_FUNDAMENTAL_TYPE=hasSymbol?Symbol.for("react.fundamental"):60117,REACT_RESPONDER_TYPE=hasSymbol?Symbol.for("react.responder"):60118,REACT_SCOPE_TYPE=hasSymbol?Symbol.for("react.scope"):60119;function isValidElementType(type){return typeof type=="string"||typeof type=="function"||type===REACT_FRAGMENT_TYPE||type===REACT_CONCURRENT_MODE_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||typeof type=="object"&&type!==null&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_FUNDAMENTAL_TYPE||type.$$typeof===REACT_RESPONDER_TYPE||type.$$typeof===REACT_SCOPE
2024-06-16 17:30:30 +02:00
Valid keys: `+JSON.stringify(Object.keys(shapeTypes),null," "));var error=checker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error)return error}return null}return createChainableTypeChecker(validate)}function isNode(propValue){switch(typeof propValue){case"number":case"string":case"undefined":return!0;case"boolean":return!propValue;case"object":if(Array.isArray(propValue))return propValue.every(isNode);if(propValue===null||isValidElement(propValue))return!0;var iteratorFn=getIteratorFn(propValue);if(iteratorFn){var iterator=iteratorFn.call(propValue),step;if(iteratorFn!==propValue.entries){for(;!(step=iterator.next()).done;)if(!isNode(step.value))return!1}else for(;!(step=iterator.next()).done;){var entry=step.value;if(entry&&!isNode(entry[1]))return!1}}else return!1;return!0;default:return!1}}function isSymbol(propType,propValue){return propType==="symbol"?!0:propValue?propValue["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&propValue instanceof Symbol:!1}function getPropType(propValue){var propType=typeof propValue;return Array.isArray(propValue)?"array":propValue instanceof RegExp?"object":isSymbol(propType,propValue)?"symbol":propType}function getPreciseType(propValue){if(typeof propValue>"u"||propValue===null)return""+propValue;var propType=getPropType(propValue);if(propType==="object"){if(propValue instanceof Date)return"date";if(propValue instanceof RegExp)return"regexp"}return propType}function getPostfixForTypeWarning(value){var type=getPreciseType(value);switch(type){case"array":case"object":return"an "+type;case"boolean":case"date":case"regexp":return"a "+type;default:return type}}function getClassName(propValue){return!propValue.constructor||!propValue.constructor.name?ANONYMOUS:propValue.constructor.name}return ReactPropTypes.checkPropTypes=checkPropTypes,ReactPropTypes.resetWarningCache=checkPropTypes.resetWarningCache,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}}});var require_prop_types=__commonJS({"../../node_modules/prop-types/index.js"(exports,module){ReactIs=require_react_is(),throwOnDirectAccess=!0,module.exports=require_factoryWithTypeCheckers()(ReactIs.isElement,throwOnDirectAccess);var ReactIs,throwOnDirectAccess}});var require_react_fast_compare=__commonJS({"../../node_modules/react-fast-compare/index.js"(exports,module){var hasElementType=typeof Element<"u",hasMap=typeof Map=="function",hasSet=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function equal(a2,b2){if(a2===b2)return!0;if(a2&&b2&&typeof a2=="object"&&typeof b2=="object"){if(a2.constructor!==b2.constructor)return!1;var length,i2,keys;if(Array.isArray(a2)){if(length=a2.length,length!=b2.length)return!1;for(i2=length;i2--!==0;)if(!equal(a2[i2],b2[i2]))return!1;return!0}var it;if(hasMap&&a2 instanceof Map&&b2 instanceof Map){if(a2.size!==b2.size)return!1;for(it=a2.entries();!(i2=it.next()).done;)if(!b2.has(i2.value[0]))return!1;for(it=a2.entries();!(i2=it.next()).done;)if(!equal(i2.value[1],b2.get(i2.value[0])))return!1;return!0}if(hasSet&&a2 instanceof Set&&b2 instanceof Set){if(a2.size!==b2.size)return!1;for(it=a2.entries();!(i2=it.next()).done;)if(!b2.has(i2.value[0]))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(a2)&&ArrayBuffer.isView(b2)){if(length=a2.length,length!=b2.length)return!1;for(i2=length;i2--!==0;)if(a2[i2]!==b2[i2])return!1;return!0}if(a2.constructor===RegExp)return a2.source===b2.source&&a2.flags===b2.flags;if(a2.valueOf!==Object.prototype.valueOf&&typeof a2.valueOf=="function"&&typeof b2.valueOf=="function")return a2.valueOf()===b2.valueOf();if(a2.toString!==Object.prototype.toString&&typeof a2.toString=="function"&&typeof b2.toString=="function")return a2.toString()===b2.toString();if(keys=Object.keys(a2),length=keys.length,length!==Object.keys(b2).length)return!1;for(i2=length;i2--!==0;)if(!Object.prototype.hasOwnProperty.call(b2,keys[i2]))return!1;if(hasElementType&&a2 instanceof Element)return!1;for(i2=length;i2--!==0;)if(!((keys[i2]==="_owner"||keys[i2]==="__v"||keys[i2]==="__o")&&a2.$$typeof)&&!equ
Search pattern: "`.concat(e5,'"'));var r5=this._prepareSearchers(e5),n4=r5.tokenSearchers,o4=r5.fullSearcher,i3=this._search(n4,o4);return this._computeScore(i3),this.options.shouldSort&&this._sort(i3),t5.limit&&typeof t5.limit=="number"&&(i3=i3.slice(0,t5.limit)),this._format(i3)}},{key:"_prepareSearchers",value:function(){var e5=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t5=[];if(this.options.tokenize)for(var r5=e5.split(this.options.tokenSeparator),n4=0,o4=r5.length;n4<o4;n4+=1)t5.push(new i2(r5[n4],this.options));return{tokenSearchers:t5,fullSearcher:new i2(e5,this.options)}}},{key:"_search",value:function(){var e5=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t5=arguments.length>1?arguments[1]:void 0,r5=this.list,n4={},o4=[];if(typeof r5[0]=="string"){for(var i3=0,a4=r5.length;i3<a4;i3+=1)this._analyze({key:"",value:r5[i3],record:i3,index:i3},{resultMap:n4,results:o4,tokenSearchers:e5,fullSearcher:t5});return o4}for(var s3=0,c3=r5.length;s3<c3;s3+=1)for(var h3=r5[s3],l3=0,u2=this._keyNames.length;l3<u2;l3+=1){var f2=this._keyNames[l3];this._analyze({key:f2,value:this.options.getFn(h3,f2),record:h3,index:s3},{resultMap:n4,results:o4,tokenSearchers:e5,fullSearcher:t5})}return o4}},{key:"_analyze",value:function(e5,t5){var r5=this,n4=e5.key,o4=e5.arrayIndex,i3=o4===void 0?-1:o4,a4=e5.value,s3=e5.record,h3=e5.index,l3=t5.tokenSearchers,u2=l3===void 0?[]:l3,f2=t5.fullSearcher,v2=t5.resultMap,p2=v2===void 0?{}:v2,d2=t5.results,g2=d2===void 0?[]:d2;(function e6(t6,o5,i4,a5){if(o5!=null){if(typeof o5=="string"){var s4=!1,h4=-1,l4=0;r5._log(`
Key: `.concat(n4===""?"--":n4));var v3=f2.search(o5);if(r5._log('Full text: "'.concat(o5,'", score: ').concat(v3.score)),r5.options.tokenize){for(var d3=o5.split(r5.options.tokenSeparator),y2=d3.length,m2=[],k2=0,b2=u2.length;k2<b2;k2+=1){var S2=u2[k2];r5._log(`
Pattern: "`.concat(S2.pattern,'"'));for(var x2=!1,M2=0;M2<y2;M2+=1){var _2=d3[M2],w2=S2.search(_2),L2={};w2.isMatch?(L2[_2]=w2.score,s4=!0,x2=!0,m2.push(w2.score)):(L2[_2]=1,r5.options.matchAllTokens||m2.push(1)),r5._log('Token: "'.concat(_2,'", score: ').concat(L2[_2]))}x2&&(l4+=1)}h4=m2[0];for(var A2=m2.length,O2=1;O2<A2;O2+=1)h4+=m2[O2];h4/=A2,r5._log("Token score average:",h4)}var C2=v3.score;h4>-1&&(C2=(C2+h4)/2),r5._log("Score average:",C2);var j2=!r5.options.tokenize||!r5.options.matchAllTokens||l4>=u2.length;if(r5._log(`
Check Matches: `.concat(j2)),(s4||v3.isMatch)&&j2){var P2={key:n4,arrayIndex:t6,value:o5,score:C2};r5.options.includeMatches&&(P2.matchedIndices=v3.matchedIndices);var I2=p2[a5];I2?I2.output.push(P2):(p2[a5]={item:i4,output:[P2]},g2.push(p2[a5]))}}else if(c2(o5))for(var F2=0,T2=o5.length;F2<T2;F2+=1)e6(F2,o5[F2],i4,a5)}})(i3,a4,s3,h3)}},{key:"_computeScore",value:function(e5){this._log(`
Computing score:
`);for(var t5=this._keyWeights,r5=!!Object.keys(t5).length,n4=0,o4=e5.length;n4<o4;n4+=1){for(var i3=e5[n4],a4=i3.output,s3=a4.length,c3=1,h3=0;h3<s3;h3+=1){var l3=a4[h3],u2=l3.key,f2=r5?t5[u2]:1,v2=l3.score===0&&t5&&t5[u2]>0?Number.EPSILON:l3.score;c3*=Math.pow(v2,f2)}i3.score=c3,this._log(i3)}}},{key:"_sort",value:function(e5){this._log(`
Sorting....`),e5.sort(this.options.sortFn)}},{key:"_format",value:function(e5){var t5=[];if(this.options.verbose){var r5=[];this._log(`
Output:
`,JSON.stringify(e5,function(e6,t6){if(n3(t6)==="object"&&t6!==null){if(r5.indexOf(t6)!==-1)return;r5.push(t6)}return t6},2)),r5=null}var o4=[];this.options.includeMatches&&o4.push(function(e6,t6){var r6=e6.output;t6.matches=[];for(var n4=0,o5=r6.length;n4<o5;n4+=1){var i4=r6[n4];if(i4.matchedIndices.length!==0){var a5={indices:i4.matchedIndices,value:i4.value};i4.key&&(a5.key=i4.key),i4.hasOwnProperty("arrayIndex")&&i4.arrayIndex>-1&&(a5.arrayIndex=i4.arrayIndex),t6.matches.push(a5)}}}),this.options.includeScore&&o4.push(function(e6,t6){t6.score=e6.score});for(var i3=0,a4=e5.length;i3<a4;i3+=1){var s3=e5[i3];if(this.options.id&&(s3.item=this.options.getFn(s3.item,this.options.id)[0]),o4.length){for(var c3={item:s3.item},h3=0,l3=o4.length;h3<l3;h3+=1)o4[h3](s3,c3);t5.push(c3)}else t5.push(s3.item)}return t5}},{key:"_log",value:function(){var e5;this.options.verbose&&(e5=console).log.apply(e5,arguments)}}])&&o3(t4.prototype,r4),a3&&o3(t4,a3),e4}();e3.exports=h2},function(e3,t3,r3){function n3(e4,t4){for(var r4=0;r4<t4.length;r4++){var n4=t4[r4];n4.enumerable=n4.enumerable||!1,n4.configurable=!0,"value"in n4&&(n4.writable=!0),Object.defineProperty(e4,n4.key,n4)}}var o3=r3(2),i2=r3(3),a2=r3(6),s2=function(){function e4(t5,r5){var n4=r5.location,o4=n4===void 0?0:n4,i3=r5.distance,s4=i3===void 0?100:i3,c2=r5.threshold,h2=c2===void 0?.6:c2,l3=r5.maxPatternLength,u2=l3===void 0?32:l3,f2=r5.isCaseSensitive,v2=f2!==void 0&&f2,p2=r5.tokenSeparator,d2=p2===void 0?/ +/g:p2,g2=r5.findAllMatches,y2=g2!==void 0&&g2,m2=r5.minMatchCharLength,k2=m2===void 0?1:m2,b2=r5.includeMatches,S2=b2!==void 0&&b2;(function(e5,t6){if(!(e5 instanceof t6))throw new TypeError("Cannot call a class as a function")})(this,e4),this.options={location:o4,distance:s4,threshold:h2,maxPatternLength:u2,isCaseSensitive:v2,tokenSeparator:d2,findAllMatches:y2,includeMatches:S2,minMatchCharLength:k2},this.pattern=v2?t5:t5.toLowerCase(),this.pattern.length<=u2&&(this.patternAlphabet=a2(this.pattern))}var t4,r4,s3;return t4=e4,(r4=[{key:"search",value:function(e5){var t5=this.options,r5=t5.isCaseSensitive,n4=t5.includeMatches;if(r5||(e5=e5.toLowerCase()),this.pattern===e5){var a3={isMatch:!0,score:0};return n4&&(a3.matchedIndices=[[0,e5.length-1]]),a3}var s4=this.options,c2=s4.maxPatternLength,h2=s4.tokenSeparator;if(this.pattern.length>c2)return o3(e5,this.pattern,h2);var l3=this.options,u2=l3.location,f2=l3.distance,v2=l3.threshold,p2=l3.findAllMatches,d2=l3.minMatchCharLength;return i2(e5,this.pattern,this.patternAlphabet,{location:u2,distance:f2,threshold:v2,findAllMatches:p2,minMatchCharLength:d2,includeMatches:n4})}}])&&n3(t4.prototype,r4),s3&&n3(t4,s3),e4}();e3.exports=s2},function(e3,t3){var r3=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e3.exports=function(e4,t4){var n3=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,o3=new RegExp(t4.replace(r3,"\\$&").replace(n3,"|")),i2=e4.match(o3),a2=!!i2,s2=[];if(a2)for(var c2=0,h2=i2.length;c2<h2;c2+=1){var l3=i2[c2];s2.push([e4.indexOf(l3),l3.length-1])}return{score:a2?.5:1,isMatch:a2,matchedIndices:s2}}},function(e3,t3,r3){var n3=r3(4),o3=r3(5);e3.exports=function(e4,t4,r4,i2){for(var a2=i2.location,s2=a2===void 0?0:a2,c2=i2.distance,h2=c2===void 0?100:c2,l3=i2.threshold,u2=l3===void 0?.6:l3,f2=i2.findAllMatches,v2=f2!==void 0&&f2,p2=i2.minMatchCharLength,d2=p2===void 0?1:p2,g2=i2.includeMatches,y2=g2!==void 0&&g2,m2=s2,k2=e4.length,b2=u2,S2=e4.indexOf(t4,m2),x2=t4.length,M2=[],_2=0;_2<k2;_2+=1)M2[_2]=0;if(S2!==-1){var w2=n3(t4,{errors:0,currentLocation:S2,expectedLocation:m2,distance:h2});if(b2=Math.min(w2,b2),(S2=e4.lastIndexOf(t4,m2+x2))!==-1){var L2=n3(t4,{errors:0,currentLocation:S2,expectedLocation:m2,distance:h2});b2=Math.min(L2,b2)}}S2=-1;for(var A2=[],O2=1,C2=x2+k2,j2=1<<(x2<=31?x2-1:30),P2=0;P2<x2;P2+=1){for(var I2=0,F2=C2;I2<F2;)n3(t4,{errors:P2,currentLocation:m2+F2,expectedLocation:m2,distance:h2})<=b2?I2=F2:C2=F2,F2=Math.floor((C2-I2)/2+I2);C2=F2;var T2=Math.max(1,m2-F2+1),N2=v2?k2:Math.min(m2+F2,k2)+x2,z2=Array(N2+2);z2[N2+1]=(1<<P2)-1;for(var E2=N2;E2>=T2;E2-=1){var W2=E2-1,K2=r4[e4.charAt(W2)];i
`,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 }).
`,3:`Passed an incorrect argument to a color function, please pass a string representation of a color.
`,4:`Couldn't generate valid rgb string from %s, it returned %s.
`,5:`Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
`,6:`Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).
`,7:`Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).
`,8:`Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
`,9:`Please provide a number of steps to the modularScale helper.
`,10:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,11:`Invalid value passed as base to modularScale, expected number or em string but got "%s"
`,12:`Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
`,13:`Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
`,14:`Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
`,15:`Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
`,16:`You must provide a template to this method.
`,17:`You passed an unsupported selector state to this method.
`,18:`minScreen and maxScreen must be provided as stringified numbers with the same units.
`,19:`fromSize and toSize must be provided as stringified numbers with the same units.
`,20:`expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:`fontFace expects a name of a font-family.
`,24:`fontFace expects either the path to the font file(s) or a name of a local copy.
`,25:`fontFace expects localFonts to be an array.
`,26:`fontFace expects fileFormats to be an array.
`,27:`radialGradient requries at least 2 color-stops to properly render.
`,28:`Please supply a filename to retinaImage() as the first argument.
`,29:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
`,32:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
`,33:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
`,34:`borderRadius expects a radius value as a string or number as the second argument.
`,35:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,36:`Property must be a string value.
`,37:`Syntax Error at %s.
`,38:`Formula contains a function that needs parentheses at %s.
`,39:`Formula is missing closing parenthesis at %s.
`,40:`Formula has too many closing parentheses at %s.
`,41:`All values in a formula must have the same unit or be unitless.
`,42:`Please provide a number of steps to the modularScale helper.
`,43:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,44:`Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
`,45:`Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
`,46:`Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
`,47:`minScreen and maxScreen must be provided as stringified numbers with the same units.
`,48:`fromSize and toSize must be provided as stringified numbers with the same units.
`,49:`Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,50:`Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
`,51:`Expects the first argument object to have the properties prop, fromSize, and toSize.
`,52:`fontFace expects either the path to the font file(s) or a name of a local copy.
`,53:`fontFace expects localFonts to be an array.
`,54:`fontFace expects fileFormats to be an array.
`,55:`fontFace expects a name of a font-family.
`,56:`linearGradient requries at least 2 color-stops to properly render.
`,57:`radialGradient requries at least 2 color-stops to properly render.
`,58:`Please supply a filename to retinaImage() as the first argument.
`,59:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:`Property must be a string value.
`,62:`borderRadius expects a radius value as a string or number as the second argument.
`,63:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,64:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
`,65:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').
`,66:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
`,67:`You must provide a template to this method.
`,68:`You passed an unsupported selector state to this method.
`,69:`Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
`,70:`Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
`,71:`Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
`,72:`Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
`,73:`Please provide a valid CSS variable.
`,74:`CSS variable not found and no default was provided.
`,75:`important requires a valid style object, got a %s instead.
`,76:`fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
`,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 format(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];var a2=args[0],b2=[],c2;for(c2=1;c2<args.length;c2+=1)b2.push(args[c2]);return b2.forEach(function(d2){a2=a2.replace(/%[a-z]/,d2)}),a2}var PolishedError=function(_Error){_inheritsLoose(PolishedError2,_Error);function PolishedError2(code){for(var _this,_len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];return _this=_Error.call(this,format.apply(void 0,[ERRORS[code]].concat(args)))||this,_assertThisInitialized(_this)}return PolishedError2}(_wrapNativeSuper(Error));function colorToInt(color){return Math.round(color*255)}function convertToInt(red,green,blue){return colorToInt(red)+","+colorToInt(green)+","+colorToInt(blue)}function hslToRgb(hue,saturation,lightness,convert){if(convert===void 0&&(convert=convertToInt),saturation===0)return convert(lightness,lightness,lightness);var huePrime=(hue%360+360)%360/60,chroma=(1-Math.abs(2*lightness-1))*saturation,secondComponent=chroma*(1-Math.abs(huePrime%2-1)),red=0,green=0,blue=0;huePrime>=0&&huePrime<1?(red=chroma,green=secondComponent):huePrime>=1&&huePrime<2?(red=secondComponent,green=chroma):huePrime>=2&&huePrime<3?(green=chroma,blue=secondComponent):huePrime>=3&&huePrime<4?(green=secondComponent,blue=chroma):huePrime>=4&&huePrime<5?(red=secondComponent,blue=chroma):huePrime>=5&&huePrime<6&&(red=chroma,blue=secondComponent);var lightnessModification=lightness-chroma/2,finalRed=red+lightnessModification,finalGreen=green+lightnessModification,finalBlue=blue+lightnessModification;return convert(finalRed,finalGreen,finalBlue)}var namedColorMap={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:"f
position: absolute;
width: 0;
height: 0;
display: inline-block;
shape-rendering: inherit;
vertical-align: middle;
`,GROUP_ID="icon--group",COMPONENT_ID="icon--component",DOCUMENT_ID="icon--document",STORY_ID="icon--story",IconSymbols=()=>import_react10.default.createElement(Svg,{"data-chromatic":"ignore"},import_react10.default.createElement("symbol",{id:GROUP_ID},import_react10.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.586 3.504l-1.5-1.5H1v9h12v-7.5H6.586zm.414-1L5.793 1.297a1 1 0 00-.707-.293H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-8.5a.5.5 0 00-.5-.5H7z",fill:"currentColor"})),import_react10.default.createElement("symbol",{id:COMPONENT_ID},import_react10.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 1.004a2.5 2.5 0 00-2.5 2.5v7a2.5 2.5 0 002.5 2.5h7a2.5 2.5 0 002.5-2.5v-7a2.5 2.5 0 00-2.5-2.5h-7zm8.5 5.5H7.5v-4.5h3a1.5 1.5 0 011.5 1.5v3zm0 1v3a1.5 1.5 0 01-1.5 1.5h-3v-4.5H12zm-5.5 4.5v-4.5H2v3a1.5 1.5 0 001.5 1.5h3zM2 6.504h4.5v-4.5h-3a1.5 1.5 0 00-1.5 1.5v3z",fill:"currentColor"})),import_react10.default.createElement("symbol",{id:DOCUMENT_ID},import_react10.default.createElement("path",{d:"M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z",fill:"currentColor"}),import_react10.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z",fill:"currentColor"})),import_react10.default.createElement("symbol",{id:STORY_ID},import_react10.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 0h7a.5.5 0 01.5.5v13a.5.5 0 01-.454.498.462.462 0 01-.371-.118L7 11.159l-3.175 2.72a.46.46 0 01-.379.118A.5.5 0 013 13.5V.5a.5.5 0 01.5-.5zM4 12.413l2.664-2.284a.454.454 0 01.377-.128.498.498 0 01.284.12L10 12.412V1H4v11.413z",fill:"currentColor"}))),UseSymbol=({type})=>type==="group"?import_react10.default.createElement("use",{xlinkHref:`#${GROUP_ID}`}):type==="component"?import_react10.default.createElement("use",{xlinkHref:`#${COMPONENT_ID}`}):type==="document"?import_react10.default.createElement("use",{xlinkHref:`#${DOCUMENT_ID}`}):type==="story"?import_react10.default.createElement("use",{xlinkHref:`#${STORY_ID}`}):null;var import_react11=__toESM(require_react());var CollapseIconWrapper=newStyled.div(({theme,isExpanded})=>({width:8,height:8,display:"flex",justifyContent:"center",alignItems:"center",color:curriedTransparentize$1(.4,theme.textMutedColor),transform:isExpanded?"rotateZ(90deg)":"none",transition:"transform .1s ease-out"})),CollapseIcon2=({isExpanded})=>import_react11.default.createElement(CollapseIconWrapper,{isExpanded},import_react11.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",fill:"none"},import_react11.default.createElement("path",{fill:"#73828C",fillRule:"evenodd",d:"M1.896 7.146a.5.5 0 1 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 1 0-.708.708L5.043 4 1.896 7.146Z",clipRule:"evenodd"})));var TypeIcon=newStyled.svg(({theme,type})=>({width:14,height:14,flex:"0 0 auto",color:type==="group"?theme.base==="dark"?theme.color.primary:theme.color.ultraviolet:type==="component"?theme.color.secondary:type==="document"?theme.base==="dark"?theme.color.gold:"#ff8300":type==="story"?theme.color.seafoam:"currentColor"})),BranchNode=newStyled.button(({theme,depth=0,isExpandable=!1})=>({width:"100%",border:"none",cursor:"pointer",display:"flex",alignItems:"start",textAlign:"left",paddingLeft:`${(isExpandable?8:22)+depth*18}px`,color:"inherit",fontSize:`${theme.typography.size.s2}px`,background:"transparent",minHeight:28,borderRadius:4,gap:6,paddingTop:5,paddingBottom:4,"&:hover, &:focus":{background:curriedTransparentize$1(.93,theme.color.secondary),outline:"none"}})),LeafNode=newStyled.a(({theme,depth=0})=>({cursor:"pointer",color:"inherit",display:"flex",gap:6,flex:1,alignItems:"start",paddingLeft:`${22+depth*18}px`,paddingTop:5,paddingBottom:4,fontSize:`${theme.typography.size.s2}px`,textDecoration:"none",overflowWrap:"break-word",w
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*resultFpsPercentage,120))}deg 100% 31%);`,opts?.key)}return(_d=opts?.onChange)==null||_d.call(opts,result),result}}function notUndefined(value,msg){if(value===void 0)throw new Error(`Unexpected undefined${msg?`: ${msg}`:""}`);return value}var approxEqual=(a2,b2)=>Math.abs(a2-b2)<1;var defaultKeyExtractor=index=>index,defaultRangeExtractor=range=>{let start=Math.max(range.startIndex-range.overscan,0),end=Math.min(range.endIndex+range.overscan,range.count-1),arr=[];for(let i2=start;i2<=end;i2++)arr.push(i2);return arr},observeElementRect=(instance,cb)=>{let element=instance.scrollElement;if(!element)return;let handler=rect=>{let{width,height}=rect;cb({width:Math.round(width),height:Math.round(height)})};if(handler(element.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};let observer=new ResizeObserver(entries=>{let entry=entries[0];if(entry?.borderBoxSize){let box=entry.borderBoxSize[0];if(box){handler({width:box.inlineSize,height:box.blockSize});return}}handler(element.getBoundingClientRect())});return observer.observe(element,{box:"border-box"}),()=>{observer.unobserve(element)}};var observeElementOffset=(instance,cb)=>{let element=instance.scrollElement;if(!element)return;let handler=()=>{cb(element[instance.options.horizontal?"scrollLeft":"scrollTop"])};return handler(),element.addEventListener("scroll",handler,{passive:!0}),()=>{element.removeEventListener("scroll",handler)}};var measureElement=(element,entry,instance)=>{if(entry?.borderBoxSize){let box=entry.borderBoxSize[0];if(box)return Math.round(box[instance.options.horizontal?"inlineSize":"blockSize"])}return Math.round(element.getBoundingClientRect()[instance.options.horizontal?"width":"height"])};var elementScroll=(offset,{adjustments=0,behavior},instance)=>{var _a,_b;let toOffset=offset+adjustments;(_b=(_a=instance.scrollElement)==null?void 0:_a.scrollTo)==null||_b.call(_a,{[instance.options.horizontal?"left":"top"]:toOffset,behavior})},Virtualizer=class{constructor(opts){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let _ro=null,get2=()=>_ro||(typeof ResizeObserver<"u"?_ro=new ResizeObserver(entries=>{entries.forEach(entry=>{this._measureElement(entry.target,entry)})}):null);return{disconnect:()=>{var _a;return(_a=get2())==null?void 0:_a.disconnect()},observe:target=>{var _a;return(_a=get2())==null?void 0:_a.observe(target,{box:"border-box"})},unobserve:target=>{var _a;return(_a=get2())==null?void 0:_a.unobserve(target)}}})(),this.range=null,this.setOptions=opts2=>{Object.entries(opts2).forEach(([key,value])=>{typeof value>"u"&&delete opts2[key]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...opts2}},this.notify=sync=>{var _a,_b;(_b=(_a=this.options).onChange)==null||_b.call(_a,this,sync)},this.maybeNotify=memo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),isScrolling=>{this.notify(isScrolling)},{key:"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(d2=>d2()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{let scrollElement=this.options.getScrollElement();this.scrollElement!==scrollElement&&(this.cleanup(),this.scrollElement=scrollElement,this._scr
padding: 0;
vertical-align: middle;
& + & {
margin-left: 6px;
}
`),Shortcut=({keys})=>import_react32.default.createElement(import_react32.default.Fragment,null,import_react32.default.createElement(Key,null,keys.map((key,index)=>import_react32.default.createElement(KeyChild,{key},shortcutToHumanString([key]))))),useMenu=(state,api,showToolbar,isFullscreen,isPanelShown,isNavShown,enableShortcuts)=>{let theme=useTheme(),shortcutKeys=api.getShortcutKeys(),about=(0,import_react32.useMemo)(()=>({id:"about",title:"About your Storybook",onClick:()=>api.changeSettingsTab("about"),icon:import_react32.default.createElement(InfoIcon,null)}),[api]),documentation=(0,import_react32.useMemo)(()=>({id:"documentation",title:"Documentation",href:api.getDocsUrl({versioned:!0,renderer:!0}),icon:import_react32.default.createElement(ShareAltIcon,null)}),[api]),whatsNewNotificationsEnabled=state.whatsNewData?.status==="SUCCESS"&&!state.disableWhatsNewNotifications,isWhatsNewUnread=api.isWhatsNewUnread(),whatsNew=(0,import_react32.useMemo)(()=>({id:"whats-new",title:"What's new?",onClick:()=>api.changeSettingsTab("whats-new"),right:whatsNewNotificationsEnabled&&isWhatsNewUnread&&import_react32.default.createElement(Badge,{status:"positive"},"Check it out"),icon:import_react32.default.createElement(WandIcon,null)}),[api,whatsNewNotificationsEnabled,isWhatsNewUnread]),shortcuts=(0,import_react32.useMemo)(()=>({id:"shortcuts",title:"Keyboard shortcuts",onClick:()=>api.changeSettingsTab("shortcuts"),right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.shortcutsPage}):null,style:{borderBottom:`4px solid ${theme.appBorderColor}`}}),[api,enableShortcuts,shortcutKeys.shortcutsPage,theme.appBorderColor]),sidebarToggle=(0,import_react32.useMemo)(()=>({id:"S",title:"Show sidebar",onClick:()=>api.toggleNav(),active:isNavShown,right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.toggleNav}):null,icon:isNavShown?import_react32.default.createElement(CheckIcon,null):null}),[api,enableShortcuts,shortcutKeys,isNavShown]),toolbarToogle=(0,import_react32.useMemo)(()=>({id:"T",title:"Show toolbar",onClick:()=>api.toggleToolbar(),active:showToolbar,right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.toolbar}):null,icon:showToolbar?import_react32.default.createElement(CheckIcon,null):null}),[api,enableShortcuts,shortcutKeys,showToolbar]),addonsToggle=(0,import_react32.useMemo)(()=>({id:"A",title:"Show addons",onClick:()=>api.togglePanel(),active:isPanelShown,right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.togglePanel}):null,icon:isPanelShown?import_react32.default.createElement(CheckIcon,null):null}),[api,enableShortcuts,shortcutKeys,isPanelShown]),addonsOrientationToggle=(0,import_react32.useMemo)(()=>({id:"D",title:"Change addons orientation",onClick:()=>api.togglePanelPosition(),right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.panelPosition}):null}),[api,enableShortcuts,shortcutKeys]),fullscreenToggle=(0,import_react32.useMemo)(()=>({id:"F",title:"Go full screen",onClick:()=>api.toggleFullscreen(),active:isFullscreen,right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.fullScreen}):null,icon:isFullscreen?import_react32.default.createElement(CheckIcon,null):null}),[api,enableShortcuts,shortcutKeys,isFullscreen]),searchToggle=(0,import_react32.useMemo)(()=>({id:"/",title:"Search",onClick:()=>api.focusOnUIElement(focusableUIElements.storySearchField),right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.search}):null}),[api,enableShortcuts,shortcutKeys]),up=(0,import_react32.useMemo)(()=>({id:"up",title:"Previous component",onClick:()=>api.jumpToComponent(-1),right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcutKeys.prevComponent}):null}),[api,enableShortcuts,shortcutKeys]),down=(0,import_react32.useMemo)(()=>({id:"down",title:"Next component",onClick:()=>api.jumpToComponent(1),right:enableShortcuts?import_react32.default.createElement(Shortcut,{keys:shortcut
"sidebar content content"`:panelPosition==="right"?`"sidebar content panel"
"sidebar content panel"`:`"sidebar content content"
"sidebar panel panel"`}})),SidebarContainer2=newStyled.div(({theme})=>({backgroundColor:theme.background.app,gridArea:"sidebar",position:"relative",borderRight:`1px solid ${theme.color.border}`})),ContentContainer=newStyled.div(({theme,shown})=>({flex:1,position:"relative",backgroundColor:theme.background.content,display:shown?"grid":"none",overflow:"auto",[MEDIA_DESKTOP_BREAKPOINT]:{flex:"auto",gridArea:"content"}})),PagesContainer=newStyled.div(({theme})=>({gridRowStart:"sidebar-start",gridRowEnd:"-1",gridColumnStart:"sidebar-end",gridColumnEnd:"-1",backgroundColor:theme.background.content,zIndex:1})),PanelContainer=newStyled.div(({theme,position})=>({gridArea:"panel",position:"relative",backgroundColor:theme.background.content,borderTop:position==="bottom"?`1px solid ${theme.color.border}`:null,borderLeft:position==="right"?`1px solid ${theme.color.border}`:null})),Drag=newStyled.div(({theme})=>({position:"absolute",opacity:0,transition:"opacity 0.2s ease-in-out",zIndex:100,"&:after":{content:'""',display:"block",backgroundColor:theme.color.secondary},"&:hover":{opacity:1}}),({orientation="vertical",position="left"})=>orientation==="vertical"?{width:position==="left"?10:13,height:"100%",top:0,right:position==="left"?"-7px":null,left:position==="right"?"-7px":null,"&:after":{width:1,height:"100%",marginLeft:position==="left"?3:6},"&:hover":{cursor:"col-resize"}}:{width:"100%",height:"13px",top:"-7px",left:0,"&:after":{width:"100%",height:1,marginTop:6},"&:hover":{cursor:"row-resize"}});var App=({managerLayoutState,setManagerLayoutState,pages,hasTab})=>{let{setMobileAboutOpen}=useLayout();return import_react60.default.createElement(import_react60.default.Fragment,null,import_react60.default.createElement(Global,{styles:createGlobal}),import_react60.default.createElement(Layout,{hasTab,managerLayoutState,setManagerLayoutState,slotMain:import_react60.default.createElement(Preview_default,{id:"main",withLoader:!0}),slotSidebar:import_react60.default.createElement(Sidebar_default,{onMenuClick:()=>setMobileAboutOpen(state=>!state)}),slotPanel:import_react60.default.createElement(Panel_default,null),slotPages:pages.map(({id,render:Content2})=>import_react60.default.createElement(Content2,{key:id}))}))};var Provider=class{getElements(_type){throw new Error("Provider.getElements() is not implemented!")}handleAPI(_api){throw new Error("Provider.handleAPI() is not implemented!")}getConfig(){return console.error("Provider.getConfig() is not implemented!"),{}}};var import_react68=__toESM(require_react());var import_react62=__toESM(require_react());var import_react61=__toESM(require_react());var Container8=newStyled.div({display:"flex",alignItems:"center",flexDirection:"column",marginTop:40}),Header=newStyled.header({marginBottom:32,alignItems:"center",display:"flex","> svg":{height:48,width:"auto",marginRight:8}}),Footer=newStyled.div(({theme})=>({marginBottom:24,display:"flex",flexDirection:"column",alignItems:"center",color:theme.base==="light"?theme.color.dark:theme.color.lightest,fontWeight:theme.typography.weight.regular,fontSize:theme.typography.size.s2})),Actions2=newStyled.div({display:"flex",flexDirection:"row",alignItems:"center",marginBottom:24,marginTop:24,gap:16}),StyledLink=newStyled(Link22)(({theme})=>({"&&":{fontWeight:theme.typography.weight.bold,color:theme.base==="light"?theme.color.dark:theme.color.light},"&:hover":{color:theme.base==="light"?theme.color.darkest:theme.color.lightest}})),AboutScreen=({onNavigateToWhatsNew})=>import_react61.default.createElement(Container8,null,import_react61.default.createElement(Header,null,import_react61.default.createElement(StorybookLogo,{alt:"Storybook"})),import_react61.default.createElement(UpgradeBlock,{onNavigateToWhatsNew}),import_react61.default.createElement(Footer,null,import_react61.default.createElement(Actions2,null,import_react61.default.createElement(Button,{asChild:!0},import_react61.default.createElement("a",{href:"https://github.com/storybookjs/storybook"},import_react61.default.createElement(GithubIcon,null),"GitHub")),import_react61.defau
0%,100% { opacity: 0; }
50% { opacity: 1; }
`,SuccessIcon=newStyled(CheckIcon)(({valid,theme})=>valid==="valid"?{color:theme.color.positive,animation:`${Fade} 2s ease forwards`}:{opacity:0},{alignSelf:"center",display:"flex",marginLeft:10,height:14,width:14}),Container9=newStyled.div(({theme})=>({fontSize:theme.typography.size.s2,padding:"3rem 20px",maxWidth:600,margin:"0 auto"})),shortcutLabels={fullScreen:"Go full screen",togglePanel:"Toggle addons",panelPosition:"Toggle addons orientation",toggleNav:"Toggle sidebar",toolbar:"Toggle canvas toolbar",search:"Focus search",focusNav:"Focus sidebar",focusIframe:"Focus canvas",focusPanel:"Focus addons",prevComponent:"Previous component",nextComponent:"Next component",prevStory:"Previous story",nextStory:"Next story",shortcutsPage:"Go to shortcuts page",aboutPage:"Go to about page",collapseAll:"Collapse all items on sidebar",expandAll:"Expand all items on sidebar",remount:"Remount component"},fixedShortcuts=["escape"];function toShortcutState(shortcutKeys){return Object.entries(shortcutKeys).reduce((acc,[feature,shortcut])=>fixedShortcuts.includes(feature)?acc:{...acc,[feature]:{shortcut,error:!1}},{})}var ShortcutsScreen=class extends import_react64.Component{constructor(props){super(props);this.onKeyDown=e3=>{let{activeFeature,shortcutKeys}=this.state;if(e3.key==="Backspace")return this.restoreDefault();let shortcut=eventToShortcut(e3);if(!shortcut)return!1;let error=!!Object.entries(shortcutKeys).find(([feature,{shortcut:existingShortcut}])=>feature!==activeFeature&&existingShortcut&&shortcutMatchesShortcut(shortcut,existingShortcut));return this.setState({shortcutKeys:{...shortcutKeys,[activeFeature]:{shortcut,error}}})};this.onFocus=focusedInput=>()=>{let{shortcutKeys}=this.state;this.setState({activeFeature:focusedInput,shortcutKeys:{...shortcutKeys,[focusedInput]:{shortcut:null,error:!1}}})};this.onBlur=async()=>{let{shortcutKeys,activeFeature}=this.state;if(shortcutKeys[activeFeature]){let{shortcut,error}=shortcutKeys[activeFeature];return!shortcut||error?this.restoreDefault():this.saveShortcut()}return!1};this.saveShortcut=async()=>{let{activeFeature,shortcutKeys}=this.state,{setShortcut}=this.props;await setShortcut(activeFeature,shortcutKeys[activeFeature].shortcut),this.setState({successField:activeFeature})};this.restoreDefaults=async()=>{let{restoreAllDefaultShortcuts}=this.props,defaultShortcuts=await restoreAllDefaultShortcuts();return this.setState({shortcutKeys:toShortcutState(defaultShortcuts)})};this.restoreDefault=async()=>{let{activeFeature,shortcutKeys}=this.state,{restoreDefaultShortcut}=this.props,defaultShortcut=await restoreDefaultShortcut(activeFeature);return this.setState({shortcutKeys:{...shortcutKeys,...toShortcutState({[activeFeature]:defaultShortcut})}})};this.displaySuccessMessage=activeElement=>{let{successField,shortcutKeys}=this.state;return activeElement===successField&&shortcutKeys[activeElement].error===!1?"valid":void 0};this.displayError=activeElement=>{let{activeFeature,shortcutKeys}=this.state;return activeElement===activeFeature&&shortcutKeys[activeElement].error===!0?"error":void 0};this.renderKeyInput=()=>{let{shortcutKeys,addonsShortcutLabels}=this.state;return Object.entries(shortcutKeys).map(([feature,{shortcut}])=>import_react64.default.createElement(Row,{key:feature},import_react64.default.createElement(Description,null,shortcutLabels[feature]||addonsShortcutLabels[feature]),import_react64.default.createElement(TextInput,{spellCheck:"false",valid:this.displayError(feature),className:"modalInput",onBlur:this.onBlur,onFocus:this.onFocus(feature),onKeyDown:this.onKeyDown,value:shortcut?shortcutToHumanString(shortcut):"",placeholder:"Type keys",readOnly:!0}),import_react64.default.createElement(SuccessIcon,{valid:this.displaySuccessMessage(feature)})))};this.renderKeyForm=()=>import_react64.default.createElement(GridWrapper,null,import_react64.default.createElement(GridHeaderRow,null,import_react64.default.createElement(HeaderItem,null,"Commands"),import_react64.default.createElement(HeaderItem,null,"Shortcut")),this.renderKeyInput());this.state={activeFeature:void 0,su