@storybook/addon-interactions 8.1.0-alpha.8 → 8.1.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/preset.js +3 -3
  2. package/package.json +11 -11
package/dist/preset.js CHANGED
@@ -505,7 +505,7 @@ ${rootStack}`,err}}}}});var require_lib19=__commonJS({"../../node_modules/@babel
505
505
 
506
506
  return FUNCTION_ID;
507
507
  })(FUNCTION)
508
- `),visitor={"ReferencedIdentifier|BindingIdentifier"(path15,state){path15.node.name!==state.name||path15.scope.getBindingIdentifier(state.name)!==state.outerDeclar||(state.selfReference=!0,path15.stop());}};function getNameFromLiteralId(id2){return isNullLiteral(id2)?"null":isRegExpLiteral(id2)?`_${id2.pattern}_${id2.flags}`:isTemplateLiteral(id2)?id2.quasis.map(quasi=>quasi.value.raw).join(""):id2.value!==void 0?id2.value+"":""}function wrap(state,method,id2,scope){if(state.selfReference)if(scope.hasBinding(id2.name)&&!scope.hasGlobal(id2.name))scope.rename(id2.name);else {if(!isFunction(method))return;let build=buildPropertyMethodAssignmentWrapper;method.generator&&(build=buildGeneratorPropertyMethodAssignmentWrapper);let template=build({FUNCTION:method,FUNCTION_ID:id2,FUNCTION_KEY:scope.generateUidIdentifier(id2.name)}).expression,params=template.callee.body.body[0].params;for(let i3=0,len=getFunctionArity(method);i3<len;i3++)params.push(scope.generateUidIdentifier("x"));return template}method.id=id2,scope.getProgramParent().references[id2.name]=!0;}function visit(node,name,scope){let state={selfAssignment:!1,selfReference:!1,outerDeclar:scope.getBindingIdentifier(name),name},binding=scope.getOwnBinding(name);return binding?binding.kind==="param"&&(state.selfReference=!0):(state.outerDeclar||scope.hasGlobal(name))&&scope.traverse(node,visitor,state),state}function _default2({node,parent,scope,id:id2},localBinding=!1,supportUnicodeId=!1){if(node.id)return;if((isObjectProperty(parent)||isObjectMethod(parent,{kind:"method"}))&&(!parent.computed||isLiteral(parent.key)))id2=parent.key;else if(isVariableDeclarator(parent)){if(id2=parent.id,isIdentifier(id2)&&!localBinding){let binding=scope.parent.getBinding(id2.name);if(binding&&binding.constant&&scope.getBinding(id2.name)===binding){node.id=cloneNode(id2),node.id[NOT_LOCAL_BINDING]=!0;return}}}else if(isAssignmentExpression(parent,{operator:"="}))id2=parent.left;else if(!id2)return;let name;if(id2&&isLiteral(id2)?name=getNameFromLiteralId(id2):id2&&isIdentifier(id2)&&(name=id2.name),name===void 0||!supportUnicodeId&&isFunction(node)&&/[\uD800-\uDFFF]/.test(name))return;name=toBindingIdentifierName(name);let newId=identifier(name);newId[NOT_LOCAL_BINDING]=!0;let state=visit(node,name,scope);return wrap(state,node,newId,scope)||node}}});var require_conversion=__commonJS({"../../node_modules/@babel/traverse/lib/path/conversion.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.arrowFunctionToExpression=arrowFunctionToExpression;exports.ensureBlock=ensureBlock;exports.toComputedKey=toComputedKey;exports.unwrapFunctionEnvironment=unwrapFunctionEnvironment;var _t14=require_lib11(),_helperEnvironmentVisitor=require_lib14(),_helperFunctionName=require_lib20(),_visitors=require_visitors(),{arrowFunctionExpression,assignmentExpression,binaryExpression,blockStatement,callExpression,conditionalExpression,expressionStatement,identifier,isIdentifier,jsxIdentifier,logicalExpression,LOGICAL_OPERATORS,memberExpression,metaProperty,numericLiteral,objectExpression,restElement,returnStatement,sequenceExpression,spreadElement,stringLiteral,super:_super,thisExpression,toExpression,unaryExpression}=_t14;function toComputedKey(){let key2;if(this.isMemberExpression())key2=this.node.property;else if(this.isProperty()||this.isMethod())key2=this.node.key;else throw new ReferenceError("todo");return this.node.computed||isIdentifier(key2)&&(key2=stringLiteral(key2.name)),key2}function ensureBlock(){let body=this.get("body"),bodyNode=body.node;if(Array.isArray(body))throw new Error("Can't convert array path to a block statement");if(!bodyNode)throw new Error("Can't convert node without a body");if(body.isBlockStatement())return bodyNode;let statements=[],stringPath="body",key2,listKey;body.isStatement()?(listKey="body",key2=0,statements.push(body.node)):(stringPath+=".body.0",this.isFunction()?(key2="argument",statements.push(returnStatement(body.node))):(key2="expression",statements.push(expressionStatement(body.node)))),this.node.body=blockStatement(statements);let parentPath=this.get(stringPath);return body.setup(parentPath,listKey?parentPath.node[listKey]:parentPath.node,listKey,key2),this.node}exports.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression();};function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");hoistFunctionEnvironment(this);}function setType(path15,type2){path15.node.type=type2;}function arrowFunctionToExpression({allowInsertArrow=!0,allowInsertArrowWithRest=allowInsertArrow,noNewArrows=!(_arguments$=>(_arguments$=arguments[0])==null?void 0:_arguments$.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let{thisBinding,fnPath:fn11}=hoistFunctionEnvironment(this,noNewArrows,allowInsertArrow,allowInsertArrowWithRest);if(fn11.ensureBlock(),setType(fn11,"FunctionExpression"),!noNewArrows){let checkBinding=thisBinding?null:fn11.scope.generateUidIdentifier("arrowCheckId");return checkBinding&&fn11.parentPath.scope.push({id:checkBinding,init:objectExpression([])}),fn11.get("body").unshiftContainer("body",expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"),[thisExpression(),identifier(checkBinding?checkBinding.name:thisBinding)]))),fn11.replaceWith(callExpression(memberExpression((0, _helperFunctionName.default)(this,!0)||fn11.node,identifier("bind")),[checkBinding?identifier(checkBinding.name):thisExpression()])),fn11.get("callee.object")}return fn11}var getSuperCallsVisitor=(0, _visitors.merge)([{CallExpression(child,{allSuperCalls}){child.get("callee").isSuper()&&allSuperCalls.push(child);}},_helperEnvironmentVisitor.default]);function hoistFunctionEnvironment(fnPath,noNewArrows=!0,allowInsertArrow=!0,allowInsertArrowWithRest=!0){let arrowParent,thisEnvFn=fnPath.findParent(p7=>{if(p7.isArrowFunctionExpression()){return (arrowParent)!=null||(arrowParent=p7),!1}return p7.isFunction()||p7.isProgram()||p7.isClassProperty({static:!1})||p7.isClassPrivateProperty({static:!1})}),inConstructor=thisEnvFn.isClassMethod({kind:"constructor"});if(thisEnvFn.isClassProperty()||thisEnvFn.isClassPrivateProperty())if(arrowParent)thisEnvFn=arrowParent;else if(allowInsertArrow)fnPath.replaceWith(callExpression(arrowFunctionExpression([],toExpression(fnPath.node)),[])),thisEnvFn=fnPath.get("callee"),fnPath=thisEnvFn.get("body");else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}=getScopeInformation(fnPath);if(inConstructor&&superCalls.length>0){if(!allowInsertArrow)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!allowInsertArrowWithRest)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let allSuperCalls=[];thisEnvFn.traverse(getSuperCallsVisitor,{allSuperCalls});let superBinding=getSuperBinding(thisEnvFn);allSuperCalls.forEach(superCall=>{let callee=identifier(superBinding);callee.loc=superCall.node.callee.loc,superCall.get("callee").replaceWith(callee);});}if(argumentsPaths.length>0){let argumentsBinding=getBinding(thisEnvFn,"arguments",()=>{let args=()=>identifier("arguments");return thisEnvFn.scope.path.isProgram()?conditionalExpression(binaryExpression("===",unaryExpression("typeof",args()),stringLiteral("undefined")),thisEnvFn.scope.buildUndefinedNode(),args()):args()});argumentsPaths.forEach(argumentsChild=>{let argsRef=identifier(argumentsBinding);argsRef.loc=argumentsChild.node.loc,argumentsChild.replaceWith(argsRef);});}if(newTargetPaths.length>0){let newTargetBinding=getBinding(thisEnvFn,"newtarget",()=>metaProperty(identifier("new"),identifier("target")));newTargetPaths.forEach(targetChild=>{let targetRef=identifier(newTargetBinding);targetRef.loc=targetChild.node.loc,targetChild.replaceWith(targetRef);});}if(superProps.length>0){if(!allowInsertArrow)throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");superProps.reduce((acc,superProp)=>acc.concat(standardizeSuperProperty(superProp)),[]).forEach(superProp=>{let key2=superProp.node.computed?"":superProp.get("property").node.name,superParentPath=superProp.parentPath,isAssignment=superParentPath.isAssignmentExpression({left:superProp.node}),isCall=superParentPath.isCallExpression({callee:superProp.node}),isTaggedTemplate=superParentPath.isTaggedTemplateExpression({tag:superProp.node}),superBinding=getSuperPropBinding(thisEnvFn,isAssignment,key2),args=[];if(superProp.node.computed&&args.push(superProp.get("property").node),isAssignment){let value=superParentPath.node.right;args.push(value);}let call=callExpression(identifier(superBinding),args);isCall?(superParentPath.unshiftContainer("arguments",thisExpression()),superProp.replaceWith(memberExpression(call,identifier("call"))),thisPaths.push(superParentPath.get("arguments.0"))):isAssignment?superParentPath.replaceWith(call):isTaggedTemplate?(superProp.replaceWith(callExpression(memberExpression(call,identifier("bind"),!1),[thisExpression()])),thisPaths.push(superProp.get("arguments.0"))):superProp.replaceWith(call);});}let thisBinding;return (thisPaths.length>0||!noNewArrows)&&(thisBinding=getThisBinding(thisEnvFn,inConstructor),(noNewArrows||inConstructor&&hasSuperClass(thisEnvFn))&&(thisPaths.forEach(thisChild=>{let thisRef=thisChild.isJSX()?jsxIdentifier(thisBinding):identifier(thisBinding);thisRef.loc=thisChild.node.loc,thisChild.replaceWith(thisRef);}),noNewArrows||(thisBinding=null))),{thisBinding,fnPath}}function isLogicalOp(op3){return LOGICAL_OPERATORS.includes(op3)}function standardizeSuperProperty(superProp){if(superProp.parentPath.isAssignmentExpression()&&superProp.parentPath.node.operator!=="="){let assignmentPath=superProp.parentPath,op3=assignmentPath.node.operator.slice(0,-1),value=assignmentPath.node.right,isLogicalAssignment=isLogicalOp(op3);if(superProp.node.computed){let tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,assignmentExpression("=",tmp,property),!0)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(tmp.name),!0),value));}else {let object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,property)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(property.name)),value));}return isLogicalAssignment?assignmentPath.replaceWith(logicalExpression(op3,assignmentPath.node.left,assignmentPath.node.right)):assignmentPath.node.operator="=",[assignmentPath.get("left"),assignmentPath.get("right").get("left")]}else if(superProp.parentPath.isUpdateExpression()){let updateExpr=superProp.parentPath,tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),computedKey=superProp.node.computed?superProp.scope.generateDeclaredUidIdentifier("prop"):null,parts=[assignmentExpression("=",tmp,memberExpression(superProp.node.object,computedKey?assignmentExpression("=",computedKey,superProp.node.property):superProp.node.property,superProp.node.computed)),assignmentExpression("=",memberExpression(superProp.node.object,computedKey?identifier(computedKey.name):superProp.node.property,superProp.node.computed),binaryExpression(superProp.parentPath.node.operator[0],identifier(tmp.name),numericLiteral(1)))];superProp.parentPath.node.prefix||parts.push(identifier(tmp.name)),updateExpr.replaceWith(sequenceExpression(parts));let left=updateExpr.get("expressions.0.right"),right=updateExpr.get("expressions.1.left");return [left,right]}return [superProp];function rightExpression(op3,left,right){return op3==="="?assignmentExpression("=",left,right):binaryExpression(op3,left,right)}}function hasSuperClass(thisEnvFn){return thisEnvFn.isClassMethod()&&!!thisEnvFn.parentPath.parentPath.node.superClass}var assignSuperThisVisitor=(0, _visitors.merge)([{CallExpression(child,{supers,thisBinding}){child.get("callee").isSuper()&&(supers.has(child.node)||(supers.add(child.node),child.replaceWithMultiple([child.node,assignmentExpression("=",identifier(thisBinding),identifier("this"))])));}},_helperEnvironmentVisitor.default]);function getThisBinding(thisEnvFn,inConstructor){return getBinding(thisEnvFn,"this",thisBinding=>{if(!inConstructor||!hasSuperClass(thisEnvFn))return thisExpression();thisEnvFn.traverse(assignSuperThisVisitor,{supers:new WeakSet,thisBinding});})}function getSuperBinding(thisEnvFn){return getBinding(thisEnvFn,"supercall",()=>{let argsBinding=thisEnvFn.scope.generateUidIdentifier("args");return arrowFunctionExpression([restElement(argsBinding)],callExpression(_super(),[spreadElement(identifier(argsBinding.name))]))})}function getSuperPropBinding(thisEnvFn,isAssignment,propName){return getBinding(thisEnvFn,`superprop_${isAssignment?"set":"get"}:${propName||""}`,()=>{let argsList=[],fnBody;if(propName)fnBody=memberExpression(_super(),identifier(propName));else {let method=thisEnvFn.scope.generateUidIdentifier("prop");argsList.unshift(method),fnBody=memberExpression(_super(),identifier(method.name),!0);}if(isAssignment){let valueIdent=thisEnvFn.scope.generateUidIdentifier("value");argsList.push(valueIdent),fnBody=assignmentExpression("=",fnBody,identifier(valueIdent.name));}return arrowFunctionExpression(argsList,fnBody)})}function getBinding(thisEnvFn,key2,init){let cacheKey="binding:"+key2,data=thisEnvFn.getData(cacheKey);if(!data){let id2=thisEnvFn.scope.generateUidIdentifier(key2);data=id2.name,thisEnvFn.setData(cacheKey,data),thisEnvFn.scope.push({id:id2,init:init(data)});}return data}var getScopeInformationVisitor=(0, _visitors.merge)([{ThisExpression(child,{thisPaths}){thisPaths.push(child);},JSXIdentifier(child,{thisPaths}){child.node.name==="this"&&(!child.parentPath.isJSXMemberExpression({object:child.node})&&!child.parentPath.isJSXOpeningElement({name:child.node})||thisPaths.push(child));},CallExpression(child,{superCalls}){child.get("callee").isSuper()&&superCalls.push(child);},MemberExpression(child,{superProps}){child.get("object").isSuper()&&superProps.push(child);},Identifier(child,{argumentsPaths}){if(!child.isReferencedIdentifier({name:"arguments"}))return;let curr=child.scope;do{if(curr.hasOwnBinding("arguments")){curr.rename("arguments");return}if(curr.path.isFunction()&&!curr.path.isArrowFunctionExpression())break}while(curr=curr.parent);argumentsPaths.push(child);},MetaProperty(child,{newTargetPaths}){child.get("meta").isIdentifier({name:"new"})&&child.get("property").isIdentifier({name:"target"})&&newTargetPaths.push(child);}},_helperEnvironmentVisitor.default]);function getScopeInformation(fnPath){let thisPaths=[],argumentsPaths=[],newTargetPaths=[],superProps=[],superCalls=[];return fnPath.traverse(getScopeInformationVisitor,{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}),{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}}}});var require_introspection=__commonJS({"../../node_modules/@babel/traverse/lib/path/introspection.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports._resolve=_resolve;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;exports.equals=equals;exports.getSource=getSource;exports.has=has;exports.is=void 0;exports.isCompletionRecord=isCompletionRecord;exports.isConstantExpression=isConstantExpression;exports.isInStrictMode=isInStrictMode;exports.isNodeType=isNodeType;exports.isStatementOrBlock=isStatementOrBlock;exports.isStatic=isStatic;exports.isnt=isnt;exports.matchesPattern=matchesPattern;exports.referencesImport=referencesImport;exports.resolve=resolve4;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;var _t14=require_lib11(),{STATEMENT_OR_BLOCK_KEYS,VISITOR_KEYS,isBlockStatement,isExpression,isIdentifier,isLiteral,isStringLiteral,isType,matchesPattern:_matchesPattern}=_t14;function matchesPattern(pattern,allowPartial){return _matchesPattern(this.node,pattern,allowPartial)}function has(key2){let val=this.node&&this.node[key2];return val&&Array.isArray(val)?!!val.length:!!val}function isStatic(){return this.scope.isStatic(this.node)}exports.is=has;function isnt(key2){return !this.has(key2)}function equals(key2,value){return this.node[key2]===value}function isNodeType(type2){return isType(this.type,type2)}function canHaveVariableDeclarationOrExpression(){return (this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(replacement){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?isBlockStatement(replacement):this.isBlockStatement()?isExpression(replacement):!1}function isCompletionRecord(allowInsideFunction){let path15=this,first=!0;do{let{type:type2,container}=path15;if(!first&&(path15.isFunction()||type2==="StaticBlock"))return !!allowInsideFunction;if(first=!1,Array.isArray(container)&&path15.key!==container.length-1)return !1}while((path15=path15.parentPath)&&!path15.isProgram()&&!path15.isDoExpression());return !0}function isStatementOrBlock(){return this.parentPath.isLabeledStatement()||isBlockStatement(this.container)?!1:STATEMENT_OR_BLOCK_KEYS.includes(this.key)}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===importName||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?isStringLiteral(this.node.property,{value:importName}):this.node.property.name===importName)){let object=this.get("object");return object.isReferencedIdentifier()&&object.referencesImport(moduleSource,"*")}return !1}let binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return !1;let path15=binding.path,parent=path15.parentPath;if(!parent.isImportDeclaration())return !1;if(parent.node.source.value===moduleSource){if(!importName)return !0}else return !1;return !!(path15.isImportDefaultSpecifier()&&importName==="default"||path15.isImportNamespaceSpecifier()&&importName==="*"||path15.isImportSpecifier()&&isIdentifier(path15.node.imported,{name:importName}))}function getSource(){let node=this.node;if(node.end){let code=this.hub.getCode();if(code)return code.slice(node.start,node.end)}return ""}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function getOuterFunction(path15){return path15.isProgram()?path15:(path15.parentPath.scope.getFunctionParent()||path15.parentPath.scope.getProgramParent()).path}function isExecutionUncertain(type2,key2){switch(type2){case"LogicalExpression":return key2==="right";case"ConditionalExpression":case"IfStatement":return key2==="consequent"||key2==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return key2==="body";case"ForStatement":return key2==="body"||key2==="update";case"SwitchStatement":return key2==="cases";case"TryStatement":return key2==="handler";case"AssignmentPattern":return key2==="right";case"OptionalMemberExpression":return key2==="property";case"OptionalCallExpression":return key2==="arguments";default:return !1}}function isExecutionUncertainInList(paths,maxIndex){for(let i3=0;i3<maxIndex;i3++){let path15=paths[i3];if(isExecutionUncertain(path15.parent.type,path15.parentKey))return !0}return !1}var SYMBOL_CHECKING=Symbol();function _guessExecutionStatusRelativeTo(target){return _guessExecutionStatusRelativeToCached(this,target,new Map)}function _guessExecutionStatusRelativeToCached(base,target,cache3){let funcParent={this:getOuterFunction(base),target:getOuterFunction(target)};if(funcParent.target.node!==funcParent.this.node)return _guessExecutionStatusRelativeToDifferentFunctionsCached(base,funcParent.target,cache3);let paths={target:target.getAncestry(),this:base.getAncestry()};if(paths.target.indexOf(base)>=0)return "after";if(paths.this.indexOf(target)>=0)return "before";let commonPath,commonIndex={target:0,this:0};for(;!commonPath&&commonIndex.this<paths.this.length;){let path15=paths.this[commonIndex.this];commonIndex.target=paths.target.indexOf(path15),commonIndex.target>=0?commonPath=path15:commonIndex.this++;}if(!commonPath)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(isExecutionUncertainInList(paths.this,commonIndex.this-1)||isExecutionUncertainInList(paths.target,commonIndex.target-1))return "unknown";let divergence={this:paths.this[commonIndex.this-1],target:paths.target[commonIndex.target-1]};if(divergence.target.listKey&&divergence.this.listKey&&divergence.target.container===divergence.this.container)return divergence.target.key>divergence.this.key?"before":"after";let keys=VISITOR_KEYS[commonPath.type],keyPosition={this:keys.indexOf(divergence.this.parentKey),target:keys.indexOf(divergence.target.parentKey)};return keyPosition.target>keyPosition.this?"before":"after"}function _guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3){if(target.isFunctionDeclaration()){if(target.parentPath.isExportDeclaration())return "unknown"}else return _guessExecutionStatusRelativeToCached(base,target,cache3)==="before"?"before":"unknown";let binding=target.scope.getBinding(target.node.id.name);if(!binding.references)return "before";let referencePaths=binding.referencePaths,allStatus;for(let path15 of referencePaths){if(!!path15.find(path16=>path16.node===target.node))continue;if(path15.key!=="callee"||!path15.parentPath.isCallExpression())return "unknown";let status=_guessExecutionStatusRelativeToCached(base,path15,cache3);if(allStatus&&allStatus!==status)return "unknown";allStatus=status;}return allStatus}function _guessExecutionStatusRelativeToDifferentFunctionsCached(base,target,cache3){let nodeMap=cache3.get(base.node),cached;if(!nodeMap)cache3.set(base.node,nodeMap=new Map);else if(cached=nodeMap.get(target.node))return cached===SYMBOL_CHECKING?"unknown":cached;nodeMap.set(target.node,SYMBOL_CHECKING);let result=_guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3);return nodeMap.set(target.node,result),result}function resolve4(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(!(resolved&&resolved.indexOf(this)>=0))if(resolved=resolved||[],resolved.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(dangerous,resolved)}else if(this.isReferencedIdentifier()){let binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant||binding.kind==="module")return;if(binding.path!==this){let ret=binding.path.resolve(dangerous,resolved);return this.find(parent=>parent.node===ret.node)?void 0:ret}}else {if(this.isTypeCastExpression())return this.get("expression").resolve(dangerous,resolved);if(dangerous&&this.isMemberExpression()){let targetKey=this.toComputedKey();if(!isLiteral(targetKey))return;let targetName=targetKey.value,target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){let props=target.get("properties");for(let prop of props){if(!prop.isProperty())continue;let key2=prop.get("key"),match=prop.isnt("computed")&&key2.isIdentifier({name:targetName});if(match=match||key2.isLiteral({value:targetName}),match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){let elem=target.get("elements")[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}}function isConstantExpression(){if(this.isIdentifier()){let binding=this.scope.getBinding(this.node.name);return binding?binding.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(expression=>expression.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator}=this.node;return operator!=="in"&&operator!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function isInStrictMode(){return !!(this.isProgram()?this:this.parentPath).find(path15=>{if(path15.isProgram({sourceType:"module"})||path15.isClass())return !0;if(path15.isArrowFunctionExpression()&&!path15.get("body").isBlockStatement())return !1;let body;if(path15.isFunction())body=path15.node.body;else if(path15.isProgram())body=path15.node;else return !1;for(let directive of body.directives)if(directive.value.value==="use strict")return !0})}}});var require_context=__commonJS({"../../node_modules/@babel/traverse/lib/path/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._call=_call;exports._getQueueContexts=_getQueueContexts;exports._resyncKey=_resyncKey;exports._resyncList=_resyncList;exports._resyncParent=_resyncParent;exports._resyncRemoved=_resyncRemoved;exports.call=call;exports.isBlacklisted=exports.isDenylisted=isDenylisted;exports.popContext=popContext;exports.pushContext=pushContext;exports.requeue=requeue;exports.resync=resync;exports.setContext=setContext;exports.setKey=setKey;exports.setScope=setScope;exports.setup=setup;exports.skip=skip3;exports.skipKey=skipKey;exports.stop=stop;exports.visit=visit;var _traverseNode=require_traverse_node(),_index=require_path4();function call(key2){let opts=this.opts;if(this.debug(key2),this.node&&this._call(opts[key2]))return !0;if(this.node){var _opts$this$node$type;return this._call((_opts$this$node$type=opts[this.node.type])==null?void 0:_opts$this$node$type[key2])}return !1}function _call(fns){if(!fns)return !1;for(let fn11 of fns){if(!fn11)continue;let node=this.node;if(!node)return !0;let ret=fn11.call(this.state,this,this.state);if(ret&&typeof ret=="object"&&typeof ret.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(ret)throw new Error(`Unexpected return value from visitor method ${fn11}`);if(this.node!==node||this._traverseFlags>0)return !0}return !1}function isDenylisted(){var _this$opts$denylist;let denylist=(_this$opts$denylist=this.opts.denylist)!=null?_this$opts$denylist:this.opts.blacklist;return denylist&&denylist.indexOf(this.node.type)>-1}function restoreContext(path15,context){path15.context!==context&&(path15.context=context,path15.state=context.state,path15.opts=context.opts);}function visit(){var _this$opts$shouldSkip,_this$opts;if(!this.node||this.isDenylisted()||(_this$opts$shouldSkip=(_this$opts=this.opts).shouldSkip)!=null&&_this$opts$shouldSkip.call(_this$opts,this))return !1;let currentContext=this.context;return this.shouldSkip||this.call("enter")?(this.debug("Skip..."),this.shouldStop):(restoreContext(this,currentContext),this.debug("Recursing into..."),this.shouldStop=(0, _traverseNode.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),restoreContext(this,currentContext),this.call("exit"),this.shouldStop)}function skip3(){this.shouldSkip=!0;}function skipKey(key2){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[key2]=!0;}function stop(){this._traverseFlags|=_index.SHOULD_SKIP|_index.SHOULD_STOP;}function setScope(){var _this$opts2,_this$scope;if((_this$opts2=this.opts)!=null&&_this$opts2.noScope)return;let path15=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&path15.isMethod()||this.key==="discriminant"&&path15.isSwitchStatement())&&(path15=path15.parentPath);let target;for(;path15&&!target;){var _path$opts;if((_path$opts=path15.opts)!=null&&_path$opts.noScope)return;target=path15.scope,path15=path15.parentPath;}this.scope=this.getScope(target),(_this$scope=this.scope)==null||_this$scope.init();}function setContext(context){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,context&&(this.context=context,this.state=context.state,this.opts=context.opts),this.setScope(),this}function resync(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey());}function _resyncParent(){this.parentPath&&(this.parent=this.parentPath.node);}function _resyncKey(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let i3=0;i3<this.container.length;i3++)if(this.container[i3]===this.node){this.setKey(i3);return}}else for(let key2 of Object.keys(this.container))if(this.container[key2]===this.node){this.setKey(key2);return}this.key=null;}}function _resyncList(){if(!this.parent||!this.inList)return;let newContainer=this.parent[this.listKey];this.container!==newContainer&&(this.container=newContainer||null);}function _resyncRemoved(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&this._markRemoved();}function popContext(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0);}function pushContext(context){this.contexts.push(context),this.setContext(context);}function setup(parentPath,container,listKey,key2){this.listKey=listKey,this.container=container,this.parentPath=parentPath||this.parentPath,this.setKey(key2);}function setKey(key2){var _this$node;this.key=key2,this.node=this.container[this.key],this.type=(_this$node=this.node)==null?void 0:_this$node.type;}function requeue(pathToQueue=this){if(pathToQueue.removed)return;let contexts=this.contexts;for(let context of contexts)context.maybeQueue(pathToQueue);}function _getQueueContexts(){let path15=this,contexts=this.contexts;for(;!contexts.length&&(path15=path15.parentPath,!!path15);)contexts=path15.contexts;return contexts}}});var require_removal_hooks=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.hooks=void 0;exports.hooks=[function(self2,parent){if(self2.key==="test"&&(parent.isWhile()||parent.isSwitchCase())||self2.key==="declaration"&&parent.isExportDeclaration()||self2.key==="body"&&parent.isLabeledStatement()||self2.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===1||self2.key==="expression"&&parent.isExpressionStatement())return parent.remove(),!0},function(self2,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1)return parent.replaceWith(parent.node.expressions[0]),!0},function(self2,parent){if(parent.isBinary())return self2.key==="left"?parent.replaceWith(parent.node.right):parent.replaceWith(parent.node.left),!0},function(self2,parent){if(parent.isIfStatement()&&self2.key==="consequent"||self2.key==="body"&&(parent.isLoop()||parent.isArrowFunctionExpression()))return self2.replaceWith({type:"BlockStatement",body:[]}),!0}];}});var require_removal=__commonJS({"../../node_modules/@babel/traverse/lib/path/removal.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._assertUnremoved=_assertUnremoved;exports._callRemovalHooks=_callRemovalHooks;exports._markRemoved=_markRemoved;exports._remove=_remove;exports._removeFromScope=_removeFromScope;exports.remove=remove;var _removalHooks=require_removal_hooks(),_cache2=require_cache(),_index=require_path4(),_t14=require_lib11(),{getBindingIdentifiers}=_t14;function remove(){var _this$opts;if(this._assertUnremoved(),this.resync(),(_this$opts=this.opts)!=null&&_this$opts.noScope||this._removeFromScope(),this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings(),this._remove(),this._markRemoved();}function _removeFromScope(){let bindings=getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(bindings).forEach(name=>this.scope.removeBinding(name));}function _callRemovalHooks(){if(this.parentPath){for(let fn11 of _removalHooks.hooks)if(fn11(this,this.parentPath))return !0}}function _remove(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null);}function _markRemoved(){this._traverseFlags|=_index.SHOULD_SKIP|_index.REMOVED,this.parent&&(0, _cache2.getCachedPaths)(this.hub,this.parent).delete(this.node),this.node=null;}function _assertUnremoved(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}});var require_hoister=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _t14=require_lib11(),_t22=_t14,{react}=_t14,{cloneNode,jsxExpressionContainer,variableDeclaration,variableDeclarator}=_t22,referenceVisitor={ReferencedIdentifier(path15,state){if(path15.isJSXIdentifier()&&react.isCompatTag(path15.node.name)&&!path15.parentPath.isJSXMemberExpression())return;if(path15.node.name==="this"){let scope=path15.scope;do if(scope.path.isFunction()&&!scope.path.isArrowFunctionExpression())break;while(scope=scope.parent);scope&&state.breakOnScopePaths.push(scope.path);}let binding=path15.scope.getBinding(path15.node.name);if(binding){for(let violation of binding.constantViolations)if(violation.scope!==binding.path.scope){state.mutableBinding=!0,path15.stop();return}binding===state.scope.getBinding(path15.node.name)&&(state.bindings[path15.node.name]=binding);}}},PathHoister=class{constructor(path15,scope){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=scope,this.path=path15,this.attachAfter=!1;}isCompatibleScope(scope){for(let key2 of Object.keys(this.bindings)){let binding=this.bindings[key2];if(!scope.bindingIdentifierEquals(key2,binding.identifier))return !1}return !0}getCompatibleScopes(){let scope=this.path.scope;do{if(this.isCompatibleScope(scope))this.scopes.push(scope);else break;if(this.breakOnScopePaths.indexOf(scope.path)>=0)break}while(scope=scope.parent)}getAttachmentPath(){let path15=this._getAttachmentPath();if(!path15)return;let targetScope=path15.scope;if(targetScope.path===path15&&(targetScope=path15.scope.parent),targetScope.path.isProgram()||targetScope.path.isFunction())for(let name of Object.keys(this.bindings)){if(!targetScope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"||binding.path.parentKey==="params")continue;if(this.getAttachmentParentForPath(binding.path).key>=path15.key){this.attachAfter=!0,path15=binding.path;for(let violationPath of binding.constantViolations)this.getAttachmentParentForPath(violationPath).key>path15.key&&(path15=violationPath);}}return path15}_getAttachmentPath(){let scope=this.scopes.pop();if(scope){if(scope.path.isFunction())if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;let bodies=scope.path.get("body").get("body");for(let i3=0;i3<bodies.length;i3++)if(!bodies[i3].node._blockHoist)return bodies[i3]}else return this.getNextScopeAttachmentParent();else if(scope.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let scope=this.scopes.pop();if(scope)return this.getAttachmentParentForPath(scope.path)}getAttachmentParentForPath(path15){do if(!path15.parentPath||Array.isArray(path15.container)&&path15.isStatement())return path15;while(path15=path15.parentPath)}hasOwnParamBindings(scope){for(let name of Object.keys(this.bindings)){if(!scope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"&&binding.constant)return !0}return !1}run(){if(this.path.traverse(referenceVisitor,this),this.mutableBinding)return;this.getCompatibleScopes();let attachTo=this.getAttachmentPath();if(!attachTo||attachTo.getFunctionParent()===this.path.getFunctionParent())return;let uid=attachTo.scope.generateUidIdentifier("ref"),declarator=variableDeclarator(uid,this.path.node),insertFn=this.attachAfter?"insertAfter":"insertBefore",[attached]=attachTo[insertFn]([attachTo.isVariableDeclarator()?declarator:variableDeclaration("var",[declarator])]),parent=this.path.parentPath;return parent.isJSXElement()&&this.path.container===parent.node.children&&(uid=jsxExpressionContainer(uid)),this.path.replaceWith(cloneNode(uid)),attachTo.isVariableDeclarator()?attached.get("init"):attached.get("declarations.0.init")}};exports.default=PathHoister;}});var require_modification=__commonJS({"../../node_modules/@babel/traverse/lib/path/modification.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._containerInsert=_containerInsert;exports._containerInsertAfter=_containerInsertAfter;exports._containerInsertBefore=_containerInsertBefore;exports._verifyNodeList=_verifyNodeList;exports.hoist=hoist;exports.insertAfter=insertAfter;exports.insertBefore=insertBefore;exports.pushContainer=pushContainer;exports.unshiftContainer=unshiftContainer;exports.updateSiblingKeys=updateSiblingKeys;var _cache2=require_cache(),_hoister=require_hoister(),_index=require_path4(),_t14=require_lib11(),{arrowFunctionExpression,assertExpression,assignmentExpression,blockStatement,callExpression,cloneNode,expressionStatement,isAssignmentExpression,isCallExpression,isExportNamedDeclaration,isExpression,isIdentifier,isSequenceExpression,isSuper,thisExpression}=_t14;function insertBefore(nodes_){this._assertUnremoved();let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertBefore(nodes);if(this.isNodeType("Expression")&&!this.isJSXElement()||parentPath.isForStatement()&&this.key==="init")return this.node&&nodes.push(this.node),this.replaceExpressionWithStatements(nodes);if(Array.isArray(this.container))return this._containerInsertBefore(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.unshiftContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);let paths=[];this.container.splice(from,0,...nodes);for(let i3=0;i3<nodes.length;i3++){var _this$context;let to5=from+i3,path15=this.getSibling(to5);paths.push(path15),(_this$context=this.context)!=null&&_this$context.queue&&path15.pushContext(this.context);}let contexts=this._getQueueContexts();for(let path15 of paths){path15.setScope(),path15.debug("Inserted.");for(let context of contexts)context.maybeQueue(path15,!0);}return paths}function _containerInsertBefore(nodes){return this._containerInsert(this.key,nodes)}function _containerInsertAfter(nodes){return this._containerInsert(this.key+1,nodes)}var last=arr=>arr[arr.length-1];function isHiddenInSequenceExpression(path15){return isSequenceExpression(path15.parent)&&(last(path15.parent.expressions)!==path15.node||isHiddenInSequenceExpression(path15.parentPath))}function isAlmostConstantAssignment(node,scope){if(!isAssignmentExpression(node)||!isIdentifier(node.left))return !1;let blockScope=scope.getBlockParent();return blockScope.hasOwnBinding(node.left.name)&&blockScope.getOwnBinding(node.left.name).constantViolations.length<=1}function insertAfter(nodes_){if(this._assertUnremoved(),this.isSequenceExpression())return last(this.get("expressions")).insertAfter(nodes_);let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertAfter(nodes.map(node=>isExpression(node)?expressionStatement(node):node));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!parentPath.isJSXElement()||parentPath.isForStatement()&&this.key==="init"){if(this.node){let node=this.node,{scope}=this;if(scope.path.isPattern())return assertExpression(node),this.replaceWith(callExpression(arrowFunctionExpression([],node),[])),this.get("callee.body").insertAfter(nodes),[this];if(isHiddenInSequenceExpression(this))nodes.unshift(node);else if(isCallExpression(node)&&isSuper(node.callee))nodes.unshift(node),nodes.push(thisExpression());else if(isAlmostConstantAssignment(node,scope))nodes.unshift(node),nodes.push(cloneNode(node.left));else if(scope.isPure(node,!0))nodes.push(node);else {parentPath.isMethod({computed:!0,key:node})&&(scope=scope.parent);let temp=scope.generateDeclaredUidIdentifier();nodes.unshift(expressionStatement(assignmentExpression("=",cloneNode(temp),node))),nodes.push(expressionStatement(cloneNode(temp)));}}return this.replaceExpressionWithStatements(nodes)}else {if(Array.isArray(this.container))return this._containerInsertAfter(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.pushContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;let paths=(0, _cache2.getCachedPaths)(this.hub,this.parent)||[];for(let[,path15]of paths)typeof path15.key=="number"&&path15.key>=fromIndex&&(path15.key+=incrementBy);}function _verifyNodeList(nodes){if(!nodes)return [];Array.isArray(nodes)||(nodes=[nodes]);for(let i3=0;i3<nodes.length;i3++){let node=nodes[i3],msg;if(node?typeof node!="object"?msg="contains a non-object node":node.type?node instanceof _index.default&&(msg="has a NodePath when it expected a raw object"):msg="without a type":msg="has falsy node",msg){let type2=Array.isArray(node)?"array":typeof node;throw new Error(`Node list ${msg} with the index of ${i3} and type of ${type2}`)}}return nodes}function unshiftContainer(listKey,nodes){return this._assertUnremoved(),nodes=this._verifyNodeList(nodes),_index.default.get({parentPath:this,parent:this.node,container:this.node[listKey],listKey,key:0}).setContext(this.context)._containerInsertBefore(nodes)}function pushContainer(listKey,nodes){this._assertUnremoved();let verifiedNodes=this._verifyNodeList(nodes),container=this.node[listKey];return _index.default.get({parentPath:this,parent:this.node,container,listKey,key:container.length}).setContext(this.context).replaceWithMultiple(verifiedNodes)}function hoist(scope=this.scope){return new _hoister.default(this,scope).run()}}});var require_family=__commonJS({"../../node_modules/@babel/traverse/lib/path/family.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._getKey=_getKey;exports._getPattern=_getPattern;exports.get=get;exports.getAllNextSiblings=getAllNextSiblings;exports.getAllPrevSiblings=getAllPrevSiblings;exports.getBindingIdentifierPaths=getBindingIdentifierPaths;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getCompletionRecords=getCompletionRecords;exports.getNextSibling=getNextSibling;exports.getOpposite=getOpposite;exports.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;exports.getPrevSibling=getPrevSibling;exports.getSibling=getSibling;var _index=require_path4(),_t14=require_lib11(),{getBindingIdentifiers:_getBindingIdentifiers,getOuterBindingIdentifiers:_getOuterBindingIdentifiers,isDeclaration,numericLiteral,unaryExpression}=_t14,NORMAL_COMPLETION=0,BREAK_COMPLETION=1;function NormalCompletion(path15){return {type:NORMAL_COMPLETION,path:path15}}function BreakCompletion(path15){return {type:BREAK_COMPLETION,path:path15}}function getOpposite(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function addCompletionRecords(path15,records,context){return path15&&records.push(..._getCompletionRecords(path15,context)),records}function completionRecordForSwitch(cases,records,context){let lastNormalCompletions=[];for(let i3=0;i3<cases.length;i3++){let casePath=cases[i3],caseCompletions=_getCompletionRecords(casePath,context),normalCompletions=[],breakCompletions=[];for(let c8 of caseCompletions)c8.type===NORMAL_COMPLETION&&normalCompletions.push(c8),c8.type===BREAK_COMPLETION&&breakCompletions.push(c8);normalCompletions.length&&(lastNormalCompletions=normalCompletions),records.push(...breakCompletions);}return records.push(...lastNormalCompletions),records}function normalCompletionToBreak(completions){completions.forEach(c8=>{c8.type=BREAK_COMPLETION;});}function replaceBreakStatementInBreakCompletion(completions,reachable){completions.forEach(c8=>{c8.path.isBreakStatement({label:null})&&(reachable?c8.path.replaceWith(unaryExpression("void",numericLiteral(0))):c8.path.remove());});}function getStatementListCompletion(paths,context){let completions=[];if(context.canHaveBreak){let lastNormalCompletions=[];for(let i3=0;i3<paths.length;i3++){let path15=paths[i3],newContext=Object.assign({},context,{inCaseClause:!1});path15.isBlockStatement()&&(context.inCaseClause||context.shouldPopulateBreak)?newContext.shouldPopulateBreak=!0:newContext.shouldPopulateBreak=!1;let statementCompletions=_getCompletionRecords(path15,newContext);if(statementCompletions.length>0&&statementCompletions.every(c8=>c8.type===BREAK_COMPLETION)){lastNormalCompletions.length>0&&statementCompletions.every(c8=>c8.path.isBreakStatement({label:null}))?(normalCompletionToBreak(lastNormalCompletions),completions.push(...lastNormalCompletions),lastNormalCompletions.some(c8=>c8.path.isDeclaration())&&(completions.push(...statementCompletions),replaceBreakStatementInBreakCompletion(statementCompletions,!0)),replaceBreakStatementInBreakCompletion(statementCompletions,!1)):(completions.push(...statementCompletions),context.shouldPopulateBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!0));break}if(i3===paths.length-1)completions.push(...statementCompletions);else {lastNormalCompletions=[];for(let i4=0;i4<statementCompletions.length;i4++){let c8=statementCompletions[i4];c8.type===BREAK_COMPLETION&&completions.push(c8),c8.type===NORMAL_COMPLETION&&lastNormalCompletions.push(c8);}}}}else if(paths.length)for(let i3=paths.length-1;i3>=0;i3--){let pathCompletions=_getCompletionRecords(paths[i3],context);if(pathCompletions.length>1||pathCompletions.length===1&&!pathCompletions[0].path.isVariableDeclaration()){completions.push(...pathCompletions);break}}return completions}function _getCompletionRecords(path15,context){let records=[];if(path15.isIfStatement())records=addCompletionRecords(path15.get("consequent"),records,context),records=addCompletionRecords(path15.get("alternate"),records,context);else {if(path15.isDoExpression()||path15.isFor()||path15.isWhile()||path15.isLabeledStatement())return addCompletionRecords(path15.get("body"),records,context);if(path15.isProgram()||path15.isBlockStatement())return getStatementListCompletion(path15.get("body"),context);if(path15.isFunction())return _getCompletionRecords(path15.get("body"),context);if(path15.isTryStatement())records=addCompletionRecords(path15.get("block"),records,context),records=addCompletionRecords(path15.get("handler"),records,context);else {if(path15.isCatchClause())return addCompletionRecords(path15.get("body"),records,context);if(path15.isSwitchStatement())return completionRecordForSwitch(path15.get("cases"),records,context);if(path15.isSwitchCase())return getStatementListCompletion(path15.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});path15.isBreakStatement()?records.push(BreakCompletion(path15)):records.push(NormalCompletion(path15));}}return records}function getCompletionRecords(){return _getCompletionRecords(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(r8=>r8.path)}function getSibling(key2){return _index.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key2}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let _key=this.key,sibling=this.getSibling(++_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(++_key);return siblings}function getAllPrevSiblings(){let _key=this.key,sibling=this.getSibling(--_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(--_key);return siblings}function get(key2,context=!0){context===!0&&(context=this.context);let parts=key2.split(".");return parts.length===1?this._getKey(key2,context):this._getPattern(parts,context)}function _getKey(key2,context){let node=this.node,container=node[key2];return Array.isArray(container)?container.map((_8,i3)=>_index.default.get({listKey:key2,parentPath:this,parent:node,container,key:i3}).setContext(context)):_index.default.get({parentPath:this,parent:node,container:node,key:key2}).setContext(context)}function _getPattern(parts,context){let path15=this;for(let part of parts)part==="."?path15=path15.parentPath:Array.isArray(path15)?path15=path15[part]:path15=path15.get(part,context);return path15}function getBindingIdentifiers(duplicates){return _getBindingIdentifiers(this.node,duplicates)}function getOuterBindingIdentifiers(duplicates){return _getOuterBindingIdentifiers(this.node,duplicates)}function getBindingIdentifierPaths(duplicates=!1,outerOnly=!1){let search=[this],ids=Object.create(null);for(;search.length;){let id2=search.shift();if(!id2||!id2.node)continue;let keys=_getBindingIdentifiers.keys[id2.node.type];if(id2.isIdentifier()){duplicates?(ids[id2.node.name]=ids[id2.node.name]||[]).push(id2):ids[id2.node.name]=id2;continue}if(id2.isExportDeclaration()){let declaration=id2.get("declaration");isDeclaration(declaration)&&search.push(declaration);continue}if(outerOnly){if(id2.isFunctionDeclaration()){search.push(id2.get("id"));continue}if(id2.isFunctionExpression())continue}if(keys)for(let i3=0;i3<keys.length;i3++){let key2=keys[i3],child=id2.get(key2);Array.isArray(child)?search.push(...child):child.node&&search.push(child);}}return ids}function getOuterBindingIdentifierPaths(duplicates=!1){return this.getBindingIdentifierPaths(duplicates,!0)}}});var require_comments2=__commonJS({"../../node_modules/@babel/traverse/lib/path/comments.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.addComment=addComment;exports.addComments=addComments;exports.shareCommentsWithSiblings=shareCommentsWithSiblings;var _t14=require_lib11(),{addComment:_addComment,addComments:_addComments}=_t14;function shareCommentsWithSiblings(){if(typeof this.key=="string")return;let node=this.node;if(!node)return;let trailing=node.trailingComments,leading=node.leadingComments;if(!trailing&&!leading)return;let prev=this.getSibling(this.key-1),next=this.getSibling(this.key+1),hasPrev=!!prev.node,hasNext=!!next.node;hasPrev&&(leading&&prev.addComments("trailing",removeIfExisting(leading,prev.node.trailingComments)),trailing&&!hasNext&&prev.addComments("trailing",trailing)),hasNext&&(trailing&&next.addComments("leading",removeIfExisting(trailing,next.node.leadingComments)),leading&&!hasPrev&&next.addComments("leading",leading));}function removeIfExisting(list,toRemove){if(!(toRemove!=null&&toRemove.length))return list;let set2=new Set(toRemove);return list.filter(el8=>!set2.has(el8))}function addComment(type2,content,line5){_addComment(this.node,type2,content,line5);}function addComments(type2,comments){_addComments(this.node,type2,comments);}}});var require_path4=__commonJS({"../../node_modules/@babel/traverse/lib/path/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=exports.SHOULD_STOP=exports.SHOULD_SKIP=exports.REMOVED=void 0;var virtualTypes=require_virtual_types(),_debug=require_src(),_index=require_lib21(),_index2=require_scope2(),_t14=require_lib11(),t25=_t14,cache3=require_cache(),_generator=require_lib12(),NodePath_ancestry=require_ancestry(),NodePath_inference=require_inference(),NodePath_replacement=require_replacement(),NodePath_evaluation=require_evaluation(),NodePath_conversion=require_conversion(),NodePath_introspection=require_introspection(),NodePath_context=require_context(),NodePath_removal=require_removal(),NodePath_modification=require_modification(),NodePath_family=require_family(),NodePath_comments=require_comments2(),NodePath_virtual_types_validator=require_virtual_types_validator(),{validate}=_t14,debug=_debug("babel"),REMOVED=exports.REMOVED=1,SHOULD_STOP=exports.SHOULD_STOP=2,SHOULD_SKIP=exports.SHOULD_SKIP=4,NodePath=class _NodePath{constructor(hub,parent){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=parent,this.hub=hub,this.data=null,this.context=null,this.scope=null;}static get({hub,parentPath,parent,container,listKey,key:key2}){if(!hub&&parentPath&&(hub=parentPath.hub),!parent)throw new Error("To get a node path the parent needs to exist");let targetNode=container[key2],paths=cache3.getOrCreateCachedPaths(hub,parent),path15=paths.get(targetNode);return path15||(path15=new _NodePath(hub,parent),targetNode&&paths.set(targetNode,path15)),path15.setup(parentPath,container,listKey,key2),path15}getScope(scope){return this.isScope()?new _index2.default(this):scope}setData(key2,val){return this.data==null&&(this.data=Object.create(null)),this.data[key2]=val}getData(key2,def){this.data==null&&(this.data=Object.create(null));let val=this.data[key2];return val===void 0&&def!==void 0&&(val=this.data[key2]=def),val}hasNode(){return this.node!=null}buildCodeFrameError(msg,Error2=SyntaxError){return this.hub.buildError(this.node,msg,Error2)}traverse(visitor,state){(0, _index.default)(this.node,visitor,this.scope,state,this);}set(key2,node){validate(this.node,key2,node),this.node[key2]=node;}getPathLocation(){let parts=[],path15=this;do{let key2=path15.key;path15.inList&&(key2=`${path15.listKey}[${key2}]`),parts.unshift(key2);}while(path15=path15.parentPath);return parts.join(".")}debug(message){debug.enabled&&debug(`${this.getPathLocation()} ${this.type}: ${message}`);}toString(){return (0, _generator.default)(this.node).code}get inList(){return !!this.listKey}set inList(inList){inList||(this.listKey=null);}get parentKey(){return this.listKey||this.key}get shouldSkip(){return !!(this._traverseFlags&SHOULD_SKIP)}set shouldSkip(v11){v11?this._traverseFlags|=SHOULD_SKIP:this._traverseFlags&=~SHOULD_SKIP;}get shouldStop(){return !!(this._traverseFlags&SHOULD_STOP)}set shouldStop(v11){v11?this._traverseFlags|=SHOULD_STOP:this._traverseFlags&=~SHOULD_STOP;}get removed(){return !!(this._traverseFlags&REMOVED)}set removed(v11){v11?this._traverseFlags|=REMOVED:this._traverseFlags&=~REMOVED;}};Object.assign(NodePath.prototype,NodePath_ancestry,NodePath_inference,NodePath_replacement,NodePath_evaluation,NodePath_conversion,NodePath_introspection,NodePath_context,NodePath_removal,NodePath_modification,NodePath_family,NodePath_comments);NodePath.prototype._guessExecutionStatusRelativeToDifferentFunctions=NodePath_introspection._guessExecutionStatusRelativeTo;for(let type2 of t25.TYPES){let typeKey=`is${type2}`,fn11=t25[typeKey];NodePath.prototype[typeKey]=function(opts){return fn11(this.node,opts)},NodePath.prototype[`assert${type2}`]=function(opts){if(!fn11(this.node,opts))throw new TypeError(`Expected node path of type ${type2}`)};}Object.assign(NodePath.prototype,NodePath_virtual_types_validator);for(let type2 of Object.keys(virtualTypes))type2[0]!=="_"&&(t25.TYPES.includes(type2)||t25.TYPES.push(type2));exports.default=NodePath;}});var require_context2=__commonJS({"../../node_modules/@babel/traverse/lib/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _index=require_path4(),_t14=require_lib11(),{VISITOR_KEYS}=_t14,TraversalContext=class{constructor(scope,opts,state,parentPath){this.queue=null,this.priorityQueue=null,this.parentPath=parentPath,this.scope=scope,this.state=state,this.opts=opts;}shouldVisit(node){let opts=this.opts;if(opts.enter||opts.exit||opts[node.type])return !0;let keys=VISITOR_KEYS[node.type];if(!(keys!=null&&keys.length))return !1;for(let key2 of keys)if(node[key2])return !0;return !1}create(node,container,key2,listKey){return _index.default.get({parentPath:this.parentPath,parent:node,container,key:key2,listKey})}maybeQueue(path15,notPriority){this.queue&&(notPriority?this.queue.push(path15):this.priorityQueue.push(path15));}visitMultiple(container,parent,listKey){if(container.length===0)return !1;let queue=[];for(let key2=0;key2<container.length;key2++){let node=container[key2];node&&this.shouldVisit(node)&&queue.push(this.create(parent,container,key2,listKey));}return this.visitQueue(queue)}visitSingle(node,key2){return this.shouldVisit(node[key2])?this.visitQueue([this.create(node,node,key2)]):!1}visitQueue(queue){this.queue=queue,this.priorityQueue=[];let visited=new WeakSet,stop=!1,visitIndex=0;for(;visitIndex<queue.length;){let path15=queue[visitIndex];if(visitIndex++,path15.resync(),(path15.contexts.length===0||path15.contexts[path15.contexts.length-1]!==this)&&path15.pushContext(this),path15.key===null)continue;let{node}=path15;if(!visited.has(node)){if(node&&visited.add(node),path15.visit()){stop=!0;break}if(this.priorityQueue.length&&(stop=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=queue,stop))break}}for(let i3=0;i3<visitIndex;i3++)queue[i3].popContext();return this.queue=null,stop}visit(node,key2){let nodes=node[key2];return nodes?Array.isArray(nodes)?this.visitMultiple(nodes,node,key2):this.visitSingle(node,key2):!1}};exports.default=TraversalContext;}});var require_traverse_node=__commonJS({"../../node_modules/@babel/traverse/lib/traverse-node.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.traverseNode=traverseNode;var _context=require_context2(),_t14=require_lib11(),{VISITOR_KEYS}=_t14;function traverseNode(node,opts,scope,state,path15,skipKeys,visitSelf){let keys=VISITOR_KEYS[node.type];if(!keys)return !1;let context=new _context.default(scope,opts,state,path15);if(visitSelf)return skipKeys!=null&&skipKeys[path15.parentKey]?!1:context.visitQueue([path15]);for(let key2 of keys)if(!(skipKeys!=null&&skipKeys[key2])&&context.visit(node,key2))return !0;return !1}}});var require_hub=__commonJS({"../../node_modules/@babel/traverse/lib/hub.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var Hub=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(node,msg,Error2=TypeError){return new Error2(msg)}};exports.default=Hub;}});var require_lib21=__commonJS({"../../node_modules/@babel/traverse/lib/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});Object.defineProperty(exports,"Hub",{enumerable:!0,get:function(){return _hub.default}});Object.defineProperty(exports,"NodePath",{enumerable:!0,get:function(){return _index.default}});Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return _index2.default}});exports.visitors=exports.default=void 0;var visitors=require_visitors();exports.visitors=visitors;var _t14=require_lib11(),cache3=require_cache(),_traverseNode=require_traverse_node(),_index=require_path4(),_index2=require_scope2(),_hub=require_hub(),{VISITOR_KEYS,removeProperties,traverseFast}=_t14;function traverse(parent,opts={},scope,state,parentPath,visitSelf){if(parent){if(!opts.noScope&&!scope&&parent.type!=="Program"&&parent.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);if(!parentPath&&visitSelf)throw new Error("visitSelf can only be used when providing a NodePath.");VISITOR_KEYS[parent.type]&&(visitors.explode(opts),(0, _traverseNode.traverseNode)(parent,opts,scope,state,parentPath,null,visitSelf));}}exports.default=traverse;traverse.visitors=visitors;traverse.verify=visitors.verify;traverse.explode=visitors.explode;traverse.cheap=function(node,enter){traverseFast(node,enter);};traverse.node=function(node,opts,scope,state,path15,skipKeys){(0, _traverseNode.traverseNode)(node,opts,scope,state,path15,skipKeys);};traverse.clearNode=function(node,opts){removeProperties(node,opts);};traverse.removeProperties=function(tree,opts){return traverseFast(tree,traverse.clearNode,opts),tree};function hasDenylistedType(path15,state){path15.node.type===state.type&&(state.has=!0,path15.stop());}traverse.hasType=function(tree,type2,denylistTypes){if(denylistTypes!=null&&denylistTypes.includes(tree.type))return !1;if(tree.type===type2)return !0;let state={has:!1,type:type2};return traverse(tree,{noScope:!0,denylist:denylistTypes,enter:hasDenylistedType},null,state),state.has};traverse.cache=cache3;}});var require_dist2=__commonJS({"../../node_modules/@storybook/csf/dist/index.js"(exports){var B15=Object.create,u=Object.defineProperty,C15=Object.getOwnPropertyDescriptor,F16=Object.getOwnPropertyNames,h7=Object.getPrototypeOf,w13=Object.prototype.hasOwnProperty,E10=(r8,e4)=>()=>(e4||r8((e4={exports:{}}).exports,e4),e4.exports),I15=(r8,e4,n,t25)=>{if(e4&&typeof e4=="object"||typeof e4=="function")for(let a3 of F16(e4))!w13.call(r8,a3)&&a3!==n&&u(r8,a3,{get:()=>e4[a3],enumerable:!(t25=C15(e4,a3))||t25.enumerable});return r8},k14=(r8,e4,n)=>(n=r8!=null?B15(h7(r8)):{},I15(e4||!r8||!r8.__esModule?u(n,"default",{value:r8,enumerable:!0}):n,r8)),x11=E10(T11=>{Object.defineProperty(T11,"__esModule",{value:!0}),T11.isEqual=function(){var r8=Object.prototype.toString,e4=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t25){return Object.keys(t25).concat(Object.getOwnPropertySymbols(t25))}:Object.keys;return function(t25,a3){return function i3(o3,s,d7){var y13,g4,p7,l=r8.call(o3),b15=r8.call(s);if(o3===s)return !0;if(o3==null||s==null)return !1;if(d7.indexOf(o3)>-1&&d7.indexOf(s)>-1)return !0;if(d7.push(o3,s),l!=b15||(y13=n(o3),g4=n(s),y13.length!=g4.length||y13.some(function(A14){return !i3(o3[A14],s[A14],d7)})))return !1;switch(l.slice(8,-1)){case"Symbol":return o3.valueOf()==s.valueOf();case"Date":case"Number":return +o3==+s||+o3!=+o3&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o3==""+s;case"Set":case"Map":y13=o3.entries(),g4=s.entries();do if(!i3((p7=y13.next()).value,g4.next().value,d7))return !1;while(!p7.done);return !0;case"ArrayBuffer":o3=new Uint8Array(o3),s=new Uint8Array(s);case"DataView":o3=new Uint8Array(o3.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o3.length!=s.length)return !1;for(p7=0;p7<o3.length;p7++)if((p7 in o3||p7 in s)&&(p7 in o3!=p7 in s||!i3(o3[p7],s[p7],d7)))return !1;return !0;case"Object":return i3(e4(o3),e4(s),d7);default:return !1}}(t25,a3,[])}}();});function R17(r8){return r8.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e4,n,t25,a3)=>`${n} ${t25}${a3}`).replace(/([a-z])([A-Z])/g,(e4,n,t25)=>`${n} ${t25}`).replace(/([a-z])([0-9])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/([0-9])([a-z])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/(\s|^)(\w)/g,(e4,n,t25)=>`${n}${t25.toUpperCase()}`).replace(/ +/g," ").trim()}var c8=k14(x11()),S11=r8=>r8.map(e4=>typeof e4<"u").filter(Boolean).length,v11=(r8,e4)=>{let{exists:n,eq:t25,neq:a3,truthy:i3}=r8;if(S11([n,t25,a3,i3])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t25,neq:a3})}`);if(typeof t25<"u")return (0, c8.isEqual)(e4,t25);if(typeof a3<"u")return !(0, c8.isEqual)(e4,a3);if(typeof n<"u"){let s=typeof e4<"u";return n?s:!s}return typeof i3>"u"||i3?!!e4:!e4},P16=(r8,e4,n)=>{if(!r8.if)return !0;let{arg:t25,global:a3}=r8.if;if(S11([t25,a3])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t25,global:a3})}`);let i3=t25?e4[t25]:n[a3];return v11(r8.if,i3)},O14=r8=>r8.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m4=(r8,e4)=>{let n=O14(r8);if(n==="")throw new Error(`Invalid ${e4} '${r8}', must include alphanumeric characters`);return n},N16=(r8,e4)=>`${m4(r8,"kind")}${e4?`--${m4(e4,"name")}`:""}`,M11=r8=>R17(r8);function f10(r8,e4){return Array.isArray(e4)?e4.includes(r8):r8.match(e4)}function G21(r8,{includeStories:e4,excludeStories:n}){return r8!=="__esModule"&&(!e4||f10(r8,e4))&&(!n||!f10(r8,n))}var V16=(r8,{rootSeparator:e4,groupSeparator:n})=>{let[t25,a3]=r8.split(e4,2),i3=(a3||r8).split(n).filter(o3=>!!o3);return {root:a3?t25:null,groups:i3}};exports.includeConditionalArg=P16;exports.isExportStory=G21;exports.parseKind=V16;exports.sanitize=O14;exports.storyNameFromExport=M11;exports.toId=N16;}});var require_dist3=__commonJS({"../../lib/csf-tools/dist/index.js"(exports,module){var __create4=Object.create,__defProp6=Object.defineProperty,__getOwnPropDesc4=Object.getOwnPropertyDescriptor,__getOwnPropNames4=Object.getOwnPropertyNames,__getProtoOf4=Object.getPrototypeOf,__hasOwnProp4=Object.prototype.hasOwnProperty,__export6=(target,all)=>{for(var name in all)__defProp6(target,name,{get:all[name],enumerable:!0});},__copyProps4=(to5,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key2 of __getOwnPropNames4(from))!__hasOwnProp4.call(to5,key2)&&key2!==except&&__defProp6(to5,key2,{get:()=>from[key2],enumerable:!(desc=__getOwnPropDesc4(from,key2))||desc.enumerable});return to5},__toESM4=(mod,isNodeMode,target)=>(target=mod!=null?__create4(__getProtoOf4(mod)):{},__copyProps4(isNodeMode||!mod||!mod.__esModule?__defProp6(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS2=mod=>__copyProps4(__defProp6({},"__esModule",{value:!0}),mod),src_exports3={};__export6(src_exports3,{ConfigFile:()=>ConfigFile,CsfFile:()=>CsfFile,NoMetaError:()=>NoMetaError,babelParse:()=>babelParse,babelParseExpression:()=>babelParseExpression,babelPrint:()=>babelPrint,enrichCsf:()=>enrichCsf,enrichCsfMeta:()=>enrichCsfMeta,enrichCsfStory:()=>enrichCsfStory,extractDescription:()=>extractDescription,extractSource:()=>extractSource,formatConfig:()=>formatConfig,formatCsf:()=>formatCsf,getStorySortParameter:()=>getStorySortParameter,loadConfig:()=>loadConfig4,loadCsf:()=>loadCsf,parserOptions:()=>parserOptions,printConfig:()=>printConfig,printCsf:()=>printCsf,readConfig:()=>readConfig,readCsf:()=>readCsf,writeConfig:()=>writeConfig,writeCsf:()=>writeCsf});module.exports=__toCommonJS2(src_exports3);var import_fs_extra=__toESM4(require_lib3()),import_ts_dedent=__require("ts-dedent"),t25=__toESM4(require_lib11()),generate=__toESM4(require_lib12()),recast2=__toESM4(require_main5()),traverse=__toESM4(require_lib21()),import_csf=require_dist2(),babelParser=__toESM4(require_lib17()),recast=__toESM4(require_main5());function parseWithFlowOrTypescript(source2,parserOptions2){let parserPlugins=/^\s*\/\/\s*@flow/.test(source2)?["flow"]:["typescript"],mergedParserOptions={...parserOptions2,plugins:[...parserOptions2.plugins??[],...parserPlugins]};return babelParser.parse(source2,mergedParserOptions)}var parserOptions={sourceType:"module",plugins:["jsx","decorators-legacy","classProperties"],tokens:!0},babelParse=code=>recast.parse(code,{parser:{parse(source2){return parseWithFlowOrTypescript(source2,parserOptions)}}}),babelPrint=ast=>recast.print(ast,{quote:"single",trailingComma:!0,tabWidth:2,wrapColumn:80,arrowParensAlways:!0}).code,babelParseExpression=code=>babelParser.parseExpression(code,parserOptions),t26=__toESM4(require_lib11()),findVarInitialization=(identifier3,program)=>{let init=null,declarations=null;return program.body.find(node=>(t26.isVariableDeclaration(node)?declarations=node.declarations:t26.isExportNamedDeclaration(node)&&t26.isVariableDeclaration(node.declaration)&&(declarations=node.declaration.declarations),declarations&&declarations.find(decl=>t26.isVariableDeclarator(decl)&&t26.isIdentifier(decl.id)&&decl.id.name===identifier3?(init=decl.init,!0):!1))),init},logger=console;function parseIncludeExclude(prop){if(t25.isArrayExpression(prop))return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error(`Expected string literal: ${e4}`)});if(t25.isStringLiteral(prop))return new RegExp(prop.value);if(t25.isRegExpLiteral(prop))return new RegExp(prop.pattern,prop.flags);throw new Error(`Unknown include/exclude: ${prop}`)}function parseTags(prop){if(!t25.isArrayExpression(prop))throw new Error("CSF: Expected tags array");return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error("CSF: Expected tag to be string literal")})}var formatLocation2=(node,fileName)=>{let{line:line5,column:column2}=node.loc?.start||{};return `${fileName||""} (line ${line5}, col ${column2})`.trim()},isArgsStory=(init,parent,csf)=>{let storyFn=init;if(t25.isCallExpression(init)){let{callee,arguments:bindArguments}=init;if(t25.isProgram(parent)&&t25.isMemberExpression(callee)&&t25.isIdentifier(callee.object)&&t25.isIdentifier(callee.property)&&callee.property.name==="bind"&&(bindArguments.length===0||bindArguments.length===1&&t25.isObjectExpression(bindArguments[0])&&bindArguments[0].properties.length===0)){let boundIdentifier=callee.object.name,template=findVarInitialization(boundIdentifier,parent);template&&(csf._templates[boundIdentifier]=template,storyFn=template);}}return t25.isArrowFunctionExpression(storyFn)||t25.isFunctionDeclaration(storyFn)?storyFn.params.length>0:!1},parseExportsOrder=init=>{if(t25.isArrayExpression(init))return init.elements.map(item=>{if(t25.isStringLiteral(item))return item.value;throw new Error(`Expected string literal named export: ${item}`)});throw new Error(`Expected array of string literals: ${init}`)},sortExports=(exportByName,order)=>order.reduce((acc,name)=>{let namedExport=exportByName[name];return namedExport&&(acc[name]=namedExport),acc},{}),NoMetaError=class extends Error{constructor(message,ast,fileName){super(import_ts_dedent.dedent`
508
+ `),visitor={"ReferencedIdentifier|BindingIdentifier"(path15,state){path15.node.name!==state.name||path15.scope.getBindingIdentifier(state.name)!==state.outerDeclar||(state.selfReference=!0,path15.stop());}};function getNameFromLiteralId(id2){return isNullLiteral(id2)?"null":isRegExpLiteral(id2)?`_${id2.pattern}_${id2.flags}`:isTemplateLiteral(id2)?id2.quasis.map(quasi=>quasi.value.raw).join(""):id2.value!==void 0?id2.value+"":""}function wrap(state,method,id2,scope){if(state.selfReference)if(scope.hasBinding(id2.name)&&!scope.hasGlobal(id2.name))scope.rename(id2.name);else {if(!isFunction(method))return;let build=buildPropertyMethodAssignmentWrapper;method.generator&&(build=buildGeneratorPropertyMethodAssignmentWrapper);let template=build({FUNCTION:method,FUNCTION_ID:id2,FUNCTION_KEY:scope.generateUidIdentifier(id2.name)}).expression,params=template.callee.body.body[0].params;for(let i3=0,len=getFunctionArity(method);i3<len;i3++)params.push(scope.generateUidIdentifier("x"));return template}method.id=id2,scope.getProgramParent().references[id2.name]=!0;}function visit(node,name,scope){let state={selfAssignment:!1,selfReference:!1,outerDeclar:scope.getBindingIdentifier(name),name},binding=scope.getOwnBinding(name);return binding?binding.kind==="param"&&(state.selfReference=!0):(state.outerDeclar||scope.hasGlobal(name))&&scope.traverse(node,visitor,state),state}function _default2({node,parent,scope,id:id2},localBinding=!1,supportUnicodeId=!1){if(node.id)return;if((isObjectProperty(parent)||isObjectMethod(parent,{kind:"method"}))&&(!parent.computed||isLiteral(parent.key)))id2=parent.key;else if(isVariableDeclarator(parent)){if(id2=parent.id,isIdentifier(id2)&&!localBinding){let binding=scope.parent.getBinding(id2.name);if(binding&&binding.constant&&scope.getBinding(id2.name)===binding){node.id=cloneNode(id2),node.id[NOT_LOCAL_BINDING]=!0;return}}}else if(isAssignmentExpression(parent,{operator:"="}))id2=parent.left;else if(!id2)return;let name;if(id2&&isLiteral(id2)?name=getNameFromLiteralId(id2):id2&&isIdentifier(id2)&&(name=id2.name),name===void 0||!supportUnicodeId&&isFunction(node)&&/[\uD800-\uDFFF]/.test(name))return;name=toBindingIdentifierName(name);let newId=identifier(name);newId[NOT_LOCAL_BINDING]=!0;let state=visit(node,name,scope);return wrap(state,node,newId,scope)||node}}});var require_conversion=__commonJS({"../../node_modules/@babel/traverse/lib/path/conversion.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.arrowFunctionToExpression=arrowFunctionToExpression;exports.ensureBlock=ensureBlock;exports.toComputedKey=toComputedKey;exports.unwrapFunctionEnvironment=unwrapFunctionEnvironment;var _t14=require_lib11(),_helperEnvironmentVisitor=require_lib14(),_helperFunctionName=require_lib20(),_visitors=require_visitors(),{arrowFunctionExpression,assignmentExpression,binaryExpression,blockStatement,callExpression,conditionalExpression,expressionStatement,identifier,isIdentifier,jsxIdentifier,logicalExpression,LOGICAL_OPERATORS,memberExpression,metaProperty,numericLiteral,objectExpression,restElement,returnStatement,sequenceExpression,spreadElement,stringLiteral,super:_super,thisExpression,toExpression,unaryExpression}=_t14;function toComputedKey(){let key2;if(this.isMemberExpression())key2=this.node.property;else if(this.isProperty()||this.isMethod())key2=this.node.key;else throw new ReferenceError("todo");return this.node.computed||isIdentifier(key2)&&(key2=stringLiteral(key2.name)),key2}function ensureBlock(){let body=this.get("body"),bodyNode=body.node;if(Array.isArray(body))throw new Error("Can't convert array path to a block statement");if(!bodyNode)throw new Error("Can't convert node without a body");if(body.isBlockStatement())return bodyNode;let statements=[],stringPath="body",key2,listKey;body.isStatement()?(listKey="body",key2=0,statements.push(body.node)):(stringPath+=".body.0",this.isFunction()?(key2="argument",statements.push(returnStatement(body.node))):(key2="expression",statements.push(expressionStatement(body.node)))),this.node.body=blockStatement(statements);let parentPath=this.get(stringPath);return body.setup(parentPath,listKey?parentPath.node[listKey]:parentPath.node,listKey,key2),this.node}exports.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression();};function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");hoistFunctionEnvironment(this);}function setType(path15,type2){path15.node.type=type2;}function arrowFunctionToExpression({allowInsertArrow=!0,allowInsertArrowWithRest=allowInsertArrow,noNewArrows=!(_arguments$=>(_arguments$=arguments[0])==null?void 0:_arguments$.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let{thisBinding,fnPath:fn11}=hoistFunctionEnvironment(this,noNewArrows,allowInsertArrow,allowInsertArrowWithRest);if(fn11.ensureBlock(),setType(fn11,"FunctionExpression"),!noNewArrows){let checkBinding=thisBinding?null:fn11.scope.generateUidIdentifier("arrowCheckId");return checkBinding&&fn11.parentPath.scope.push({id:checkBinding,init:objectExpression([])}),fn11.get("body").unshiftContainer("body",expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"),[thisExpression(),identifier(checkBinding?checkBinding.name:thisBinding)]))),fn11.replaceWith(callExpression(memberExpression((0, _helperFunctionName.default)(this,!0)||fn11.node,identifier("bind")),[checkBinding?identifier(checkBinding.name):thisExpression()])),fn11.get("callee.object")}return fn11}var getSuperCallsVisitor=(0, _visitors.merge)([{CallExpression(child,{allSuperCalls}){child.get("callee").isSuper()&&allSuperCalls.push(child);}},_helperEnvironmentVisitor.default]);function hoistFunctionEnvironment(fnPath,noNewArrows=!0,allowInsertArrow=!0,allowInsertArrowWithRest=!0){let arrowParent,thisEnvFn=fnPath.findParent(p7=>{if(p7.isArrowFunctionExpression()){return (arrowParent)!=null||(arrowParent=p7),!1}return p7.isFunction()||p7.isProgram()||p7.isClassProperty({static:!1})||p7.isClassPrivateProperty({static:!1})}),inConstructor=thisEnvFn.isClassMethod({kind:"constructor"});if(thisEnvFn.isClassProperty()||thisEnvFn.isClassPrivateProperty())if(arrowParent)thisEnvFn=arrowParent;else if(allowInsertArrow)fnPath.replaceWith(callExpression(arrowFunctionExpression([],toExpression(fnPath.node)),[])),thisEnvFn=fnPath.get("callee"),fnPath=thisEnvFn.get("body");else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}=getScopeInformation(fnPath);if(inConstructor&&superCalls.length>0){if(!allowInsertArrow)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!allowInsertArrowWithRest)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let allSuperCalls=[];thisEnvFn.traverse(getSuperCallsVisitor,{allSuperCalls});let superBinding=getSuperBinding(thisEnvFn);allSuperCalls.forEach(superCall=>{let callee=identifier(superBinding);callee.loc=superCall.node.callee.loc,superCall.get("callee").replaceWith(callee);});}if(argumentsPaths.length>0){let argumentsBinding=getBinding(thisEnvFn,"arguments",()=>{let args=()=>identifier("arguments");return thisEnvFn.scope.path.isProgram()?conditionalExpression(binaryExpression("===",unaryExpression("typeof",args()),stringLiteral("undefined")),thisEnvFn.scope.buildUndefinedNode(),args()):args()});argumentsPaths.forEach(argumentsChild=>{let argsRef=identifier(argumentsBinding);argsRef.loc=argumentsChild.node.loc,argumentsChild.replaceWith(argsRef);});}if(newTargetPaths.length>0){let newTargetBinding=getBinding(thisEnvFn,"newtarget",()=>metaProperty(identifier("new"),identifier("target")));newTargetPaths.forEach(targetChild=>{let targetRef=identifier(newTargetBinding);targetRef.loc=targetChild.node.loc,targetChild.replaceWith(targetRef);});}if(superProps.length>0){if(!allowInsertArrow)throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");superProps.reduce((acc,superProp)=>acc.concat(standardizeSuperProperty(superProp)),[]).forEach(superProp=>{let key2=superProp.node.computed?"":superProp.get("property").node.name,superParentPath=superProp.parentPath,isAssignment=superParentPath.isAssignmentExpression({left:superProp.node}),isCall=superParentPath.isCallExpression({callee:superProp.node}),isTaggedTemplate=superParentPath.isTaggedTemplateExpression({tag:superProp.node}),superBinding=getSuperPropBinding(thisEnvFn,isAssignment,key2),args=[];if(superProp.node.computed&&args.push(superProp.get("property").node),isAssignment){let value=superParentPath.node.right;args.push(value);}let call=callExpression(identifier(superBinding),args);isCall?(superParentPath.unshiftContainer("arguments",thisExpression()),superProp.replaceWith(memberExpression(call,identifier("call"))),thisPaths.push(superParentPath.get("arguments.0"))):isAssignment?superParentPath.replaceWith(call):isTaggedTemplate?(superProp.replaceWith(callExpression(memberExpression(call,identifier("bind"),!1),[thisExpression()])),thisPaths.push(superProp.get("arguments.0"))):superProp.replaceWith(call);});}let thisBinding;return (thisPaths.length>0||!noNewArrows)&&(thisBinding=getThisBinding(thisEnvFn,inConstructor),(noNewArrows||inConstructor&&hasSuperClass(thisEnvFn))&&(thisPaths.forEach(thisChild=>{let thisRef=thisChild.isJSX()?jsxIdentifier(thisBinding):identifier(thisBinding);thisRef.loc=thisChild.node.loc,thisChild.replaceWith(thisRef);}),noNewArrows||(thisBinding=null))),{thisBinding,fnPath}}function isLogicalOp(op3){return LOGICAL_OPERATORS.includes(op3)}function standardizeSuperProperty(superProp){if(superProp.parentPath.isAssignmentExpression()&&superProp.parentPath.node.operator!=="="){let assignmentPath=superProp.parentPath,op3=assignmentPath.node.operator.slice(0,-1),value=assignmentPath.node.right,isLogicalAssignment=isLogicalOp(op3);if(superProp.node.computed){let tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,assignmentExpression("=",tmp,property),!0)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(tmp.name),!0),value));}else {let object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,property)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(property.name)),value));}return isLogicalAssignment?assignmentPath.replaceWith(logicalExpression(op3,assignmentPath.node.left,assignmentPath.node.right)):assignmentPath.node.operator="=",[assignmentPath.get("left"),assignmentPath.get("right").get("left")]}else if(superProp.parentPath.isUpdateExpression()){let updateExpr=superProp.parentPath,tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),computedKey=superProp.node.computed?superProp.scope.generateDeclaredUidIdentifier("prop"):null,parts=[assignmentExpression("=",tmp,memberExpression(superProp.node.object,computedKey?assignmentExpression("=",computedKey,superProp.node.property):superProp.node.property,superProp.node.computed)),assignmentExpression("=",memberExpression(superProp.node.object,computedKey?identifier(computedKey.name):superProp.node.property,superProp.node.computed),binaryExpression(superProp.parentPath.node.operator[0],identifier(tmp.name),numericLiteral(1)))];superProp.parentPath.node.prefix||parts.push(identifier(tmp.name)),updateExpr.replaceWith(sequenceExpression(parts));let left=updateExpr.get("expressions.0.right"),right=updateExpr.get("expressions.1.left");return [left,right]}return [superProp];function rightExpression(op3,left,right){return op3==="="?assignmentExpression("=",left,right):binaryExpression(op3,left,right)}}function hasSuperClass(thisEnvFn){return thisEnvFn.isClassMethod()&&!!thisEnvFn.parentPath.parentPath.node.superClass}var assignSuperThisVisitor=(0, _visitors.merge)([{CallExpression(child,{supers,thisBinding}){child.get("callee").isSuper()&&(supers.has(child.node)||(supers.add(child.node),child.replaceWithMultiple([child.node,assignmentExpression("=",identifier(thisBinding),identifier("this"))])));}},_helperEnvironmentVisitor.default]);function getThisBinding(thisEnvFn,inConstructor){return getBinding(thisEnvFn,"this",thisBinding=>{if(!inConstructor||!hasSuperClass(thisEnvFn))return thisExpression();thisEnvFn.traverse(assignSuperThisVisitor,{supers:new WeakSet,thisBinding});})}function getSuperBinding(thisEnvFn){return getBinding(thisEnvFn,"supercall",()=>{let argsBinding=thisEnvFn.scope.generateUidIdentifier("args");return arrowFunctionExpression([restElement(argsBinding)],callExpression(_super(),[spreadElement(identifier(argsBinding.name))]))})}function getSuperPropBinding(thisEnvFn,isAssignment,propName){return getBinding(thisEnvFn,`superprop_${isAssignment?"set":"get"}:${propName||""}`,()=>{let argsList=[],fnBody;if(propName)fnBody=memberExpression(_super(),identifier(propName));else {let method=thisEnvFn.scope.generateUidIdentifier("prop");argsList.unshift(method),fnBody=memberExpression(_super(),identifier(method.name),!0);}if(isAssignment){let valueIdent=thisEnvFn.scope.generateUidIdentifier("value");argsList.push(valueIdent),fnBody=assignmentExpression("=",fnBody,identifier(valueIdent.name));}return arrowFunctionExpression(argsList,fnBody)})}function getBinding(thisEnvFn,key2,init){let cacheKey="binding:"+key2,data=thisEnvFn.getData(cacheKey);if(!data){let id2=thisEnvFn.scope.generateUidIdentifier(key2);data=id2.name,thisEnvFn.setData(cacheKey,data),thisEnvFn.scope.push({id:id2,init:init(data)});}return data}var getScopeInformationVisitor=(0, _visitors.merge)([{ThisExpression(child,{thisPaths}){thisPaths.push(child);},JSXIdentifier(child,{thisPaths}){child.node.name==="this"&&(!child.parentPath.isJSXMemberExpression({object:child.node})&&!child.parentPath.isJSXOpeningElement({name:child.node})||thisPaths.push(child));},CallExpression(child,{superCalls}){child.get("callee").isSuper()&&superCalls.push(child);},MemberExpression(child,{superProps}){child.get("object").isSuper()&&superProps.push(child);},Identifier(child,{argumentsPaths}){if(!child.isReferencedIdentifier({name:"arguments"}))return;let curr=child.scope;do{if(curr.hasOwnBinding("arguments")){curr.rename("arguments");return}if(curr.path.isFunction()&&!curr.path.isArrowFunctionExpression())break}while(curr=curr.parent);argumentsPaths.push(child);},MetaProperty(child,{newTargetPaths}){child.get("meta").isIdentifier({name:"new"})&&child.get("property").isIdentifier({name:"target"})&&newTargetPaths.push(child);}},_helperEnvironmentVisitor.default]);function getScopeInformation(fnPath){let thisPaths=[],argumentsPaths=[],newTargetPaths=[],superProps=[],superCalls=[];return fnPath.traverse(getScopeInformationVisitor,{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}),{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}}}});var require_introspection=__commonJS({"../../node_modules/@babel/traverse/lib/path/introspection.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports._resolve=_resolve;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;exports.equals=equals;exports.getSource=getSource;exports.has=has;exports.is=void 0;exports.isCompletionRecord=isCompletionRecord;exports.isConstantExpression=isConstantExpression;exports.isInStrictMode=isInStrictMode;exports.isNodeType=isNodeType;exports.isStatementOrBlock=isStatementOrBlock;exports.isStatic=isStatic;exports.isnt=isnt;exports.matchesPattern=matchesPattern;exports.referencesImport=referencesImport;exports.resolve=resolve4;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;var _t14=require_lib11(),{STATEMENT_OR_BLOCK_KEYS,VISITOR_KEYS,isBlockStatement,isExpression,isIdentifier,isLiteral,isStringLiteral,isType,matchesPattern:_matchesPattern}=_t14;function matchesPattern(pattern,allowPartial){return _matchesPattern(this.node,pattern,allowPartial)}function has(key2){let val=this.node&&this.node[key2];return val&&Array.isArray(val)?!!val.length:!!val}function isStatic(){return this.scope.isStatic(this.node)}exports.is=has;function isnt(key2){return !this.has(key2)}function equals(key2,value){return this.node[key2]===value}function isNodeType(type2){return isType(this.type,type2)}function canHaveVariableDeclarationOrExpression(){return (this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(replacement){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?isBlockStatement(replacement):this.isBlockStatement()?isExpression(replacement):!1}function isCompletionRecord(allowInsideFunction){let path15=this,first=!0;do{let{type:type2,container}=path15;if(!first&&(path15.isFunction()||type2==="StaticBlock"))return !!allowInsideFunction;if(first=!1,Array.isArray(container)&&path15.key!==container.length-1)return !1}while((path15=path15.parentPath)&&!path15.isProgram()&&!path15.isDoExpression());return !0}function isStatementOrBlock(){return this.parentPath.isLabeledStatement()||isBlockStatement(this.container)?!1:STATEMENT_OR_BLOCK_KEYS.includes(this.key)}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===importName||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?isStringLiteral(this.node.property,{value:importName}):this.node.property.name===importName)){let object=this.get("object");return object.isReferencedIdentifier()&&object.referencesImport(moduleSource,"*")}return !1}let binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return !1;let path15=binding.path,parent=path15.parentPath;if(!parent.isImportDeclaration())return !1;if(parent.node.source.value===moduleSource){if(!importName)return !0}else return !1;return !!(path15.isImportDefaultSpecifier()&&importName==="default"||path15.isImportNamespaceSpecifier()&&importName==="*"||path15.isImportSpecifier()&&isIdentifier(path15.node.imported,{name:importName}))}function getSource(){let node=this.node;if(node.end){let code=this.hub.getCode();if(code)return code.slice(node.start,node.end)}return ""}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function getOuterFunction(path15){return path15.isProgram()?path15:(path15.parentPath.scope.getFunctionParent()||path15.parentPath.scope.getProgramParent()).path}function isExecutionUncertain(type2,key2){switch(type2){case"LogicalExpression":return key2==="right";case"ConditionalExpression":case"IfStatement":return key2==="consequent"||key2==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return key2==="body";case"ForStatement":return key2==="body"||key2==="update";case"SwitchStatement":return key2==="cases";case"TryStatement":return key2==="handler";case"AssignmentPattern":return key2==="right";case"OptionalMemberExpression":return key2==="property";case"OptionalCallExpression":return key2==="arguments";default:return !1}}function isExecutionUncertainInList(paths,maxIndex){for(let i3=0;i3<maxIndex;i3++){let path15=paths[i3];if(isExecutionUncertain(path15.parent.type,path15.parentKey))return !0}return !1}var SYMBOL_CHECKING=Symbol();function _guessExecutionStatusRelativeTo(target){return _guessExecutionStatusRelativeToCached(this,target,new Map)}function _guessExecutionStatusRelativeToCached(base,target,cache3){let funcParent={this:getOuterFunction(base),target:getOuterFunction(target)};if(funcParent.target.node!==funcParent.this.node)return _guessExecutionStatusRelativeToDifferentFunctionsCached(base,funcParent.target,cache3);let paths={target:target.getAncestry(),this:base.getAncestry()};if(paths.target.indexOf(base)>=0)return "after";if(paths.this.indexOf(target)>=0)return "before";let commonPath,commonIndex={target:0,this:0};for(;!commonPath&&commonIndex.this<paths.this.length;){let path15=paths.this[commonIndex.this];commonIndex.target=paths.target.indexOf(path15),commonIndex.target>=0?commonPath=path15:commonIndex.this++;}if(!commonPath)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(isExecutionUncertainInList(paths.this,commonIndex.this-1)||isExecutionUncertainInList(paths.target,commonIndex.target-1))return "unknown";let divergence={this:paths.this[commonIndex.this-1],target:paths.target[commonIndex.target-1]};if(divergence.target.listKey&&divergence.this.listKey&&divergence.target.container===divergence.this.container)return divergence.target.key>divergence.this.key?"before":"after";let keys=VISITOR_KEYS[commonPath.type],keyPosition={this:keys.indexOf(divergence.this.parentKey),target:keys.indexOf(divergence.target.parentKey)};return keyPosition.target>keyPosition.this?"before":"after"}function _guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3){if(target.isFunctionDeclaration()){if(target.parentPath.isExportDeclaration())return "unknown"}else return _guessExecutionStatusRelativeToCached(base,target,cache3)==="before"?"before":"unknown";let binding=target.scope.getBinding(target.node.id.name);if(!binding.references)return "before";let referencePaths=binding.referencePaths,allStatus;for(let path15 of referencePaths){if(!!path15.find(path16=>path16.node===target.node))continue;if(path15.key!=="callee"||!path15.parentPath.isCallExpression())return "unknown";let status=_guessExecutionStatusRelativeToCached(base,path15,cache3);if(allStatus&&allStatus!==status)return "unknown";allStatus=status;}return allStatus}function _guessExecutionStatusRelativeToDifferentFunctionsCached(base,target,cache3){let nodeMap=cache3.get(base.node),cached;if(!nodeMap)cache3.set(base.node,nodeMap=new Map);else if(cached=nodeMap.get(target.node))return cached===SYMBOL_CHECKING?"unknown":cached;nodeMap.set(target.node,SYMBOL_CHECKING);let result=_guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3);return nodeMap.set(target.node,result),result}function resolve4(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(!(resolved&&resolved.indexOf(this)>=0))if(resolved=resolved||[],resolved.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(dangerous,resolved)}else if(this.isReferencedIdentifier()){let binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant||binding.kind==="module")return;if(binding.path!==this){let ret=binding.path.resolve(dangerous,resolved);return this.find(parent=>parent.node===ret.node)?void 0:ret}}else {if(this.isTypeCastExpression())return this.get("expression").resolve(dangerous,resolved);if(dangerous&&this.isMemberExpression()){let targetKey=this.toComputedKey();if(!isLiteral(targetKey))return;let targetName=targetKey.value,target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){let props=target.get("properties");for(let prop of props){if(!prop.isProperty())continue;let key2=prop.get("key"),match=prop.isnt("computed")&&key2.isIdentifier({name:targetName});if(match=match||key2.isLiteral({value:targetName}),match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){let elem=target.get("elements")[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}}function isConstantExpression(){if(this.isIdentifier()){let binding=this.scope.getBinding(this.node.name);return binding?binding.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(expression=>expression.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator}=this.node;return operator!=="in"&&operator!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function isInStrictMode(){return !!(this.isProgram()?this:this.parentPath).find(path15=>{if(path15.isProgram({sourceType:"module"})||path15.isClass())return !0;if(path15.isArrowFunctionExpression()&&!path15.get("body").isBlockStatement())return !1;let body;if(path15.isFunction())body=path15.node.body;else if(path15.isProgram())body=path15.node;else return !1;for(let directive of body.directives)if(directive.value.value==="use strict")return !0})}}});var require_context=__commonJS({"../../node_modules/@babel/traverse/lib/path/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._call=_call;exports._getQueueContexts=_getQueueContexts;exports._resyncKey=_resyncKey;exports._resyncList=_resyncList;exports._resyncParent=_resyncParent;exports._resyncRemoved=_resyncRemoved;exports.call=call;exports.isBlacklisted=exports.isDenylisted=isDenylisted;exports.popContext=popContext;exports.pushContext=pushContext;exports.requeue=requeue;exports.resync=resync;exports.setContext=setContext;exports.setKey=setKey;exports.setScope=setScope;exports.setup=setup;exports.skip=skip3;exports.skipKey=skipKey;exports.stop=stop;exports.visit=visit;var _traverseNode=require_traverse_node(),_index=require_path4();function call(key2){let opts=this.opts;if(this.debug(key2),this.node&&this._call(opts[key2]))return !0;if(this.node){var _opts$this$node$type;return this._call((_opts$this$node$type=opts[this.node.type])==null?void 0:_opts$this$node$type[key2])}return !1}function _call(fns){if(!fns)return !1;for(let fn11 of fns){if(!fn11)continue;let node=this.node;if(!node)return !0;let ret=fn11.call(this.state,this,this.state);if(ret&&typeof ret=="object"&&typeof ret.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(ret)throw new Error(`Unexpected return value from visitor method ${fn11}`);if(this.node!==node||this._traverseFlags>0)return !0}return !1}function isDenylisted(){var _this$opts$denylist;let denylist=(_this$opts$denylist=this.opts.denylist)!=null?_this$opts$denylist:this.opts.blacklist;return denylist&&denylist.indexOf(this.node.type)>-1}function restoreContext(path15,context){path15.context!==context&&(path15.context=context,path15.state=context.state,path15.opts=context.opts);}function visit(){var _this$opts$shouldSkip,_this$opts;if(!this.node||this.isDenylisted()||(_this$opts$shouldSkip=(_this$opts=this.opts).shouldSkip)!=null&&_this$opts$shouldSkip.call(_this$opts,this))return !1;let currentContext=this.context;return this.shouldSkip||this.call("enter")?(this.debug("Skip..."),this.shouldStop):(restoreContext(this,currentContext),this.debug("Recursing into..."),this.shouldStop=(0, _traverseNode.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),restoreContext(this,currentContext),this.call("exit"),this.shouldStop)}function skip3(){this.shouldSkip=!0;}function skipKey(key2){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[key2]=!0;}function stop(){this._traverseFlags|=_index.SHOULD_SKIP|_index.SHOULD_STOP;}function setScope(){var _this$opts2,_this$scope;if((_this$opts2=this.opts)!=null&&_this$opts2.noScope)return;let path15=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&path15.isMethod()||this.key==="discriminant"&&path15.isSwitchStatement())&&(path15=path15.parentPath);let target;for(;path15&&!target;){var _path$opts;if((_path$opts=path15.opts)!=null&&_path$opts.noScope)return;target=path15.scope,path15=path15.parentPath;}this.scope=this.getScope(target),(_this$scope=this.scope)==null||_this$scope.init();}function setContext(context){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,context&&(this.context=context,this.state=context.state,this.opts=context.opts),this.setScope(),this}function resync(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey());}function _resyncParent(){this.parentPath&&(this.parent=this.parentPath.node);}function _resyncKey(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let i3=0;i3<this.container.length;i3++)if(this.container[i3]===this.node){this.setKey(i3);return}}else for(let key2 of Object.keys(this.container))if(this.container[key2]===this.node){this.setKey(key2);return}this.key=null;}}function _resyncList(){if(!this.parent||!this.inList)return;let newContainer=this.parent[this.listKey];this.container!==newContainer&&(this.container=newContainer||null);}function _resyncRemoved(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&this._markRemoved();}function popContext(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0);}function pushContext(context){this.contexts.push(context),this.setContext(context);}function setup(parentPath,container,listKey,key2){this.listKey=listKey,this.container=container,this.parentPath=parentPath||this.parentPath,this.setKey(key2);}function setKey(key2){var _this$node;this.key=key2,this.node=this.container[this.key],this.type=(_this$node=this.node)==null?void 0:_this$node.type;}function requeue(pathToQueue=this){if(pathToQueue.removed)return;let contexts=this.contexts;for(let context of contexts)context.maybeQueue(pathToQueue);}function _getQueueContexts(){let path15=this,contexts=this.contexts;for(;!contexts.length&&(path15=path15.parentPath,!!path15);)contexts=path15.contexts;return contexts}}});var require_removal_hooks=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.hooks=void 0;exports.hooks=[function(self2,parent){if(self2.key==="test"&&(parent.isWhile()||parent.isSwitchCase())||self2.key==="declaration"&&parent.isExportDeclaration()||self2.key==="body"&&parent.isLabeledStatement()||self2.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===1||self2.key==="expression"&&parent.isExpressionStatement())return parent.remove(),!0},function(self2,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1)return parent.replaceWith(parent.node.expressions[0]),!0},function(self2,parent){if(parent.isBinary())return self2.key==="left"?parent.replaceWith(parent.node.right):parent.replaceWith(parent.node.left),!0},function(self2,parent){if(parent.isIfStatement()&&self2.key==="consequent"||self2.key==="body"&&(parent.isLoop()||parent.isArrowFunctionExpression()))return self2.replaceWith({type:"BlockStatement",body:[]}),!0}];}});var require_removal=__commonJS({"../../node_modules/@babel/traverse/lib/path/removal.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._assertUnremoved=_assertUnremoved;exports._callRemovalHooks=_callRemovalHooks;exports._markRemoved=_markRemoved;exports._remove=_remove;exports._removeFromScope=_removeFromScope;exports.remove=remove;var _removalHooks=require_removal_hooks(),_cache2=require_cache(),_index=require_path4(),_t14=require_lib11(),{getBindingIdentifiers}=_t14;function remove(){var _this$opts;if(this._assertUnremoved(),this.resync(),(_this$opts=this.opts)!=null&&_this$opts.noScope||this._removeFromScope(),this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings(),this._remove(),this._markRemoved();}function _removeFromScope(){let bindings=getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(bindings).forEach(name=>this.scope.removeBinding(name));}function _callRemovalHooks(){if(this.parentPath){for(let fn11 of _removalHooks.hooks)if(fn11(this,this.parentPath))return !0}}function _remove(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null);}function _markRemoved(){this._traverseFlags|=_index.SHOULD_SKIP|_index.REMOVED,this.parent&&(0, _cache2.getCachedPaths)(this.hub,this.parent).delete(this.node),this.node=null;}function _assertUnremoved(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}});var require_hoister=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _t14=require_lib11(),_t22=_t14,{react}=_t14,{cloneNode,jsxExpressionContainer,variableDeclaration,variableDeclarator}=_t22,referenceVisitor={ReferencedIdentifier(path15,state){if(path15.isJSXIdentifier()&&react.isCompatTag(path15.node.name)&&!path15.parentPath.isJSXMemberExpression())return;if(path15.node.name==="this"){let scope=path15.scope;do if(scope.path.isFunction()&&!scope.path.isArrowFunctionExpression())break;while(scope=scope.parent);scope&&state.breakOnScopePaths.push(scope.path);}let binding=path15.scope.getBinding(path15.node.name);if(binding){for(let violation of binding.constantViolations)if(violation.scope!==binding.path.scope){state.mutableBinding=!0,path15.stop();return}binding===state.scope.getBinding(path15.node.name)&&(state.bindings[path15.node.name]=binding);}}},PathHoister=class{constructor(path15,scope){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=scope,this.path=path15,this.attachAfter=!1;}isCompatibleScope(scope){for(let key2 of Object.keys(this.bindings)){let binding=this.bindings[key2];if(!scope.bindingIdentifierEquals(key2,binding.identifier))return !1}return !0}getCompatibleScopes(){let scope=this.path.scope;do{if(this.isCompatibleScope(scope))this.scopes.push(scope);else break;if(this.breakOnScopePaths.indexOf(scope.path)>=0)break}while(scope=scope.parent)}getAttachmentPath(){let path15=this._getAttachmentPath();if(!path15)return;let targetScope=path15.scope;if(targetScope.path===path15&&(targetScope=path15.scope.parent),targetScope.path.isProgram()||targetScope.path.isFunction())for(let name of Object.keys(this.bindings)){if(!targetScope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"||binding.path.parentKey==="params")continue;if(this.getAttachmentParentForPath(binding.path).key>=path15.key){this.attachAfter=!0,path15=binding.path;for(let violationPath of binding.constantViolations)this.getAttachmentParentForPath(violationPath).key>path15.key&&(path15=violationPath);}}return path15}_getAttachmentPath(){let scope=this.scopes.pop();if(scope){if(scope.path.isFunction())if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;let bodies=scope.path.get("body").get("body");for(let i3=0;i3<bodies.length;i3++)if(!bodies[i3].node._blockHoist)return bodies[i3]}else return this.getNextScopeAttachmentParent();else if(scope.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let scope=this.scopes.pop();if(scope)return this.getAttachmentParentForPath(scope.path)}getAttachmentParentForPath(path15){do if(!path15.parentPath||Array.isArray(path15.container)&&path15.isStatement())return path15;while(path15=path15.parentPath)}hasOwnParamBindings(scope){for(let name of Object.keys(this.bindings)){if(!scope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"&&binding.constant)return !0}return !1}run(){if(this.path.traverse(referenceVisitor,this),this.mutableBinding)return;this.getCompatibleScopes();let attachTo=this.getAttachmentPath();if(!attachTo||attachTo.getFunctionParent()===this.path.getFunctionParent())return;let uid=attachTo.scope.generateUidIdentifier("ref"),declarator=variableDeclarator(uid,this.path.node),insertFn=this.attachAfter?"insertAfter":"insertBefore",[attached]=attachTo[insertFn]([attachTo.isVariableDeclarator()?declarator:variableDeclaration("var",[declarator])]),parent=this.path.parentPath;return parent.isJSXElement()&&this.path.container===parent.node.children&&(uid=jsxExpressionContainer(uid)),this.path.replaceWith(cloneNode(uid)),attachTo.isVariableDeclarator()?attached.get("init"):attached.get("declarations.0.init")}};exports.default=PathHoister;}});var require_modification=__commonJS({"../../node_modules/@babel/traverse/lib/path/modification.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._containerInsert=_containerInsert;exports._containerInsertAfter=_containerInsertAfter;exports._containerInsertBefore=_containerInsertBefore;exports._verifyNodeList=_verifyNodeList;exports.hoist=hoist;exports.insertAfter=insertAfter;exports.insertBefore=insertBefore;exports.pushContainer=pushContainer;exports.unshiftContainer=unshiftContainer;exports.updateSiblingKeys=updateSiblingKeys;var _cache2=require_cache(),_hoister=require_hoister(),_index=require_path4(),_t14=require_lib11(),{arrowFunctionExpression,assertExpression,assignmentExpression,blockStatement,callExpression,cloneNode,expressionStatement,isAssignmentExpression,isCallExpression,isExportNamedDeclaration,isExpression,isIdentifier,isSequenceExpression,isSuper,thisExpression}=_t14;function insertBefore(nodes_){this._assertUnremoved();let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertBefore(nodes);if(this.isNodeType("Expression")&&!this.isJSXElement()||parentPath.isForStatement()&&this.key==="init")return this.node&&nodes.push(this.node),this.replaceExpressionWithStatements(nodes);if(Array.isArray(this.container))return this._containerInsertBefore(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.unshiftContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);let paths=[];this.container.splice(from,0,...nodes);for(let i3=0;i3<nodes.length;i3++){var _this$context;let to5=from+i3,path15=this.getSibling(to5);paths.push(path15),(_this$context=this.context)!=null&&_this$context.queue&&path15.pushContext(this.context);}let contexts=this._getQueueContexts();for(let path15 of paths){path15.setScope(),path15.debug("Inserted.");for(let context of contexts)context.maybeQueue(path15,!0);}return paths}function _containerInsertBefore(nodes){return this._containerInsert(this.key,nodes)}function _containerInsertAfter(nodes){return this._containerInsert(this.key+1,nodes)}var last=arr=>arr[arr.length-1];function isHiddenInSequenceExpression(path15){return isSequenceExpression(path15.parent)&&(last(path15.parent.expressions)!==path15.node||isHiddenInSequenceExpression(path15.parentPath))}function isAlmostConstantAssignment(node,scope){if(!isAssignmentExpression(node)||!isIdentifier(node.left))return !1;let blockScope=scope.getBlockParent();return blockScope.hasOwnBinding(node.left.name)&&blockScope.getOwnBinding(node.left.name).constantViolations.length<=1}function insertAfter(nodes_){if(this._assertUnremoved(),this.isSequenceExpression())return last(this.get("expressions")).insertAfter(nodes_);let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertAfter(nodes.map(node=>isExpression(node)?expressionStatement(node):node));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!parentPath.isJSXElement()||parentPath.isForStatement()&&this.key==="init"){if(this.node){let node=this.node,{scope}=this;if(scope.path.isPattern())return assertExpression(node),this.replaceWith(callExpression(arrowFunctionExpression([],node),[])),this.get("callee.body").insertAfter(nodes),[this];if(isHiddenInSequenceExpression(this))nodes.unshift(node);else if(isCallExpression(node)&&isSuper(node.callee))nodes.unshift(node),nodes.push(thisExpression());else if(isAlmostConstantAssignment(node,scope))nodes.unshift(node),nodes.push(cloneNode(node.left));else if(scope.isPure(node,!0))nodes.push(node);else {parentPath.isMethod({computed:!0,key:node})&&(scope=scope.parent);let temp=scope.generateDeclaredUidIdentifier();nodes.unshift(expressionStatement(assignmentExpression("=",cloneNode(temp),node))),nodes.push(expressionStatement(cloneNode(temp)));}}return this.replaceExpressionWithStatements(nodes)}else {if(Array.isArray(this.container))return this._containerInsertAfter(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.pushContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;let paths=(0, _cache2.getCachedPaths)(this.hub,this.parent)||[];for(let[,path15]of paths)typeof path15.key=="number"&&path15.key>=fromIndex&&(path15.key+=incrementBy);}function _verifyNodeList(nodes){if(!nodes)return [];Array.isArray(nodes)||(nodes=[nodes]);for(let i3=0;i3<nodes.length;i3++){let node=nodes[i3],msg;if(node?typeof node!="object"?msg="contains a non-object node":node.type?node instanceof _index.default&&(msg="has a NodePath when it expected a raw object"):msg="without a type":msg="has falsy node",msg){let type2=Array.isArray(node)?"array":typeof node;throw new Error(`Node list ${msg} with the index of ${i3} and type of ${type2}`)}}return nodes}function unshiftContainer(listKey,nodes){return this._assertUnremoved(),nodes=this._verifyNodeList(nodes),_index.default.get({parentPath:this,parent:this.node,container:this.node[listKey],listKey,key:0}).setContext(this.context)._containerInsertBefore(nodes)}function pushContainer(listKey,nodes){this._assertUnremoved();let verifiedNodes=this._verifyNodeList(nodes),container=this.node[listKey];return _index.default.get({parentPath:this,parent:this.node,container,listKey,key:container.length}).setContext(this.context).replaceWithMultiple(verifiedNodes)}function hoist(scope=this.scope){return new _hoister.default(this,scope).run()}}});var require_family=__commonJS({"../../node_modules/@babel/traverse/lib/path/family.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._getKey=_getKey;exports._getPattern=_getPattern;exports.get=get;exports.getAllNextSiblings=getAllNextSiblings;exports.getAllPrevSiblings=getAllPrevSiblings;exports.getBindingIdentifierPaths=getBindingIdentifierPaths;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getCompletionRecords=getCompletionRecords;exports.getNextSibling=getNextSibling;exports.getOpposite=getOpposite;exports.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;exports.getPrevSibling=getPrevSibling;exports.getSibling=getSibling;var _index=require_path4(),_t14=require_lib11(),{getBindingIdentifiers:_getBindingIdentifiers,getOuterBindingIdentifiers:_getOuterBindingIdentifiers,isDeclaration,numericLiteral,unaryExpression}=_t14,NORMAL_COMPLETION=0,BREAK_COMPLETION=1;function NormalCompletion(path15){return {type:NORMAL_COMPLETION,path:path15}}function BreakCompletion(path15){return {type:BREAK_COMPLETION,path:path15}}function getOpposite(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function addCompletionRecords(path15,records,context){return path15&&records.push(..._getCompletionRecords(path15,context)),records}function completionRecordForSwitch(cases,records,context){let lastNormalCompletions=[];for(let i3=0;i3<cases.length;i3++){let casePath=cases[i3],caseCompletions=_getCompletionRecords(casePath,context),normalCompletions=[],breakCompletions=[];for(let c8 of caseCompletions)c8.type===NORMAL_COMPLETION&&normalCompletions.push(c8),c8.type===BREAK_COMPLETION&&breakCompletions.push(c8);normalCompletions.length&&(lastNormalCompletions=normalCompletions),records.push(...breakCompletions);}return records.push(...lastNormalCompletions),records}function normalCompletionToBreak(completions){completions.forEach(c8=>{c8.type=BREAK_COMPLETION;});}function replaceBreakStatementInBreakCompletion(completions,reachable){completions.forEach(c8=>{c8.path.isBreakStatement({label:null})&&(reachable?c8.path.replaceWith(unaryExpression("void",numericLiteral(0))):c8.path.remove());});}function getStatementListCompletion(paths,context){let completions=[];if(context.canHaveBreak){let lastNormalCompletions=[];for(let i3=0;i3<paths.length;i3++){let path15=paths[i3],newContext=Object.assign({},context,{inCaseClause:!1});path15.isBlockStatement()&&(context.inCaseClause||context.shouldPopulateBreak)?newContext.shouldPopulateBreak=!0:newContext.shouldPopulateBreak=!1;let statementCompletions=_getCompletionRecords(path15,newContext);if(statementCompletions.length>0&&statementCompletions.every(c8=>c8.type===BREAK_COMPLETION)){lastNormalCompletions.length>0&&statementCompletions.every(c8=>c8.path.isBreakStatement({label:null}))?(normalCompletionToBreak(lastNormalCompletions),completions.push(...lastNormalCompletions),lastNormalCompletions.some(c8=>c8.path.isDeclaration())&&(completions.push(...statementCompletions),replaceBreakStatementInBreakCompletion(statementCompletions,!0)),replaceBreakStatementInBreakCompletion(statementCompletions,!1)):(completions.push(...statementCompletions),context.shouldPopulateBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!0));break}if(i3===paths.length-1)completions.push(...statementCompletions);else {lastNormalCompletions=[];for(let i4=0;i4<statementCompletions.length;i4++){let c8=statementCompletions[i4];c8.type===BREAK_COMPLETION&&completions.push(c8),c8.type===NORMAL_COMPLETION&&lastNormalCompletions.push(c8);}}}}else if(paths.length)for(let i3=paths.length-1;i3>=0;i3--){let pathCompletions=_getCompletionRecords(paths[i3],context);if(pathCompletions.length>1||pathCompletions.length===1&&!pathCompletions[0].path.isVariableDeclaration()){completions.push(...pathCompletions);break}}return completions}function _getCompletionRecords(path15,context){let records=[];if(path15.isIfStatement())records=addCompletionRecords(path15.get("consequent"),records,context),records=addCompletionRecords(path15.get("alternate"),records,context);else {if(path15.isDoExpression()||path15.isFor()||path15.isWhile()||path15.isLabeledStatement())return addCompletionRecords(path15.get("body"),records,context);if(path15.isProgram()||path15.isBlockStatement())return getStatementListCompletion(path15.get("body"),context);if(path15.isFunction())return _getCompletionRecords(path15.get("body"),context);if(path15.isTryStatement())records=addCompletionRecords(path15.get("block"),records,context),records=addCompletionRecords(path15.get("handler"),records,context);else {if(path15.isCatchClause())return addCompletionRecords(path15.get("body"),records,context);if(path15.isSwitchStatement())return completionRecordForSwitch(path15.get("cases"),records,context);if(path15.isSwitchCase())return getStatementListCompletion(path15.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});path15.isBreakStatement()?records.push(BreakCompletion(path15)):records.push(NormalCompletion(path15));}}return records}function getCompletionRecords(){return _getCompletionRecords(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(r8=>r8.path)}function getSibling(key2){return _index.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key2}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let _key=this.key,sibling=this.getSibling(++_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(++_key);return siblings}function getAllPrevSiblings(){let _key=this.key,sibling=this.getSibling(--_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(--_key);return siblings}function get(key2,context=!0){context===!0&&(context=this.context);let parts=key2.split(".");return parts.length===1?this._getKey(key2,context):this._getPattern(parts,context)}function _getKey(key2,context){let node=this.node,container=node[key2];return Array.isArray(container)?container.map((_8,i3)=>_index.default.get({listKey:key2,parentPath:this,parent:node,container,key:i3}).setContext(context)):_index.default.get({parentPath:this,parent:node,container:node,key:key2}).setContext(context)}function _getPattern(parts,context){let path15=this;for(let part of parts)part==="."?path15=path15.parentPath:Array.isArray(path15)?path15=path15[part]:path15=path15.get(part,context);return path15}function getBindingIdentifiers(duplicates){return _getBindingIdentifiers(this.node,duplicates)}function getOuterBindingIdentifiers(duplicates){return _getOuterBindingIdentifiers(this.node,duplicates)}function getBindingIdentifierPaths(duplicates=!1,outerOnly=!1){let search=[this],ids=Object.create(null);for(;search.length;){let id2=search.shift();if(!id2||!id2.node)continue;let keys=_getBindingIdentifiers.keys[id2.node.type];if(id2.isIdentifier()){duplicates?(ids[id2.node.name]=ids[id2.node.name]||[]).push(id2):ids[id2.node.name]=id2;continue}if(id2.isExportDeclaration()){let declaration=id2.get("declaration");isDeclaration(declaration)&&search.push(declaration);continue}if(outerOnly){if(id2.isFunctionDeclaration()){search.push(id2.get("id"));continue}if(id2.isFunctionExpression())continue}if(keys)for(let i3=0;i3<keys.length;i3++){let key2=keys[i3],child=id2.get(key2);Array.isArray(child)?search.push(...child):child.node&&search.push(child);}}return ids}function getOuterBindingIdentifierPaths(duplicates=!1){return this.getBindingIdentifierPaths(duplicates,!0)}}});var require_comments2=__commonJS({"../../node_modules/@babel/traverse/lib/path/comments.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.addComment=addComment;exports.addComments=addComments;exports.shareCommentsWithSiblings=shareCommentsWithSiblings;var _t14=require_lib11(),{addComment:_addComment,addComments:_addComments}=_t14;function shareCommentsWithSiblings(){if(typeof this.key=="string")return;let node=this.node;if(!node)return;let trailing=node.trailingComments,leading=node.leadingComments;if(!trailing&&!leading)return;let prev=this.getSibling(this.key-1),next=this.getSibling(this.key+1),hasPrev=!!prev.node,hasNext=!!next.node;hasPrev&&(leading&&prev.addComments("trailing",removeIfExisting(leading,prev.node.trailingComments)),trailing&&!hasNext&&prev.addComments("trailing",trailing)),hasNext&&(trailing&&next.addComments("leading",removeIfExisting(trailing,next.node.leadingComments)),leading&&!hasPrev&&next.addComments("leading",leading));}function removeIfExisting(list,toRemove){if(!(toRemove!=null&&toRemove.length))return list;let set2=new Set(toRemove);return list.filter(el8=>!set2.has(el8))}function addComment(type2,content,line5){_addComment(this.node,type2,content,line5);}function addComments(type2,comments){_addComments(this.node,type2,comments);}}});var require_path4=__commonJS({"../../node_modules/@babel/traverse/lib/path/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=exports.SHOULD_STOP=exports.SHOULD_SKIP=exports.REMOVED=void 0;var virtualTypes=require_virtual_types(),_debug=require_src(),_index=require_lib21(),_index2=require_scope2(),_t14=require_lib11(),t25=_t14,cache3=require_cache(),_generator=require_lib12(),NodePath_ancestry=require_ancestry(),NodePath_inference=require_inference(),NodePath_replacement=require_replacement(),NodePath_evaluation=require_evaluation(),NodePath_conversion=require_conversion(),NodePath_introspection=require_introspection(),NodePath_context=require_context(),NodePath_removal=require_removal(),NodePath_modification=require_modification(),NodePath_family=require_family(),NodePath_comments=require_comments2(),NodePath_virtual_types_validator=require_virtual_types_validator(),{validate}=_t14,debug=_debug("babel"),REMOVED=exports.REMOVED=1,SHOULD_STOP=exports.SHOULD_STOP=2,SHOULD_SKIP=exports.SHOULD_SKIP=4,NodePath=class _NodePath{constructor(hub,parent){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=parent,this.hub=hub,this.data=null,this.context=null,this.scope=null;}static get({hub,parentPath,parent,container,listKey,key:key2}){if(!hub&&parentPath&&(hub=parentPath.hub),!parent)throw new Error("To get a node path the parent needs to exist");let targetNode=container[key2],paths=cache3.getOrCreateCachedPaths(hub,parent),path15=paths.get(targetNode);return path15||(path15=new _NodePath(hub,parent),targetNode&&paths.set(targetNode,path15)),path15.setup(parentPath,container,listKey,key2),path15}getScope(scope){return this.isScope()?new _index2.default(this):scope}setData(key2,val){return this.data==null&&(this.data=Object.create(null)),this.data[key2]=val}getData(key2,def){this.data==null&&(this.data=Object.create(null));let val=this.data[key2];return val===void 0&&def!==void 0&&(val=this.data[key2]=def),val}hasNode(){return this.node!=null}buildCodeFrameError(msg,Error2=SyntaxError){return this.hub.buildError(this.node,msg,Error2)}traverse(visitor,state){(0, _index.default)(this.node,visitor,this.scope,state,this);}set(key2,node){validate(this.node,key2,node),this.node[key2]=node;}getPathLocation(){let parts=[],path15=this;do{let key2=path15.key;path15.inList&&(key2=`${path15.listKey}[${key2}]`),parts.unshift(key2);}while(path15=path15.parentPath);return parts.join(".")}debug(message){debug.enabled&&debug(`${this.getPathLocation()} ${this.type}: ${message}`);}toString(){return (0, _generator.default)(this.node).code}get inList(){return !!this.listKey}set inList(inList){inList||(this.listKey=null);}get parentKey(){return this.listKey||this.key}get shouldSkip(){return !!(this._traverseFlags&SHOULD_SKIP)}set shouldSkip(v11){v11?this._traverseFlags|=SHOULD_SKIP:this._traverseFlags&=~SHOULD_SKIP;}get shouldStop(){return !!(this._traverseFlags&SHOULD_STOP)}set shouldStop(v11){v11?this._traverseFlags|=SHOULD_STOP:this._traverseFlags&=~SHOULD_STOP;}get removed(){return !!(this._traverseFlags&REMOVED)}set removed(v11){v11?this._traverseFlags|=REMOVED:this._traverseFlags&=~REMOVED;}};Object.assign(NodePath.prototype,NodePath_ancestry,NodePath_inference,NodePath_replacement,NodePath_evaluation,NodePath_conversion,NodePath_introspection,NodePath_context,NodePath_removal,NodePath_modification,NodePath_family,NodePath_comments);NodePath.prototype._guessExecutionStatusRelativeToDifferentFunctions=NodePath_introspection._guessExecutionStatusRelativeTo;for(let type2 of t25.TYPES){let typeKey=`is${type2}`,fn11=t25[typeKey];NodePath.prototype[typeKey]=function(opts){return fn11(this.node,opts)},NodePath.prototype[`assert${type2}`]=function(opts){if(!fn11(this.node,opts))throw new TypeError(`Expected node path of type ${type2}`)};}Object.assign(NodePath.prototype,NodePath_virtual_types_validator);for(let type2 of Object.keys(virtualTypes))type2[0]!=="_"&&(t25.TYPES.includes(type2)||t25.TYPES.push(type2));exports.default=NodePath;}});var require_context2=__commonJS({"../../node_modules/@babel/traverse/lib/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _index=require_path4(),_t14=require_lib11(),{VISITOR_KEYS}=_t14,TraversalContext=class{constructor(scope,opts,state,parentPath){this.queue=null,this.priorityQueue=null,this.parentPath=parentPath,this.scope=scope,this.state=state,this.opts=opts;}shouldVisit(node){let opts=this.opts;if(opts.enter||opts.exit||opts[node.type])return !0;let keys=VISITOR_KEYS[node.type];if(!(keys!=null&&keys.length))return !1;for(let key2 of keys)if(node[key2])return !0;return !1}create(node,container,key2,listKey){return _index.default.get({parentPath:this.parentPath,parent:node,container,key:key2,listKey})}maybeQueue(path15,notPriority){this.queue&&(notPriority?this.queue.push(path15):this.priorityQueue.push(path15));}visitMultiple(container,parent,listKey){if(container.length===0)return !1;let queue=[];for(let key2=0;key2<container.length;key2++){let node=container[key2];node&&this.shouldVisit(node)&&queue.push(this.create(parent,container,key2,listKey));}return this.visitQueue(queue)}visitSingle(node,key2){return this.shouldVisit(node[key2])?this.visitQueue([this.create(node,node,key2)]):!1}visitQueue(queue){this.queue=queue,this.priorityQueue=[];let visited=new WeakSet,stop=!1,visitIndex=0;for(;visitIndex<queue.length;){let path15=queue[visitIndex];if(visitIndex++,path15.resync(),(path15.contexts.length===0||path15.contexts[path15.contexts.length-1]!==this)&&path15.pushContext(this),path15.key===null)continue;let{node}=path15;if(!visited.has(node)){if(node&&visited.add(node),path15.visit()){stop=!0;break}if(this.priorityQueue.length&&(stop=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=queue,stop))break}}for(let i3=0;i3<visitIndex;i3++)queue[i3].popContext();return this.queue=null,stop}visit(node,key2){let nodes=node[key2];return nodes?Array.isArray(nodes)?this.visitMultiple(nodes,node,key2):this.visitSingle(node,key2):!1}};exports.default=TraversalContext;}});var require_traverse_node=__commonJS({"../../node_modules/@babel/traverse/lib/traverse-node.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.traverseNode=traverseNode;var _context=require_context2(),_t14=require_lib11(),{VISITOR_KEYS}=_t14;function traverseNode(node,opts,scope,state,path15,skipKeys,visitSelf){let keys=VISITOR_KEYS[node.type];if(!keys)return !1;let context=new _context.default(scope,opts,state,path15);if(visitSelf)return skipKeys!=null&&skipKeys[path15.parentKey]?!1:context.visitQueue([path15]);for(let key2 of keys)if(!(skipKeys!=null&&skipKeys[key2])&&context.visit(node,key2))return !0;return !1}}});var require_hub=__commonJS({"../../node_modules/@babel/traverse/lib/hub.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var Hub=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(node,msg,Error2=TypeError){return new Error2(msg)}};exports.default=Hub;}});var require_lib21=__commonJS({"../../node_modules/@babel/traverse/lib/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});Object.defineProperty(exports,"Hub",{enumerable:!0,get:function(){return _hub.default}});Object.defineProperty(exports,"NodePath",{enumerable:!0,get:function(){return _index.default}});Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return _index2.default}});exports.visitors=exports.default=void 0;var visitors=require_visitors();exports.visitors=visitors;var _t14=require_lib11(),cache3=require_cache(),_traverseNode=require_traverse_node(),_index=require_path4(),_index2=require_scope2(),_hub=require_hub(),{VISITOR_KEYS,removeProperties,traverseFast}=_t14;function traverse(parent,opts={},scope,state,parentPath,visitSelf){if(parent){if(!opts.noScope&&!scope&&parent.type!=="Program"&&parent.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);if(!parentPath&&visitSelf)throw new Error("visitSelf can only be used when providing a NodePath.");VISITOR_KEYS[parent.type]&&(visitors.explode(opts),(0, _traverseNode.traverseNode)(parent,opts,scope,state,parentPath,null,visitSelf));}}exports.default=traverse;traverse.visitors=visitors;traverse.verify=visitors.verify;traverse.explode=visitors.explode;traverse.cheap=function(node,enter){traverseFast(node,enter);};traverse.node=function(node,opts,scope,state,path15,skipKeys){(0, _traverseNode.traverseNode)(node,opts,scope,state,path15,skipKeys);};traverse.clearNode=function(node,opts){removeProperties(node,opts);};traverse.removeProperties=function(tree,opts){return traverseFast(tree,traverse.clearNode,opts),tree};function hasDenylistedType(path15,state){path15.node.type===state.type&&(state.has=!0,path15.stop());}traverse.hasType=function(tree,type2,denylistTypes){if(denylistTypes!=null&&denylistTypes.includes(tree.type))return !1;if(tree.type===type2)return !0;let state={has:!1,type:type2};return traverse(tree,{noScope:!0,denylist:denylistTypes,enter:hasDenylistedType},null,state),state.has};traverse.cache=cache3;}});var require_dist2=__commonJS({"../../node_modules/@storybook/csf/dist/index.js"(exports){var B15=Object.create,u=Object.defineProperty,C15=Object.getOwnPropertyDescriptor,F16=Object.getOwnPropertyNames,h7=Object.getPrototypeOf,w13=Object.prototype.hasOwnProperty,E10=(r8,e4)=>()=>(e4||r8((e4={exports:{}}).exports,e4),e4.exports),I15=(r8,e4,n,t25)=>{if(e4&&typeof e4=="object"||typeof e4=="function")for(let a3 of F16(e4))!w13.call(r8,a3)&&a3!==n&&u(r8,a3,{get:()=>e4[a3],enumerable:!(t25=C15(e4,a3))||t25.enumerable});return r8},k14=(r8,e4,n)=>(n=r8!=null?B15(h7(r8)):{},I15(e4||!r8||!r8.__esModule?u(n,"default",{value:r8,enumerable:!0}):n,r8)),x11=E10(T11=>{Object.defineProperty(T11,"__esModule",{value:!0}),T11.isEqual=function(){var r8=Object.prototype.toString,e4=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t25){return Object.keys(t25).concat(Object.getOwnPropertySymbols(t25))}:Object.keys;return function(t25,a3){return function i3(o3,s,d7){var y13,g4,p7,l=r8.call(o3),b15=r8.call(s);if(o3===s)return !0;if(o3==null||s==null)return !1;if(d7.indexOf(o3)>-1&&d7.indexOf(s)>-1)return !0;if(d7.push(o3,s),l!=b15||(y13=n(o3),g4=n(s),y13.length!=g4.length||y13.some(function(A14){return !i3(o3[A14],s[A14],d7)})))return !1;switch(l.slice(8,-1)){case"Symbol":return o3.valueOf()==s.valueOf();case"Date":case"Number":return +o3==+s||+o3!=+o3&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o3==""+s;case"Set":case"Map":y13=o3.entries(),g4=s.entries();do if(!i3((p7=y13.next()).value,g4.next().value,d7))return !1;while(!p7.done);return !0;case"ArrayBuffer":o3=new Uint8Array(o3),s=new Uint8Array(s);case"DataView":o3=new Uint8Array(o3.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o3.length!=s.length)return !1;for(p7=0;p7<o3.length;p7++)if((p7 in o3||p7 in s)&&(p7 in o3!=p7 in s||!i3(o3[p7],s[p7],d7)))return !1;return !0;case"Object":return i3(e4(o3),e4(s),d7);default:return !1}}(t25,a3,[])}}();});function R17(r8){return r8.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e4,n,t25,a3)=>`${n} ${t25}${a3}`).replace(/([a-z])([A-Z])/g,(e4,n,t25)=>`${n} ${t25}`).replace(/([a-z])([0-9])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/([0-9])([a-z])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/(\s|^)(\w)/g,(e4,n,t25)=>`${n}${t25.toUpperCase()}`).replace(/ +/g," ").trim()}var c8=k14(x11()),S11=r8=>r8.map(e4=>typeof e4<"u").filter(Boolean).length,v11=(r8,e4)=>{let{exists:n,eq:t25,neq:a3,truthy:i3}=r8;if(S11([n,t25,a3,i3])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t25,neq:a3})}`);if(typeof t25<"u")return (0, c8.isEqual)(e4,t25);if(typeof a3<"u")return !(0, c8.isEqual)(e4,a3);if(typeof n<"u"){let s=typeof e4<"u";return n?s:!s}return typeof i3>"u"||i3?!!e4:!e4},P16=(r8,e4,n)=>{if(!r8.if)return !0;let{arg:t25,global:a3}=r8.if;if(S11([t25,a3])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t25,global:a3})}`);let i3=t25?e4[t25]:n[a3];return v11(r8.if,i3)},O14=r8=>r8.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m4=(r8,e4)=>{let n=O14(r8);if(n==="")throw new Error(`Invalid ${e4} '${r8}', must include alphanumeric characters`);return n},N16=(r8,e4)=>`${m4(r8,"kind")}${e4?`--${m4(e4,"name")}`:""}`,M11=r8=>R17(r8);function f10(r8,e4){return Array.isArray(e4)?e4.includes(r8):r8.match(e4)}function G21(r8,{includeStories:e4,excludeStories:n}){return r8!=="__esModule"&&(!e4||f10(r8,e4))&&(!n||!f10(r8,n))}var V16=(r8,{rootSeparator:e4,groupSeparator:n})=>{let[t25,a3]=r8.split(e4,2),i3=(a3||r8).split(n).filter(o3=>!!o3);return {root:a3?t25:null,groups:i3}},z14=(...r8)=>{let e4=r8.reduce((n,t25)=>(t25.startsWith("!")?n.delete(t25.slice(1)):n.add(t25),n),new Set);return Array.from(e4)};exports.combineTags=z14;exports.includeConditionalArg=P16;exports.isExportStory=G21;exports.parseKind=V16;exports.sanitize=O14;exports.storyNameFromExport=M11;exports.toId=N16;}});var require_dist3=__commonJS({"../../lib/csf-tools/dist/index.js"(exports,module){var __create4=Object.create,__defProp6=Object.defineProperty,__getOwnPropDesc4=Object.getOwnPropertyDescriptor,__getOwnPropNames4=Object.getOwnPropertyNames,__getProtoOf4=Object.getPrototypeOf,__hasOwnProp4=Object.prototype.hasOwnProperty,__export6=(target,all)=>{for(var name in all)__defProp6(target,name,{get:all[name],enumerable:!0});},__copyProps4=(to5,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key2 of __getOwnPropNames4(from))!__hasOwnProp4.call(to5,key2)&&key2!==except&&__defProp6(to5,key2,{get:()=>from[key2],enumerable:!(desc=__getOwnPropDesc4(from,key2))||desc.enumerable});return to5},__toESM4=(mod,isNodeMode,target)=>(target=mod!=null?__create4(__getProtoOf4(mod)):{},__copyProps4(isNodeMode||!mod||!mod.__esModule?__defProp6(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS2=mod=>__copyProps4(__defProp6({},"__esModule",{value:!0}),mod),src_exports3={};__export6(src_exports3,{ConfigFile:()=>ConfigFile,CsfFile:()=>CsfFile,NoMetaError:()=>NoMetaError,babelParse:()=>babelParse,babelParseExpression:()=>babelParseExpression,babelPrint:()=>babelPrint,enrichCsf:()=>enrichCsf,enrichCsfMeta:()=>enrichCsfMeta,enrichCsfStory:()=>enrichCsfStory,extractDescription:()=>extractDescription,extractSource:()=>extractSource,formatConfig:()=>formatConfig,formatCsf:()=>formatCsf,getStorySortParameter:()=>getStorySortParameter,loadConfig:()=>loadConfig4,loadCsf:()=>loadCsf,parserOptions:()=>parserOptions,printConfig:()=>printConfig,printCsf:()=>printCsf,readConfig:()=>readConfig,readCsf:()=>readCsf,writeConfig:()=>writeConfig,writeCsf:()=>writeCsf});module.exports=__toCommonJS2(src_exports3);var import_fs_extra=__toESM4(require_lib3()),import_ts_dedent=__require("ts-dedent"),t25=__toESM4(require_lib11()),generate=__toESM4(require_lib12()),recast2=__toESM4(require_main5()),traverse=__toESM4(require_lib21()),import_csf=require_dist2(),babelParser=__toESM4(require_lib17()),recast=__toESM4(require_main5());function parseWithFlowOrTypescript(source2,parserOptions2){let parserPlugins=/^\s*\/\/\s*@flow/.test(source2)?["flow"]:["typescript"],mergedParserOptions={...parserOptions2,plugins:[...parserOptions2.plugins??[],...parserPlugins]};return babelParser.parse(source2,mergedParserOptions)}var parserOptions={sourceType:"module",plugins:["jsx","decorators-legacy","classProperties"],tokens:!0},babelParse=code=>recast.parse(code,{parser:{parse(source2){return parseWithFlowOrTypescript(source2,parserOptions)}}}),babelPrint=ast=>recast.print(ast,{quote:"single",trailingComma:!0,tabWidth:2,wrapColumn:80,arrowParensAlways:!0}).code,babelParseExpression=code=>babelParser.parseExpression(code,parserOptions),t26=__toESM4(require_lib11()),findVarInitialization=(identifier3,program)=>{let init=null,declarations=null;return program.body.find(node=>(t26.isVariableDeclaration(node)?declarations=node.declarations:t26.isExportNamedDeclaration(node)&&t26.isVariableDeclaration(node.declaration)&&(declarations=node.declaration.declarations),declarations&&declarations.find(decl=>t26.isVariableDeclarator(decl)&&t26.isIdentifier(decl.id)&&decl.id.name===identifier3?(init=decl.init,!0):!1))),init},logger=console;function parseIncludeExclude(prop){if(t25.isArrayExpression(prop))return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error(`Expected string literal: ${e4}`)});if(t25.isStringLiteral(prop))return new RegExp(prop.value);if(t25.isRegExpLiteral(prop))return new RegExp(prop.pattern,prop.flags);throw new Error(`Unknown include/exclude: ${prop}`)}function parseTags(prop){if(!t25.isArrayExpression(prop))throw new Error("CSF: Expected tags array");return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error("CSF: Expected tag to be string literal")})}var formatLocation2=(node,fileName)=>{let{line:line5,column:column2}=node.loc?.start||{};return `${fileName||""} (line ${line5}, col ${column2})`.trim()},isArgsStory=(init,parent,csf)=>{let storyFn=init;if(t25.isCallExpression(init)){let{callee,arguments:bindArguments}=init;if(t25.isProgram(parent)&&t25.isMemberExpression(callee)&&t25.isIdentifier(callee.object)&&t25.isIdentifier(callee.property)&&callee.property.name==="bind"&&(bindArguments.length===0||bindArguments.length===1&&t25.isObjectExpression(bindArguments[0])&&bindArguments[0].properties.length===0)){let boundIdentifier=callee.object.name,template=findVarInitialization(boundIdentifier,parent);template&&(csf._templates[boundIdentifier]=template,storyFn=template);}}return t25.isArrowFunctionExpression(storyFn)||t25.isFunctionDeclaration(storyFn)?storyFn.params.length>0:!1},parseExportsOrder=init=>{if(t25.isArrayExpression(init))return init.elements.map(item=>{if(t25.isStringLiteral(item))return item.value;throw new Error(`Expected string literal named export: ${item}`)});throw new Error(`Expected array of string literals: ${init}`)},sortExports=(exportByName,order)=>order.reduce((acc,name)=>{let namedExport=exportByName[name];return namedExport&&(acc[name]=namedExport),acc},{}),NoMetaError=class extends Error{constructor(message,ast,fileName){super(import_ts_dedent.dedent`
509
509
  CSF: ${message} ${formatLocation2(ast,fileName)}
510
510
 
511
511
  More info: https://storybook.js.org/docs/react/writing-stories#default-export
@@ -518,7 +518,7 @@ ${rootStack}`,err}}}}});var require_lib19=__commonJS({"../../node_modules/@babel
518
518
 
519
519
  SB8 does not support \`storiesOf\`.
520
520
  `)}},ImportDeclaration:{enter({node}){let{source:source2}=node;if(t25.isStringLiteral(source2))self2.imports.push(source2.value);else throw new Error("CSF: unexpected import source")}}}),!self2._meta)throw new NoMetaError("missing default export",self2._ast,self2._fileName);let entries=Object.entries(self2._stories);if(self2._meta.title=this._makeTitle(self2._meta?.title),self2._metaAnnotations.play&&(self2._meta.tags=[...self2._meta.tags||[],"play-fn"]),self2._stories=entries.reduce((acc,[key2,story])=>{if(!(0, import_csf.isExportStory)(key2,self2._meta))return acc;let id2=story.parameters?.__id??(0, import_csf.toId)(self2._meta?.id||self2._meta?.title,(0, import_csf.storyNameFromExport)(key2)),parameters={...story.parameters,__id:id2},{includeStories}=self2._meta||{};key2==="__page"&&(entries.length===1||Array.isArray(includeStories)&&includeStories.length===1)&&(parameters.docsOnly=!0),acc[key2]={...story,id:id2,parameters};let{tags,play}=self2._storyAnnotations[key2];if(tags){let node=t25.isIdentifier(tags)?findVarInitialization(tags.name,this._ast.program):tags;acc[key2].tags=parseTags(node);}return play&&(acc[key2].tags=[...acc[key2].tags||[],"play-fn"]),acc},{}),Object.keys(self2._storyExports).forEach(key2=>{(0, import_csf.isExportStory)(key2,self2._meta)||(delete self2._storyExports[key2],delete self2._storyAnnotations[key2]);}),self2._namedExportsOrder){let unsortedExports=Object.keys(self2._storyExports);self2._storyExports=sortExports(self2._storyExports,self2._namedExportsOrder),self2._stories=sortExports(self2._stories,self2._namedExportsOrder);let sortedExports=Object.keys(self2._storyExports);if(unsortedExports.length!==sortedExports.length)throw new Error(`Missing exports after sort: ${unsortedExports.filter(key2=>!sortedExports.includes(key2))}`)}return self2}get meta(){return this._meta}get stories(){return Object.values(this._stories)}get indexInputs(){if(!this._fileName)throw new Error(import_ts_dedent.dedent`Cannot automatically create index inputs with CsfFile.indexInputs because the CsfFile instance was created without a the fileName option.
521
- Either add the fileName option when creating the CsfFile instance, or create the index inputs manually.`);return Object.entries(this._stories).map(([exportName,story])=>{let tags=Array.from(new Set([...this._meta?.tags??[],...story.tags??[]]));return {type:"story",importPath:this._fileName,exportName,name:story.name,title:this.meta?.title,metaId:this.meta?.id,tags,metaTags:this.meta?.tags,__id:story.id}})}},loadCsf=(code,options9)=>{let ast=babelParse(code);return new CsfFile(ast,options9)},formatCsf=(csf,options9={sourceMaps:!1})=>{let result=generate.default(csf._ast,options9);if(options9.sourceMaps)return result;let{code}=result;return code},printCsf=(csf,options9={})=>recast2.print(csf._ast,options9),readCsf=async(fileName,options9)=>{let code=(await import_fs_extra.default.readFile(fileName,"utf-8")).toString();return loadCsf(code,{...options9,fileName})},writeCsf=async(csf,fileName)=>{if(!(fileName||csf._fileName))throw new Error("Please specify a fileName for writeCsf");await import_fs_extra.default.writeFile(fileName,printCsf(csf).code);},import_fs_extra2=__toESM4(require_lib3()),import_ts_dedent2=__toESM4(__require("ts-dedent")),t32=__toESM4(require_lib11()),generate2=__toESM4(require_lib12()),traverse2=__toESM4(require_lib21()),recast3=__toESM4(require_main5()),logger2=console,getCsfParsingErrorMessage=({expectedType,foundType,node})=>{let nodeInfo="";if(node)try{nodeInfo=JSON.stringify(node);}catch{}return import_ts_dedent2.default`
521
+ Either add the fileName option when creating the CsfFile instance, or create the index inputs manually.`);return Object.entries(this._stories).map(([exportName,story])=>{let tags=[...this._meta?.tags??[],...story.tags??[]];return {type:"story",importPath:this._fileName,exportName,name:story.name,title:this.meta?.title,metaId:this.meta?.id,tags,__id:story.id}})}},loadCsf=(code,options9)=>{let ast=babelParse(code);return new CsfFile(ast,options9)},formatCsf=(csf,options9={sourceMaps:!1})=>{let result=generate.default(csf._ast,options9);if(options9.sourceMaps)return result;let{code}=result;return code},printCsf=(csf,options9={})=>recast2.print(csf._ast,options9),readCsf=async(fileName,options9)=>{let code=(await import_fs_extra.default.readFile(fileName,"utf-8")).toString();return loadCsf(code,{...options9,fileName})},writeCsf=async(csf,fileName)=>{if(!(fileName||csf._fileName))throw new Error("Please specify a fileName for writeCsf");await import_fs_extra.default.writeFile(fileName,printCsf(csf).code);},import_fs_extra2=__toESM4(require_lib3()),import_ts_dedent2=__toESM4(__require("ts-dedent")),t32=__toESM4(require_lib11()),generate2=__toESM4(require_lib12()),traverse2=__toESM4(require_lib21()),recast3=__toESM4(require_main5()),logger2=console,getCsfParsingErrorMessage=({expectedType,foundType,node})=>{let nodeInfo="";if(node)try{nodeInfo=JSON.stringify(node);}catch{}return import_ts_dedent2.default`
522
522
  CSF Parsing error: Expected '${expectedType}' but found '${foundType}' instead in '${node?.type}'.
523
523
  ${nodeInfo}
524
524
  `},propKey=p7=>t32.isIdentifier(p7.key)?p7.key.name:t32.isStringLiteral(p7.key)?p7.key.value:null,_getPath=(path15,node)=>{if(path15.length===0)return node;if(t32.isObjectExpression(node)){let[first,...rest]=path15,field=node.properties.find(p7=>propKey(p7)===first);if(field)return _getPath(rest,field.value)}},_getPathProperties=(path15,node)=>{if(path15.length===0){if(t32.isObjectExpression(node))return node.properties;throw new Error("Expected object expression")}if(t32.isObjectExpression(node)){let[first,...rest]=path15,field=node.properties.find(p7=>propKey(p7)===first);if(field)return rest.length===0?node.properties:_getPathProperties(rest,field.value)}},_findVarDeclarator=(identifier3,program)=>{let declarator=null,declarations=null;return program.body.find(node=>(t32.isVariableDeclaration(node)?declarations=node.declarations:t32.isExportNamedDeclaration(node)&&t32.isVariableDeclaration(node.declaration)&&(declarations=node.declaration.declarations),declarations&&declarations.find(decl=>t32.isVariableDeclarator(decl)&&t32.isIdentifier(decl.id)&&decl.id.name===identifier3?(declarator=decl,!0):!1))),declarator},_findVarInitialization=(identifier3,program)=>_findVarDeclarator(identifier3,program)?.init,_makeObjectExpression=(path15,value)=>{if(path15.length===0)return value;let[first,...rest]=path15,innerExpression=_makeObjectExpression(rest,value);return t32.objectExpression([t32.objectProperty(t32.identifier(first),innerExpression)])},_updateExportNode=(path15,expr,existing)=>{let[first,...rest]=path15,existingField=existing.properties.find(p7=>propKey(p7)===first);existingField?t32.isObjectExpression(existingField.value)&&rest.length>0?_updateExportNode(rest,expr,existingField.value):existingField.value=_makeObjectExpression(rest,expr):existing.properties.push(t32.objectProperty(t32.identifier(first),_makeObjectExpression(rest,expr)));},ConfigFile=class{constructor(ast,code,fileName){this._exports={},this._exportDecls={},this.hasDefaultExport=!1,this._ast=ast,this._code=code,this.fileName=fileName;}parse(){let self2=this;return traverse2.default(this._ast,{ExportDefaultDeclaration:{enter({node,parent}){self2.hasDefaultExport=!0;let decl=t32.isIdentifier(node.declaration)&&t32.isProgram(parent)?_findVarInitialization(node.declaration.name,parent):node.declaration;(t32.isTSAsExpression(decl)||t32.isTSSatisfiesExpression(decl))&&(decl=decl.expression),t32.isObjectExpression(decl)?(self2._exportsObject=decl,decl.properties.forEach(p7=>{let exportName=propKey(p7);if(exportName){let exportVal=p7.value;t32.isIdentifier(exportVal)&&(exportVal=_findVarInitialization(exportVal.name,parent)),self2._exports[exportName]=exportVal;}})):logger2.warn(getCsfParsingErrorMessage({expectedType:"ObjectExpression",foundType:decl?.type,node:decl||node.declaration}));}},ExportNamedDeclaration:{enter({node,parent}){t32.isVariableDeclaration(node.declaration)?node.declaration.declarations.forEach(decl=>{if(t32.isVariableDeclarator(decl)&&t32.isIdentifier(decl.id)){let{name:exportName}=decl.id,exportVal=decl.init;t32.isIdentifier(exportVal)&&(exportVal=_findVarInitialization(exportVal.name,parent)),self2._exports[exportName]=exportVal,self2._exportDecls[exportName]=decl;}}):node.specifiers?node.specifiers.forEach(spec=>{if(t32.isExportSpecifier(spec)&&t32.isIdentifier(spec.exported)){let{name:exportName}=spec.exported,decl=_findVarDeclarator(exportName,parent);self2._exports[exportName]=decl.init,self2._exportDecls[exportName]=decl;}}):logger2.warn(getCsfParsingErrorMessage({expectedType:"VariableDeclaration",foundType:node.declaration?.type,node:node.declaration}));}},ExpressionStatement:{enter({node,parent}){if(t32.isAssignmentExpression(node.expression)&&node.expression.operator==="="){let{left,right}=node.expression;if(t32.isMemberExpression(left)&&t32.isIdentifier(left.object)&&left.object.name==="module"&&t32.isIdentifier(left.property)&&left.property.name==="exports"){let exportObject=right;t32.isIdentifier(right)&&(exportObject=_findVarInitialization(right.name,parent)),(t32.isTSAsExpression(exportObject)||t32.isTSSatisfiesExpression(exportObject))&&(exportObject=exportObject.expression),t32.isObjectExpression(exportObject)?(self2._exportsObject=exportObject,exportObject.properties.forEach(p7=>{let exportName=propKey(p7);if(exportName){let exportVal=p7.value;t32.isIdentifier(exportVal)&&(exportVal=_findVarInitialization(exportVal.name,parent)),self2._exports[exportName]=exportVal;}})):logger2.warn(getCsfParsingErrorMessage({expectedType:"ObjectExpression",foundType:exportObject?.type,node:exportObject}));}}}}}),self2}getFieldNode(path15){let[root2,...rest]=path15,exported=this._exports[root2];if(exported)return _getPath(rest,exported)}getFieldProperties(path15){let[root2,...rest]=path15,exported=this._exports[root2];if(exported)return _getPathProperties(rest,exported)}getFieldValue(path15){let node=this.getFieldNode(path15);if(node){let{code}=generate2.default(node,{});return (0, eval)(`(() => (${code}))()`)}}getSafeFieldValue(path15){try{return this.getFieldValue(path15)}catch{}}setFieldNode(path15,expr){let[first,...rest]=path15,exportNode=this._exports[first];if(this._exportsObject)_updateExportNode(path15,expr,this._exportsObject),this._exports[path15[0]]=expr;else if(exportNode&&t32.isObjectExpression(exportNode)&&rest.length>0)_updateExportNode(rest,expr,exportNode);else if(exportNode&&rest.length===0&&this._exportDecls[path15[0]]){let decl=this._exportDecls[path15[0]];decl.init=_makeObjectExpression([],expr);}else {if(this.hasDefaultExport)throw new Error(`Could not set the "${path15.join(".")}" field as the default export is not an object in this file.`);{let exportObj=_makeObjectExpression(rest,expr),newExport=t32.exportNamedDeclaration(t32.variableDeclaration("const",[t32.variableDeclarator(t32.identifier(first),exportObj)]));this._exports[first]=exportObj,this._ast.program.body.push(newExport);}}}getNameFromPath(path15){let node=this.getFieldNode(path15);if(node)return this._getPresetValue(node,"name")}getNamesFromPath(path15){let node=this.getFieldNode(path15);if(!node)return;let pathNames=[];return t32.isArrayExpression(node)&&node.elements.forEach(element=>{pathNames.push(this._getPresetValue(element,"name"));}),pathNames}_getPnpWrappedValue(node){if(t32.isCallExpression(node)){let arg=node.arguments[0];if(t32.isStringLiteral(arg))return arg.value}}_getPresetValue(node,fallbackProperty){let value;if(t32.isStringLiteral(node)?value=node.value:t32.isObjectExpression(node)&&node.properties.forEach(prop=>{t32.isObjectProperty(prop)&&t32.isIdentifier(prop.key)&&prop.key.name===fallbackProperty&&(t32.isStringLiteral(prop.value)?value=prop.value.value:value=this._getPnpWrappedValue(prop.value)),t32.isObjectProperty(prop)&&t32.isStringLiteral(prop.key)&&prop.key.value==="name"&&t32.isStringLiteral(prop.value)&&(value=prop.value.value);}),!value)throw new Error(`The given node must be a string literal or an object expression with a "${fallbackProperty}" property that is a string literal.`);return value}removeField(path15){let removeProperty=(properties2,prop)=>{let index=properties2.findIndex(p7=>t32.isIdentifier(p7.key)&&p7.key.name===prop||t32.isStringLiteral(p7.key)&&p7.key.value===prop);index>=0&&properties2.splice(index,1);};if(path15.length===1){let removedRootProperty=!1;if(this._ast.program.body.forEach(node=>{if(t32.isExportNamedDeclaration(node)&&t32.isVariableDeclaration(node.declaration)){let decl=node.declaration.declarations[0];t32.isIdentifier(decl.id)&&decl.id.name===path15[0]&&(this._ast.program.body.splice(this._ast.program.body.indexOf(node),1),removedRootProperty=!0);}if(t32.isExportDefaultDeclaration(node)&&t32.isObjectExpression(node.declaration)){let properties2=node.declaration.properties;removeProperty(properties2,path15[0]),removedRootProperty=!0;}if(t32.isExpressionStatement(node)&&t32.isAssignmentExpression(node.expression)&&t32.isMemberExpression(node.expression.left)&&t32.isIdentifier(node.expression.left.object)&&node.expression.left.object.name==="module"&&t32.isIdentifier(node.expression.left.property)&&node.expression.left.property.name==="exports"&&t32.isObjectExpression(node.expression.right)){let properties2=node.expression.right.properties;removeProperty(properties2,path15[0]),removedRootProperty=!0;}}),removedRootProperty)return}let properties=this.getFieldProperties(path15);if(properties){let lastPath=path15.at(-1);removeProperty(properties,lastPath);}}appendValueToArray(path15,value){let node=this.valueToNode(value);node&&this.appendNodeToArray(path15,node);}appendNodeToArray(path15,node){let current=this.getFieldNode(path15);if(!current)this.setFieldNode(path15,t32.arrayExpression([node]));else if(t32.isArrayExpression(current))current.elements.push(node);else throw new Error(`Expected array at '${path15.join(".")}', got '${current.type}'`)}removeEntryFromArray(path15,value){let current=this.getFieldNode(path15);if(current)if(t32.isArrayExpression(current)){let index=current.elements.findIndex(element=>t32.isStringLiteral(element)?element.value===value:t32.isObjectExpression(element)?this._getPresetValue(element,"name")===value:this._getPnpWrappedValue(element)===value);if(index>=0)current.elements.splice(index,1);else throw new Error(`Could not find '${value}' in array at '${path15.join(".")}'`)}else throw new Error(`Expected array at '${path15.join(".")}', got '${current.type}'`)}_inferQuotes(){if(!this._quotes){let occurrences=(this._ast.tokens||[]).slice(0,500).reduce((acc,token2)=>(token2.type.label==="string"&&(acc[this._code[token2.start]]+=1),acc),{"'":0,'"':0});this._quotes=occurrences["'"]>occurrences['"']?"single":"double";}return this._quotes}valueToNode(value){let quotes=this._inferQuotes(),valueNode;if(quotes==="single"){let{code}=generate2.default(t32.valueToNode(value),{jsescOption:{quotes}}),program=babelParse(`const __x = ${code}`);traverse2.default(program,{VariableDeclaration:{enter({node}){node.declarations.length===1&&t32.isVariableDeclarator(node.declarations[0])&&t32.isIdentifier(node.declarations[0].id)&&node.declarations[0].id.name==="__x"&&(valueNode=node.declarations[0].init);}}});}else valueNode=t32.valueToNode(value);return valueNode}setFieldValue(path15,value){let valueNode=this.valueToNode(value);if(!valueNode)throw new Error(`Unexpected value ${JSON.stringify(value)}`);this.setFieldNode(path15,valueNode);}getBodyDeclarations(){return this._ast.program.body}setBodyDeclaration(declaration){this._ast.program.body.push(declaration);}setRequireImport(importSpecifier2,fromImport){let requireDeclaration=this._ast.program.body.find(node=>t32.isVariableDeclaration(node)&&node.declarations.length===1&&t32.isVariableDeclarator(node.declarations[0])&&t32.isCallExpression(node.declarations[0].init)&&t32.isIdentifier(node.declarations[0].init.callee)&&node.declarations[0].init.callee.name==="require"&&t32.isStringLiteral(node.declarations[0].init.arguments[0])&&node.declarations[0].init.arguments[0].value===fromImport),hasRequireSpecifier=name=>t32.isObjectPattern(requireDeclaration?.declarations[0].id)&&requireDeclaration?.declarations[0].id.properties.find(specifier=>t32.isObjectProperty(specifier)&&t32.isIdentifier(specifier.key)&&specifier.key.name===name),hasDefaultRequireSpecifier=(declaration,name)=>declaration.declarations.length===1&&t32.isVariableDeclarator(declaration.declarations[0])&&t32.isIdentifier(declaration.declarations[0].id)&&declaration.declarations[0].id.name===name;if(typeof importSpecifier2=="string"){let addDefaultRequireSpecifier=()=>{this._ast.program.body.unshift(t32.variableDeclaration("const",[t32.variableDeclarator(t32.identifier(importSpecifier2),t32.callExpression(t32.identifier("require"),[t32.stringLiteral(fromImport)]))]));};requireDeclaration&&hasDefaultRequireSpecifier(requireDeclaration,importSpecifier2)||addDefaultRequireSpecifier();}else requireDeclaration?importSpecifier2.forEach(specifier=>{hasRequireSpecifier(specifier)||requireDeclaration.declarations[0].id.properties.push(t32.objectProperty(t32.identifier(specifier),t32.identifier(specifier),void 0,!0));}):this._ast.program.body.unshift(t32.variableDeclaration("const",[t32.variableDeclarator(t32.objectPattern(importSpecifier2.map(specifier=>t32.objectProperty(t32.identifier(specifier),t32.identifier(specifier),void 0,!0))),t32.callExpression(t32.identifier("require"),[t32.stringLiteral(fromImport)]))]));}setImport(importSpecifier2,fromImport){let getNewImportSpecifier=specifier=>t32.importSpecifier(t32.identifier(specifier),t32.identifier(specifier)),hasImportSpecifier=(declaration,name)=>declaration.specifiers.find(specifier=>t32.isImportSpecifier(specifier)&&t32.isIdentifier(specifier.imported)&&specifier.imported.name===name),hasDefaultImportSpecifier=(declaration,name)=>declaration.specifiers.find(specifier=>t32.isImportDefaultSpecifier(specifier)),importDeclaration2=this._ast.program.body.find(node=>t32.isImportDeclaration(node)&&node.source.value===fromImport);typeof importSpecifier2=="string"?importDeclaration2?hasDefaultImportSpecifier(importDeclaration2)||importDeclaration2.specifiers.push(t32.importDefaultSpecifier(t32.identifier(importSpecifier2))):this._ast.program.body.unshift(t32.importDeclaration([t32.importDefaultSpecifier(t32.identifier(importSpecifier2))],t32.stringLiteral(fromImport))):importDeclaration2?importSpecifier2.forEach(specifier=>{hasImportSpecifier(importDeclaration2,specifier)||importDeclaration2.specifiers.push(getNewImportSpecifier(specifier));}):this._ast.program.body.unshift(t32.importDeclaration(importSpecifier2.map(specifier=>t32.importSpecifier(t32.identifier(specifier),t32.identifier(specifier))),t32.stringLiteral(fromImport)));}},loadConfig4=(code,fileName)=>{let ast=babelParse(code);return new ConfigFile(ast,code,fileName)},formatConfig=config=>printConfig(config).code,printConfig=(config,options9={})=>recast3.print(config._ast,options9),readConfig=async fileName=>{let code=(await import_fs_extra2.default.readFile(fileName,"utf-8")).toString();return loadConfig4(code,fileName).parse()},writeConfig=async(config,fileName)=>{let fname=fileName||config.fileName;if(!fname)throw new Error("Please specify a fileName for writeConfig");await import_fs_extra2.default.writeFile(fname,formatConfig(config));},t42=__toESM4(require_lib11()),traverse3=__toESM4(require_lib21()),generate3=__toESM4(require_lib12()),import_ts_dedent3=__require("ts-dedent"),logger3=console,getValue=(obj,key2)=>{let value;return obj.properties.forEach(p7=>{t42.isIdentifier(p7.key)&&p7.key.name===key2&&(value=p7.value);}),value},parseValue=value=>{let expr=stripTSModifiers(value);if(t42.isArrayExpression(expr))return expr.elements.map(o3=>parseValue(o3));if(t42.isObjectExpression(expr))return expr.properties.reduce((acc,p7)=>(t42.isIdentifier(p7.key)&&(acc[p7.key.name]=parseValue(p7.value)),acc),{});if(t42.isLiteral(expr))return expr.value;if(t42.isIdentifier(expr))return unsupported(expr.name,!0);throw new Error(`Unknown node type ${expr.type}`)},unsupported=(unexpectedVar,isError)=>{let message=import_ts_dedent3.dedent`
@@ -1662,7 +1662,7 @@ in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",cate
1662
1662
  `),!mainConfigPath)throw new import_server_errors.MainFileMissingError({location:configDir})}function loadCustomPresets({configDir}){validateConfigurationFiles(configDir);let presets=serverRequire2(import_path25.default.resolve(configDir,"presets"));if(serverRequire2(import_path25.default.resolve(configDir,"main"))){let resolved=serverResolve(import_path25.default.resolve(configDir,"main"));if(resolved)return [resolved]}return presets||[]}var import_resolve_from=__toESM4(require_resolve_from()),safeResolveFrom=(path19,file)=>{try{return (0,import_resolve_from.default)(path19,file)}catch{return}},safeResolve=file=>{try{return __require.resolve(file)}catch{return}},import_path32=__toESM4(__require("path"));function normalizePath(id2){return import_path32.default.posix.normalize(slash3(id2))}function stripAbsNodeModulesPath(absPath){let splits=absPath.split(`node_modules${import_path32.default.sep}`);return normalizePath(splits[splits.length-1])}var isObject3=val=>val!=null&&typeof val=="object"&&Array.isArray(val)===!1,isFunction=val=>typeof val=="function";function filterPresetsConfig(presetsConfig){return presetsConfig.filter(preset=>{let presetName=typeof preset=="string"?preset:preset.name;return !/@storybook[\\\\/]preset-typescript/.test(presetName)})}function resolvePathToMjs(filePath){let{dir,name}=(0, import_path42.parse)(filePath),mjsPath=(0, import_path42.join)(dir,`${name}.mjs`);return safeResolve(mjsPath)?mjsPath:filePath}function resolvePresetFunction(input,presetOptions,storybookOptions){return isFunction(input)?[...input({...storybookOptions,...presetOptions})]:Array.isArray(input)?[...input]:[]}var resolveAddonName=(configDir,name,options9)=>{let resolve4=name.startsWith("/")?safeResolve:safeResolveFrom.bind(null,configDir),resolved=resolve4(name);if(resolved){let{dir:fdir,name:fname}=(0, import_path42.parse)(resolved);if(name.match(/\/(manager|register(-panel)?)(\.(js|mjs|ts|tsx|jsx))?$/))return {type:"virtual",name,managerEntries:[resolvePathToMjs((0, import_path42.join)(fdir,fname))]};if(name.match(/\/(preset)(\.(js|mjs|ts|tsx|jsx))?$/))return {type:"presets",name:resolved}}let checkExists=exportName=>{if(resolve4(`${name}${exportName}`))return `${name}${exportName}`},absolutizeExport=(exportName,preferMJS)=>{let found=resolve4(`${name}${exportName}`);if(found)return preferMJS?resolvePathToMjs(found):found},managerFile=absolutizeExport("/manager",!0),registerFile=absolutizeExport("/register",!0)||absolutizeExport("/register-panel",!0),previewFile=checkExists("/preview"),previewFileAbsolute=absolutizeExport("/preview",!0),presetFile=absolutizeExport("/preset",!1);if(!(managerFile||previewFile)&&presetFile)return {type:"presets",name:presetFile};if(managerFile||registerFile||previewFile||presetFile){let managerEntries=[];return managerFile&&managerEntries.push(managerFile),!managerFile&&registerFile&&!presetFile&&managerEntries.push(registerFile),{type:"virtual",name,...managerEntries.length?{managerEntries}:{},...previewFile?{previewAnnotations:[previewFileAbsolute?{bare:previewFile.includes("node_modules")?stripAbsNodeModulesPath(previewFile):previewFile,absolute:previewFileAbsolute}:previewFile]}:{},...presetFile?{presets:[{name:presetFile,options:options9}]}:{}}}if(resolved)return {type:"presets",name:resolved}},map2=({configDir})=>item=>{let options9=isObject3(item)&&item.options||void 0,name=isObject3(item)?item.name:item,resolved;try{resolved=resolveAddonName(configDir,name,options9);}catch{import_node_logger2.logger.error(`Addon value should end in /manager or /preview or /register OR it should be a valid preset https://storybook.js.org/docs/react/addons/writing-presets/
1663
1663
  ${item}`);return}if(!resolved){import_node_logger2.logger.warn(`Could not resolve addon "${name}", skipping. Is it installed?`);return}return {...options9?{options:options9}:{},...resolved}};async function getContent(input){if(input.type==="virtual"){let{type:type2,name:name2,...rest}=input;return rest}let name=input.name?input.name:input;return interopRequireDefault(name)}async function loadPreset(input,level,storybookOptions){let presetName=input.name?input.name:input;try{let presetOptions=input.options?input.options:{},contents=await getContent(input);if(typeof contents=="function"&&(contents=contents(storybookOptions,presetOptions)),Array.isArray(contents))return await loadPresets(contents,level+1,storybookOptions);if(isObject3(contents)){let{addons:addonsInput=[],presets:presetsInput=[],...rest}=contents,filter2=i3=>!0;storybookOptions.isCritical!==!0&&(storybookOptions.build?.test?.disabledAddons?.length||0)>0&&(filter2=i3=>{let name=i3.name?i3.name:i3;return !storybookOptions.build?.test?.disabledAddons?.find(n=>name.includes(n))});let subPresets=resolvePresetFunction(presetsInput,presetOptions,storybookOptions).filter(filter2),subAddons=resolvePresetFunction(addonsInput,presetOptions,storybookOptions).filter(filter2);return [...await loadPresets([...subPresets],level+1,storybookOptions),...await loadPresets([...subAddons.map(map2(storybookOptions))].filter(Boolean),level+1,storybookOptions),{name:presetName,preset:rest,options:presetOptions}]}throw new Error(import_ts_dedent2.dedent`
1664
1664
  ${input} is not a valid preset
1665
- `)}catch(error){if(storybookOptions?.isCritical)throw new import_server_errors2.CriticalPresetLoadError({error,presetName});let warning=level>0?` Failed to load preset: ${JSON.stringify(input)} on level ${level}`:` Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(error),[]}}async function loadPresets(presets,level,storybookOptions){return !presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options:options9})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options9,presetsList:presets,presets:{apply:async(ext,c8,a3={})=>applyPresets(presets,ext,c8,a3,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject3(newConfig)&&isObject3(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return {apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options9){let{corePresets=[],overridePresets=[],...restOptions}=options9,presetsConfig=[...corePresets,...loadCustomPresets(options9),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM4(require_lib2());function createFileSystemCache(options9){return (0, import_file_system_cache.default)(options9)}var import_path52=__toESM4(__require("path")),import_find_cache_dir=__toESM4(require_find_cache_dir());function resolvePathInStorybookCache(fileOrDirectoryName,sub="default"){let cacheDirectory=(0, import_find_cache_dir.default)({name:"storybook"});return cacheDirectory||=import_path52.default.join(process.cwd(),".cache","storybook"),import_path52.default.join(cacheDirectory,sub,fileOrDirectoryName)}var cache3=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"}),import_fs_extra2=require_lib3(),import_path72=__require("path"),import_tempy=__toESM4(require_tempy()),import_path62=__toESM4(__require("path")),import_fs_extra=__toESM4(require_lib3());function getStorybookConfiguration(storybookScript,shortName,longName){if(!storybookScript)return null;let parts=storybookScript.split(/[\s='"]+/),index=parts.indexOf(longName);return index===-1&&(index=parts.indexOf(shortName)),index===-1?null:parts[index+1]}var rendererPackages={"@storybook/react":"react","@storybook/vue3":"vue3","@storybook/angular":"angular","@storybook/html":"html","@storybook/web-components":"web-components","@storybook/polymer":"polymer","@storybook/ember":"ember","@storybook/svelte":"svelte","@storybook/preact":"preact","@storybook/server":"server","storybook-framework-qwik":"qwik","storybook-solidjs":"solid","@storybook/vue":"vue"},frameworkPackages={"@storybook/angular":"angular","@storybook/ember":"ember","@storybook/html-vite":"html-vite","@storybook/html-webpack5":"html-webpack5","@storybook/nextjs":"nextjs","@storybook/preact-vite":"preact-vite","@storybook/preact-webpack5":"preact-webpack5","@storybook/react-vite":"react-vite","@storybook/react-webpack5":"react-webpack5","@storybook/server-webpack5":"server-webpack5","@storybook/svelte-vite":"svelte-vite","@storybook/svelte-webpack5":"svelte-webpack5","@storybook/sveltekit":"sveltekit","@storybook/vue3-vite":"vue3-vite","@storybook/vue3-webpack5":"vue3-webpack5","@storybook/web-components-vite":"web-components-vite","@storybook/web-components-webpack5":"web-components-webpack5","storybook-framework-qwik":"qwik","storybook-solidjs-vite":"solid"},builderPackages=["@storybook/builder-webpack5","@storybook/builder-vite"],logger2=console,findDependency=({dependencies,devDependencies,peerDependencies},predicate)=>[Object.entries(dependencies||{}).find(predicate),Object.entries(devDependencies||{}).find(predicate),Object.entries(peerDependencies||{}).find(predicate)],getRendererInfo=packageJson=>{let[dep,devDep,peerDep]=findDependency(packageJson,([key2])=>rendererPackages[key2]),[pkg,version]=dep||devDep||peerDep||[];return dep&&devDep&&dep[0]===devDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "devDependencies". This is probably a mistake.`),dep&&peerDep&&dep[0]===peerDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "peerDependencies". This is probably a mistake.`),{version,frameworkPackage:pkg}},validConfigExtensions=["ts","js","tsx","jsx","mjs","cjs"],findConfigFile2=(prefix,configDir)=>{let filePrefix=import_path62.default.join(configDir,prefix),extension=validConfigExtensions.find(ext=>import_fs_extra.default.existsSync(`${filePrefix}.${ext}`));return extension?`${filePrefix}.${extension}`:null},getConfigInfo=(packageJson,configDir)=>{let storybookConfigDir=configDir??".storybook",storybookScript=packageJson.scripts?.storybook;if(storybookScript&&!configDir){let configParam=getStorybookConfiguration(storybookScript,"-c","--config-dir");configParam&&(storybookConfigDir=configParam);}return {configDir:storybookConfigDir,mainConfig:findConfigFile2("main",storybookConfigDir),previewConfig:findConfigFile2("preview",storybookConfigDir),managerConfig:findConfigFile2("manager",storybookConfigDir)}},getStorybookInfo=(packageJson,configDir)=>{let rendererInfo=getRendererInfo(packageJson),configInfo=getConfigInfo(packageJson,configDir);return {...rendererInfo,...configInfo}},versions_default={"@storybook/addon-a11y":"8.1.0-alpha.8","@storybook/addon-actions":"8.1.0-alpha.8","@storybook/addon-backgrounds":"8.1.0-alpha.8","@storybook/addon-controls":"8.1.0-alpha.8","@storybook/addon-docs":"8.1.0-alpha.8","@storybook/addon-essentials":"8.1.0-alpha.8","@storybook/addon-highlight":"8.1.0-alpha.8","@storybook/addon-interactions":"8.1.0-alpha.8","@storybook/addon-jest":"8.1.0-alpha.8","@storybook/addon-links":"8.1.0-alpha.8","@storybook/addon-mdx-gfm":"8.1.0-alpha.8","@storybook/addon-measure":"8.1.0-alpha.8","@storybook/addon-onboarding":"8.1.0-alpha.8","@storybook/addon-outline":"8.1.0-alpha.8","@storybook/addon-storysource":"8.1.0-alpha.8","@storybook/addon-themes":"8.1.0-alpha.8","@storybook/addon-toolbars":"8.1.0-alpha.8","@storybook/addon-viewport":"8.1.0-alpha.8","@storybook/angular":"8.1.0-alpha.8","@storybook/blocks":"8.1.0-alpha.8","@storybook/builder-manager":"8.1.0-alpha.8","@storybook/builder-vite":"8.1.0-alpha.8","@storybook/builder-webpack5":"8.1.0-alpha.8","@storybook/channels":"8.1.0-alpha.8","@storybook/cli":"8.1.0-alpha.8","@storybook/client-logger":"8.1.0-alpha.8","@storybook/codemod":"8.1.0-alpha.8","@storybook/components":"8.1.0-alpha.8","@storybook/core-common":"8.1.0-alpha.8","@storybook/core-events":"8.1.0-alpha.8","@storybook/core-server":"8.1.0-alpha.8","@storybook/core-webpack":"8.1.0-alpha.8","@storybook/csf-plugin":"8.1.0-alpha.8","@storybook/csf-tools":"8.1.0-alpha.8","@storybook/docs-tools":"8.1.0-alpha.8","@storybook/ember":"8.1.0-alpha.8","@storybook/html":"8.1.0-alpha.8","@storybook/html-vite":"8.1.0-alpha.8","@storybook/html-webpack5":"8.1.0-alpha.8","@storybook/instrumenter":"8.1.0-alpha.8","@storybook/manager":"8.1.0-alpha.8","@storybook/manager-api":"8.1.0-alpha.8","@storybook/nextjs":"8.1.0-alpha.8","@storybook/node-logger":"8.1.0-alpha.8","@storybook/preact":"8.1.0-alpha.8","@storybook/preact-vite":"8.1.0-alpha.8","@storybook/preact-webpack5":"8.1.0-alpha.8","@storybook/preset-create-react-app":"8.1.0-alpha.8","@storybook/preset-html-webpack":"8.1.0-alpha.8","@storybook/preset-preact-webpack":"8.1.0-alpha.8","@storybook/preset-react-webpack":"8.1.0-alpha.8","@storybook/preset-server-webpack":"8.1.0-alpha.8","@storybook/preset-svelte-webpack":"8.1.0-alpha.8","@storybook/preset-vue3-webpack":"8.1.0-alpha.8","@storybook/preview":"8.1.0-alpha.8","@storybook/preview-api":"8.1.0-alpha.8","@storybook/react":"8.1.0-alpha.8","@storybook/react-dom-shim":"8.1.0-alpha.8","@storybook/react-vite":"8.1.0-alpha.8","@storybook/react-webpack5":"8.1.0-alpha.8","@storybook/router":"8.1.0-alpha.8","@storybook/server":"8.1.0-alpha.8","@storybook/server-webpack5":"8.1.0-alpha.8","@storybook/source-loader":"8.1.0-alpha.8","@storybook/svelte":"8.1.0-alpha.8","@storybook/svelte-vite":"8.1.0-alpha.8","@storybook/svelte-webpack5":"8.1.0-alpha.8","@storybook/sveltekit":"8.1.0-alpha.8","@storybook/telemetry":"8.1.0-alpha.8","@storybook/test":"8.1.0-alpha.8","@storybook/theming":"8.1.0-alpha.8","@storybook/types":"8.1.0-alpha.8","@storybook/vue3":"8.1.0-alpha.8","@storybook/vue3-vite":"8.1.0-alpha.8","@storybook/vue3-webpack5":"8.1.0-alpha.8","@storybook/web-components":"8.1.0-alpha.8","@storybook/web-components-vite":"8.1.0-alpha.8","@storybook/web-components-webpack5":"8.1.0-alpha.8",sb:"8.1.0-alpha.8",storybook:"8.1.0-alpha.8"};function parseList(str2){return str2.split(",").map(item=>item.trim()).filter(item=>item.length>0)}async function getCoercedStorybookVersion(packageManager){return (await Promise.all(Object.keys(rendererPackages).map(async pkg=>({name:pkg,version:await packageManager.getPackageVersion(pkg)})))).filter(({version})=>!!version)[0]?.version}function getEnvConfig(program,configEnv){Object.keys(configEnv).forEach(fieldName=>{let envVarName=configEnv[fieldName],envVarValue=process.env[envVarName];envVarValue&&(program[fieldName]=envVarValue);});}var createLogStream=async(logFileName="storybook.log")=>{let finalLogPath=(0, import_path72.join)(process.cwd(),logFileName),temporaryLogPath=import_tempy.default.file({name:logFileName}),logStream=(0, import_fs_extra2.createWriteStream)(temporaryLogPath,{encoding:"utf8"});return new Promise((resolve4,reject)=>{logStream.once("open",()=>{resolve4({logStream,moveLogFile:async()=>(0, import_fs_extra2.move)(temporaryLogPath,finalLogPath,{overwrite:!0}),clearLogFile:async()=>(0, import_fs_extra2.writeFile)(temporaryLogPath,""),removeLogFile:async()=>(0, import_fs_extra2.remove)(temporaryLogPath),readLogFile:async()=>(0, import_fs_extra2.readFile)(temporaryLogPath,"utf8")});}),logStream.once("error",reject);})},isCorePackage=pkg=>Object.keys(versions_default).includes(pkg),import_node_logger3=require_dist(),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.replaceAll(/(\\){1,2}/g,"/").includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder2=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!config?.addons){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`);}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`);}},import_lazy_universal_dotenv=require_lib5(),import_path82=__toESM4(__require("path")),import_find_up=__toESM4(require_find_up2()),getProjectRoot=()=>{let result;if(process.env.STORYBOOK_PROJECT_ROOT)return process.env.STORYBOOK_PROJECT_ROOT;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".hg",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let splitDirname=__dirname.split("node_modules");result=result||(splitDirname.length>=2?splitDirname[0]:void 0);}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p7=>import_path82.default.resolve("./",p7)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path82.default.sep}${filename}`}function loadEnvs(options9={}){let defaultNodeEnv=options9.production?"production":"development",env3={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options9.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env3[name]=process.env[name];});let base=Object.entries(env3).reduce((acc,[k14,v11])=>Object.assign(acc,{[k14]:JSON.stringify(v11)}),{}),{stringified,raw}=(0, import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env3.NODE_ENV}),fullRaw={...env3,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[key2]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[`process.env.${key2}`]=JSON.stringify(value),acc),{}),NODE_MODULES_RE=/node_modules/,commonGlobOptions=glob2=>NODE_MODULES_RE.test(glob2)?{}:{ignore:["**/node_modules/**"]},frameworkToRenderer={angular:"angular",ember:"ember","html-vite":"html","html-webpack5":"html",nextjs:"react","preact-vite":"preact","preact-webpack5":"preact",qwik:"qwik","react-vite":"react","react-webpack5":"react","server-webpack5":"server",solid:"solid","svelte-vite":"svelte","svelte-webpack5":"svelte",sveltekit:"svelte","vue3-vite":"vue3","vue3-webpack5":"vue3","web-components-vite":"web-components","web-components-webpack5":"web-components",html:"html",preact:"preact","react-native":"react-native",react:"react",server:"server",svelte:"svelte",vue3:"vue3","web-components":"web-components"};async function getBuilderOptions(options9){let framework=await options9.presets.apply("framework",{},options9);if(typeof framework!="string"&&framework?.options?.builder)return framework.options.builder;let{builder}=await options9.presets.apply("core",{},options9);return typeof builder!="string"&&builder?.options?builder.options:{}}var import_ts_dedent3=__require("ts-dedent"),import_path92=__toESM4(__require("path"));function normalizePath2(p7){return import_path92.default.posix.normalize(p7.replace(/\\/g,"/"))}async function getFrameworkName(options9){let framework=await options9.presets.apply("framework","",options9);if(!framework)throw new Error(import_ts_dedent3.dedent`
1665
+ `)}catch(error){if(storybookOptions?.isCritical)throw new import_server_errors2.CriticalPresetLoadError({error,presetName});let warning=level>0?` Failed to load preset: ${JSON.stringify(input)} on level ${level}`:` Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(error),[]}}async function loadPresets(presets,level,storybookOptions){return !presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options:options9})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options9,presetsList:presets,presets:{apply:async(ext,c8,a3={})=>applyPresets(presets,ext,c8,a3,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject3(newConfig)&&isObject3(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return {apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options9){let{corePresets=[],overridePresets=[],...restOptions}=options9,presetsConfig=[...corePresets,...loadCustomPresets(options9),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM4(require_lib2());function createFileSystemCache(options9){return (0, import_file_system_cache.default)(options9)}var import_path52=__toESM4(__require("path")),import_find_cache_dir=__toESM4(require_find_cache_dir());function resolvePathInStorybookCache(fileOrDirectoryName,sub="default"){let cacheDirectory=(0, import_find_cache_dir.default)({name:"storybook"});return cacheDirectory||=import_path52.default.join(process.cwd(),".cache","storybook"),import_path52.default.join(cacheDirectory,sub,fileOrDirectoryName)}var cache3=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"}),import_fs_extra2=require_lib3(),import_path72=__require("path"),import_tempy=__toESM4(require_tempy()),import_path62=__toESM4(__require("path")),import_fs_extra=__toESM4(require_lib3());function getStorybookConfiguration(storybookScript,shortName,longName){if(!storybookScript)return null;let parts=storybookScript.split(/[\s='"]+/),index=parts.indexOf(longName);return index===-1&&(index=parts.indexOf(shortName)),index===-1?null:parts[index+1]}var rendererPackages={"@storybook/react":"react","@storybook/vue3":"vue3","@storybook/angular":"angular","@storybook/html":"html","@storybook/web-components":"web-components","@storybook/polymer":"polymer","@storybook/ember":"ember","@storybook/svelte":"svelte","@storybook/preact":"preact","@storybook/server":"server","storybook-framework-qwik":"qwik","storybook-solidjs":"solid","@storybook/vue":"vue"},frameworkPackages={"@storybook/angular":"angular","@storybook/ember":"ember","@storybook/html-vite":"html-vite","@storybook/html-webpack5":"html-webpack5","@storybook/nextjs":"nextjs","@storybook/preact-vite":"preact-vite","@storybook/preact-webpack5":"preact-webpack5","@storybook/react-vite":"react-vite","@storybook/react-webpack5":"react-webpack5","@storybook/server-webpack5":"server-webpack5","@storybook/svelte-vite":"svelte-vite","@storybook/svelte-webpack5":"svelte-webpack5","@storybook/sveltekit":"sveltekit","@storybook/vue3-vite":"vue3-vite","@storybook/vue3-webpack5":"vue3-webpack5","@storybook/web-components-vite":"web-components-vite","@storybook/web-components-webpack5":"web-components-webpack5","storybook-framework-qwik":"qwik","storybook-solidjs-vite":"solid"},builderPackages=["@storybook/builder-webpack5","@storybook/builder-vite"],logger2=console,findDependency=({dependencies,devDependencies,peerDependencies},predicate)=>[Object.entries(dependencies||{}).find(predicate),Object.entries(devDependencies||{}).find(predicate),Object.entries(peerDependencies||{}).find(predicate)],getRendererInfo=packageJson=>{let[dep,devDep,peerDep]=findDependency(packageJson,([key2])=>rendererPackages[key2]),[pkg,version]=dep||devDep||peerDep||[];return dep&&devDep&&dep[0]===devDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "devDependencies". This is probably a mistake.`),dep&&peerDep&&dep[0]===peerDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "peerDependencies". This is probably a mistake.`),{version,frameworkPackage:pkg}},validConfigExtensions=["ts","js","tsx","jsx","mjs","cjs"],findConfigFile2=(prefix,configDir)=>{let filePrefix=import_path62.default.join(configDir,prefix),extension=validConfigExtensions.find(ext=>import_fs_extra.default.existsSync(`${filePrefix}.${ext}`));return extension?`${filePrefix}.${extension}`:null},getConfigInfo=(packageJson,configDir)=>{let storybookConfigDir=configDir??".storybook",storybookScript=packageJson.scripts?.storybook;if(storybookScript&&!configDir){let configParam=getStorybookConfiguration(storybookScript,"-c","--config-dir");configParam&&(storybookConfigDir=configParam);}return {configDir:storybookConfigDir,mainConfig:findConfigFile2("main",storybookConfigDir),previewConfig:findConfigFile2("preview",storybookConfigDir),managerConfig:findConfigFile2("manager",storybookConfigDir)}},getStorybookInfo=(packageJson,configDir)=>{let rendererInfo=getRendererInfo(packageJson),configInfo=getConfigInfo(packageJson,configDir);return {...rendererInfo,...configInfo}},versions_default={"@storybook/addon-a11y":"8.1.0-beta.1","@storybook/addon-actions":"8.1.0-beta.1","@storybook/addon-backgrounds":"8.1.0-beta.1","@storybook/addon-controls":"8.1.0-beta.1","@storybook/addon-docs":"8.1.0-beta.1","@storybook/addon-essentials":"8.1.0-beta.1","@storybook/addon-highlight":"8.1.0-beta.1","@storybook/addon-interactions":"8.1.0-beta.1","@storybook/addon-jest":"8.1.0-beta.1","@storybook/addon-links":"8.1.0-beta.1","@storybook/addon-mdx-gfm":"8.1.0-beta.1","@storybook/addon-measure":"8.1.0-beta.1","@storybook/addon-onboarding":"8.1.0-beta.1","@storybook/addon-outline":"8.1.0-beta.1","@storybook/addon-storysource":"8.1.0-beta.1","@storybook/addon-themes":"8.1.0-beta.1","@storybook/addon-toolbars":"8.1.0-beta.1","@storybook/addon-viewport":"8.1.0-beta.1","@storybook/angular":"8.1.0-beta.1","@storybook/blocks":"8.1.0-beta.1","@storybook/builder-manager":"8.1.0-beta.1","@storybook/builder-vite":"8.1.0-beta.1","@storybook/builder-webpack5":"8.1.0-beta.1","@storybook/channels":"8.1.0-beta.1","@storybook/cli":"8.1.0-beta.1","@storybook/client-logger":"8.1.0-beta.1","@storybook/codemod":"8.1.0-beta.1","@storybook/components":"8.1.0-beta.1","@storybook/core-common":"8.1.0-beta.1","@storybook/core-events":"8.1.0-beta.1","@storybook/core-server":"8.1.0-beta.1","@storybook/core-webpack":"8.1.0-beta.1","@storybook/csf-plugin":"8.1.0-beta.1","@storybook/csf-tools":"8.1.0-beta.1","@storybook/docs-tools":"8.1.0-beta.1","@storybook/ember":"8.1.0-beta.1","@storybook/html":"8.1.0-beta.1","@storybook/html-vite":"8.1.0-beta.1","@storybook/html-webpack5":"8.1.0-beta.1","@storybook/instrumenter":"8.1.0-beta.1","@storybook/manager":"8.1.0-beta.1","@storybook/manager-api":"8.1.0-beta.1","@storybook/nextjs":"8.1.0-beta.1","@storybook/node-logger":"8.1.0-beta.1","@storybook/preact":"8.1.0-beta.1","@storybook/preact-vite":"8.1.0-beta.1","@storybook/preact-webpack5":"8.1.0-beta.1","@storybook/preset-create-react-app":"8.1.0-beta.1","@storybook/preset-html-webpack":"8.1.0-beta.1","@storybook/preset-preact-webpack":"8.1.0-beta.1","@storybook/preset-react-webpack":"8.1.0-beta.1","@storybook/preset-server-webpack":"8.1.0-beta.1","@storybook/preset-svelte-webpack":"8.1.0-beta.1","@storybook/preset-vue3-webpack":"8.1.0-beta.1","@storybook/preview":"8.1.0-beta.1","@storybook/preview-api":"8.1.0-beta.1","@storybook/react":"8.1.0-beta.1","@storybook/react-dom-shim":"8.1.0-beta.1","@storybook/react-vite":"8.1.0-beta.1","@storybook/react-webpack5":"8.1.0-beta.1","@storybook/router":"8.1.0-beta.1","@storybook/server":"8.1.0-beta.1","@storybook/server-webpack5":"8.1.0-beta.1","@storybook/source-loader":"8.1.0-beta.1","@storybook/svelte":"8.1.0-beta.1","@storybook/svelte-vite":"8.1.0-beta.1","@storybook/svelte-webpack5":"8.1.0-beta.1","@storybook/sveltekit":"8.1.0-beta.1","@storybook/telemetry":"8.1.0-beta.1","@storybook/test":"8.1.0-beta.1","@storybook/theming":"8.1.0-beta.1","@storybook/types":"8.1.0-beta.1","@storybook/vue3":"8.1.0-beta.1","@storybook/vue3-vite":"8.1.0-beta.1","@storybook/vue3-webpack5":"8.1.0-beta.1","@storybook/web-components":"8.1.0-beta.1","@storybook/web-components-vite":"8.1.0-beta.1","@storybook/web-components-webpack5":"8.1.0-beta.1",sb:"8.1.0-beta.1",storybook:"8.1.0-beta.1"};function parseList(str2){return str2.split(",").map(item=>item.trim()).filter(item=>item.length>0)}async function getCoercedStorybookVersion(packageManager){return (await Promise.all(Object.keys(rendererPackages).map(async pkg=>({name:pkg,version:await packageManager.getPackageVersion(pkg)})))).filter(({version})=>!!version)[0]?.version}function getEnvConfig(program,configEnv){Object.keys(configEnv).forEach(fieldName=>{let envVarName=configEnv[fieldName],envVarValue=process.env[envVarName];envVarValue&&(program[fieldName]=envVarValue);});}var createLogStream=async(logFileName="storybook.log")=>{let finalLogPath=(0, import_path72.join)(process.cwd(),logFileName),temporaryLogPath=import_tempy.default.file({name:logFileName}),logStream=(0, import_fs_extra2.createWriteStream)(temporaryLogPath,{encoding:"utf8"});return new Promise((resolve4,reject)=>{logStream.once("open",()=>{resolve4({logStream,moveLogFile:async()=>(0, import_fs_extra2.move)(temporaryLogPath,finalLogPath,{overwrite:!0}),clearLogFile:async()=>(0, import_fs_extra2.writeFile)(temporaryLogPath,""),removeLogFile:async()=>(0, import_fs_extra2.remove)(temporaryLogPath),readLogFile:async()=>(0, import_fs_extra2.readFile)(temporaryLogPath,"utf8")});}),logStream.once("error",reject);})},isCorePackage=pkg=>Object.keys(versions_default).includes(pkg),import_node_logger3=require_dist(),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.replaceAll(/(\\){1,2}/g,"/").includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder2=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!config?.addons){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`);}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`);}},import_lazy_universal_dotenv=require_lib5(),import_path82=__toESM4(__require("path")),import_find_up=__toESM4(require_find_up2()),getProjectRoot=()=>{let result;if(process.env.STORYBOOK_PROJECT_ROOT)return process.env.STORYBOOK_PROJECT_ROOT;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".hg",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let splitDirname=__dirname.split("node_modules");result=result||(splitDirname.length>=2?splitDirname[0]:void 0);}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p7=>import_path82.default.resolve("./",p7)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path82.default.sep}${filename}`}function loadEnvs(options9={}){let defaultNodeEnv=options9.production?"production":"development",env3={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options9.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env3[name]=process.env[name];});let base=Object.entries(env3).reduce((acc,[k14,v11])=>Object.assign(acc,{[k14]:JSON.stringify(v11)}),{}),{stringified,raw}=(0, import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env3.NODE_ENV}),fullRaw={...env3,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[key2]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[`process.env.${key2}`]=JSON.stringify(value),acc),{}),NODE_MODULES_RE=/node_modules/,commonGlobOptions=glob2=>NODE_MODULES_RE.test(glob2)?{}:{ignore:["**/node_modules/**"]},frameworkToRenderer={angular:"angular",ember:"ember","html-vite":"html","html-webpack5":"html",nextjs:"react","preact-vite":"preact","preact-webpack5":"preact",qwik:"qwik","react-vite":"react","react-webpack5":"react","server-webpack5":"server",solid:"solid","svelte-vite":"svelte","svelte-webpack5":"svelte",sveltekit:"svelte","vue3-vite":"vue3","vue3-webpack5":"vue3","web-components-vite":"web-components","web-components-webpack5":"web-components",html:"html",preact:"preact","react-native":"react-native",react:"react",server:"server",svelte:"svelte",vue3:"vue3","web-components":"web-components"};async function getBuilderOptions(options9){let framework=await options9.presets.apply("framework",{},options9);if(typeof framework!="string"&&framework?.options?.builder)return framework.options.builder;let{builder}=await options9.presets.apply("core",{},options9);return typeof builder!="string"&&builder?.options?builder.options:{}}var import_ts_dedent3=__require("ts-dedent"),import_path92=__toESM4(__require("path"));function normalizePath2(p7){return import_path92.default.posix.normalize(p7.replace(/\\/g,"/"))}async function getFrameworkName(options9){let framework=await options9.presets.apply("framework","",options9);if(!framework)throw new Error(import_ts_dedent3.dedent`
1666
1666
  You must specify a framework in '.storybook/main.js' config.
1667
1667
 
1668
1668
  https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-interactions",
3
- "version": "8.1.0-alpha.8",
3
+ "version": "8.1.0-beta.1",
4
4
  "description": "Automate, test and debug user interactions",
5
5
  "keywords": [
6
6
  "storybook-addons",
@@ -54,22 +54,22 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@storybook/global": "^5.0.0",
57
- "@storybook/instrumenter": "8.1.0-alpha.8",
58
- "@storybook/test": "8.1.0-alpha.8",
59
- "@storybook/types": "8.1.0-alpha.8",
57
+ "@storybook/instrumenter": "8.1.0-beta.1",
58
+ "@storybook/test": "8.1.0-beta.1",
59
+ "@storybook/types": "8.1.0-beta.1",
60
60
  "polished": "^4.2.2",
61
61
  "ts-dedent": "^2.2.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@devtools-ds/object-inspector": "^1.1.2",
65
- "@storybook/client-logger": "8.1.0-alpha.8",
66
- "@storybook/components": "8.1.0-alpha.8",
67
- "@storybook/core-common": "8.1.0-alpha.8",
68
- "@storybook/core-events": "8.1.0-alpha.8",
65
+ "@storybook/client-logger": "8.1.0-beta.1",
66
+ "@storybook/components": "8.1.0-beta.1",
67
+ "@storybook/core-common": "8.1.0-beta.1",
68
+ "@storybook/core-events": "8.1.0-beta.1",
69
69
  "@storybook/icons": "^1.2.5",
70
- "@storybook/manager-api": "8.1.0-alpha.8",
71
- "@storybook/preview-api": "8.1.0-alpha.8",
72
- "@storybook/theming": "8.1.0-alpha.8",
70
+ "@storybook/manager-api": "8.1.0-beta.1",
71
+ "@storybook/preview-api": "8.1.0-beta.1",
72
+ "@storybook/theming": "8.1.0-beta.1",
73
73
  "@types/node": "^18.0.0",
74
74
  "formik": "^2.2.9",
75
75
  "react": "^18.2.0",