Replace absolute image paths
This commit is contained in:
1 parent
6e274124c3
commit
e871c9de4b
100 files changed
+90292
-62
No files matched your search
@@ -0,0 +1,971 @@
|
||||
try{
|
||||
(()=>{var P1=Object.defineProperty;var Ke=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var co=(e,t)=>()=>(e&&(t=e(e=0)),t);var N1=(e,t)=>{for(var r in t)P1(e,r,{get:t[r],enumerable:!0})};var te=co(()=>{});var re=co(()=>{});var ne=co(()=>{});var xc={};N1(xc,{A:()=>j1,ActionBar:()=>Cn,AddonPanel:()=>Dn,Badge:()=>gr,Bar:()=>Tn,Blockquote:()=>M1,Button:()=>Je,ClipboardCode:()=>$1,Code:()=>q1,DL:()=>U1,Div:()=>H1,DocumentWrapper:()=>V1,EmptyTabContent:()=>kn,ErrorFormatter:()=>z1,FlexBar:()=>Ai,Form:()=>$e,H1:()=>G1,H2:()=>W1,H3:()=>Y1,H4:()=>K1,H5:()=>X1,H6:()=>J1,HR:()=>Z1,IconButton:()=>ce,Img:()=>Q1,LI:()=>eE,Link:()=>Ze,ListItem:()=>tE,Loader:()=>rE,Modal:()=>It,OL:()=>nE,P:()=>xi,Placeholder:()=>oE,Pre:()=>aE,ProgressSpinner:()=>iE,ResetWrapper:()=>wi,ScrollArea:()=>Si,Separator:()=>Ci,Spaced:()=>sE,Span:()=>lE,StorybookIcon:()=>uE,StorybookLogo:()=>cE,SyntaxHighlighter:()=>On,TT:()=>dE,TabBar:()=>pE,TabButton:()=>mE,TabWrapper:()=>hE,Table:()=>fE,Tabs:()=>gE,TabsState:()=>yE,TooltipLinkList:()=>In,TooltipMessage:()=>bE,TooltipNote:()=>vt,UL:()=>EE,WithTooltip:()=>De,WithTooltipPure:()=>Di,Zoom:()=>Ti,codeCommon:()=>Qt,components:()=>vE,createCopyToClipboardFunction:()=>AE,default:()=>L1,getStoryHref:()=>xE,interleaveSeparators:()=>wE,nameSpaceClassNames:()=>SE,resetComponents:()=>CE,withReset:()=>er});var L1,j1,Cn,Dn,gr,Tn,M1,Je,$1,q1,U1,H1,V1,kn,z1,Ai,$e,G1,W1,Y1,K1,X1,J1,Z1,ce,Q1,eE,Ze,tE,rE,It,nE,xi,oE,aE,iE,wi,Si,Ci,sE,lE,uE,cE,On,dE,pE,mE,hE,fE,gE,yE,In,bE,vt,EE,De,Di,Ti,Qt,vE,AE,xE,wE,SE,CE,er,J=co(()=>{te();re();ne();L1=__STORYBOOK_COMPONENTS__,{A:j1,ActionBar:Cn,AddonPanel:Dn,Badge:gr,Bar:Tn,Blockquote:M1,Button:Je,ClipboardCode:$1,Code:q1,DL:U1,Div:H1,DocumentWrapper:V1,EmptyTabContent:kn,ErrorFormatter:z1,FlexBar:Ai,Form:$e,H1:G1,H2:W1,H3:Y1,H4:K1,H5:X1,H6:J1,HR:Z1,IconButton:ce,Img:Q1,LI:eE,Link:Ze,ListItem:tE,Loader:rE,Modal:It,OL:nE,P:xi,Placeholder:oE,Pre:aE,ProgressSpinner:iE,ResetWrapper:wi,ScrollArea:Si,Separator:Ci,Spaced:sE,Span:lE,StorybookIcon:uE,StorybookLogo:cE,SyntaxHighlighter:On,TT:dE,TabBar:pE,TabButton:mE,TabWrapper:hE,Table:fE,Tabs:gE,TabsState:yE,TooltipLinkList:In,TooltipMessage:bE,TooltipNote:vt,UL:EE,WithTooltip:De,WithTooltipPure:Di,Zoom:Ti,codeCommon:Qt,components:vE,createCopyToClipboardFunction:AE,getStoryHref:xE,interleaveSeparators:wE,nameSpaceClassNames:SE,resetComponents:CE,withReset:er}=__STORYBOOK_COMPONENTS__});te();re();ne();te();re();ne();te();re();ne();var c=__REACT__,{Children:po,Component:Et,Fragment:ft,Profiler:mI,PureComponent:hI,StrictMode:fI,Suspense:Ec,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gI,act:yI,cloneElement:Pe,createContext:Lr,createElement:Y,createFactory:bI,createRef:EI,forwardRef:vc,isValidElement:vI,lazy:Ac,memo:Xe,startTransition:AI,unstable_act:xI,useCallback:Q,useContext:mo,useDebugValue:wI,useDeferredValue:SI,useEffect:X,useId:CI,useImperativeHandle:DI,useInsertionEffect:TI,useLayoutEffect:ho,useMemo:Me,useReducer:kI,useRef:ye,useState:z,useSyncExternalStore:OI,useTransition:II,version:RI}=__REACT__;J();te();re();ne();var jI=__STORYBOOK_ICONS__,{AccessibilityAltIcon:MI,AccessibilityIcon:$I,AccessibilityIgnoredIcon:qI,AddIcon:go,AdminIcon:UI,AlertAltIcon:HI,AlertIcon:VI,AlignLeftIcon:zI,AlignRightIcon:GI,AppleIcon:WI,ArrowBottomLeftIcon:YI,ArrowBottomRightIcon:KI,ArrowDownIcon:XI,ArrowLeftIcon:JI,ArrowRightIcon:ZI,ArrowSolidDownIcon:QI,ArrowSolidLeftIcon:eR,ArrowSolidRightIcon:tR,ArrowSolidUpIcon:rR,ArrowTopLeftIcon:nR,ArrowTopRightIcon:oR,ArrowUpIcon:aR,AzureDevOpsIcon:iR,BackIcon:sR,BasketIcon:lR,BatchAcceptIcon:uR,BatchDenyIcon:cR,BeakerIcon:dR,BellIcon:pR,BitbucketIcon:mR,BoldIcon:hR,BookIcon:fR,BookmarkHollowIcon:gR,BookmarkIcon:yR,BottomBarIcon:bR,BottomBarToggleIcon:ER,BoxIcon:vR,BranchIcon:AR,BrowserIcon:wc,ButtonIcon:xR,CPUIcon:wR,CalendarIcon:SR,CameraIcon:CR,CameraStabilizeIcon:DR,CategoryIcon:TR,CertificateIcon:kR,ChangedIcon:OR,ChatIcon:IR,CheckIcon:yo,ChevronDownIcon:bo,ChevronLeftIcon:RR,ChevronRightIcon:Sc,ChevronSmallDownIcon:Eo,ChevronSmallLeftIcon:BR,ChevronSmallRightIcon:_R,ChevronSmallUpIcon:Cc,ChevronUpIcon:Dc,ChromaticIcon:FR,ChromeIcon:PR,CircleHollowIcon:NR,CircleIcon:vo,ClearIcon:LR,CloseAltIcon:jR,CloseIcon:MR,CloudHollowIcon:$R,CloudIcon:qR,CogIcon:UR,CollapseIcon:HR,CommandIcon:VR,CommentAddIcon:zR,CommentIcon:GR,CommentsIcon:WR,CommitIcon:YR,CompassIcon:KR,ComponentDrivenIcon:XR,ComponentIcon:JR,ContrastIcon:ZR,ContrastIgnoredIcon:QR,ControlsIcon:eB,CopyIcon:tB,CreditIcon:rB,CrossIcon:nB,DashboardIcon:oB,DatabaseIcon:aB,DeleteIcon:iB,DiamondIcon:sB,DirectionIcon:lB,DiscordIcon:uB,DocChartIcon:cB,DocListIcon:dB,DocumentIcon:yr,DownloadIcon:pB,DragIcon:mB,EditIcon:hB,EllipsisIcon:fB,EmailIcon:gB,ExpandAltIcon:yB,ExpandIcon:bB,EyeCloseIcon:Tc,EyeIcon:kc,FaceHappyIcon:EB,FaceNeutralIcon:vB,FaceSadIcon:AB,FaLine truncated
|
||||
[ ]{`+Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a,`
|
||||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var i=n[0];return t.forEach(function(s,l){var u=i.match(/(?:^|\n)( *)$/),d=u?u[1]:"",m=s;typeof s=="string"&&s.includes(`
|
||||
`)&&(m=String(s).split(`
|
||||
`).map(function(p,f){return f===0?p:""+d+p}).join(`
|
||||
`)),i+=m+n[l+1]}),i}Ae(ke,"dedent");function Li({code:e,category:t}){let r=String(e).padStart(4,"0");return`SB_${t}_${r}`}Ae(Li,"parseErrorCode");var Ed=class vd extends Error{constructor(t){super(vd.getFullMessage(t)),this.data={},this.fromStorybook=!0,this.category=t.category,this.documentation=t.documentation??!1,this.code=t.code}get fullErrorCode(){return Li({code:this.code,category:this.category})}get name(){let t=this.constructor.name;return`${this.fullErrorCode} (${t})`}static getFullMessage({documentation:t,code:r,category:n,message:o}){let a;return t===!0?a=`https://storybook.js.org/error/${Li({code:r,category:n})}`:typeof t=="string"?a=t:Array.isArray(t)&&(a=`
|
||||
${t.map(i=>` - ${i}`).join(`
|
||||
`)}`),`${o}${a!=null?`
|
||||
|
||||
More info: ${a}
|
||||
`:""}`}};Ae(Ed,"StorybookError");var Te=Ed,TE=(e=>(e.BLOCKS="BLOCKS",e.DOCS_TOOLS="DOCS-TOOLS",e.PREVIEW_CLIENT_LOGGER="PREVIEW_CLIENT-LOGGER",e.PREVIEW_CHANNELS="PREVIEW_CHANNELS",e.PREVIEW_CORE_EVENTS="PREVIEW_CORE-EVENTS",e.PREVIEW_INSTRUMENTER="PREVIEW_INSTRUMENTER",e.PREVIEW_API="PREVIEW_API",e.PREVIEW_REACT_DOM_SHIM="PREVIEW_REACT-DOM-SHIM",e.PREVIEW_ROUTER="PREVIEW_ROUTER",e.PREVIEW_THEMING="PREVIEW_THEMING",e.RENDERER_HTML="RENDERER_HTML",e.RENDERER_PREACT="RENDERER_PREACT",e.RENDERER_REACT="RENDERER_REACT",e.RENDERER_SERVER="RENDERER_SERVER",e.RENDERER_SVELTE="RENDERER_SVELTE",e.RENDERER_VUE="RENDERER_VUE",e.RENDERER_VUE3="RENDERER_VUE3",e.RENDERER_WEB_COMPONENTS="RENDERER_WEB-COMPONENTS",e.FRAMEWORK_NEXTJS="FRAMEWORK_NEXTJS",e.ADDON_VITEST="ADDON_VITEST",e.ADDON_A11Y="ADDON_A11Y",e))(TE||{}),Ad=class extends Te{constructor(t){super({category:"PREVIEW_API",code:1,message:ke`
|
||||
Couldn't find story matching id '${t.storyId}' after HMR.
|
||||
- Did you just rename a story?
|
||||
- Did you remove it from your CSF file?
|
||||
- Are you sure a story with the id '${t.storyId}' exists?
|
||||
- Please check the values in the stories field of your main.js config and see if they would match your CSF File.
|
||||
- Also check the browser console and terminal for potential error messages.`}),this.data=t}};Ae(Ad,"MissingStoryAfterHmrError");var xd=Ad,wd=class extends Te{constructor(t){super({category:"PREVIEW_API",code:2,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-for-example-in-the-play-function",message:ke`
|
||||
We detected that you use an implicit action arg while ${t.phase} of your story.
|
||||
${t.deprecated?`
|
||||
This is deprecated and won't work in Storybook 8 anymore.
|
||||
`:""}
|
||||
Please provide an explicit spy to your args like this:
|
||||
import { fn } from 'storybook/test';
|
||||
...
|
||||
args: {
|
||||
${t.name}: fn()
|
||||
}`}),this.data=t}};Ae(wd,"ImplicitActionsDuringRendering");var Sd=wd,Cd=class extends Te{constructor(){super({category:"PREVIEW_API",code:3,message:ke`
|
||||
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
|
||||
|
||||
You probably meant to call \`await preview.extract()\` which does the above for you.`})}};Ae(Cd,"CalledExtractOnStoreError");var Dd=Cd,Td=class extends Te{constructor(){super({category:"PREVIEW_API",code:4,message:ke`
|
||||
Expected your framework's preset to export a \`renderToCanvas\` field.
|
||||
|
||||
Perhaps it needs to be upgraded for Storybook 7.0?`,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"})}};Ae(Td,"MissingRenderToCanvasError");var kd=Td,Od=class extends Te{constructor(t){super({category:"PREVIEW_API",code:5,message:ke`
|
||||
Called \`Preview.${t.methodName}()\` before initialization.
|
||||
|
||||
The preview needs to load the story index before most methods can be called. If you want
|
||||
to call \`${t.methodName}\`, try \`await preview.initializationPromise;\` first.
|
||||
|
||||
If you didn't call the above code, then likely it was called by an addon that needs to
|
||||
do the above.`}),this.data=t}};Ae(Od,"CalledPreviewMethodBeforeInitializationError");var rt=Od,Id=class extends Te{constructor(t){super({category:"PREVIEW_API",code:6,message:ke`
|
||||
Error fetching \`/index.json\`:
|
||||
|
||||
${t.text}
|
||||
|
||||
If you are in development, this likely indicates a problem with your Storybook process,
|
||||
check the terminal for errors.
|
||||
|
||||
If you are in a deployed Storybook, there may have been an issue deploying the full Storybook
|
||||
build.`}),this.data=t}};Ae(Id,"StoryIndexFetchError");var Rd=Id,Bd=class extends Te{constructor(t){super({category:"PREVIEW_API",code:7,message:ke`
|
||||
Tried to render docs entry ${t.storyId} but it is a MDX file that has no CSF
|
||||
references, or autodocs for a CSF file that some doesn't refer to itself.
|
||||
|
||||
This likely is an internal error in Storybook's indexing, or you've attached the
|
||||
\`attached-mdx\` tag to an MDX file that is not attached.`}),this.data=t}};Ae(Bd,"MdxFileWithNoCsfReferencesError");var _d=Bd,Fd=class extends Te{constructor(){super({category:"PREVIEW_API",code:8,message:ke`
|
||||
Couldn't find any stories in your Storybook.
|
||||
|
||||
- Please check your stories field of your main.js config: does it match correctly?
|
||||
- Also check the browser console and terminal for error messages.`})}};Ae(Fd,"EmptyIndexError");var Pd=Fd,Nd=class extends Te{constructor(t){super({category:"PREVIEW_API",code:9,message:ke`
|
||||
Couldn't find story matching '${t.storySpecifier}'.
|
||||
|
||||
- Are you sure a story with that id exists?
|
||||
- Please check your stories field of your main.js config.
|
||||
- Also check the browser console and terminal for error messages.`}),this.data=t}};Ae(Nd,"NoStoryMatchError");var Ld=Nd,jd=class extends Te{constructor(t){super({category:"PREVIEW_API",code:10,message:ke`
|
||||
Couldn't find story matching id '${t.storyId}' after importing a CSF file.
|
||||
|
||||
The file was indexed as if the story was there, but then after importing the file in the browser
|
||||
we didn't find the story. Possible reasons:
|
||||
- You are using a custom story indexer that is misbehaving.
|
||||
- You have a custom file loader that is removing or renaming exports.
|
||||
|
||||
Please check your browser console and terminal for errors that may explain the issue.`}),this.data=t}};Ae(jd,"MissingStoryFromCsfFileError");var Md=jd,$d=class extends Te{constructor(){super({category:"PREVIEW_API",code:11,message:ke`
|
||||
Cannot access the Story Store until the index is ready.
|
||||
|
||||
It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will
|
||||
remove access to the store entirely`})}};Ae($d,"StoryStoreAccessedBeforeInitializationError");var qd=$d,Ud=class extends Te{constructor(t){super({category:"PREVIEW_API",code:12,message:ke`
|
||||
Incorrect use of mount in the play function.
|
||||
|
||||
To use mount in the play function, you must satisfy the following two requirements:
|
||||
|
||||
1. You *must* destructure the mount property from the \`context\` (the argument passed to your play function).
|
||||
This makes sure that Storybook does not start rendering the story before the play function begins.
|
||||
|
||||
2. Your Storybook framework or builder must be configured to transpile to ES2017 or newer.
|
||||
This is because destructuring statements and async/await usages are otherwise transpiled away,
|
||||
which prevents Storybook from recognizing your usage of \`mount\`.
|
||||
|
||||
Note that Angular is not supported. As async/await is transpiled to support the zone.js polyfill.
|
||||
|
||||
More info: https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-the-component-gets-rendered
|
||||
|
||||
Received the following play function:
|
||||
${t.playFunction}`}),this.data=t}};Ae(Ud,"MountMustBeDestructuredError");var qr=Ud,Hd=class extends Te{constructor(t){super({category:"PREVIEW_API",code:14,message:ke`
|
||||
No render function available for storyId '${t.id}'
|
||||
`}),this.data=t}};Ae(Hd,"NoRenderFunctionError");var Lo=Hd,Vd=class extends Te{constructor(){super({category:"PREVIEW_API",code:15,message:ke`
|
||||
No component is mounted in your story.
|
||||
|
||||
This usually occurs when you destructure mount in the play function, but forget to call it.
|
||||
|
||||
For example:
|
||||
|
||||
async play({ mount, canvasElement }) {
|
||||
// 👈 mount should be called: await mount();
|
||||
const canvas = within(canvasElement);
|
||||
const button = await canvas.findByRole('button');
|
||||
await userEvent.click(button);
|
||||
};
|
||||
|
||||
Make sure to either remove it or call mount in your play function.
|
||||
`})}};Ae(Vd,"NoStoryMountedError");var zd=Vd,kE=class extends Te{constructor(t){super({category:"PREVIEW_API",code:16,message:`Status has typeId "${t.status.typeId}" but was added to store with typeId "${t.typeId}". Full status: ${JSON.stringify(t.status,null,2)}`}),this.data=t}};Ae(kE,"StatusTypeIdMismatchError");var OE=class extends Te{constructor(){super({category:"FRAMEWORK_NEXTJS",code:1,documentation:"https://storybook.js.org/docs/get-started/nextjs#faq",message:ke`
|
||||
You are importing avif images, but you don't have sharp installed.
|
||||
|
||||
You have to install sharp in order to use image optimization features in Next.js.
|
||||
`})}};Ae(OE,"NextJsSharpError");var IE=class extends Te{constructor(t){super({category:"FRAMEWORK_NEXTJS",code:2,message:ke`
|
||||
Tried to access router mocks from "${t.importType}" but they were not created yet. You might be running code in an unsupported environment.
|
||||
`}),this.data=t}};Ae(IE,"NextjsRouterMocksNotAvailable");var RE=class extends Te{constructor(t){super({category:"DOCS-TOOLS",code:1,documentation:"https://github.com/storybookjs/storybook/issues/26606",message:ke`
|
||||
There was a failure when generating detailed ArgTypes in ${t.language} for:
|
||||
${JSON.stringify(t.type,null,2)}
|
||||
|
||||
Storybook will fall back to use a generic type description instead.
|
||||
|
||||
This type is either not supported or it is a bug in the docgen generation in Storybook.
|
||||
If you think this is a bug, please detail it as much as possible in the Github issue.
|
||||
`}),this.data=t}};Ae(RE,"UnknownArgTypesError");var BE=class extends Te{constructor(t){super({category:"ADDON_VITEST",code:1,message:ke`
|
||||
Encountered an unsupported value "${t.value}" when setting the viewport ${t.dimension} dimension.
|
||||
|
||||
The Storybook plugin only supports values in the following units:
|
||||
- px, vh, vw, em, rem and %.
|
||||
|
||||
You can either change the viewport for this story to use one of the supported units or skip the test by adding '!test' to the story's tags per https://storybook.js.org/docs/writing-stories/tags
|
||||
`}),this.data=t}};Ae(BE,"UnsupportedViewportDimensionError");var _E=class extends Te{constructor(){super({category:"ADDON_A11Y",code:1,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#a11y-addon-replace-element-parameter-with-context-parameter",message:'The "element" parameter in parameters.a11y has been removed. Use "context" instead.'})}};Ae(_E,"ElementA11yParameterError");te();re();ne();var FE=Object.create,os=Object.defineProperty,PE=Object.getOwnPropertyDescriptor,NE=Object.getOwnPropertyNames,LE=Object.getPrototypeOf,jE=Object.prototype.hasOwnProperty,w=(e,t)=>os(e,"name",{value:t,configurable:!0}),jo=(e=>typeof Ke<"u"?Ke:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Ke<"u"?Ke:t)[r]}):e)(function(e){if(typeof Ke<"u")return Ke.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ME=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of NE(t))!jE.call(e,o)&&o!==r&&os(e,o,{get:()=>t[o],enumerable:!(n=PE(t,o))||n.enumerable});return e},Jr=(e,t,r)=>(r=e!=null?FE(LE(e)):{},ME(t||!e||!e.__esModule?os(r,"default",{value:e,enumerable:!0}):r,e)),ip=Ne((e,t)=>{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"||typeof window<"u"?n=window:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){var r,n,o;return w(function a(i,s,l){function u(p,f){if(!s[p]){if(!i[p]){var g=typeof jo=="function"&&jo;if(!f&&g)return g(p,!0);if(d)return d(p,!0);var y=new Error("Cannot find module '"+p+"'");throw y.code="MODULE_NOT_FOUND",y}var E=s[p]={exports:{}};i[p][0].call(E.exports,function(b){var x=i[p][1][b];return u(x||b)},E,E.exports,a,i,s,l)}return s[p].exports}w(u,"s");for(var d=typeof jo=="function"&&jo,m=0;m<l.length;m++)u(l[m]);return u},"e")({1:[function(a,i,s){i.exports=function(l){if(typeof Map!="function"||l){var u=a("./similar");return new u}else return new Map}},{"./similar":2}],2:[function(a,i,s){function l(){return this.list=[],this.lastItem=void 0,this.size=0,this}w(l,"Similar"),l.prototype.get=function(u){var d;if(this.lastItem&&this.isEqual(this.lastItem.key,u))return this.lastItem.val;if(d=this.indexOf(u),d>=0)return this.lastItem=this.list[d],this.list[d].val},l.prototype.set=function(u,d){var m;return this.lastItem&&this.isEqual(this.lastItem.key,u)?(this.lastItem.val=d,this):(m=this.indexOf(u),m>=0?(this.lastItem=this.list[m],this.list[m].val=d,this):(this.lastItem={key:u,val:d},this.list.push(this.lastItem),this.size++,this))},l.prototype.delete=function(u){var d;if(this.lastItem&&this.isEqual(this.lastItem.key,u)&&(this.lastItem=void 0),d=this.indexOf(u),d>=0)return this.size--,this.list.splice(d,1)[0]},l.prototype.has=function(u){var d;return this.lastItem&&this.isEqual(this.lastItem.key,u)?!0:(d=this.indexOf(u),d>=0?(this.lastItem=this.list[d],!0):!1)},l.prototype.forEach=function(u,d){var m;for(m=0;m<this.size;m++)u.call(d||this,this.list[m].val,this.list[m].key,this)},l.prototype.indexOf=function(u){var d;for(d=0;d<this.size;d++)if(this.isEqual(this.list[d].key,u))return d;return-1},l.prototype.isEqual=function(u,d){return u===d||u!==u&&d!==d},i.exports=l},{}],3:[function(a,i,s){var l=a("map-or-similar");i.exports=function(p){var f=new l(!1),g=[];return function(y){var E=w(function(){var b=f,x,S,T=arguments.length-1,_=Array(T+1),O=!0,k;if((E.numArgs||E.numArgs===0)&&E.numArgs!==T+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(k=0;k<T;k++){if(_[k]={cacheItem:b,arg:arguments[k]},b.has(arguments[k])){b=b.get(arguments[k]);continue}O=!1,x=new l(!1),b.set(arguments[k],x),b=x}return O&&(b.has(arguments[T])?S=b.get(arguments[T]):O=!1),O||(S=y.apply(null,arguments),b.set(arguments[T],S)),p>0&&(_[T]={cacheItem:b,arg:arguments[T]},O?u(g,_):g.push(_),g.length>p&&d(g.shift())),E.wasMemoized=O,E.numArgs=T+1,S},"memoizerific");return E.limit=p,E.wasMemoized=!1,E.cache=f,E.lru=g,E}};function u(p,f){var g=p.length,y=f.length,E,b,x;for(b=0;b<g;b++){for(E=!0,x=0;x<y;x++)if(!m(p[b][x].arg,f[x].arg)){E=!1;break}if(E)break}p.push(p.splice(b,1)[0])}w(u,"moveToMostRecentLru");function d(p){var f=p.length,g=p[f-1],y,E;for(g.cacheItem.delete(g.arg),E=f-2;E>=0&&(g=p[E],y=g.cacheItem.get(g.arg),!y||!y.size);E--)g.cacheItem.delete(g.arg)}w(d,"removeCachedResult");function m(p,f){return p===f||p!==p&&f!==f}w(m,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})}),sp=Ne(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeString=n;var t=Array.from({length:256},(o,a)=>"%"+((a<16?"0":"")+a.toString(16)).toUpperCase()),r=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function n(o){let a=o.
Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M=!0,q=!1,V;return{s:w(function(){D=D.call(v)},"s"),n:w(function(){var G=D.next();return M=G.done,G},"n"),e:w(function(G){q=!0,V=G},"e"),f:w(function(){try{!M&&D.return!=null&&D.return()}finally{if(q)throw V}},"f")}}w(a,"_createForOfIteratorHelper");function i(v,A){if(v){if(typeof v=="string")return s(v,A);var D=Object.prototype.toString.call(v).slice(8,-1);if(D==="Object"&&v.constructor&&(D=v.constructor.name),D==="Map"||D==="Set")return Array.from(v);if(D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D))return s(v,A)}}w(i,"_unsupportedIterableToArray");function s(v,A){(A==null||A>v.length)&&(A=v.length);for(var D=0,N=new Array(A);D<A;D++)N[D]=v[D];return N}w(s,"_arrayLikeToArray");var l=GE(),u={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:d()};function d(){var v={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return x(0,5).forEach(function(A){x(0,5).forEach(function(D){x(0,5).forEach(function(N){return m(A,D,N,v)})})}),x(0,23).forEach(function(A){var D=A+232,N=p(A*10+8);v[D]="#"+N+N+N}),v}w(d,"getDefaultColors");function m(v,A,D,N){var F=16+v*36+A*6+D,M=v>0?v*40+55:0,q=A>0?A*40+55:0,V=D>0?D*40+55:0;N[F]=f([M,q,V])}w(m,"setStyleColor");function p(v){for(var A=v.toString(16);A.length<2;)A="0"+A;return A}w(p,"toHexString");function f(v){var A=[],D=a(v),N;try{for(D.s();!(N=D.n()).done;){var F=N.value;A.push(p(F))}}catch(M){D.e(M)}finally{D.f()}return"#"+A.join("")}w(f,"toColorHexString");function g(v,A,D,N){var F;return A==="text"?F=_(D,N):A==="display"?F=E(v,D,N):A==="xterm256Foreground"?F=B(v,N.colors[D]):A==="xterm256Background"?F=P(v,N.colors[D]):A==="rgb"&&(F=y(v,D)),F}w(g,"generateOutput");function y(v,A){A=A.substring(2).slice(0,-1);var D=+A.substr(0,2),N=A.substring(5).split(";"),F=N.map(function(M){return("0"+Number(M).toString(16)).substr(-2)}).join("");return k(v,(D===38?"color:#":"background-color:#")+F)}w(y,"handleRgb");function E(v,A,D){A=parseInt(A,10);var N={"-1":w(function(){return"<br/>"},"_"),0:w(function(){return v.length&&b(v)},"_"),1:w(function(){return O(v,"b")},"_"),3:w(function(){return O(v,"i")},"_"),4:w(function(){return O(v,"u")},"_"),8:w(function(){return k(v,"display:none")},"_"),9:w(function(){return O(v,"strike")},"_"),22:w(function(){return k(v,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:w(function(){return L(v,"i")},"_"),24:w(function(){return L(v,"u")},"_"),39:w(function(){return B(v,D.fg)},"_"),49:w(function(){return P(v,D.bg)},"_"),53:w(function(){return k(v,"text-decoration:overline")},"_")},F;return N[A]?F=N[A]():4<A&&A<7?F=O(v,"blink"):29<A&&A<38?F=B(v,D.colors[A-30]):39<A&&A<48?F=P(v,D.colors[A-40]):89<A&&A<98?F=B(v,D.colors[8+(A-90)]):99<A&&A<108&&(F=P(v,D.colors[8+(A-100)])),F}w(E,"handleDisplay");function b(v){var A=v.slice(0);return v.length=0,A.reverse().map(function(D){return"</"+D+">"}).join("")}w(b,"resetStyles");function x(v,A){for(var D=[],N=v;N<=A;N++)D.push(N);return D}w(x,"range");function S(v){return function(A){return(v===null||A.category!==v)&&v!=="all"}}w(S,"notCategory");function T(v){v=parseInt(v,10);var A=null;return v===0?A="all":v===1?A="bold":2<v&&v<5?A="underline":4<v&&v<7?A="blink":v===8?A="hide":v===9?A="strike":29<v&&v<38||v===39||89<v&&v<98?A="foreground-color":(39<v&&v<48||v===49||99<v&&v<108)&&(A="background-color"),A}w(T,"categoryForCode");function _(v,A){return A.escapeXML?l.encodeXML(v):v}w(_,"pushText");function O(v,A,D){return D||(D=""),v.push(A),"<".concat(A).concat(D?' style="'.concat(D,'"'):"",">")}w(O,"pushTag");function k(v,A){return O(v,"span",A)}w(k,"pushStyle");function B(v,A){return O(v,"span","color:"+A)}w(B,"pushForegroundColor");function P(v,A){return O(v,"span","background-color:"+A)}w(P,"pushBackgroundColor");function L(v,A){var D;if(v.slice(-1)[0]===A&&(D=v.pop()),D)return"</"+A+">"}w(L,"closeTag");function j(v,A,D){var N=!1,F=3;function M(){return""}w(M,"remove");function q(me,ue){return D("xterm256Foreground",ue),""}w(q,"removeXterm256Foreground");function V(me,ue){return D("xterm256Background",ue),""}w(V,"removeXterm256Background");function G(me){return A.newline?D("display",-1):D("text",me),""}w(G,"newline");function se(me,ue){N=!0,ue.trim().length===0&&(ue="0"),ue=ue.trimRight(";").split(";");var ht=a(ue),Sn;try{for(ht.s();!(Sn=ht.n()).done;){var Ei=Sn.value;D("display",Ei)}}catch(vi){ht.e(vi)}finally{ht.f()}return""}w(se,"ansiMess");function pe(me){return D("text",me),""}w(pe,"realText");function ae(me){return D("rgb",me),""}w(ae,"rgb");var we=[{pattern:/^\x08+/,sub:M},{pattern:/^\x1b\[[012]?K/,sub:M},{pattern:/^\x1b\[\(B/,sub:M},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:ae},{pattern:/^\x1b\[38;5;(\d+)m/,sub:q},{pattern:/^\x1b\[48;5;(\d+)m/,sub:V},{pattern:/^\n/,sub:G},{pattern:/^\r+\n/,sub:G},{pattern:/^\r/,sub:G},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:se},{patt
Line truncated
|
||||
Previous: ${o.deps}
|
||||
Incoming: ${r}`),(r==null||o.deps==null||!JE(r,o.deps))&&(t(o),o.deps=r),o}throw ss()}w(gp,"useHook");function Pn(e,t,r){let{memoizedState:n}=gp(e,o=>{o.memoizedState=t()},r);return n}w(Pn,"useMemoLike");function us(e,t){return Pn("useMemo",e,t)}w(us,"useMemo");function Fn(e,t){return Pn("useCallback",()=>e,t)}w(Fn,"useCallback");function cs(e,t){return Pn(e,()=>({current:t}),[])}w(cs,"useRefLike");function ZE(e){return cs("useRef",e)}w(ZE,"useRef");function yp(){let e=ls();if(e!=null&&e.currentPhase!=="NONE")e.hasUpdates=!0;else try{ut.getChannel().emit(To)}catch{Z.warn("State updates of Storybook preview hooks work only in browser")}}w(yp,"triggerUpdate");function ds(e,t){let r=cs(e,typeof t=="function"?t():t),n=w(o=>{r.current=typeof o=="function"?o(r.current):o,yp()},"setState");return[r.current,n]}w(ds,"useStateLike");function QE(e){return ds("useState",e)}w(QE,"useState");function ev(e,t,r){let n=r!=null?()=>r(t):t,[o,a]=ds("useReducer",n);return[o,w(i=>a(s=>e(s,i)),"dispatch")]}w(ev,"useReducer");function Bt(e,t){let r=Wo(),n=Pn("useEffect",()=>({create:e}),t);r.currentEffects.includes(n)||r.currentEffects.push(n)}w(Bt,"useEffect");function tv(e,t=[]){let r=ut.getChannel();return Bt(()=>(Object.entries(e).forEach(([n,o])=>r.on(n,o)),()=>{Object.entries(e).forEach(([n,o])=>r.removeListener(n,o))}),[...Object.keys(e),...t]),Fn(r.emit.bind(r),[r])}w(tv,"useChannel");function Yo(){let{currentContext:e}=Wo();if(e==null)throw ss();return e}w(Yo,"useStoryContext");function rv(e,t){let{parameters:r}=Yo();if(e)return r[e]??t}w(rv,"useParameter");function nv(){let e=ut.getChannel(),{id:t,args:r}=Yo(),n=Fn(a=>e.emit(Po,{storyId:t,updatedArgs:a}),[e,t]),o=Fn(a=>e.emit(Oo,{storyId:t,argNames:a}),[e,t]);return[r,n,o]}w(nv,"useArgs");function ov(){let e=ut.getChannel(),{globals:t}=Yo(),r=Fn(n=>e.emit(Fo,{globals:n}),[e]);return[t,r]}w(ov,"useGlobals");var s6=w(({name:e,parameterName:t,wrapper:r,skipIfNoParametersOrOptions:n=!1})=>{let o=w(a=>(i,s)=>{let l=s.parameters&&s.parameters[t];return l&&l.disable||n&&!a&&!l?i(s):r(i,s,{options:a,parameters:l})},"decorator");return(...a)=>typeof a[0]=="function"?o()(...a):(...i)=>{if(i.length>1)return a.length>1?o(a)(...i):o(...a)(...i);throw new Error(`Passing stories directly into ${e}() is not allowed,
|
||||
instead use addDecorator(${e}) and pass options with the '${t}' parameter`)}},"makeDecorator");function bp(){}w(bp,"noop");function Gi(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}w(Gi,"getSymbols");function Wi(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}w(Wi,"getTag");var av="[object RegExp]",iv="[object String]",sv="[object Number]",lv="[object Boolean]",Yd="[object Arguments]",uv="[object Symbol]",cv="[object Date]",dv="[object Map]",pv="[object Set]",mv="[object Array]",hv="[object Function]",fv="[object ArrayBuffer]",$i="[object Object]",gv="[object Error]",yv="[object DataView]",bv="[object Uint8Array]",Ev="[object Uint8ClampedArray]",vv="[object Uint16Array]",Av="[object Uint32Array]",xv="[object BigUint64Array]",wv="[object Int8Array]",Sv="[object Int16Array]",Cv="[object Int32Array]",Dv="[object BigInt64Array]",Tv="[object Float32Array]",kv="[object Float64Array]";function xt(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}w(xt,"isPlainObject");function Gr(e,t){let r={},n=Object.keys(e);for(let o=0;o<n.length;o++){let a=n[o],i=e[a];r[a]=t(i,a,e)}return r}w(Gr,"mapValues");function Ep(e,t){let r={},n=Object.keys(e);for(let o=0;o<n.length;o++){let a=n[o],i=e[a];t(i,a)&&(r[a]=i)}return r}w(Ep,"pickBy");function vp(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}w(vp,"eq");function Ap(e,t,r){return Vr(e,t,void 0,void 0,void 0,void 0,r)}w(Ap,"isEqualWith");function Vr(e,t,r,n,o,a,i){let s=i(e,t,r,n,o,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return zr(e,t,a,i)}return zr(e,t,a,i)}w(Vr,"isEqualWithImpl");function zr(e,t,r,n){if(Object.is(e,t))return!0;let o=Wi(e),a=Wi(t);if(o===Yd&&(o=$i),a===Yd&&(a=$i),o!==a)return!1;switch(o){case iv:return e.toString()===t.toString();case sv:{let l=e.valueOf(),u=t.valueOf();return vp(l,u)}case lv:case cv:case uv:return Object.is(e.valueOf(),t.valueOf());case av:return e.source===t.source&&e.flags===t.flags;case hv:return e===t}r=r??new Map;let i=r.get(e),s=r.get(t);if(i!=null&&s!=null)return i===t;r.set(e,t),r.set(t,e);try{switch(o){case dv:{if(e.size!==t.size)return!1;for(let[l,u]of e.entries())if(!t.has(l)||!Vr(u,t.get(l),l,e,t,r,n))return!1;return!0}case pv:{if(e.size!==t.size)return!1;let l=Array.from(e.values()),u=Array.from(t.values());for(let d=0;d<l.length;d++){let m=l[d],p=u.findIndex(f=>Vr(m,f,void 0,e,t,r,n));if(p===-1)return!1;u.splice(p,1)}return!0}case mv:case bv:case Ev:case vv:case Av:case xv:case wv:case Sv:case Cv:case Dv:case Tv:case kv:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(!Vr(e[l],t[l],l,e,t,r,n))return!1;return!0}case fv:return e.byteLength!==t.byteLength?!1:zr(new Uint8Array(e),new Uint8Array(t),r,n);case yv:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:zr(new Uint8Array(e),new Uint8Array(t),r,n);case gv:return e.name===t.name&&e.message===t.message;case $i:{if(!(zr(e.constructor,t.constructor,r,n)||xt(e)&&xt(t)))return!1;let l=[...Object.keys(e),...Gi(e)],u=[...Object.keys(t),...Gi(t)];if(l.length!==u.length)return!1;for(let d=0;d<l.length;d++){let m=l[d],p=e[m];if(!Object.hasOwn(t,m))return!1;let f=t[m];if(!Vr(p,f,m,e,t,r,n))return!1}return!0}default:return!1}}finally{r.delete(e),r.delete(t)}}w(zr,"areObjectsEqual");function xp(e,t){return Ap(e,t,bp)}w(xp,"isEqual");var qi=Jr(ip(),1);function wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Array.from(typeof e=="string"?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var o=n.reduce(function(s,l){var u=l.match(/\n([\t ]+|(?!\s).)/g);return u?s.concat(u.map(function(d){var m,p;return(p=(m=d.match(/[\t ]/g))===null||m===void 0?void 0:m.length)!==null&&p!==void 0?p:0})):s},[]);if(o.length){var a=new RegExp(`
|
||||
[ ]{`+Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a,`
|
||||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var i=n[0];return t.forEach(function(s,l){var u=i.match(/(?:^|\n)( *)$/),d=u?u[1]:"",m=s;typeof s=="string"&&s.includes(`
|
||||
`)&&(m=String(s).split(`
|
||||
`).map(function(p,f){return f===0?p:""+d+p}).join(`
|
||||
`)),i+=m+n[l+1]}),i}w(wt,"dedent");var Ur=Symbol("incompatible"),Yi=w((e,t)=>{let r=t.type;if(e==null||!r||t.mapping)return e;switch(r.name){case"string":return String(e);case"enum":return e;case"number":return Number(e);case"boolean":return String(e)==="true";case"array":return!r.value||!Array.isArray(e)?Ur:e.reduce((n,o,a)=>{let i=Yi(o,{type:r.value});return i!==Ur&&(n[a]=i),n},new Array(e.length));case"object":return typeof e=="string"||typeof e=="number"?e:!r.value||typeof e!="object"?Ur:Object.entries(e).reduce((n,[o,a])=>{let i=Yi(a,{type:r.value[o]});return i===Ur?n:Object.assign(n,{[o]:i})},{});default:return Ur}},"map"),Ov=w((e,t)=>Object.entries(e).reduce((r,[n,o])=>{if(!t[n])return r;let a=Yi(o,t[n]);return a===Ur?r:Object.assign(r,{[n]:a})},{}),"mapArgsToTypes"),Ki=w((e,t)=>Array.isArray(e)&&Array.isArray(t)?t.reduce((r,n,o)=>(r[o]=Ki(e[o],t[o]),r),[...e]).filter(r=>r!==void 0):!xt(e)||!xt(t)?t:Object.keys({...e,...t}).reduce((r,n)=>{if(n in t){let o=Ki(e[n],t[n]);o!==void 0&&(r[n]=o)}else r[n]=e[n];return r},{}),"combineArgs"),Iv=w((e,t)=>Object.entries(t).reduce((r,[n,{options:o}])=>{function a(){return n in e&&(r[n]=e[n]),r}if(w(a,"allowArg"),!o)return a();if(!Array.isArray(o))return yt.error(wt`
|
||||
Invalid argType: '${n}.options' should be an array.
|
||||
|
||||
More info: https://storybook.js.org/docs/api/arg-types
|
||||
`),a();if(o.some(m=>m&&["object","function"].includes(typeof m)))return yt.error(wt`
|
||||
Invalid argType: '${n}.options' should only contain primitives. Use a 'mapping' for complex values.
|
||||
|
||||
More info: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
|
||||
`),a();let i=Array.isArray(e[n]),s=i&&e[n].findIndex(m=>!o.includes(m)),l=i&&s===-1;if(e[n]===void 0||o.includes(e[n])||l)return a();let u=i?`${n}[${s}]`:n,d=o.map(m=>typeof m=="string"?`'${m}'`:String(m)).join(", ");return yt.warn(`Received illegal value for '${u}'. Supported options: ${d}`),r},{}),"validateOptions"),Bn=Symbol("Deeply equal"),Uo=w((e,t)=>{if(typeof e!=typeof t)return t;if(xp(e,t))return Bn;if(Array.isArray(e)&&Array.isArray(t)){let r=t.reduce((n,o,a)=>{let i=Uo(e[a],o);return i!==Bn&&(n[a]=i),n},new Array(t.length));return t.length>=e.length?r:r.concat(new Array(e.length-t.length).fill(void 0))}return xt(e)&&xt(t)?Object.keys({...e,...t}).reduce((r,n)=>{let o=Uo(e?.[n],t?.[n]);return o===Bn?r:Object.assign(r,{[n]:o})},{}):t},"deepDiff"),wp="UNTARGETED";function Sp({args:e,argTypes:t}){let r={};return Object.entries(e).forEach(([n,o])=>{let{target:a=wp}=t[n]||{};r[a]=r[a]||{},r[a][n]=o}),r}w(Sp,"groupArgsByTarget");function Cp(e){return Object.keys(e).forEach(t=>e[t]===void 0&&delete e[t]),e}w(Cp,"deleteUndefined");var Dp=class{constructor(){this.initialArgsByStoryId={},this.argsByStoryId={}}get(t){if(!(t in this.argsByStoryId))throw new Error(`No args known for ${t} -- has it been rendered yet?`);return this.argsByStoryId[t]}setInitial(t){if(!this.initialArgsByStoryId[t.id])this.initialArgsByStoryId[t.id]=t.initialArgs,this.argsByStoryId[t.id]=t.initialArgs;else if(this.initialArgsByStoryId[t.id]!==t.initialArgs){let r=Uo(this.initialArgsByStoryId[t.id],this.argsByStoryId[t.id]);this.initialArgsByStoryId[t.id]=t.initialArgs,this.argsByStoryId[t.id]=t.initialArgs,r!==Bn&&this.updateFromDelta(t,r)}}updateFromDelta(t,r){let n=Iv(r,t.argTypes);this.argsByStoryId[t.id]=Ki(this.argsByStoryId[t.id],n)}updateFromPersisted(t,r){let n=Ov(r,t.argTypes);return this.updateFromDelta(t,n)}update(t,r){if(!(t in this.argsByStoryId))throw new Error(`No args known for ${t} -- has it been rendered yet?`);this.argsByStoryId[t]=Cp({...this.argsByStoryId[t],...r})}};w(Dp,"ArgsStore");var Rv=Dp,Tp=w((e={})=>Object.entries(e).reduce((t,[r,{defaultValue:n}])=>(typeof n<"u"&&(t[r]=n),t),{}),"getValuesFromArgTypes"),kp=class{constructor({globals:t={},globalTypes:r={}}){this.set({globals:t,globalTypes:r})}set({globals:t={},globalTypes:r={}}){let n=this.initialGlobals&&Uo(this.initialGlobals,this.globals);this.allowedGlobalNames=new Set([...Object.keys(t),...Object.keys(r)]);let o=Tp(r);this.initialGlobals={...o,...t},this.globals=this.initialGlobals,n&&n!==Bn&&this.updateFromPersisted(n)}filterAllowedGlobals(t){return Object.entries(t).reduce((r,[n,o])=>(this.allowedGlobalNames.has(n)?r[n]=o:Z.warn(`Attempted to set a global (${n}) that is not defined in initial globals or globalTypes`),r),{})}updateFromPersisted(t){let r=this.filterAllowedGlobals(t);this.globals={...this.globals,...r}}get(){return this.globals}update(t){this.globals={...this.globals,...this.filterAllowedGlobals(t)};for(let r in t)t[r]===void 0&&(this.globals[r]=this.initialGlobals[r])}};w(kp,"GlobalsStore");var Bv=kp,_v=Jr(ip(),1),Fv=(0,_v.default)(1)(e=>Object.values(e).reduce((t,r)=>(t[r.importPath]=t[r.importPath]||r,t),{})),Op=class{constructor({entries:t}={v:5,entries:{}}){this.entries=t}entryFromSpecifier(t){let r=Object.values(this.entries);if(t==="*")return r[0];if(typeof t=="string")return this.entries[t]?this.entries[t]:r.find(a=>a.id.startsWith(t));let{name:n,title:o}=t;return r.find(a=>a.name===n&&a.title===o)}storyIdToEntry(t){let r=this.entries[t];if(!r)throw new xd({storyId:t});return r}importPathToEntry(t){return Fv(this.entries)[t]}};w(Op,"StoryIndexStore");var Pv=Op,Nv=w(e=>typeof e=="string"?{name:e}:e,"normalizeType"),Lv=w(e=>typeof e=="string"?{type:e}:e,"normalizeControl"),jv=w((e,t)=>{let{type:r,control:n,...o}=e,a={name:t,...o};return r&&(a.type=Nv(r)),n?a.control=Lv(n):n===!1&&(a.control={disable:!0}),a},"normalizeInputType"),Ho=w(e=>Gr(e,jv),"normalizeInputTypes"),be=w(e=>Array.isArray(e)?e:e?[e]:[],"normalizeArrays"),Mv=wt`
|
||||
CSF .story annotations deprecated; annotate story functions directly:
|
||||
- StoryFn.story.name => StoryFn.storyName
|
||||
- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
|
||||
See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.
|
||||
`;function Vo(e,t,r){let n=t,o=typeof t=="function"?t:null,{story:a}=n;a&&(Z.debug("deprecated story",a),$r(Mv));let i=Jo(e),s=typeof n!="function"&&n.name||n.storyName||a?.name||i,l=[...be(n.decorators),...be(a?.decorators)],u={...a?.parameters,...n.parameters},d={...a?.args,...n.args},m={...a?.argTypes,...n.argTypes},p=[...be(n.loaders),...be(a?.loaders)],f=[...be(n.beforeEach),...be(a?.beforeEach)],g=[...be(n.afterEach),...be(a?.afterEach)],{render:y,play:E,tags:b=[],globals:x={}}=n,S=u.__id||Xo(r.id,i);return{moduleExport:t,id:S,name:s,tags:b,decorators:l,parameters:u,args:d,argTypes:Ho(m),loaders:p,beforeEach:f,afterEach:g,globals:x,...y&&{render:y},...o&&{userStoryFn:o},...E&&{play:E}}}w(Vo,"normalizeStory");function zo(e,t=e.title,r){let{id:n,argTypes:o}=e;return{id:Nn(n||t),...e,title:t,...o&&{argTypes:Ho(o)},parameters:{fileName:r,...e.parameters}}}w(zo,"normalizeComponentAnnotations");var $v=w(e=>{let{globals:t,globalTypes:r}=e;(t||r)&&Z.error("Global args/argTypes can only be set globally",JSON.stringify({globals:t,globalTypes:r}))},"checkGlobals"),qv=w(e=>{let{options:t}=e;t?.storySort&&Z.error("The storySort option parameter can only be set globally")},"checkStorySort"),Mo=w(e=>{e&&($v(e),qv(e))},"checkDisallowedParameters");function Ip(e,t,r){let{default:n,__namedExportsOrder:o,...a}=e,i=Object.values(a)[0];if(Ar(i)){let u=zo(i.meta.input,r,t);Mo(u.parameters);let d={meta:u,stories:{},moduleExports:e};return Object.keys(a).forEach(m=>{if(Xr(m,u)){let p=Vo(m,a[m].input,u);Mo(p.parameters),d.stories[p.id]=p}}),d.projectAnnotations=i.meta.preview.composed,d}let s=zo(n,r,t);Mo(s.parameters);let l={meta:s,stories:{},moduleExports:e};return Object.keys(a).forEach(u=>{if(Xr(u,s)){let d=Vo(u,a[u],s);Mo(d.parameters),l.stories[d.id]=d}}),l}w(Ip,"processCSFFile");function Rp(e){return e!=null&&Bp(e).includes("mount")}w(Rp,"mountDestructured");function Bp(e){let t=e.toString().match(/[^(]*\(([^)]*)/);if(!t)return[];let r=Xi(t[1]);if(!r.length)return[];let n=r[0];return n.startsWith("{")&&n.endsWith("}")?Xi(n.slice(1,-1).replace(/\s/g,"")).map(o=>o.replace(/:.*|=.*/g,"")):[]}w(Bp,"getUsedProps");function Xi(e){let t=[],r=[],n=0;for(let a=0;a<e.length;a++)if(e[a]==="{"||e[a]==="[")r.push(e[a]==="{"?"}":"]");else if(e[a]===r[r.length-1])r.pop();else if(!r.length&&e[a]===","){let i=e.substring(n,a).trim();i&&t.push(i),n=a+1}let o=e.substring(n).trim();return o&&t.push(o),t}w(Xi,"splitByComma");function _p(e,t,r){let n=r(e);return o=>t(n,o)}w(_p,"decorateStory");function Fp({componentId:e,title:t,kind:r,id:n,name:o,story:a,parameters:i,initialArgs:s,argTypes:l,...u}={}){return u}w(Fp,"sanitizeStoryContextUpdate");function Pp(e,t){let r={},n=w(a=>i=>{if(!r.value)throw new Error("Decorated function called without init");return r.value={...r.value,...Fp(i)},a(r.value)},"bindWithContext"),o=t.reduce((a,i)=>_p(a,i,n),e);return a=>(r.value=a,o(a))}w(Pp,"defaultDecorateStory");var Wr=w((...e)=>{let t={},r=e.filter(Boolean),n=r.reduce((o,a)=>(Object.entries(a).forEach(([i,s])=>{let l=o[i];Array.isArray(s)||typeof l>"u"?o[i]=s:xt(s)&&xt(l)?t[i]=!0:typeof s<"u"&&(o[i]=s)}),o),{});return Object.keys(t).forEach(o=>{let a=r.filter(Boolean).map(i=>i[o]).filter(i=>typeof i<"u");a.every(i=>xt(i))?n[o]=Wr(...a):n[o]=a[a.length-1]}),n},"combineParameters");function ps(e,t,r){let{moduleExport:n,id:o,name:a}=e||{},i=ms(e,t,r),s=w(async O=>{let k={};for(let B of[be(r.loaders),be(t.loaders),be(e.loaders)]){if(O.abortSignal.aborted)return k;let P=await Promise.all(B.map(L=>L(O)));Object.assign(k,...P)}return k},"applyLoaders"),l=w(async O=>{let k=new Array;for(let B of[...be(r.beforeEach),...be(t.beforeEach),...be(e.beforeEach)]){if(O.abortSignal.aborted)return k;let P=await B(O);P&&k.push(P)}return k},"applyBeforeEach"),u=w(async O=>{let k=[...be(r.afterEach),...be(t.afterEach),...be(e.afterEach)].reverse();for(let B of k){if(O.abortSignal.aborted)return;await B(O)}},"applyAfterEach"),d=w(O=>O.originalStoryFn(O.args,O),"undecoratedStoryFn"),{applyDecorators:m=Pp,runStep:p}=r,f=[...be(e?.decorators),...be(t?.decorators),...be(r?.decorators)],g=e?.userStoryFn||e?.render||t.render||r.render,y=XE(m)(d,f),E=w(O=>y(O),"unboundStoryFn"),b=e?.play??t?.play,x=Rp(b);if(!g&&!x)throw new Lo({id:o});let S=w(O=>async()=>(await O.renderToCanvas(),O.canvas),"defaultMount"),T=e.mount??t.mount??r.mount??S,_=r.testingLibraryRender;return{storyGlobals:{},...i,moduleExport:n,id:o,name:a,story:a,originalStoryFn:g,undecoratedStoryFn:d,unboundStoryFn:E,applyLoaders:s,applyBeforeEach:l,applyAfterEach:u,playFunction:b,runStep:p,mount:T,testingLibraryRender:_,renderToCanvas:r.renderToCanvas,usesMount:x}}w(ps,"prepareStory");function Np(e,t,r){return{...ms(void 0,e,t),moduleExport:r}}w(Np,"prepareMeta");function ms(e,t,r){let n=["dev","test"],o=H.DOCS_OPTIONS?.autodocs===!0?["autodocs"]:[],a=en(...n,...o,...r.tags??[],...t.tags??[],...e?.tags??[]),i=Wr(r.parameters,t.parameters,e?.parameters),{argTypesEnhancers:s=[],argsEnhancers:l=[]}=r,u=Wr(r.argTypes,t.a
Line truncated
|
||||
We've detected a cycle in arg '${t}'. Args should be JSON-serializable.
|
||||
|
||||
Consider using the mapping feature or fully custom args:
|
||||
- Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
|
||||
- Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
|
||||
`),{name:"other",value:"cyclic object"}):(r.add(e),Array.isArray(e)?{name:"array",value:e.length>0?Ji(e[0],t,new Set(r)):{name:"other",value:"unknown"}}:{name:"object",value:Gr(e,o=>Ji(o,t,new Set(r)))}):{name:"object",value:{}}},"inferType"),Lp=w(e=>{let{id:t,argTypes:r={},initialArgs:n={}}=e,o=Gr(n,(i,s)=>({name:s,type:Ji(i,`${t}.${s}`,new Set)})),a=Gr(r,(i,s)=>({name:s}));return Wr(o,a,r)},"inferArgTypes");Lp.secondPass=!0;var Kd=w((e,t)=>Array.isArray(t)?t.includes(e):e.match(t),"matches"),Uv=w((e,t,r)=>!t&&!r?e:e&&Ep(e,(n,o)=>{let a=n.name||o.toString();return!!(!t||Kd(a,t))&&(!r||!Kd(a,r))}),"filterArgTypes"),Hv=w((e,t,r)=>{let{type:n,options:o}=e;if(n){if(r.color&&r.color.test(t)){let a=n.name;if(a==="string")return{control:{type:"color"}};a!=="enum"&&Z.warn(`Addon controls: Control of type color only supports string, received "${a}" instead`)}if(r.date&&r.date.test(t))return{control:{type:"date"}};switch(n.name){case"array":return{control:{type:"object"}};case"boolean":return{control:{type:"boolean"}};case"string":return{control:{type:"text"}};case"number":return{control:{type:"number"}};case"enum":{let{value:a}=n;return{control:{type:a?.length<=5?"radio":"select"},options:a}}case"function":case"symbol":return null;default:return{control:{type:o?"select":"object"}}}}},"inferControl"),jp=w(e=>{let{argTypes:t,parameters:{__isArgsStory:r,controls:{include:n=null,exclude:o=null,matchers:a={}}={}}}=e;if(!r)return t;let i=Uv(t,n,o),s=Gr(i,(l,u)=>l?.type&&Hv(l,u.toString(),a));return Wr(s,i)},"inferControls");jp.secondPass=!0;function Go({argTypes:e,globalTypes:t,argTypesEnhancers:r,decorators:n,loaders:o,beforeEach:a,afterEach:i,initialGlobals:s,...l}){return{...e&&{argTypes:Ho(e)},...t&&{globalTypes:Ho(t)},decorators:be(n),loaders:be(o),beforeEach:be(a),afterEach:be(i),argTypesEnhancers:[...r||[],Lp,jp],initialGlobals:s,...l}}w(Go,"normalizeProjectAnnotations");var Vv=w(e=>async()=>{let t=[];for(let r of e){let n=await r();n&&t.unshift(n)}return async()=>{for(let r of t)await r()}},"composeBeforeAllHooks");function Mp(e){return async(t,r,n)=>{await e.reduceRight((o,a)=>async()=>a(t,o,n),async()=>r(n))()}}w(Mp,"composeStepRunners");function Yr(e,t){return e.map(r=>r.default?.[t]??r[t]).filter(Boolean)}w(Yr,"getField");function jt(e,t,r={}){return Yr(e,t).reduce((n,o)=>{let a=be(o);return r.reverseFileOrder?[...a,...n]:[...n,...a]},[])}w(jt,"getArrayField");function Rn(e,t){return Object.assign({},...Yr(e,t))}w(Rn,"getObjectField");function Hr(e,t){return Yr(e,t).pop()}w(Hr,"getSingletonField");function Kr(e){let t=jt(e,"argTypesEnhancers"),r=Yr(e,"runStep"),n=jt(e,"beforeAll");return{parameters:Wr(...Yr(e,"parameters")),decorators:jt(e,"decorators",{reverseFileOrder:!(H.FEATURES?.legacyDecoratorFileOrder??!1)}),args:Rn(e,"args"),argsEnhancers:jt(e,"argsEnhancers"),argTypes:Rn(e,"argTypes"),argTypesEnhancers:[...t.filter(o=>!o.secondPass),...t.filter(o=>o.secondPass)],initialGlobals:Rn(e,"initialGlobals"),globalTypes:Rn(e,"globalTypes"),loaders:jt(e,"loaders"),beforeAll:Vv(n),beforeEach:jt(e,"beforeEach"),afterEach:jt(e,"afterEach"),render:Hr(e,"render"),renderToCanvas:Hr(e,"renderToCanvas"),applyDecorators:Hr(e,"applyDecorators"),runStep:Mp(r),tags:jt(e,"tags"),mount:Hr(e,"mount"),testingLibraryRender:Hr(e,"testingLibraryRender")}}w(Kr,"composeConfigs");function fs(){try{return!!globalThis.__vitest_browser__||!!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)}catch{return!1}}w(fs,"isTestEnvironment");function gs(e=!0){if(!("document"in globalThis&&"createElement"in globalThis.document))return()=>{};let t=document.createElement("style");t.textContent=`*, *:before, *:after {
|
||||
animation: none !important;
|
||||
}`,document.head.appendChild(t);let r=document.createElement("style");return r.textContent=`*, *:before, *:after {
|
||||
animation-delay: 0s !important;
|
||||
animation-direction: ${e?"reverse":"normal"} !important;
|
||||
animation-play-state: paused !important;
|
||||
transition: none !important;
|
||||
}`,document.head.appendChild(r),document.body.clientHeight,document.head.removeChild(t),()=>{r.parentNode?.removeChild(r)}}w(gs,"pauseAnimations");async function ys(e){if(!("document"in globalThis&&"getAnimations"in globalThis.document&&"querySelectorAll"in globalThis.document))return;let t=!1;await Promise.race([new Promise(r=>{setTimeout(()=>{let n=[globalThis.document,...bs(globalThis.document)],o=w(async()=>{if(t||e?.aborted)return;let a=n.flatMap(i=>i?.getAnimations?.()||[]).filter(i=>i.playState==="running"&&!$p(i));a.length>0&&(await Promise.all(a.map(i=>i.finished)),await o())},"checkAnimationsFinished");o().then(r)},100)}),new Promise(r=>setTimeout(()=>{t=!0,r(void 0)},5e3))])}w(ys,"waitForAnimations");function bs(e){return[e,...e.querySelectorAll("*")].reduce((t,r)=>("shadowRoot"in r&&r.shadowRoot&&t.push(r.shadowRoot,...bs(r.shadowRoot)),t),[])}w(bs,"getShadowRoots");function $p(e){if(e instanceof CSSAnimation&&e.effect instanceof KeyframeEffect&&e.effect.target){let t=getComputedStyle(e.effect.target,e.effect.pseudoElement),r=t.animationName?.split(", ").indexOf(e.animationName);return t.animationIterationCount.split(", ")[r]==="infinite"}return!1}w($p,"isInfiniteAnimation");var qp=class{constructor(){this.reports=[]}async addReport(t){this.reports.push(t)}};w(qp,"ReporterAPI");var Up=qp;function Hp(e,t,r){return Ar(e)?{story:e.input,meta:e.meta.input,preview:e.meta.preview.composed}:{story:e,meta:t,preview:r}}w(Hp,"getCsfFactoryAnnotations");function zv(e){globalThis.defaultProjectAnnotations=e}w(zv,"setDefaultProjectAnnotations");var Gv="ComposedStory",Wv="Unnamed Story";function Vp(e){return e?Kr([e]):{}}w(Vp,"extractAnnotation");function Yv(e){let t=Array.isArray(e)?e:[e];return globalThis.globalProjectAnnotations=Kr([...Qr(),globalThis.defaultProjectAnnotations??{},Kr(t.map(Vp))]),globalThis.globalProjectAnnotations??{}}w(Yv,"setProjectAnnotations");var nr=[];function zp(e,t,r,n,o){if(e===void 0)throw new Error("Expected a story but received undefined.");t.title=t.title??Gv;let a=zo(t),i=o||e.storyName||e.story?.name||e.name||Wv,s=Vo(i,e,a),l=Go(Kr([n??globalThis.globalProjectAnnotations??{},r??{}])),u=ps(s,a,l),d={...Tp(l.globalTypes),...l.initialGlobals,...u.storyGlobals},m=new Up,p=w(()=>{let b=hs({hooks:new fp,globals:d,args:{...u.initialArgs},viewMode:"story",reporting:m,loaded:{},abortSignal:new AbortController().signal,step:w((x,S)=>u.runStep(x,S,b),"step"),canvasElement:null,canvas:{},userEvent:{},globalTypes:l.globalTypes,...u,context:null,mount:null});return b.parameters.__isPortableStory=!0,b.context=b,u.renderToCanvas&&(b.renderToCanvas=async()=>{let x=await u.renderToCanvas?.({componentId:u.componentId,title:u.title,id:u.id,name:u.name,tags:u.tags,showMain:w(()=>{},"showMain"),showError:w(S=>{throw new Error(`${S.title}
|
||||
${S.description}`)},"showError"),showException:w(S=>{throw S},"showException"),forceRemount:!0,storyContext:b,storyFn:w(()=>u.unboundStoryFn(b),"storyFn"),unboundStoryFn:u.unboundStoryFn},b.canvasElement);x&&nr.push(x)}),b.mount=u.mount(b),b},"initializeContext"),f,g=w(async b=>{let x=p();return x.canvasElement??=globalThis?.document?.body,f&&(x.loaded=f.loaded),Object.assign(x,b),u.playFunction(x)},"play"),y=w(b=>{let x=p();return Object.assign(x,b),Gp(u,x)},"run"),E=u.playFunction?g:void 0;return Object.assign(w(function(b){let x=p();return f&&(x.loaded=f.loaded),x.args={...x.initialArgs,...b},u.unboundStoryFn(x)},"storyFn"),{id:u.id,storyName:i,load:w(async()=>{for(let x of[...nr].reverse())await x();nr.length=0;let b=p();b.loaded=await u.applyLoaders(b),nr.push(...(await u.applyBeforeEach(b)).filter(Boolean)),f=b},"load"),globals:d,args:u.initialArgs,parameters:u.parameters,argTypes:u.argTypes,play:E,run:y,reporting:m,tags:u.tags})}w(zp,"composeStory");var Kv=w((e,t,r,n)=>zp(e,t,r,{},n),"defaultComposeStory");function Xv(e,t,r=Kv){let{default:n,__esModule:o,__namedExportsOrder:a,...i}=e,s=n;return Object.entries(i).reduce((l,[u,d])=>{let{story:m,meta:p}=Hp(d);return!s&&p&&(s=p),Xr(u,s)?Object.assign(l,{[u]:r(m,s,t,u)}):l},{})}w(Xv,"composeStories");function Jv(e){return e.extend({mount:w(async({mount:t,page:r},n)=>{await n(async(o,...a)=>{if(!("__pw_type"in o)||"__pw_type"in o&&o.__pw_type!=="jsx")throw new Error(wt`
|
||||
Portable stories in Playwright CT only work when referencing JSX elements.
|
||||
Please use JSX format for your components such as:
|
||||
|
||||
instead of:
|
||||
await mount(MyComponent, { props: { foo: 'bar' } })
|
||||
|
||||
do:
|
||||
await mount(<MyComponent foo="bar"/>)
|
||||
|
||||
More info: https://storybook.js.org/docs/api/portable-stories-playwright
|
||||
`);let{props:i,...s}=o;await r.evaluate(async u=>{let d=await globalThis.__pwUnwrapObject?.(u);return("__pw_type"in d?d.type:d)?.load?.()},s);let l=await t(o,...a);return await r.evaluate(async u=>{let d=await globalThis.__pwUnwrapObject?.(u),m="__pw_type"in d?d.type:d,p=document.querySelector("#root");return m?.play?.({canvasElement:p})},s),l})},"mount")})}w(Jv,"createPlaywrightTest");async function Gp(e,t){for(let a of[...nr].reverse())await a();if(nr.length=0,!t.canvasElement){let a=document.createElement("div");globalThis?.document?.body?.appendChild(a),t.canvasElement=a,nr.push(()=>{globalThis?.document?.body?.contains(a)&&globalThis?.document?.body?.removeChild(a)})}if(t.loaded=await e.applyLoaders(t),t.abortSignal.aborted)return;nr.push(...(await e.applyBeforeEach(t)).filter(Boolean));let r=e.playFunction,n=e.usesMount;if(n||await t.mount(),t.abortSignal.aborted)return;r&&(n||(t.mount=async()=>{throw new qr({playFunction:r.toString()})}),await r(t));let o;fs()?o=gs():await ys(t.abortSignal),await e.applyAfterEach(t),await o?.()}w(Gp,"runStory");var Xd=1e3,Zv=1e4,Wp=class{constructor(t,r,n){this.importFn=r,this.storyIndex=new Pv(t),this.projectAnnotations=Go(Kr([...Qr(),n]));let{initialGlobals:o,globalTypes:a}=this.projectAnnotations;this.args=new Rv,this.userGlobals=new Bv({globals:o,globalTypes:a}),this.hooks={},this.cleanupCallbacks={},this.processCSFFileWithCache=(0,qi.default)(Xd)(Ip),this.prepareMetaWithCache=(0,qi.default)(Xd)(Np),this.prepareStoryWithCache=(0,qi.default)(Zv)(ps)}setProjectAnnotations(t){this.projectAnnotations=Go(t);let{initialGlobals:r,globalTypes:n}=t;this.userGlobals.set({globals:r,globalTypes:n})}async onStoriesChanged({importFn:t,storyIndex:r}){t&&(this.importFn=t),r&&(this.storyIndex.entries=r.entries),this.cachedCSFFiles&&await this.cacheAllCSFFiles()}async storyIdToEntry(t){return this.storyIndex.storyIdToEntry(t)}async loadCSFFileByStoryId(t){let{importPath:r,title:n}=this.storyIndex.storyIdToEntry(t),o=await this.importFn(r);return this.processCSFFileWithCache(o,r,n)}async loadAllCSFFiles(){let t={};return Object.entries(this.storyIndex.entries).forEach(([r,{importPath:n}])=>{t[n]=r}),(await Promise.all(Object.entries(t).map(async([r,n])=>({importPath:r,csfFile:await this.loadCSFFileByStoryId(n)})))).reduce((r,{importPath:n,csfFile:o})=>(r[n]=o,r),{})}async cacheAllCSFFiles(){this.cachedCSFFiles=await this.loadAllCSFFiles()}preparedMetaFromCSFFile({csfFile:t}){let r=t.meta;return this.prepareMetaWithCache(r,this.projectAnnotations,t.moduleExports.default)}async loadStory({storyId:t}){let r=await this.loadCSFFileByStoryId(t);return this.storyFromCSFFile({storyId:t,csfFile:r})}storyFromCSFFile({storyId:t,csfFile:r}){let n=r.stories[t];if(!n)throw new Md({storyId:t});let o=r.meta,a=this.prepareStoryWithCache(n,o,r.projectAnnotations??this.projectAnnotations);return this.args.setInitial(a),this.hooks[a.id]=this.hooks[a.id]||new fp,a}componentStoriesFromCSFFile({csfFile:t}){return Object.keys(this.storyIndex.entries).filter(r=>!!t.stories[r]).map(r=>this.storyFromCSFFile({storyId:r,csfFile:t}))}async loadEntry(t){let r=await this.storyIdToEntry(t),n=r.type==="docs"?r.storiesImports:[],[o,...a]=await Promise.all([this.importFn(r.importPath),...n.map(i=>{let s=this.storyIndex.importPathToEntry(i);return this.loadCSFFileByStoryId(s.id)})]);return{entryExports:o,csfFiles:a}}getStoryContext(t,{forceInitialArgs:r=!1}={}){let n=this.userGlobals.get(),{initialGlobals:o}=this.userGlobals,a=new Up;return hs({...t,args:r?t.initialArgs:this.args.get(t.id),initialGlobals:o,globalTypes:this.projectAnnotations.globalTypes,userGlobals:n,reporting:a,globals:{...n,...t.storyGlobals},hooks:this.hooks[t.id]})}addCleanupCallbacks(t,...r){this.cleanupCallbacks[t.id]=(this.cleanupCallbacks[t.id]||[]).concat(r)}async cleanupStory(t){this.hooks[t.id].clean();let r=this.cleanupCallbacks[t.id];if(r)for(let n of[...r].reverse())await n();delete this.cleanupCallbacks[t.id]}extract(t={includeDocsOnly:!1}){let{cachedCSFFiles:r}=this;if(!r)throw new Dd;return Object.entries(this.storyIndex.entries).reduce((n,[o,{type:a,importPath:i}])=>{if(a==="docs")return n;let s=r[i],l=this.storyFromCSFFile({storyId:o,csfFile:s});return!t.includeDocsOnly&&l.parameters.docsOnly||(n[o]=Object.entries(l).reduce((u,[d,m])=>d==="moduleExport"||typeof m=="function"?u:Array.isArray(m)?Object.assign(u,{[d]:m.slice().sort()}):Object.assign(u,{[d]:m}),{args:l.initialArgs,globals:{...this.userGlobals.initialGlobals,...this.userGlobals.globals,...l.storyGlobals}})),n},{})}};w(Wp,"StoryStore");var Qv=Wp;function Yp(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}w(Yp,"slash");var eA=w(e=>{if(e.length===0)return e;let t=e[e.length-1],r=t?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i,"");if(e.length===1)return[r];let n=e[e.length-2];return r&&n&&r.toLowerCase()===n.toLowerCase()?[...e.slice(0,-2),r]:r&&(/^(story|stories)([.][^.]+)$/i.test(t)||/^index$/i.test(r))?e.slice(0,-1):[...e.slice(0,-1),r]},"sanitize
Line truncated
|
||||
CSF Auto-title received a numeric fileName. This typically happens when
|
||||
webpack is mis-configured in production mode. To force webpack to produce
|
||||
filenames, set optimization.moduleIds = "named" in your webpack config.
|
||||
`);let i=Yp(String(e));if(o.exec(i)){if(!r){let s=i.replace(n,""),l=Zi([a,s]).split("/");return l=eA(l),l.join("/")}return a?Zi([a,r]):r}},"userOrAutoTitleFromSpecifier"),P6=w((e,t,r)=>{for(let n=0;n<t.length;n+=1){let o=tA(e,t[n],r);if(o)return o}return r||void 0},"userOrAutoTitle"),Jd=/\s*\/\s*/,rA=w((e={})=>(t,r)=>{if(t.title===r.title&&!e.includeNames)return 0;let n=e.method||"configure",o=e.order||[],a=t.title.trim().split(Jd),i=r.title.trim().split(Jd);e.includeNames&&(a.push(t.name),i.push(r.name));let s=0;for(;a[s]||i[s];){if(!a[s])return-1;if(!i[s])return 1;let l=a[s],u=i[s];if(l!==u){let m=o.indexOf(l),p=o.indexOf(u),f=o.indexOf("*");return m!==-1||p!==-1?(m===-1&&(f!==-1?m=f:m=o.length),p===-1&&(f!==-1?p=f:p=o.length),m-p):n==="configure"?0:l.localeCompare(u,e.locales?e.locales:void 0,{numeric:!0,sensitivity:"accent"})}let d=o.indexOf(l);d===-1&&(d=o.indexOf("*")),o=d!==-1&&Array.isArray(o[d+1])?o[d+1]:[],s+=1}return 0},"storySort"),nA=w((e,t,r)=>{if(t){let n;typeof t=="function"?n=t:n=rA(t),e.sort(n)}else e.sort((n,o)=>r.indexOf(n.importPath)-r.indexOf(o.importPath));return e},"sortStoriesCommon"),N6=w((e,t,r)=>{try{return nA(e,t,r)}catch(n){throw new Error(wt`
|
||||
Error sorting stories with sort parameter ${t}:
|
||||
|
||||
> ${n.message}
|
||||
|
||||
Are you using a V6-style sort function in V7 mode?
|
||||
|
||||
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort
|
||||
`)}},"sortStoriesV7"),Ko=new Error("prepareAborted"),{AbortController:Zd}=globalThis;function Qi(e){try{let{name:t="Error",message:r=String(e),stack:n}=e;return{name:t,message:r,stack:n}}catch{return{name:"Error",message:String(e)}}}w(Qi,"serializeError");var Kp=class{constructor(t,r,n,o,a,i,s={autoplay:!0,forceInitialArgs:!1},l){this.channel=t,this.store=r,this.renderToScreen=n,this.callbacks=o,this.id=a,this.viewMode=i,this.renderOptions=s,this.type="story",this.notYetRendered=!0,this.rerenderEnqueued=!1,this.disableKeyListeners=!1,this.teardownRender=w(()=>{},"teardownRender"),this.torndown=!1,this.abortController=new Zd,this.renderId=Date.now(),l&&(this.story=l,this.phase="preparing")}async runPhase(t,r,n){this.phase=r,this.channel.emit(gt,{newPhase:this.phase,renderId:this.renderId,storyId:this.id}),n&&(await n(),this.checkIfAborted(t))}checkIfAborted(t){return t.aborted?(this.phase="aborted",this.channel.emit(gt,{newPhase:this.phase,renderId:this.renderId,storyId:this.id}),!0):!1}async prepare(){if(await this.runPhase(this.abortController.signal,"preparing",async()=>{this.story=await this.store.loadStory({storyId:this.id})}),this.abortController.signal.aborted)throw await this.store.cleanupStory(this.story),Ko}isEqual(t){return!!(this.id===t.id&&this.story&&this.story===t.story)}isPreparing(){return["preparing"].includes(this.phase)}isPending(){return["loading","beforeEach","rendering","playing","afterEach"].includes(this.phase)}async renderToElement(t){return this.canvasElement=t,this.render({initial:!0,forceRemount:!0})}storyContext(){if(!this.story)throw new Error("Cannot call storyContext before preparing");let{forceInitialArgs:t}=this.renderOptions;return this.store.getStoryContext(this.story,{forceInitialArgs:t})}async render({initial:t=!1,forceRemount:r=!1}={}){let{canvasElement:n}=this;if(!this.story)throw new Error("cannot render when not prepared");let o=this.story;if(!n)throw new Error("cannot render when canvasElement is unset");let{id:a,componentId:i,title:s,name:l,tags:u,applyLoaders:d,applyBeforeEach:m,applyAfterEach:p,unboundStoryFn:f,playFunction:g,runStep:y}=o;r&&!t&&(this.cancelRender(),this.abortController=new Zd);let E=this.abortController.signal,b=!1,x=o.usesMount;try{let S={...this.storyContext(),viewMode:this.viewMode,abortSignal:E,canvasElement:n,loaded:{},step:w(($,v)=>y($,v,S),"step"),context:null,canvas:{},userEvent:{},renderToCanvas:w(async()=>{let $=await this.renderToScreen(T,n);this.teardownRender=$||(()=>{}),b=!0},"renderToCanvas"),mount:w(async(...$)=>{this.callbacks.showStoryDuringRender?.();let v=null;return await this.runPhase(E,"rendering",async()=>{v=await o.mount(S)(...$)}),x&&await this.runPhase(E,"playing"),v},"mount")};S.context=S;let T={componentId:i,title:s,kind:s,id:a,name:l,story:l,tags:u,...this.callbacks,showError:w($=>(this.phase="errored",this.callbacks.showError($)),"showError"),showException:w($=>(this.phase="errored",this.callbacks.showException($)),"showException"),forceRemount:r||this.notYetRendered,storyContext:S,storyFn:w(()=>f(S),"storyFn"),unboundStoryFn:f};if(await this.runPhase(E,"loading",async()=>{S.loaded=await d(S)}),E.aborted)return;let _=await m(S);if(this.store.addCleanupCallbacks(o,..._),this.checkIfAborted(E)||(!b&&!x&&await S.mount(),this.notYetRendered=!1,E.aborted))return;let O=this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors===!0,k=new Set,B=w($=>{$.error&&k.add($.error)},"onError"),P=w($=>{$.reason&&k.add($.reason)},"onUnhandledRejection");if(this.renderOptions.autoplay&&r&&g&&this.phase!=="errored"){window?.addEventListener?.("error",B),window?.addEventListener?.("unhandledrejection",P),this.disableKeyListeners=!0;try{if(x?await g(S):(S.mount=async()=>{throw new qr({playFunction:g.toString()})},await this.runPhase(E,"playing",async()=>g(S))),!b)throw new zd;this.checkIfAborted(E),!O&&k.size>0?await this.runPhase(E,"errored"):await this.runPhase(E,"played")}catch($){if(this.callbacks.showStoryDuringRender?.(),await this.runPhase(E,"errored",async()=>{this.channel.emit(ko,Qi($))}),this.story.parameters.throwPlayFunctionExceptions!==!1)throw $;console.error($)}if(!O&&k.size>0&&this.channel.emit(_o,Array.from(k).map(Qi)),this.disableKeyListeners=!1,window?.removeEventListener?.("unhandledrejection",P),window?.removeEventListener?.("error",B),E.aborted)return}await this.runPhase(E,"completing",async()=>{fs()?this.store.addCleanupCallbacks(o,gs()):await ys(E)}),await this.runPhase(E,"completed",async()=>{this.channel.emit(rr,a)}),this.phase!=="errored"&&await this.runPhase(E,"afterEach",async()=>{await p(S)});let L=!O&&k.size>0,j=S.reporting.reports.some($=>$.status==="failed"),U=L||j;await this.runPhase(E,"finished",async()=>this.channel.emit(Pi,{storyId:a,status:U?"error":"success",reporters:S.reporting.reports}))}catch(S){this.phase="errored",this.callbacks.showException(S),await this.runPhase(E,"finished",async()=>this.channel.emit(Pi,{storyId:a,status:"error",reporters:[]}))}this.rerenderEnqueued&&(this.rerende
Line truncated
|
||||
- Did you pass a component to the 'of' prop when the block only supports a story or a meta?
|
||||
- ... or vice versa?
|
||||
- Did you pass a story, CSF file or meta to the 'of' prop that is not indexed, ie. is not targeted by the 'stories' globs in the main configuration?`)}switch(n.type){case"component":return{...n,projectAnnotations:this.projectAnnotations};case"meta":return{...n,preparedMeta:this.store.preparedMetaFromCSFFile({csfFile:n.csfFile})};case"story":default:return n}}};w(Jp,"DocsContext");var Zp=Jp,Qp=class{constructor(t,r,n,o){this.channel=t,this.store=r,this.entry=n,this.callbacks=o,this.type="docs",this.subtype="csf",this.torndown=!1,this.disableKeyListeners=!1,this.preparing=!1,this.id=n.id,this.renderId=Date.now()}isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:t,csfFiles:r=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw Ko;let{importPath:n,title:o}=this.entry,a=this.store.processCSFFileWithCache(t,n,o),i=Object.keys(a.stories)[0];this.story=this.store.storyFromCSFFile({storyId:i,csfFile:a}),this.csfFiles=[a,...r],this.preparing=!1}isEqual(t){return!!(this.id===t.id&&this.story&&this.story===t.story)}docsContext(t){if(!this.csfFiles)throw new Error("Cannot render docs before preparing");let r=new Zp(this.channel,this.store,t,this.csfFiles);return this.csfFiles.forEach(n=>r.attachCSFFile(n)),r}async renderToElement(t,r){if(!this.story||!this.csfFiles)throw new Error("Cannot render docs before preparing");let n=this.docsContext(r),{docs:o}=this.story.parameters||{};if(!o)throw new Error("Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed");let a=await o.renderer(),{render:i}=a,s=w(async()=>{try{await i(n,o,t),this.channel.emit(Do,this.id)}catch(l){this.callbacks.showException(l)}},"renderDocs");return this.rerender=async()=>s(),this.teardownRender=async({viewModeChanged:l})=>{!l||!t||a.unmount(t)},s()}async teardown({viewModeChanged:t}={}){this.teardownRender?.({viewModeChanged:t}),this.torndown=!0}};w(Qp,"CsfDocsRender");var Qd=Qp,em=class{constructor(t,r,n,o){this.channel=t,this.store=r,this.entry=n,this.callbacks=o,this.type="docs",this.subtype="mdx",this.torndown=!1,this.disableKeyListeners=!1,this.preparing=!1,this.id=n.id,this.renderId=Date.now()}isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:t,csfFiles:r=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw Ko;this.csfFiles=r,this.exports=t,this.preparing=!1}isEqual(t){return!!(this.id===t.id&&this.exports&&this.exports===t.exports)}docsContext(t){if(!this.csfFiles)throw new Error("Cannot render docs before preparing");return new Zp(this.channel,this.store,t,this.csfFiles)}async renderToElement(t,r){if(!this.exports||!this.csfFiles||!this.store.projectAnnotations)throw new Error("Cannot render docs before preparing");let n=this.docsContext(r),{docs:o}=this.store.projectAnnotations.parameters??{};if(!o)throw new Error("Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed");let a={...o,page:this.exports.default},i=await o.renderer(),{render:s}=i,l=w(async()=>{try{await s(n,a,t),this.channel.emit(Do,this.id)}catch(u){this.callbacks.showException(u)}},"renderDocs");return this.rerender=async()=>l(),this.teardownRender=async({viewModeChanged:u}={})=>{!u||!t||(i.unmount(t),this.torndown=!0)},l()}async teardown({viewModeChanged:t}={}){this.teardownRender?.({viewModeChanged:t}),this.torndown=!0}};w(em,"MdxDocsRender");var ep=em,lA=globalThis;function tm(e){let t=e.composedPath&&e.composedPath()[0]||e.target;return/input|textarea/i.test(t.tagName)||t.getAttribute("contenteditable")!==null}w(tm,"focusInInput");var rm="attached-mdx",uA="unattached-mdx";function nm({tags:e}){return e?.includes(uA)||e?.includes(rm)}w(nm,"isMdxEntry");function qo(e){return e.type==="story"}w(qo,"isStoryRender");function om(e){return e.type==="docs"}w(om,"isDocsRender");function am(e){return om(e)&&e.subtype==="csf"}w(am,"isCsfDocsRender");var im=class extends iA{constructor(t,r,n,o){super(t,r,void 0,!1),this.importFn=t,this.getProjectAnnotations=r,this.selectionStore=n,this.view=o,this.initialize()}setupListeners(){super.setupListeners(),lA.onkeydown=this.onKeydown.bind(this),this.channel.on(Ro,this.onSetCurrentStory.bind(this)),this.channel.on(bd,this.onUpdateQueryParams.bind(this)),this.channel.on(ld,this.onPreloadStories.bind(this))}async setInitialGlobals(){if(!this.storyStoreValue)throw new rt({methodName:"setInitialGlobals"});let{globals:t}=this.selectionStore.selectionSpecifier||{};t&&this.storyStoreValue.userGlobals.updateFromPersisted(t),this.emitGlobals()}async initializeWithStoryIndex(t){return await super.initializeWithStoryIndex(t),this.selectSpecifiedStory()}async selectSpecifiedStory(){if(!this.storyStoreValue)throw new rt({methodName:"selectSpecifiedStory"});if(this.selectionStore.selection){await this.renderSelection();return}if(!this.selectionStore.selectionSpecifier){this.renderMissingStory();return}let{storySpecifier:t,args:r}=this.selectionStore.selectionSpecifier,n=this.storyStoreValue.storyInd
Line truncated
|
||||
Omitted potentially unsafe URL args.
|
||||
|
||||
More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
|
||||
`),r),{})},"parseArgsParam"),{history:um,document:or}=H;function cm(e){let t=(e||"").match(/^\/story\/(.+)/);if(!t)throw new Error(`Invalid path '${e}', must start with '/story/'`);return t[1]}w(cm,"pathToId");var dm=w(({selection:e,extraParams:t})=>{let r=or?.location.search.slice(1),{path:n,selectedKind:o,selectedStory:a,...i}=(0,ts.parse)(r);return`?${(0,ts.stringify)({...i,...t,...e&&{id:e.storyId,viewMode:e.viewMode}})}`},"getQueryString"),hA=w(e=>{if(!e)return;let t=dm({selection:e}),{hash:r=""}=or.location;or.title=e.storyId,um.replaceState({},"",`${or.location.pathname}${t}${r}`)},"setPath"),fA=w(e=>e!=null&&typeof e=="object"&&Array.isArray(e)===!1,"isObject"),_n=w(e=>{if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e))return _n(e[0]);if(fA(e))return _n(Object.values(e).filter(Boolean))}},"getFirstString"),gA=w(()=>{if(typeof or<"u"){let e=or.location.search.slice(1),t=(0,ts.parse)(e),r=typeof t.args=="string"?rp(t.args):void 0,n=typeof t.globals=="string"?rp(t.globals):void 0,o=_n(t.viewMode);(typeof o!="string"||!o.match(/docs|story/))&&(o="story");let a=_n(t.path),i=a?cm(a):_n(t.id);if(i)return{storySpecifier:i,args:r,globals:n,viewMode:o}}return null},"getSelectionSpecifierFromPath"),pm=class{constructor(){this.selectionSpecifier=gA()}setSelection(t){this.selection=t,hA(this.selection)}setQueryParams(t){let r=dm({extraParams:t}),{hash:n=""}=or.location;um.replaceState({},"",`${or.location.pathname}${r}${n}`)}};w(pm,"UrlStore");var yA=pm,bA=Jr(WE(),1),EA=Jr(is(),1),{document:qe}=H,np=100,mm=(e=>(e.MAIN="MAIN",e.NOPREVIEW="NOPREVIEW",e.PREPARING_STORY="PREPARING_STORY",e.PREPARING_DOCS="PREPARING_DOCS",e.ERROR="ERROR",e))(mm||{}),Hi={PREPARING_STORY:"sb-show-preparing-story",PREPARING_DOCS:"sb-show-preparing-docs",MAIN:"sb-show-main",NOPREVIEW:"sb-show-nopreview",ERROR:"sb-show-errordisplay"},Vi={centered:"sb-main-centered",fullscreen:"sb-main-fullscreen",padded:"sb-main-padded"},op=new bA.default({escapeXML:!0}),hm=class{constructor(){if(this.testing=!1,typeof qe<"u"){let{__SPECIAL_TEST_PARAMETER__:t}=(0,EA.parse)(qe.location.search.slice(1));switch(t){case"preparing-story":{this.showPreparingStory(),this.testing=!0;break}case"preparing-docs":{this.showPreparingDocs(),this.testing=!0;break}default:}}}prepareForStory(t){return this.showStory(),this.applyLayout(t.parameters.layout),qe.documentElement.scrollTop=0,qe.documentElement.scrollLeft=0,this.storyRoot()}storyRoot(){return qe.getElementById("storybook-root")}prepareForDocs(){return this.showMain(),this.showDocs(),this.applyLayout("fullscreen"),qe.documentElement.scrollTop=0,qe.documentElement.scrollLeft=0,this.docsRoot()}docsRoot(){return qe.getElementById("storybook-docs")}applyLayout(t="padded"){if(t==="none"){qe.body.classList.remove(this.currentLayoutClass),this.currentLayoutClass=null;return}this.checkIfLayoutExists(t);let r=Vi[t];qe.body.classList.remove(this.currentLayoutClass),qe.body.classList.add(r),this.currentLayoutClass=r}checkIfLayoutExists(t){Vi[t]||Z.warn(wt`
|
||||
The desired layout: ${t} is not a valid option.
|
||||
The possible options are: ${Object.keys(Vi).join(", ")}, none.
|
||||
`)}showMode(t){clearTimeout(this.preparingTimeout),Object.keys(mm).forEach(r=>{r===t?qe.body.classList.add(Hi[r]):qe.body.classList.remove(Hi[r])})}showErrorDisplay({message:t="",stack:r=""}){let n=t,o=r,a=t.split(`
|
||||
`);a.length>1&&([n]=a,o=a.slice(1).join(`
|
||||
`).replace(/^\n/,"")),qe.getElementById("error-message").innerHTML=op.toHtml(n),qe.getElementById("error-stack").innerHTML=op.toHtml(o),this.showMode("ERROR")}showNoPreview(){this.testing||(this.showMode("NOPREVIEW"),this.storyRoot()?.setAttribute("hidden","true"),this.docsRoot()?.setAttribute("hidden","true"))}showPreparingStory({immediate:t=!1}={}){clearTimeout(this.preparingTimeout),t?this.showMode("PREPARING_STORY"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_STORY"),np)}showPreparingDocs({immediate:t=!1}={}){clearTimeout(this.preparingTimeout),t?this.showMode("PREPARING_DOCS"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_DOCS"),np)}showMain(){this.showMode("MAIN")}showDocs(){this.storyRoot().setAttribute("hidden","true"),this.docsRoot().removeAttribute("hidden")}showStory(){this.docsRoot().setAttribute("hidden","true"),this.storyRoot().removeAttribute("hidden")}showStoryDuringRender(){qe.body.classList.add(Hi.MAIN)}};w(hm,"WebView");var vA=hm,AA=class extends cA{constructor(t,r){super(t,r,new yA,new vA),this.importFn=t,this.getProjectAnnotations=r,H.__STORYBOOK_PREVIEW__=this}};w(AA,"PreviewWeb");var{document:vr}=H,xA=["application/javascript","application/ecmascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript","module"],wA="script",ap="scripts-root";function ns(){let e=vr.createEvent("Event");e.initEvent("DOMContentLoaded",!0,!0),vr.dispatchEvent(e)}w(ns,"simulateDOMContentLoaded");function fm(e,t,r){let n=vr.createElement("script");n.type=e.type==="module"?"module":"text/javascript",e.src?(n.onload=t,n.onerror=t,n.src=e.src):n.textContent=e.innerText,r?r.appendChild(n):vr.head.appendChild(n),e.parentNode.removeChild(e),e.src||t()}w(fm,"insertScript");function Es(e,t,r=0){e[r](()=>{r++,r===e.length?t():Es(e,t,r)})}w(Es,"insertScriptsSequentially");function SA(e){let t=vr.getElementById(ap);t?t.innerHTML="":(t=vr.createElement("div"),t.id=ap,vr.body.appendChild(t));let r=Array.from(e.querySelectorAll(wA));if(r.length){let n=[];r.forEach(o=>{let a=o.getAttribute("type");(!a||xA.includes(a))&&n.push(i=>fm(o,i,t))}),n.length&&Es(n,ns,void 0)}else ns()}w(SA,"simulatePageLoad");var gm="storybook/docs",cP=`${gm}/panel`,CA=`${gm}/snippet-rendered`;async function DA(e,t){let r=t.parameters?.docs?.source?.transform,{id:n,unmappedArgs:o}=t,a=r&&e?r?.(e,t):e,i=a?await a:void 0;ut.getChannel().emit(CA,{id:n,source:i,args:o})}w(DA,"emitTransformCode");te();re();ne();var gP=__STORYBOOK_TEST__,{buildQueries:yP,clearAllMocks:ym,configure:bP,createEvent:EP,expect:vP,findAllByAltText:AP,findAllByDisplayValue:xP,findAllByLabelText:wP,findAllByPlaceholderText:SP,findAllByRole:CP,findAllByTestId:DP,findAllByText:TP,findAllByTitle:kP,findByAltText:OP,findByDisplayValue:IP,findByLabelText:RP,findByPlaceholderText:BP,findByRole:_P,findByTestId:FP,findByText:PP,findByTitle:NP,fireEvent:LP,fn:bm,getAllByAltText:jP,getAllByDisplayValue:MP,getAllByLabelText:$P,getAllByPlaceholderText:qP,getAllByRole:UP,getAllByTestId:HP,getAllByText:VP,getAllByTitle:zP,getByAltText:GP,getByDisplayValue:WP,getByLabelText:YP,getByPlaceholderText:KP,getByRole:XP,getByTestId:JP,getByText:ZP,getByTitle:QP,getConfig:eN,getDefaultNormalizer:tN,getElementError:rN,getNodeText:nN,getQueriesForElement:oN,getRoles:aN,getSuggestedQuery:iN,isInaccessible:sN,isMockFunction:Em,logDOM:lN,logRoles:uN,mocked:cN,mocks:dN,onMockCall:vm,prettyDOM:pN,prettyFormat:mN,queries:hN,queryAllByAltText:fN,queryAllByAttribute:gN,queryAllByDisplayValue:yN,queryAllByLabelText:bN,queryAllByPlaceholderText:EN,queryAllByRole:vN,queryAllByTestId:AN,queryAllByText:xN,queryAllByTitle:wN,queryByAltText:SN,queryByAttribute:CN,queryByDisplayValue:DN,queryByLabelText:TN,queryByPlaceholderText:kN,queryByRole:ON,queryByTestId:IN,queryByText:RN,queryByTitle:BN,queryHelpers:_N,resetAllMocks:Am,restoreAllMocks:xm,sb:FN,screen:PN,spyOn:NN,uninstrumentedUserEvent:wm,userEvent:LN,waitFor:jN,waitForElementToBeRemoved:MN,within:Sm}=__STORYBOOK_TEST__;te();re();ne();var TA=Object.defineProperty,C=(e,t)=>TA(e,"name",{value:t,configurable:!0}),kA={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[
Line truncated
|
||||
`)&&(m=r.spacingOuter+s+m+r.spacingOuter+n),m=`{${m}}`),`${r.spacingInner+n+l.prop.open+u+l.prop.close}=${l.value.open}${m}${l.value.close}`}).join("")}C(da,"printProps");function pa(e,t,r,n,o,a){return e.map(i=>t.spacingOuter+r+(typeof i=="string"?Zs(i,t):a(i,t,r,n,o))).join("")}C(pa,"printChildren");function Zs(e,t){let r=t.colors.content;return r.open+Js(e)+r.close}C(Zs,"printText");function eh(e,t){let r=t.colors.comment;return`${r.open}<!--${Js(e)}-->${r.close}`}C(eh,"printComment");function ma(e,t,r,n,o){let a=n.colors.tag;return`${a.open}<${e}${t&&a.close+t+n.spacingOuter+o+a.open}${r?`>${a.close}${r}${n.spacingOuter}${o}${a.open}</${e}`:`${t&&!n.min?"":" "}/`}>${a.close}`}C(ma,"printElement");function ha(e,t){let r=t.colors.tag;return`${r.open}<${e}${r.close} \u2026${r.open} />${r.close}`}C(ha,"printElementAsLeaf");var MA=1,th=3,rh=8,nh=11,$A=/^(?:(?:HTML|SVG)\w*)?Element$/;function oh(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}C(oh,"testHasAttribute");function ah(e){let t=e.constructor.name,{nodeType:r,tagName:n}=e,o=typeof n=="string"&&n.includes("-")||oh(e);return r===MA&&($A.test(t)||o)||r===th&&t==="Text"||r===rh&&t==="Comment"||r===nh&&t==="DocumentFragment"}C(ah,"testNode");var qA=C(e=>{var t;return(e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&ah(e)},"test$3");function ih(e){return e.nodeType===th}C(ih,"nodeIsText");function sh(e){return e.nodeType===rh}C(sh,"nodeIsComment");function Qo(e){return e.nodeType===nh}C(Qo,"nodeIsFragment");var UA=C((e,t,r,n,o,a)=>{if(ih(e))return Zs(e.data,t);if(sh(e))return eh(e.data,t);let i=Qo(e)?"DocumentFragment":e.tagName.toLowerCase();return++n>t.maxDepth?ha(i,t):ma(i,da(Qo(e)?[]:Array.from(e.attributes,s=>s.name).sort(),Qo(e)?{}:[...e.attributes].reduce((s,l)=>(s[l.name]=l.value,s),{}),t,r+t.indent,n,o,a),pa(Array.prototype.slice.call(e.childNodes||e.children),t,r+t.indent,n,o,a),t,r)},"serialize$3"),HA={serialize:UA,test:qA},VA="@@__IMMUTABLE_ITERABLE__@@",zA="@@__IMMUTABLE_LIST__@@",GA="@@__IMMUTABLE_KEYED__@@",WA="@@__IMMUTABLE_MAP__@@",Cm="@@__IMMUTABLE_ORDERED__@@",YA="@@__IMMUTABLE_RECORD__@@",KA="@@__IMMUTABLE_SEQ__@@",XA="@@__IMMUTABLE_SET__@@",JA="@@__IMMUTABLE_STACK__@@",rn=C(e=>`Immutable.${e}`,"getImmutableName"),fa=C(e=>`[${e}]`,"printAsLeaf"),Un=" ",Dm="\u2026";function lh(e,t,r,n,o,a,i){return++n>t.maxDepth?fa(rn(i)):`${rn(i)+Un}{${sn(e.entries(),t,r,n,o,a)}}`}C(lh,"printImmutableEntries");function uh(e){let t=0;return{next(){if(t<e._keys.length){let r=e._keys[t++];return{done:!1,value:[r,e.get(r)]}}return{done:!0,value:void 0}}}}C(uh,"getRecordEntries");function ch(e,t,r,n,o,a){let i=rn(e._name||"Record");return++n>t.maxDepth?fa(i):`${i+Un}{${sn(uh(e),t,r,n,o,a)}}`}C(ch,"printImmutableRecord");function dh(e,t,r,n,o,a){let i=rn("Seq");return++n>t.maxDepth?fa(i):e[GA]?`${i+Un}{${e._iter||e._object?sn(e.entries(),t,r,n,o,a):Dm}}`:`${i+Un}[${e._iter||e._array||e._collection||e._iterable?ua(e.values(),t,r,n,o,a):Dm}]`}C(dh,"printImmutableSeq");function ea(e,t,r,n,o,a,i){return++n>t.maxDepth?fa(rn(i)):`${rn(i)+Un}[${ua(e.values(),t,r,n,o,a)}]`}C(ea,"printImmutableValues");var ZA=C((e,t,r,n,o,a)=>e[WA]?lh(e,t,r,n,o,a,e[Cm]?"OrderedMap":"Map"):e[zA]?ea(e,t,r,n,o,a,"List"):e[XA]?ea(e,t,r,n,o,a,e[Cm]?"OrderedSet":"Set"):e[JA]?ea(e,t,r,n,o,a,"Stack"):e[KA]?dh(e,t,r,n,o,a):ch(e,t,r,n,o,a),"serialize$2"),QA=C(e=>e&&(e[VA]===!0||e[YA]===!0),"test$2"),ex={serialize:ZA,test:QA};function Qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}C(Qs,"getDefaultExportFromCjs");var Tm={exports:{}},he={},km;function ph(){return km||(km=1,function(){function e(y){if(typeof y=="object"&&y!==null){var E=y.$$typeof;switch(E){case t:switch(y=y.type,y){case n:case a:case o:case u:case d:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case l:case p:case m:return y;case i:return y;default:return E}}case r:return E}}}C(e,"typeOf");var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");he.ContextConsumer=i,he.ContextProvider=s,he.Element=t,he.ForwardRef=l,he.Fragment=n,he.Lazy=p,he.Memo=m,he.Portal=r,he.Profiler=a,he.StrictMode=o,he.Suspense=u,he.SuspenseList=d,he.isContextConsumer=function(y){return e(y)===i},he.isContextProvider=function(y){return e(y)===s},he.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},he.isForwardRef=function(y){return e(y)===l},he.isFragment=function(y){return e(y)===n},he.isLazy=function(y){return e(y)===p},he.isMemo=function(y){return e(y)===m},he.isPortal=function(y){return e(y)===r},he.isProfiler=function(y){r
Line truncated
|
||||
${l}`)},{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(s){throw new wh(s.message,s.stack)}if(typeof i!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);return i}C(nl,"printPlugin");function ol(e,t){for(let r of e)try{if(r.test(t))return r}catch(n){throw new wh(n.message,n.stack)}return null}C(ol,"findPlugin");function $t(e,t,r,n,o,a){let i=ol(t.plugins,e);if(i!==null)return nl(i,e,t,r,n,o);let s=tl(e,t.printFunctionName,t.escapeRegex,t.escapeString);return s!==null?s:rl(e,t,r,n,o,a)}C($t,"printer");var al={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},kh=Object.keys(al),St={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:al};function Oh(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(St,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}C(Oh,"validateOptions");function Ih(){return kh.reduce((e,t)=>{let r=al[t],n=r&&Ut[r];if(n&&typeof n.close=="string"&&typeof n.open=="string")e[t]=n;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`);return e},Object.create(null))}C(Ih,"getColorsHighlight");function Rh(){return kh.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}C(Rh,"getColorsEmpty");function il(e){return e?.printFunctionName??St.printFunctionName}C(il,"getPrintFunctionName");function sl(e){return e?.escapeRegex??St.escapeRegex}C(sl,"getEscapeRegex");function ll(e){return e?.escapeString??St.escapeString}C(ll,"getEscapeString");function Rs(e){return{callToJSON:e?.callToJSON??St.callToJSON,colors:e?.highlight?Ih():Rh(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:St.compareKeys,escapeRegex:sl(e),escapeString:ll(e),indent:e?.min?"":Bh(e?.indent??St.indent),maxDepth:e?.maxDepth??St.maxDepth,maxWidth:e?.maxWidth??St.maxWidth,min:e?.min??St.min,plugins:e?.plugins??St.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:il(e),spacingInner:e?.min?" ":`
|
||||
`,spacingOuter:e?.min?"":`
|
||||
`}}C(Rs,"getConfig");function Bh(e){return Array.from({length:e+1}).join(" ")}C(Bh,"createIndent");function Ct(e,t){if(t&&(Oh(t),t.plugins)){let n=ol(t.plugins,e);if(n!==null)return nl(n,e,Rs(t),"",0,[])}let r=tl(e,il(t),sl(t),ll(t));return r!==null?r:rl(e,Rs(t),"",0,[])}C(Ct,"format");var ul={AsymmetricMatcher:_A,DOMCollection:jA,DOMElement:HA,Immutable:ex,ReactElement:lx,ReactTestComponent:px,Error:yx},Fm={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},bx={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},nn="\u2026";function _h(e,t){let r=Fm[bx[t]]||Fm[t]||"";return r?`\x1B[${r[0]}m${String(e)}\x1B[${r[1]}m`:String(e)}C(_h,"colorise");function Fh({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:n=!0,showProxy:o=!1,maxArrayLength:a=1/0,breakLength:i=1/0,seen:s=[],truncate:l=1/0,stylize:u=String}={},d){let m={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!n,showProxy:!!o,maxArrayLength:Number(a),breakLength:Number(i),truncate:Number(l),seen:s,inspect:d,stylize:u};return m.colors&&(m.stylize=_h),m}C(Fh,"normaliseOptions");function Ph(e){return e>="\uD800"&&e<="\uDBFF"}C(Ph,"isHighSurrogate");function Ht(e,t,r=nn){e=String(e);let n=r.length,o=e.length;if(n>t&&o>n)return r;if(o>t&&o>n){let a=t-n;return a>0&&Ph(e[a-1])&&(a=a-1),`${e.slice(0,a)}${r}`}return e}C(Ht,"truncate");function bt(e,t,r,n=", "){r=r||t.inspect;let o=e.length;if(o===0)return"";let a=t.truncate,i="",s="",l="";for(let u=0;u<o;u+=1){let d=u+1===e.length,m=u+2===e.length;l=`${nn}(${e.length-u})`;let p=e[u];t.truncate=a-i.length-(d?0:n.length);let f=s||r(p,t)+(d?"":n),g=i.length+f.length,y=g+l.length;if(d&&g>a&&i.length+l.length<=a||!d&&!m&&y>a||(s=d?"":r(e[u+1],t)+(m?"":n),!d&&m&&y>a&&g+s.length>a))break;if(i+=f,!d&&!m&&g+s.length>=a){l=`${nn}(${e.length-u-1})`;break}l=""}return`${i}${l}`}C(bt,"inspectList");function Nh(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}C(Nh,"quoteComplexKey");function on([e,t],r){return r.truncate-=2,typeof e=="string"?e=Nh(e):typeof e!="number"&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}C(on,"inspectProperty");function Lh(e,t){let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return"[]";t.truncate-=4;let n=bt(e,t);t.truncate-=n.length;let o="";return r.length&&(o=bt(r.map(a=>[a,e[a]]),t,on)),`[ ${n}${o?`, ${o}`:""} ]`}C(Lh,"inspectArray");var Ex=C(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function _t(e,t){let r=Ex(e);t.truncate-=r.length+4;let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return`${r}[]`;let o="";for(let i=0;i<e.length;i++){let s=`${t.stylize(Ht(e[i],t.truncate),"number")}${i===e.length-1?"":", "}`;if(t.truncate-=s.length,e[i]!==e.length&&t.truncate<=3){o+=`${nn}(${e.length-e[i]+1})`;break}o+=s}let a="";return n.length&&(a=bt(n.map(i=>[i,e[i]]),t,on)),`${r}[ ${o}${a?`, ${a}`:""} ]`}C(_t,"inspectTypedArray");function jh(e,t){let r=e.toJSON();if(r===null)return"Invalid Date";let n=r.split("T"),o=n[0];return t.stylize(`${o}T${Ht(n[1],t.truncate-o.length-1)}`,"date")}C(jh,"inspectDate");function Bs(e,t){let r=e[Symbol.toStringTag]||"Function",n=e.name;return n?t.stylize(`[${r} ${Ht(n,t.truncate-11)}]`,"special"):t.stylize(`[${r}]`,"special")}C(Bs,"inspectFunction");function Mh([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}C(Mh,"inspectMapEntry");function $h(e){let t=[];return e.forEach((r,n)=>{t.push([n,r])}),t}C($h,"mapToEntries");function qh(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${bt($h(e),t,Mh)} }`)}C(qh,"inspectMap");var vx=Number.isNaN||(e=>e!==e);function _s(e,t){return vx(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(Ht(String(e),t.truncate),"number")}C(_s,"inspectNumber");function Fs(e,t){let r=Ht(e.toString(),t.truncate-1);return r!==nn&&(r+="n"),t.stylize(r,"bigint")}C(Fs,"inspectBigInt");function Uh(e,t){let r=e.toString().split("/")[2],n=t.truncate-(2+r.length),o=e.source;return t.stylize(`/${Ht(o,n)}/${r}`,"regexp")}C(Uh,"inspectRegExp");function Hh(e){let t=[];return e.forEach(r=>{t.push(r)}),t}C(Hh,"arrayFromSet");function Vh(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${bt(Hh(e),t)} }`)}C(Vh,"inspectSet");var
Line truncated
|
||||
`)}C(ra,"inspectNodeCollection");function Jh(e,t){switch(e.nodeType){case 1:return cl(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}C(Jh,"inspectNode");function cl(e,t){let r=e.getAttributeNames(),n=e.tagName.toLowerCase(),o=t.stylize(`<${n}`,"special"),a=t.stylize(">","special"),i=t.stylize(`</${n}>`,"special");t.truncate-=n.length*2+5;let s="";r.length>0&&(s+=" ",s+=bt(r.map(d=>[d,e.getAttribute(d)]),t,Xh," ")),t.truncate-=s.length;let l=t.truncate,u=ra(e.children,t);return u&&u.length>l&&(u=`${nn}(${e.children.length})`),`${o}${s}${a}${u}${i}`}C(cl,"inspectHTML");var Dx=typeof Symbol=="function"&&typeof Symbol.for=="function",xs=Dx?Symbol.for("chai/inspect"):"@@chai/inspect",ws=Symbol.for("nodejs.util.inspect.custom"),Nm=new WeakMap,Lm={},jm={undefined:C((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:C((e,t)=>t.stylize("null","null"),"null"),boolean:C((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:C((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:_s,Number:_s,bigint:Fs,BigInt:Fs,string:Ps,String:Ps,function:Bs,Function:Bs,symbol:Ns,Symbol:Ns,Array:Lh,Date:jh,Map:qh,Set:Vh,RegExp:Uh,Promise:Sx,WeakSet:C((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:C((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:Yh,Int8Array:_t,Uint8Array:_t,Uint8ClampedArray:_t,Int16Array:_t,Uint16Array:_t,Int32Array:_t,Uint32Array:_t,Float32Array:_t,Float64Array:_t,Generator:C(()=>"","Generator"),DataView:C(()=>"","DataView"),ArrayBuffer:C(()=>"","ArrayBuffer"),Error:Kh,HTMLCollection:ra,NodeList:ra},Tx=C((e,t,r)=>xs in e&&typeof e[xs]=="function"?e[xs](t):ws in e&&typeof e[ws]=="function"?e[ws](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Nm.has(e.constructor)?Nm.get(e.constructor)(e,t):Lm[r]?Lm[r](e,t):"","inspectCustom"),kx=Object.prototype.toString;function na(e,t={}){let r=Fh(t,na),{customInspect:n}=r,o=e===null?"null":typeof e;if(o==="object"&&(o=kx.call(e).slice(8,-1)),o in jm)return jm[o](e,r);if(n&&e){let i=Tx(e,r,o);if(i)return typeof i=="string"?i:na(i,r)}let a=e?Object.getPrototypeOf(e):!1;return a===Object.prototype||a===null?$n(e,r):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?cl(e,r):"constructor"in e?e.constructor!==Object?Wh(e,r):$n(e,r):e===Object(e)?$n(e,r):r.stylize(String(e),o)}C(na,"inspect");var{AsymmetricMatcher:Ox,DOMCollection:Ix,DOMElement:Rx,Immutable:Bx,ReactElement:_x,ReactTestComponent:Fx}=ul,Mm=[Fx,_x,Rx,Ix,Bx,Ox];function an(e,t=10,{maxLength:r,...n}={}){let o=r??1e4,a;try{a=Ct(e,{maxDepth:t,escapeString:!1,plugins:Mm,...n})}catch{a=Ct(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:Mm,...n})}return a.length>=o&&t>1?an(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:r,...n}):a}C(an,"stringify");var Px=/%[sdjifoOc%]/g;function Zh(...e){if(typeof e[0]!="string"){let a=[];for(let i=0;i<e.length;i++)a.push(tn(e[i],{depth:0,colors:!1}));return a.join(" ")}let t=e.length,r=1,n=e[0],o=String(n).replace(Px,a=>{if(a==="%%")return"%";if(r>=t)return a;switch(a){case"%s":{let i=e[r++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="number"&&i===0&&1/i<0?"-0":typeof i=="object"&&i!==null?typeof i.toString=="function"&&i.toString!==Object.prototype.toString?i.toString():tn(i,{depth:0,colors:!1}):String(i)}case"%d":{let i=e[r++];return typeof i=="bigint"?`${i.toString()}n`:Number(i).toString()}case"%i":{let i=e[r++];return typeof i=="bigint"?`${i.toString()}n`:Number.parseInt(String(i)).toString()}case"%f":return Number.parseFloat(String(e[r++])).toString();case"%o":return tn(e[r++],{showHidden:!0,showProxy:!0});case"%O":return tn(e[r++]);case"%c":return r++,"";case"%j":try{return JSON.stringify(e[r++])}catch(i){let s=i.message;if(s.includes("circular structure")||s.includes("cyclic structures")||s.includes("cyclic object"))return"[Circular]";throw i}default:return a}});for(let a=e[r];r<t;a=e[++r])a===null||typeof a!="object"?o+=` ${a}`:o+=` ${tn(a)}`;return o}C(Zh,"format");function tn(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),na(e,t)}C(tn,"inspect");function Qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}C(Qh,"getDefaultExportFromCjs");function ef(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}C(ef,"isFinalObj");function oa(e){return Object.prototype.toString.apply(e).slice(8,-1)}C(oa,"getType");function tf(e,t){let r=typeof t=="function"?t:n=>t.add(n);Object.getOwnPropertyNames(e).forEach(r),Object.getOwnPropertySymbols(e).forEach(r)}C(tf,"collectOwnProperties");function dl(e){let t=new Set;return ef(e)?[]:(tf(e,t),Array.from(t))}C(dl,"getOwnProperties");var rf={forceWritable:!1};function Ls(e,t=rf){return aa(e,new WeakMap,t)}C(Ls,"deepClone");function aa(e,t,r=rf){let n,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:n=e.length}),t.set(e,o);n--;)o[n]=aa(e[n],t,r);return o}if(Object.prototype.toString.caLine truncated
|
||||
`)}C(pf,"joinAlignedDiffsNoExpand");function mf(e,t){return e.map((r,n,o)=>{let a=r[1],i=n===0||n===o.length-1;switch(r[0]){case Ue:return hl(a,i,t);case Le:return fl(a,i,t);default:return gl(a,i,t)}}).join(`
|
||||
`)}C(mf,"joinAlignedDiffsExpand");var Ss=C(e=>e,"noColor"),hf=5,$x=0;function ff(){return{aAnnotation:"Expected",aColor:Ut.green,aIndicator:"-",bAnnotation:"Received",bColor:Ut.red,bIndicator:"+",changeColor:Ut.inverse,changeLineTrailingSpaceColor:Ss,commonColor:Ut.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Ss,compareKeys:void 0,contextLines:hf,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:Ut.yellow,printBasicPrototype:!1,truncateThreshold:$x,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Ss}}C(ff,"getDefaultOptions");function gf(e){return e&&typeof e=="function"?e:void 0}C(gf,"getCompareKeys");function yf(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:hf}C(yf,"getContextLines");function ar(e={}){return{...ff(),...e,compareKeys:gf(e.compareKeys),contextLines:yf(e.contextLines)}}C(ar,"normalizeDiffOptions");function wr(e){return e.length===1&&e[0].length===0}C(wr,"isEmptyString");function bf(e){let t=0,r=0;return e.forEach(n=>{switch(n[0]){case Ue:t+=1;break;case Le:r+=1;break}}),{a:t,b:r}}C(bf,"countChanges");function Ef({aAnnotation:e,aColor:t,aIndicator:r,bAnnotation:n,bColor:o,bIndicator:a,includeChangeCounts:i,omitAnnotationLines:s},l){if(s)return"";let u="",d="";if(i){let f=String(l.a),g=String(l.b),y=n.length-e.length,E=" ".repeat(Math.max(0,y)),b=" ".repeat(Math.max(0,-y)),x=g.length-f.length,S=" ".repeat(Math.max(0,x)),T=" ".repeat(Math.max(0,-x));u=`${E} ${r} ${S}${f}`,d=`${b} ${a} ${T}${g}`}let m=`${r} ${e}${u}`,p=`${a} ${n}${d}`;return`${t(m)}
|
||||
${o(p)}
|
||||
|
||||
`}C(Ef,"printAnnotation");function ya(e,t,r){return Ef(r,bf(e))+(r.expand?mf(e,r):pf(e,r))+(t?r.truncateAnnotationColor(`
|
||||
${r.truncateAnnotation}`):"")}C(ya,"printDiffLines");function Hn(e,t,r){let n=ar(r),[o,a]=yl(wr(e)?[]:e,wr(t)?[]:t,n);return ya(o,a,n)}C(Hn,"diffLinesUnified");function vf(e,t,r,n,o){if(wr(e)&&wr(r)&&(e=[],r=[]),wr(t)&&wr(n)&&(t=[],n=[]),e.length!==r.length||t.length!==n.length)return Hn(e,t,o);let[a,i]=yl(r,n,o),s=0,l=0;return a.forEach(u=>{switch(u[0]){case Ue:u[1]=e[s],s+=1;break;case Le:u[1]=t[l],l+=1;break;default:u[1]=t[l],s+=1,l+=1}}),ya(a,i,ar(o))}C(vf,"diffLinesUnified2");function yl(e,t,r){let n=r?.truncateThreshold??!1,o=Math.max(Math.floor(r?.truncateThreshold??0),0),a=n?Math.min(e.length,o):e.length,i=n?Math.min(t.length,o):t.length,s=a!==e.length||i!==t.length,l=C((p,f)=>e[p]===t[f],"isCommon"),u=[],d=0,m=0;for(cf(a,i,l,C((p,f,g)=>{for(;d!==f;d+=1)u.push(new xe(Ue,e[d]));for(;m!==g;m+=1)u.push(new xe(Le,t[m]));for(;p!==0;p-=1,d+=1,m+=1)u.push(new xe(Se,t[m]))},"foundSubsequence"));d!==a;d+=1)u.push(new xe(Ue,e[d]));for(;m!==i;m+=1)u.push(new xe(Le,t[m]));return[u,s]}C(yl,"diffLinesRaw");function $s(e){if(e===void 0)return"undefined";if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="boolean")return"boolean";if(typeof e=="function")return"function";if(typeof e=="number")return"number";if(typeof e=="string")return"string";if(typeof e=="bigint")return"bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}else if(typeof e=="symbol")return"symbol";throw new Error(`value of unknown type: ${e}`)}C($s,"getType");function qs(e){return e.includes(`\r
|
||||
`)?`\r
|
||||
`:`
|
||||
`}C(qs,"getNewLineSymbol");function Af(e,t,r){let n=r?.truncateThreshold??!1,o=Math.max(Math.floor(r?.truncateThreshold??0),0),a=e.length,i=t.length;if(n){let p=e.includes(`
|
||||
`),f=t.includes(`
|
||||
`),g=qs(e),y=qs(t),E=p?`${e.split(g,o).join(g)}
|
||||
`:e,b=f?`${t.split(y,o).join(y)}
|
||||
`:t;a=E.length,i=b.length}let s=a!==e.length||i!==t.length,l=C((p,f)=>e[p]===t[f],"isCommon"),u=0,d=0,m=[];return cf(a,i,l,C((p,f,g)=>{u!==f&&m.push(new xe(Ue,e.slice(u,f))),d!==g&&m.push(new xe(Le,t.slice(d,g))),u=f+p,d=g+p,m.push(new xe(Se,t.slice(g,d)))},"foundSubsequence")),u!==a&&m.push(new xe(Ue,e.slice(u))),d!==i&&m.push(new xe(Le,t.slice(d))),[m,s]}C(Af,"diffStrings");function xf(e,t,r){return t.reduce((n,o)=>n+(o[0]===Se?o[1]:o[0]===e&&o[1].length!==0?r(o[1]):""),"")}C(xf,"concatenateRelevantDiffs");var wf=class{op;line;lines;changeColor;constructor(t,r){this.op=t,this.line=[],this.lines=[],this.changeColor=r}pushSubstring(t){this.pushDiff(new xe(this.op,t))}pushLine(){this.lines.push(this.line.length!==1?new xe(this.op,xf(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new xe(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t)}align(t){let r=t[1];if(r.includes(`
|
||||
`)){let n=r.split(`
|
||||
`),o=n.length-1;n.forEach((a,i)=>{i<o?(this.pushSubstring(a),this.pushLine()):a.length!==0&&this.pushSubstring(a)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}};C(wf,"ChangeBuffer");var Vm=wf,Sf=class{deleteBuffer;insertBuffer;lines;constructor(t,r){this.deleteBuffer=t,this.insertBuffer=r,this.lines=[]}pushDiffCommonLine(t){this.lines.push(t)}pushDiffChangeLines(t){let r=t[1].length===0;(!r||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!r||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(t){let r=t[0],n=t[1];if(n.includes(`
|
||||
`)){let o=n.split(`
|
||||
`),a=o.length-1;o.forEach((i,s)=>{if(s===0){let l=new xe(r,i);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(l)):(this.pushDiffChangeLines(l),this.flushChangeLines())}else s<a?this.pushDiffCommonLine(new xe(r,i)):i.length!==0&&this.pushDiffChangeLines(new xe(r,i))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}};C(Sf,"CommonBuffer");var qx=Sf;function Cf(e,t){let r=new Vm(Ue,t),n=new Vm(Le,t),o=new qx(r,n);return e.forEach(a=>{switch(a[0]){case Ue:r.align(a);break;case Le:n.align(a);break;default:o.align(a)}}),o.getLines()}C(Cf,"getAlignedDiffs");function Df(e,t){if(t){let r=e.length-1;return e.some((n,o)=>n[0]===Se&&(o!==r||n[1]!==`
|
||||
`))}return e.some(r=>r[0]===Se)}C(Df,"hasCommonDiff");function Tf(e,t,r){if(e!==t&&e.length!==0&&t.length!==0){let n=e.includes(`
|
||||
`)||t.includes(`
|
||||
`),[o,a]=bl(n?`${e}
|
||||
`:e,n?`${t}
|
||||
`:t,!0,r);if(Df(o,n)){let i=ar(r),s=Cf(o,i.changeColor);return ya(s,a,i)}}return Hn(e.split(`
|
||||
`),t.split(`
|
||||
`),r)}C(Tf,"diffStringsUnified");function bl(e,t,r,n){let[o,a]=Af(e,t,n);return r&&af(o),[o,a]}C(bl,"diffStringsRaw");function ia(e,t){let{commonColor:r}=ar(t);return r(e)}C(ia,"getCommonMessage");var{AsymmetricMatcher:Ux,DOMCollection:Hx,DOMElement:Vx,Immutable:zx,ReactElement:Gx,ReactTestComponent:Wx}=ul,kf=[Wx,Gx,Vx,Hx,zx,Ux,ul.Error],Us={maxDepth:20,plugins:kf},Of={callToJSON:!1,maxDepth:8,plugins:kf};function If(e,t,r){if(Object.is(e,t))return"";let n=$s(e),o=n,a=!1;if(n==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),a=o==="string"}if(o!==$s(t)){let i=function(S){return S.length<=E?S:`${S.slice(0,E)}...`};C(i,"truncate");let{aAnnotation:s,aColor:l,aIndicator:u,bAnnotation:d,bColor:m,bIndicator:p}=ar(r),f=sa(Of,r),g=Ct(e,f),y=Ct(t,f),E=1e5;g=i(g),y=i(y);let b=`${l(`${u} ${s}:`)}
|
||||
${g}`,x=`${m(`${p} ${d}:`)}
|
||||
${y}`;return`${b}
|
||||
|
||||
${x}`}if(!a)switch(n){case"string":return Hn(e.split(`
|
||||
`),t.split(`
|
||||
`),r);case"boolean":case"number":return Rf(e,t,r);case"map":return ta(Hs(e),Hs(t),r);case"set":return ta(Vs(e),Vs(t),r);default:return ta(e,t,r)}}C(If,"diff");function Rf(e,t,r){let n=Ct(e,Us),o=Ct(t,Us);return n===o?"":Hn(n.split(`
|
||||
`),o.split(`
|
||||
`),r)}C(Rf,"comparePrimitive");function Hs(e){return new Map(Array.from(e.entries()).sort())}C(Hs,"sortMap");function Vs(e){return new Set(Array.from(e.values()).sort())}C(Vs,"sortSet");function ta(e,t,r){let n,o=!1;try{let i=sa(Us,r);n=zs(e,t,i,r)}catch{o=!0}let a=ia(lf,r);if(n===void 0||n===a){let i=sa(Of,r);n=zs(e,t,i,r),n!==a&&!o&&(n=`${ia(jx,r)}
|
||||
|
||||
${n}`)}return n}C(ta,"compareObjects");function sa(e,t){let{compareKeys:r,printBasicPrototype:n,maxDepth:o}=ar(t);return{...e,compareKeys:r,printBasicPrototype:n,maxDepth:o??e.maxDepth}}C(sa,"getFormatOptions");function zs(e,t,r,n){let o={...r,indent:0},a=Ct(e,o),i=Ct(t,o);if(a===i)return ia(lf,n);{let s=Ct(e,r),l=Ct(t,r);return vf(s.split(`
|
||||
`),l.split(`
|
||||
`),a.split(`
|
||||
`),i.split(`
|
||||
`),n)}}C(zs,"getObjectsDifference");var zm=2e4;function Gs(e){return oa(e)==="Object"&&typeof e.asymmetricMatch=="function"}C(Gs,"isAsymmetricMatcher");function Ws(e,t){let r=oa(e),n=oa(t);return r===n&&(r==="Object"||r==="Array")}C(Ws,"isReplaceable");function Bf(e,t,r){let{aAnnotation:n,bAnnotation:o}=ar(r);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=zm&&e.length<=zm&&t!==e){if(t.includes(`
|
||||
`)||e.includes(`
|
||||
`))return Tf(t,e,r);let[u]=bl(t,e,!0),d=u.some(g=>g[0]===Se),m=_f(n,o),p=m(n)+Pf(Ys(u,Ue,d)),f=m(o)+Ff(Ys(u,Le,d));return`${p}
|
||||
${f}`}let a=Ls(t,{forceWritable:!0}),i=Ls(e,{forceWritable:!0}),{replacedExpected:s,replacedActual:l}=El(i,a);return If(s,l,r)}C(Bf,"printDiffOrStringify");function El(e,t,r=new WeakSet,n=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):Ws(e,t)?r.has(e)||n.has(t)?{replacedActual:e,replacedExpected:t}:(r.add(e),n.add(t),dl(t).forEach(o=>{let a=t[o],i=e[o];if(Gs(a))a.asymmetricMatch(i)&&(e[o]=a);else if(Gs(i))i.asymmetricMatch(a)&&(t[o]=i);else if(Ws(i,a)){let s=El(i,a,r,n);e[o]=s.replacedActual,t[o]=s.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}C(El,"replaceAsymmetricMatcher");function _f(...e){let t=e.reduce((r,n)=>n.length>r?n.length:r,0);return r=>`${r}: ${" ".repeat(t-r.length)}`}C(_f,"getLabelPrinter");var Yx="\xB7";function vl(e){return e.replace(/\s+$/gm,t=>Yx.repeat(t.length))}C(vl,"replaceTrailingSpaces");function Ff(e){return Ut.red(vl(an(e)))}C(Ff,"printReceived");function Pf(e){return Ut.green(vl(an(e)))}C(Pf,"printExpected");function Ys(e,t,r){return e.reduce((n,o)=>n+(o[0]===Se?o[1]:o[0]===t?r?Ut.inverse(o[1]):o[1]:""),"")}C(Ys,"getCommonAndChangedSubstrings");var Kx="@@__IMMUTABLE_RECORD__@@",Xx="@@__IMMUTABLE_ITERABLE__@@";function Nf(e){return e&&(e[Xx]||e[Kx])}C(Nf,"isImmutable");var Jx=Object.getPrototypeOf({});function Ks(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}C(Ks,"getUnserializableMessage");function qt(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){let r=e.toJSON();return r&&r!==e&&typeof r=="object"&&(typeof e.message=="string"&&jn(()=>r.message??(r.message=e.message)),typeof e.stack=="string"&&jn(()=>r.stack??(r.stack=e.stack)),typeof e.name=="string"&&jn(()=>r.name??(r.name=e.name)),e.cause!=null&&jn(()=>r.cause??(r.cause=qt(e.cause,t)))),qt(r,t)}if(typeof e=="function")return`Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(Nf(e))return qt(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.asymmetricMatch=="function")return`${e.toString()} ${Zh(e.sample)}`;if(typeof e.toJSON=="function")return qt(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let r=new Array(e.length);return t.set(e,r),e.forEach((n,o)=>{try{r[o]=qt(n,t)}catch(a){r[o]=Ks(a)}}),r}else{let r=Object.create(null);t.set(e,r);let n=e;for(;n&&n!==Jx;)Object.getOwnPropertyNames(n).forEach(o=>{if(!(o in r))try{r[o]=qt(e[o],t)}catch(a){delete r[o],r[o]=Ks(a)}}),n=Object.getPrototypeOf(n);return r}}C(qt,"serializeValue");function jn(e){try{return e()}catch{}}C(jn,"safe");function Lf(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}C(Lf,"normalizeErrorMessage");function Al(e,t,r=new WeakSet){if(!e||typeof e!="object")return{message:String(e)};let n=e;(n.showDiff||n.showDiff===void 0&&n.expected!==void 0&&n.actual!==void 0)&&(n.diff=Bf(n.actual,n.expected,{...t,...n.diffOptions})),"expected"in n&&typeof n.expected!="string"&&(n.expected=an(n.expected,10)),"actual"in n&&typeof n.actual!="string"&&(n.actual=an(n.actual,10));try{typeof n.message=="string"&&(n.message=Lf(n.message))}catch{}try{!r.has(n)&&typeof n.cause=="object"&&(r.add(n),n.cause=Al(n.cause,t,r))}catch{}try{return qt(n)}catch(o){return qt(new Error(`Failed to fully serialize error: ${o?.message}
|
||||
Inner error message: ${n?.message}`))}}C(Al,"processError");var Mt={CALL:"storybook/instrumenter/call",SYNC:"storybook/instrumenter/sync",START:"storybook/instrumenter/start",BACK:"storybook/instrumenter/back",GOTO:"storybook/instrumenter/goto",NEXT:"storybook/instrumenter/next",END:"storybook/instrumenter/end"},Cs=globalThis.__STORYBOOK_ADDONS_PREVIEW,Zx=(e=>(e.DONE="done",e.ERROR="error",e.ACTIVE="active",e.WAITING="waiting",e))(Zx||{}),Qx=new Error("This function ran after the play function completed. Did you forget to `await` it?"),Gm=C(e=>Object.prototype.toString.call(e)==="[object Object]","isObject"),ew=C(e=>Object.prototype.toString.call(e)==="[object Module]","isModule"),tw=C(e=>{if(!Gm(e)&&!ew(e))return!1;if(e.constructor===void 0)return!0;let t=e.constructor.prototype;return!!Gm(t)},"isInstrumentable"),rw=C(e=>{try{return new e.constructor}catch{return{}}},"construct"),Ds=C(()=>({renderPhase:"preparing",isDebugging:!1,isPlaying:!1,isLocked:!1,cursor:0,calls:[],shadowCalls:[],callRefsByResult:new Map,chainedCallIds:new Set,ancestors:[],playUntil:void 0,resolvers:{},syncTimeout:void 0}),"getInitialState"),Wm=C((e,t=!1)=>{let r=(t?e.shadowCalls:e.calls).filter(o=>o.retain);if(!r.length)return;let n=new Map(Array.from(e.callRefsByResult.entries()).filter(([,o])=>o.retain));return{cursor:r.length,calls:r,callRefsByResult:n}},"getRetainedState"),jf=class{constructor(){this.detached=!1,this.initialized=!1,this.state={},this.loadParentWindowState=C(()=>{try{this.state=H.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__||{}}catch{this.detached=!0}},"loadParentWindowState"),this.updateParentWindowState=C(()=>{try{H.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__=this.state}catch{this.detached=!0}},"updateParentWindowState"),this.loadParentWindowState();let t=C(({storyId:l,renderPhase:u,isPlaying:d=!0,isDebugging:m=!1})=>{let p=this.getState(l);this.setState(l,{...Ds(),...Wm(p,m),renderPhase:u||p.renderPhase,shadowCalls:m?p.shadowCalls:[],chainedCallIds:m?p.chainedCallIds:new Set,playUntil:m?p.playUntil:void 0,isPlaying:d,isDebugging:m}),this.sync(l)},"resetState"),r=C(l=>({storyId:u,playUntil:d})=>{this.getState(u).isDebugging||this.setState(u,({calls:p})=>({calls:[],shadowCalls:p.map(f=>({...f,status:"waiting"})),isDebugging:!0}));let m=this.getLog(u);this.setState(u,({shadowCalls:p})=>{if(d||!m.length)return{playUntil:d};let f=p.findIndex(g=>g.id===m[0].callId);return{playUntil:p.slice(0,f).filter(g=>g.interceptable&&!g.ancestors?.length).slice(-1)[0]?.id}}),l.emit(br,{storyId:u,isDebugging:!0})},"start"),n=C(l=>({storyId:u})=>{let d=this.getLog(u).filter(p=>!p.ancestors?.length),m=d.reduceRight((p,f,g)=>p>=0||f.status==="waiting"?p:g,-1);r(l)({storyId:u,playUntil:d[m-1]?.callId})},"back"),o=C(l=>({storyId:u,callId:d})=>{let{calls:m,shadowCalls:p,resolvers:f}=this.getState(u),g=m.find(({id:E})=>E===d),y=p.find(({id:E})=>E===d);if(!g&&y&&Object.values(f).length>0){let E=this.getLog(u).find(b=>b.status==="waiting")?.callId;y.id!==E&&this.setState(u,{playUntil:y.id}),Object.values(f).forEach(b=>b())}else r(l)({storyId:u,playUntil:d})},"goto"),a=C(l=>({storyId:u})=>{let{resolvers:d}=this.getState(u);if(Object.values(d).length>0)Object.values(d).forEach(m=>m());else{let m=this.getLog(u).find(p=>p.status==="waiting")?.callId;m?r(l)({storyId:u,playUntil:m}):i({storyId:u})}},"next"),i=C(({storyId:l})=>{this.setState(l,{playUntil:void 0,isDebugging:!1}),Object.values(this.getState(l).resolvers).forEach(u=>u())},"end"),s=C(({storyId:l,newPhase:u})=>{let{isDebugging:d}=this.getState(l);if(u==="preparing"&&d)return t({storyId:l,renderPhase:u});if(u==="playing")return t({storyId:l,renderPhase:u,isDebugging:d});u==="played"?this.setState(l,{renderPhase:u,isLocked:!1,isPlaying:!1,isDebugging:!1}):u==="errored"?this.setState(l,{renderPhase:u,isLocked:!1,isPlaying:!1}):u==="aborted"?this.setState(l,{renderPhase:u,isLocked:!0,isPlaying:!1}):this.setState(l,{renderPhase:u}),this.sync(l)},"renderPhaseChanged");Cs&&Cs.ready().then(()=>{this.channel=Cs.getChannel(),this.channel.on(br,t),this.channel.on(gt,s),this.channel.on(Ro,()=>{this.initialized?this.cleanup():this.initialized=!0}),this.channel.on(Mt.START,r(this.channel)),this.channel.on(Mt.BACK,n(this.channel)),this.channel.on(Mt.GOTO,o(this.channel)),this.channel.on(Mt.NEXT,a(this.channel)),this.channel.on(Mt.END,i)})}getState(t){return this.state[t]||Ds()}setState(t,r){if(t){let n=this.getState(t),o=typeof r=="function"?r(n):r;this.state={...this.state,[t]:{...n,...o}},this.updateParentWindowState()}}cleanup(){this.state=Object.entries(this.state).reduce((r,[n,o])=>{let a=Wm(o);return a&&(r[n]=Object.assign(Ds(),a)),r},{});let t={controlStates:{detached:this.detached,start:!1,back:!1,goto:!1,next:!1,end:!1},logItems:[]};this.channel?.emit(Mt.SYNC,t),this.updateParentWindowState()}getLog(t){let{calls:r,shadowCalls:n}=this.getState(t),o=[...n];r.forEach((i,s)=>{o[s]=i});let a=new Set;return o.reduceRight((i,s)=>(s.args.forEach(l=>{l?
Line truncated
|
||||
[ ]{`+Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a,`
|
||||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var i=n[0];return t.forEach(function(s,l){var u=i.match(/(?:^|\n)( *)$/),d=u?u[1]:"",m=s;typeof s=="string"&&s.includes(`
|
||||
`)&&(m=String(s).split(`
|
||||
`).map(function(p,f){return f===0?p:""+d+p}).join(`
|
||||
`)),i+=m+n[l+1]}),i}I(ka,"dedent");var yL=Symbol("incompatible"),bL=Symbol("Deeply equal"),xg="UNTARGETED";function wg({args:e,argTypes:t}){let r={};return Object.entries(e).forEach(([n,o])=>{let{target:a=xg}=t[n]||{};r[a]=r[a]||{},r[a][n]=o}),r}I(wg,"groupArgsByTarget");var bw=I((e={})=>Object.entries(e).reduce((t,[r,{defaultValue:n}])=>(typeof n<"u"&&(t[r]=n),t),{}),"getValuesFromArgTypes"),Ew=I(e=>typeof e=="string"?{name:e}:e,"normalizeType"),vw=I(e=>typeof e=="string"?{type:e}:e,"normalizeControl"),Aw=I((e,t)=>{let{type:r,control:n,...o}=e,a={name:t,...o};return r&&(a.type=Ew(r)),n?a.control=vw(n):n===!1&&(a.control={disable:!0}),a},"normalizeInputType"),wa=I(e=>dn(e,Aw),"normalizeInputTypes"),oe=I(e=>Array.isArray(e)?e:e?[e]:[],"normalizeArrays"),xw=ka`
|
||||
CSF .story annotations deprecated; annotate story functions directly:
|
||||
- StoryFn.story.name => StoryFn.storyName
|
||||
- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
|
||||
See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.
|
||||
`;function Sg(e,t,r){let n=t,o=typeof t=="function"?t:null,{story:a}=n;a&&(Z.debug("deprecated story",a),$r(xw));let i=Jo(e),s=typeof n!="function"&&n.name||n.storyName||a?.name||i,l=[...oe(n.decorators),...oe(a?.decorators)],u={...a?.parameters,...n.parameters},d={...a?.args,...n.args},m={...a?.argTypes,...n.argTypes},p=[...oe(n.loaders),...oe(a?.loaders)],f=[...oe(n.beforeEach),...oe(a?.beforeEach)],g=[...oe(n.afterEach),...oe(a?.afterEach)],{render:y,play:E,tags:b=[],globals:x={}}=n,S=u.__id||Xo(r.id,i);return{moduleExport:t,id:S,name:s,tags:b,decorators:l,parameters:u,args:d,argTypes:wa(m),loaders:p,beforeEach:f,afterEach:g,globals:x,...y&&{render:y},...o&&{userStoryFn:o},...E&&{play:E}}}I(Sg,"normalizeStory");function Cg(e,t=e.title,r){let{id:n,argTypes:o}=e;return{id:Nn(n||t),...e,title:t,...o&&{argTypes:wa(o)},parameters:{fileName:r,...e.parameters}}}I(Cg,"normalizeComponentAnnotations");function Dg(e){return e!=null&&Tg(e).includes("mount")}I(Dg,"mountDestructured");function Tg(e){let t=e.toString().match(/[^(]*\(([^)]*)/);if(!t)return[];let r=Dl(t[1]);if(!r.length)return[];let n=r[0];return n.startsWith("{")&&n.endsWith("}")?Dl(n.slice(1,-1).replace(/\s/g,"")).map(o=>o.replace(/:.*|=.*/g,"")):[]}I(Tg,"getUsedProps");function Dl(e){let t=[],r=[],n=0;for(let a=0;a<e.length;a++)if(e[a]==="{"||e[a]==="[")r.push(e[a]==="{"?"}":"]");else if(e[a]===r[r.length-1])r.pop();else if(!r.length&&e[a]===","){let i=e.substring(n,a).trim();i&&t.push(i),n=a+1}let o=e.substring(n).trim();return o&&t.push(o),t}I(Dl,"splitByComma");function kg(e,t,r){let n=r(e);return o=>t(n,o)}I(kg,"decorateStory");function Og({componentId:e,title:t,kind:r,id:n,name:o,story:a,parameters:i,initialArgs:s,argTypes:l,...u}={}){return u}I(Og,"sanitizeStoryContextUpdate");function Ig(e,t){let r={},n=I(a=>i=>{if(!r.value)throw new Error("Decorated function called without init");return r.value={...r.value,...Og(i)},a(r.value)},"bindWithContext"),o=t.reduce((a,i)=>kg(a,i,n),e);return a=>(r.value=a,o(a))}I(Ig,"defaultDecorateStory");var lr=I((...e)=>{let t={},r=e.filter(Boolean),n=r.reduce((o,a)=>(Object.entries(a).forEach(([i,s])=>{let l=o[i];Array.isArray(s)||typeof l>"u"?o[i]=s:Aa(s)&&Aa(l)?t[i]=!0:typeof s<"u"&&(o[i]=s)}),o),{});return Object.keys(t).forEach(o=>{let a=r.filter(Boolean).map(i=>i[o]).filter(i=>typeof i<"u");a.every(i=>Aa(i))?n[o]=lr(...a):n[o]=a[a.length-1]}),n},"combineParameters");function Rg(e,t,r){let{moduleExport:n,id:o,name:a}=e||{},i=Bg(e,t,r),s=I(async O=>{let k={};for(let B of[oe(r.loaders),oe(t.loaders),oe(e.loaders)]){if(O.abortSignal.aborted)return k;let P=await Promise.all(B.map(L=>L(O)));Object.assign(k,...P)}return k},"applyLoaders"),l=I(async O=>{let k=new Array;for(let B of[...oe(r.beforeEach),...oe(t.beforeEach),...oe(e.beforeEach)]){if(O.abortSignal.aborted)return k;let P=await B(O);P&&k.push(P)}return k},"applyBeforeEach"),u=I(async O=>{let k=[...oe(r.afterEach),...oe(t.afterEach),...oe(e.afterEach)].reverse();for(let B of k){if(O.abortSignal.aborted)return;await B(O)}},"applyAfterEach"),d=I(O=>O.originalStoryFn(O.args,O),"undecoratedStoryFn"),{applyDecorators:m=Ig,runStep:p}=r,f=[...oe(e?.decorators),...oe(t?.decorators),...oe(r?.decorators)],g=e?.userStoryFn||e?.render||t.render||r.render,y=yw(m)(d,f),E=I(O=>y(O),"unboundStoryFn"),b=e?.play??t?.play,x=Dg(b);if(!g&&!x)throw new Lo({id:o});let S=I(O=>async()=>(await O.renderToCanvas(),O.canvas),"defaultMount"),T=e.mount??t.mount??r.mount??S,_=r.testingLibraryRender;return{storyGlobals:{},...i,moduleExport:n,id:o,name:a,story:a,originalStoryFn:g,undecoratedStoryFn:d,unboundStoryFn:E,applyLoaders:s,applyBeforeEach:l,applyAfterEach:u,playFunction:b,runStep:p,mount:T,testingLibraryRender:_,renderToCanvas:r.renderToCanvas,usesMount:x}}I(Rg,"prepareStory");function Bg(e,t,r){let n=["dev","test"],o=H.DOCS_OPTIONS?.autodocs===!0?["autodocs"]:[],a=en(...n,...o,...r.tags??[],...t.tags??[],...e?.tags??[]),i=lr(r.parameters,t.parameters,e?.parameters),{argTypesEnhancers:s=[],argsEnhancers:l=[]}=r,u=lr(r.argTypes,t.argTypes,e?.argTypes);if(e){let b=e?.userStoryFn||e?.render||t.render||r.render;i.__isArgsStory=b&&b.length>0}let d={...r.args,...t.args,...e?.args},m={...t.globals,...e?.globals},p={componentId:t.id,title:t.title,kind:t.title,id:e?.id||t.id,name:e?.name||"__meta",story:e?.name||"__meta",component:t.component,subcomponents:t.subcomponents,tags:a,parameters:i,initialArgs:d,argTypes:u,storyGlobals:m};p.argTypes=s.reduce((b,x)=>x({...p,argTypes:b}),p.argTypes);let f={...d};p.initialArgs=[...l].reduce((b,x)=>({...b,...x({...p,initialArgs:b})}),f);let{name:g,story:y,...E}=p;return E}I(Bg,"preparePartialAnnotations");function _g(e){let{args:t}=e,r={...e,allArgs:void 0,argsByTarget:void 0};if(H.FEATURES?.argTypeTargetsV7){let a=wg(e);r={...e,allArgs:e.args,argsByTarget:a,args:a[xg]||{}}}let n=Object.entries(r.args).reduce((a,[i,s])=>{if(!r.argTypes[i]?.mapping)return a[i]=s,a;let l=I(u=>{let d=r.argTypes[i].mapping;return d&&u in d?d[u]:u},"mappingFn");return a[i]
Line truncated
|
||||
We've detected a cycle in arg '${t}'. Args should be JSON-serializable.
|
||||
|
||||
Consider using the mapping feature or fully custom args:
|
||||
- Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
|
||||
- Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
|
||||
`),{name:"other",value:"cyclic object"}):(r.add(e),Array.isArray(e)?{name:"array",value:e.length>0?Tl(e[0],t,new Set(r)):{name:"other",value:"unknown"}}:{name:"object",value:dn(e,o=>Tl(o,t,new Set(r)))}):{name:"object",value:{}}},"inferType"),Fg=I(e=>{let{id:t,argTypes:r={},initialArgs:n={}}=e,o=dn(n,(i,s)=>({name:s,type:Tl(i,`${t}.${s}`,new Set)})),a=dn(r,(i,s)=>({name:s}));return lr(o,a,r)},"inferArgTypes");Fg.secondPass=!0;var Hf=I((e,t)=>Array.isArray(t)?t.includes(e):e.match(t),"matches"),ww=I((e,t,r)=>!t&&!r?e:e&&Ag(e,(n,o)=>{let a=n.name||o.toString();return!!(!t||Hf(a,t))&&(!r||!Hf(a,r))}),"filterArgTypes"),Sw=I((e,t,r)=>{let{type:n,options:o}=e;if(n){if(r.color&&r.color.test(t)){let a=n.name;if(a==="string")return{control:{type:"color"}};a!=="enum"&&Z.warn(`Addon controls: Control of type color only supports string, received "${a}" instead`)}if(r.date&&r.date.test(t))return{control:{type:"date"}};switch(n.name){case"array":return{control:{type:"object"}};case"boolean":return{control:{type:"boolean"}};case"string":return{control:{type:"text"}};case"number":return{control:{type:"number"}};case"enum":{let{value:a}=n;return{control:{type:a?.length<=5?"radio":"select"},options:a}}case"function":case"symbol":return null;default:return{control:{type:o?"select":"object"}}}}},"inferControl"),Pg=I(e=>{let{argTypes:t,parameters:{__isArgsStory:r,controls:{include:n=null,exclude:o=null,matchers:a={}}={}}}=e;if(!r)return t;let i=ww(t,n,o),s=dn(i,(l,u)=>l?.type&&Sw(l,u.toString(),a));return lr(s,i)},"inferControls");Pg.secondPass=!0;function Bl({argTypes:e,globalTypes:t,argTypesEnhancers:r,decorators:n,loaders:o,beforeEach:a,afterEach:i,initialGlobals:s,...l}){return{...e&&{argTypes:wa(e)},...t&&{globalTypes:wa(t)},decorators:oe(n),loaders:oe(o),beforeEach:oe(a),afterEach:oe(i),argTypesEnhancers:[...r||[],Fg,Pg],initialGlobals:s,...l}}I(Bl,"normalizeProjectAnnotations");var Cw=I(e=>async()=>{let t=[];for(let r of e){let n=await r();n&&t.unshift(n)}return async()=>{for(let r of t)await r()}},"composeBeforeAllHooks");function Ng(e){return async(t,r,n)=>{await e.reduceRight((o,a)=>async()=>a(t,o,n),async()=>r(n))()}}I(Ng,"composeStepRunners");function pn(e,t){return e.map(r=>r.default?.[t]??r[t]).filter(Boolean)}I(pn,"getField");function zt(e,t,r={}){return pn(e,t).reduce((n,o)=>{let a=oe(o);return r.reverseFileOrder?[...a,...n]:[...n,...a]},[])}I(zt,"getArrayField");function Gn(e,t){return Object.assign({},...pn(e,t))}I(Gn,"getObjectField");function un(e,t){return pn(e,t).pop()}I(un,"getSingletonField");function _l(e){let t=zt(e,"argTypesEnhancers"),r=pn(e,"runStep"),n=zt(e,"beforeAll");return{parameters:lr(...pn(e,"parameters")),decorators:zt(e,"decorators",{reverseFileOrder:!(H.FEATURES?.legacyDecoratorFileOrder??!1)}),args:Gn(e,"args"),argsEnhancers:zt(e,"argsEnhancers"),argTypes:Gn(e,"argTypes"),argTypesEnhancers:[...t.filter(o=>!o.secondPass),...t.filter(o=>o.secondPass)],initialGlobals:Gn(e,"initialGlobals"),globalTypes:Gn(e,"globalTypes"),loaders:zt(e,"loaders"),beforeAll:Cw(n),beforeEach:zt(e,"beforeEach"),afterEach:zt(e,"afterEach"),render:un(e,"render"),renderToCanvas:un(e,"renderToCanvas"),applyDecorators:un(e,"applyDecorators"),runStep:Ng(r),tags:zt(e,"tags"),mount:un(e,"mount"),testingLibraryRender:un(e,"testingLibraryRender")}}I(_l,"composeConfigs");function Lg(){try{return!!globalThis.__vitest_browser__||!!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)}catch{return!1}}I(Lg,"isTestEnvironment");function jg(e=!0){if(!("document"in globalThis&&"createElement"in globalThis.document))return()=>{};let t=document.createElement("style");t.textContent=`*, *:before, *:after {
|
||||
animation: none !important;
|
||||
}`,document.head.appendChild(t);let r=document.createElement("style");return r.textContent=`*, *:before, *:after {
|
||||
animation-delay: 0s !important;
|
||||
animation-direction: ${e?"reverse":"normal"} !important;
|
||||
animation-play-state: paused !important;
|
||||
transition: none !important;
|
||||
}`,document.head.appendChild(r),document.body.clientHeight,document.head.removeChild(t),()=>{r.parentNode?.removeChild(r)}}I(jg,"pauseAnimations");async function Mg(e){if(!("document"in globalThis&&"getAnimations"in globalThis.document&&"querySelectorAll"in globalThis.document))return;let t=!1;await Promise.race([new Promise(r=>{setTimeout(()=>{let n=[globalThis.document,...Fl(globalThis.document)],o=I(async()=>{if(t||e?.aborted)return;let a=n.flatMap(i=>i?.getAnimations?.()||[]).filter(i=>i.playState==="running"&&!$g(i));a.length>0&&(await Promise.all(a.map(i=>i.finished)),await o())},"checkAnimationsFinished");o().then(r)},100)}),new Promise(r=>setTimeout(()=>{t=!0,r(void 0)},5e3))])}I(Mg,"waitForAnimations");function Fl(e){return[e,...e.querySelectorAll("*")].reduce((t,r)=>("shadowRoot"in r&&r.shadowRoot&&t.push(r.shadowRoot,...Fl(r.shadowRoot)),t),[])}I(Fl,"getShadowRoots");function $g(e){if(e instanceof CSSAnimation&&e.effect instanceof KeyframeEffect&&e.effect.target){let t=getComputedStyle(e.effect.target,e.effect.pseudoElement),r=t.animationName?.split(", ").indexOf(e.animationName);return t.animationIterationCount.split(", ")[r]==="infinite"}return!1}I($g,"isInfiniteAnimation");var qg=class{constructor(){this.reports=[]}async addReport(t){this.reports.push(t)}};I(qg,"ReporterAPI");var Dw=qg,Tw="ComposedStory",kw="Unnamed Story",sr=[];function Ug(e,t,r,n,o){if(e===void 0)throw new Error("Expected a story but received undefined.");t.title=t.title??Tw;let a=Cg(t),i=o||e.storyName||e.story?.name||e.name||kw,s=Sg(i,e,a),l=Bl(_l([n??globalThis.globalProjectAnnotations??{},r??{}])),u=Rg(s,a,l),d={...bw(l.globalTypes),...l.initialGlobals,...u.storyGlobals},m=new Dw,p=I(()=>{let b=_g({hooks:new fw,globals:d,args:{...u.initialArgs},viewMode:"story",reporting:m,loaded:{},abortSignal:new AbortController().signal,step:I((x,S)=>u.runStep(x,S,b),"step"),canvasElement:null,canvas:{},userEvent:{},globalTypes:l.globalTypes,...u,context:null,mount:null});return b.parameters.__isPortableStory=!0,b.context=b,u.renderToCanvas&&(b.renderToCanvas=async()=>{let x=await u.renderToCanvas?.({componentId:u.componentId,title:u.title,id:u.id,name:u.name,tags:u.tags,showMain:I(()=>{},"showMain"),showError:I(S=>{throw new Error(`${S.title}
|
||||
${S.description}`)},"showError"),showException:I(S=>{throw S},"showException"),forceRemount:!0,storyContext:b,storyFn:I(()=>u.unboundStoryFn(b),"storyFn"),unboundStoryFn:u.unboundStoryFn},b.canvasElement);x&&sr.push(x)}),b.mount=u.mount(b),b},"initializeContext"),f,g=I(async b=>{let x=p();return x.canvasElement??=globalThis?.document?.body,f&&(x.loaded=f.loaded),Object.assign(x,b),u.playFunction(x)},"play"),y=I(b=>{let x=p();return Object.assign(x,b),Hg(u,x)},"run"),E=u.playFunction?g:void 0;return Object.assign(I(function(b){let x=p();return f&&(x.loaded=f.loaded),x.args={...x.initialArgs,...b},u.unboundStoryFn(x)},"storyFn"),{id:u.id,storyName:i,load:I(async()=>{for(let x of[...sr].reverse())await x();sr.length=0;let b=p();b.loaded=await u.applyLoaders(b),sr.push(...(await u.applyBeforeEach(b)).filter(Boolean)),f=b},"load"),globals:d,args:u.initialArgs,parameters:u.parameters,argTypes:u.argTypes,play:E,run:y,reporting:m,tags:u.tags})}I(Ug,"composeStory");async function Hg(e,t){for(let a of[...sr].reverse())await a();if(sr.length=0,!t.canvasElement){let a=document.createElement("div");globalThis?.document?.body?.appendChild(a),t.canvasElement=a,sr.push(()=>{globalThis?.document?.body?.contains(a)&&globalThis?.document?.body?.removeChild(a)})}if(t.loaded=await e.applyLoaders(t),t.abortSignal.aborted)return;sr.push(...(await e.applyBeforeEach(t)).filter(Boolean));let r=e.playFunction,n=e.usesMount;if(n||await t.mount(),t.abortSignal.aborted)return;r&&(n||(t.mount=async()=>{throw new qr({playFunction:r.toString()})}),await r(t));let o;Lg()?o=jg():await Mg(t.abortSignal),await e.applyAfterEach(t),await o?.()}I(Hg,"runStory");var Ow=!1,Sl="Invariant failed";function Sa(e,t){if(!e){if(Ow)throw new Error(Sl);var r=typeof t=="function"?t():t,n=r?"".concat(Sl,": ").concat(r):Sl;throw new Error(n)}}I(Sa,"invariant");var Vg={};hg(Vg,{argsEnhancers:()=>Nw});var Pl="storybook/actions",ML=`${Pl}/panel`,Iw=`${Pl}/action-event`,$L=`${Pl}/action-clear`,Rw={depth:10,clearOnStoryChange:!0,limit:50},zg=I((e,t)=>{let r=Object.getPrototypeOf(e);return!r||t(r)?r:zg(r,t)},"findProto"),Bw=I(e=>!!(typeof e=="object"&&e&&zg(e,t=>/^Synthetic(?:Base)?Event$/.test(t.constructor.name))&&typeof e.persist=="function"),"isReactSyntheticEvent"),_w=I(e=>{if(Bw(e)){let t=Object.create(e.constructor.prototype,Object.getOwnPropertyDescriptors(e));t.persist();let r=Object.getOwnPropertyDescriptor(t,"view"),n=r?.value;return typeof n=="object"&&n?.constructor.name==="Window"&&Object.defineProperty(t,"view",{...r,value:Object.create(n.constructor.prototype)}),t}return e},"serializeArg");function Oa(e,t={}){let r={...Rw,...t},n=I(function(...o){if(t.implicit){let m=("__STORYBOOK_PREVIEW__"in H?H.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find(p=>p.phase==="playing"||p.phase==="rendering");if(m){let p=!globalThis?.FEATURES?.disallowImplicitActionsInRenderV8,f=new Sd({phase:m.phase,name:e,deprecated:p});if(p)console.warn(f);else throw f}}let a=ut.getChannel(),i=Date.now().toString(36)+Math.random().toString(36).substring(2),s=5,l=o.map(_w),u=o.length>1?l:l[0],d={id:i,count:0,data:{name:e,args:u},options:{...r,maxDepth:s+(r.depth||3)}};a.emit(Iw,d)},"actionHandler");return n.isAction=!0,n.implicit=t.implicit,n}I(Oa,"action");var Gg=I((e,t)=>typeof t[e]>"u"&&!(e in t),"isInInitialArgs"),Fw=I(e=>{let{initialArgs:t,argTypes:r,id:n,parameters:{actions:o}}=e;if(!o||o.disable||!o.argTypesRegex||!r)return{};let a=new RegExp(o.argTypesRegex);return Object.entries(r).filter(([i])=>!!a.test(i)).reduce((i,[s,l])=>(Gg(s,t)&&(i[s]=Oa(s,{implicit:!0,id:n})),i),{})},"inferActionsFromArgTypesRegex"),Pw=I(e=>{let{initialArgs:t,argTypes:r,parameters:{actions:n}}=e;return n?.disable||!r?{}:Object.entries(r).filter(([o,a])=>!!a.action).reduce((o,[a,i])=>(Gg(a,t)&&(o[a]=Oa(typeof i.action=="string"?i.action:a)),o),{})},"addActionsFromArgTypes"),Nw=[Pw,Fw],Wg={};hg(Wg,{loaders:()=>jw});var Vf=!1,Lw=I(e=>{let{parameters:t}=e;t?.actions?.disable||Vf||(vm((r,n)=>{let o=r.getMockName();o!=="spy"&&(!/^next\/.*::/.test(o)||["next/router::useRouter()","next/navigation::useRouter()","next/navigation::redirect","next/cache::","next/headers::cookies().set","next/headers::cookies().delete","next/headers::headers().set","next/headers::headers().delete"].some(a=>o.startsWith(a)))&&Oa(o)(n)}),Vf=!0)},"logActionsWhenMockCalled"),jw=[Lw],zf=I(()=>({...Vg,...Wg}),"default"),Mw="storybook/background",Ca="backgrounds",HL={UPDATE:`${Mw}/update`},$w={light:{name:"light",value:"#F8F8F8"},dark:{name:"dark",value:"#333"}},{document:Dt}=globalThis,qw=I(()=>globalThis?.matchMedia?!!globalThis.matchMedia("(prefers-reduced-motion: reduce)")?.matches:!1,"isReduceMotionEnabled"),Gf=I(e=>{(Array.isArray(e)?e:[e]).forEach(Uw)},"clearStyles"),Uw=I(e=>{if(!Dt)return;let t=Dt.getElementById(e);t&&t.parentElement&&t.parentElement.removeChild(t)},"clearStyle"),Hw=I((e,t)=>{if(!Dt)return;let r=Dt.getElementById(e);if(r)r.innerHTML!==t&&(r.innerHTML=t);else{let n=Dt.createElement("style");n.setAttribute("id",
Line truncated
|
||||
${y} {
|
||||
background: ${p} !important;
|
||||
${Gw}
|
||||
}`;if(!g){Gf(B);return}Vw(B,j,P)},[y,B,P,g,p]);let L=o==="docs"?`${Yf}-docs-${a}`:`${Yf}`;return Bt(()=>{if(!f){Gf(L);return}let j=[`${T*S}px ${T*S}px`,`${T*S}px ${T*S}px`,`${T}px ${T}px`,`${T}px ${T}px`].join(", "),U=`
|
||||
${E} {
|
||||
background-size: ${j} !important;
|
||||
background-position: ${O}px ${k}px, ${O}px ${k}px, ${O}px ${k}px, ${O}px ${k}px !important;
|
||||
background-blend-mode: difference !important;
|
||||
background-image: linear-gradient(rgba(130, 130, 130, ${_}) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(130, 130, 130, ${_}) 1px, transparent 1px),
|
||||
linear-gradient(rgba(130, 130, 130, ${_/2}) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(130, 130, 130, ${_/2}) 1px, transparent 1px) !important;
|
||||
}
|
||||
`;Hw(L,U)},[S,T,E,L,f,O,k,_]),e()},"withBackgroundAndGrid"),Yw=globalThis.FEATURES?.backgrounds?[Ww]:[],Kw={[Ca]:{grid:{cellSize:20,opacity:.5,cellAmount:5},disable:!1}},Xw={[Ca]:{value:void 0,grid:!1}},Kf=I(()=>({decorators:Yw,parameters:Kw,initialGlobals:Xw}),"default"),{step:Jw}=Vn({step:I(async(e,t,r)=>t(r),"step")},{intercept:!0}),Xf=I(()=>({parameters:{throwPlayFunctionExceptions:!1},runStep:Jw}),"default"),Ia="storybook/highlight",Zw=`${Ia}/add`,Qw=`${Ia}/remove`,eS=`${Ia}/reset`,tS=`${Ia}/scroll-into-view`,Jf=2147483647,ir=28,Zf={chevronLeft:["M9.10355 10.1464C9.29882 10.3417 9.29882 10.6583 9.10355 10.8536C8.90829 11.0488 8.59171 11.0488 8.39645 10.8536L4.89645 7.35355C4.70118 7.15829 4.70118 6.84171 4.89645 6.64645L8.39645 3.14645C8.59171 2.95118 8.90829 2.95118 9.10355 3.14645C9.29882 3.34171 9.29882 3.65829 9.10355 3.85355L5.95711 7L9.10355 10.1464Z"],chevronRight:["M4.89645 10.1464C4.70118 10.3417 4.70118 10.6583 4.89645 10.8536C5.09171 11.0488 5.40829 11.0488 5.60355 10.8536L9.10355 7.35355C9.29882 7.15829 9.29882 6.84171 9.10355 6.64645L5.60355 3.14645C5.40829 2.95118 5.09171 2.95118 4.89645 3.14645C4.70118 3.34171 4.70118 3.65829 4.89645 3.85355L8.04289 7L4.89645 10.1464Z"],info:["M7 5.5a.5.5 0 01.5.5v4a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM7 4.5A.75.75 0 107 3a.75.75 0 000 1.5z","M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z"],shareAlt:["M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z","M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z"]},rS="svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","),Oe=I((e,t={},r)=>{let n=rS.includes(e)?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return Object.entries(t).forEach(([o,a])=>{/[A-Z]/.test(o)?(o==="onClick"&&(n.addEventListener("click",a),n.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),a())})),o==="onMouseEnter"&&n.addEventListener("mouseenter",a),o==="onMouseLeave"&&n.addEventListener("mouseleave",a)):n.setAttribute(o,a)}),r?.forEach(o=>{if(!(o==null||o===!1))try{n.appendChild(o)}catch{n.appendChild(document.createTextNode(String(o)))}}),n},"createElement"),ba=I(e=>Zf[e]&&Oe("svg",{width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},Zf[e].map(t=>Oe("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:t}))),"createIcon"),nS=I(e=>{if("elements"in e){let{elements:n,color:o,style:a}=e;return{id:void 0,priority:0,selectors:n,styles:{outline:`2px ${a} ${o}`,outlineOffset:"2px",boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"},menu:void 0}}let{menu:t,...r}=e;return{id:void 0,priority:0,styles:{outline:"2px dashed #029cfd"},...r,menu:Array.isArray(t)?t.every(Array.isArray)?t:[t]:void 0}},"normalizeOptions"),oS=I(e=>e instanceof Function,"isFunction"),zn=new Map,Sr=new Map,Ea=new Map,Vt=I(e=>{let t=Symbol();return Sr.set(t,[]),zn.set(t,e),{get:I(()=>zn.get(t),"get"),set:I(r=>{let n=zn.get(t),o=oS(r)?r(n):r;o!==n&&(zn.set(t,o),Sr.get(t)?.forEach(a=>{Ea.get(a)?.(),Ea.set(a,a(o))}))},"set"),subscribe:I(r=>(Sr.get(t)?.push(r),()=>{let n=Sr.get(t);n&&Sr.set(t,n.filter(o=>o!==r))}),"subscribe"),teardown:I(()=>{Sr.get(t)?.forEach(r=>{Ea.get(r)?.(),Ea.delete(r)}),Sr.delete(t),zn.delete(t)},"teardown")}},"useStore"),Qf=I(e=>{let t=document.getElementById("storybook-root"),r=new Map;for(let n of e){let{priority:o=0}=n;for(let a of n.selectors){let i=[...document.querySelectorAll(`:is(${a}):not([id^="storybook-"], [id^="storybook-"] *, [class^="sb-"], [class^="sb-"] *)`),...t?.querySelectorAll(a)||[]];for(let s of i){let l=r.get(s);(!l||l.priority<=o)&&r.set(s,{...n,priority:o,selectors:Array.from(new Set((l?.selectors||[]).concat(a)))})}}}return r},"mapElements"),aS=I(e=>Array.from(e.entries()).map(([t,{selectors:r,styles:n,hoverStyles:o,focusStyles:a,menu:i}])=>{let{top:s,left:l,width:u,height:d}=t.getBoundingClientRect(),{position:m}=getComputedStyle(t);return{element:t,selectors:r,styles:n,hoverStyles:o,focusStyles:a,menu:i,top:m==="fixed"?s:s+window.scrollY,left:m==="fixed"?l:l+window.scrollX,width:u,height:d}}).sort((t,r)=>r.width*r.height-t.width*t.height),"mapBoxes"),eg=I((e,t)=>{let r=e.getBoundingClientRect(),{x:n,y:o}=t;return r?.top&&r?.left&&n>=r.left&&n<=r.left+r.width&&o>=r.top&&o<=r.top+r.height},"isOverMenu"),tg=I((e,t,r)=>{if(!t||!r)return!1;let{left:n,top:o,width:a,height:i}=e;i<ir&&(o=o-Math.round((ir-i)/2),i=ir),a<ir&&(n=n-Math.round((ir-a)/2),a=ir),t.style.position==="fixed"&&(n+=window.scrollX,o+=window.scrollY);let{x:s,y:l}=r;return s>=n&&s<=n+a&&l>=o&&l<=o+i},"isTargeted"),iS=I((e,t,r={})=>{let{x:n,y:o}=t,{margin:a=5,topOffset:i=0,centered:s=!1}=r,{scrollX:l,scrollY:u,innerHeight:d,innerWidth:m}=window,p=Math.min(e.style.position==="fixed"?o-u:o,d-e.clientHeight-a-i+u),f=s?e.clientWidth/2:0,g=e.style.position==="fixed"?Math.max(Math.min(n-l,m-f-a),f+a):Math.max(Math.min(n,m-f-a+l),f
Line truncated
|
||||
#${Ee} {
|
||||
position: absolute;
|
||||
z-index: ${Jf};
|
||||
width: 300px;
|
||||
padding: 0px;
|
||||
margin: 15px 0 0 0;
|
||||
transform: translateX(-50%);
|
||||
font-family: "Nunito Sans", -apple-system, ".SFNSText-Regular", "San Francisco", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
background: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05), 0 5px 15px 0 rgba(0, 0, 0, 0.1);
|
||||
color: #2E3438;
|
||||
}
|
||||
#${Ee} ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#${Ee} > ul {
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
padding: 4px 0;
|
||||
}
|
||||
#${Ee} li {
|
||||
padding: 0 4px;
|
||||
margin: 0;
|
||||
}
|
||||
#${Ee} li > :not(ul) {
|
||||
display: flex;
|
||||
padding: 8px;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#${Ee} button {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
#${Ee} button:focus-visible {
|
||||
outline-color: #029CFD;
|
||||
}
|
||||
#${Ee} button:hover {
|
||||
background: rgba(2, 156, 253, 0.07);
|
||||
color: #029CFD;
|
||||
cursor: pointer;
|
||||
}
|
||||
#${Ee} li code {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 16px;
|
||||
font-size: 11px;
|
||||
}
|
||||
#${Ee} li svg {
|
||||
flex-shrink: 0;
|
||||
margin: 1px;
|
||||
color: #73828C;
|
||||
}
|
||||
#${Ee} li > button:hover svg, #${Ee} li > button:focus-visible svg {
|
||||
color: #029CFD;
|
||||
}
|
||||
#${Ee} .element-list li svg {
|
||||
display: none;
|
||||
}
|
||||
#${Ee} li.selectable svg, #${Ee} li.selected svg {
|
||||
display: block;
|
||||
}
|
||||
#${Ee} .menu-list {
|
||||
border-top: 1px solid rgba(38, 85, 115, 0.15);
|
||||
}
|
||||
#${Ee} .menu-list > li:not(:last-child) {
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 4px;
|
||||
border-bottom: 1px solid rgba(38, 85, 115, 0.15);
|
||||
}
|
||||
#${Ee} .menu-items, #${Ee} .menu-items li {
|
||||
padding: 0;
|
||||
}
|
||||
#${Ee} .menu-item {
|
||||
display: flex;
|
||||
}
|
||||
#${Ee} .menu-item-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
}
|
||||
`]))}let B=d.get(),P=B?[B]:s.get();if(P.length&&(k.style.position=getComputedStyle(P[0].element).position==="fixed"?"fixed":"absolute",k.appendChild(Oe("ul",{class:"element-list"},P.map(j=>{let U=P.length>1&&!!j.menu?.some(A=>A.some(D=>!D.selectors||D.selectors.some(N=>j.selectors.includes(N)))),$=U?{class:"selectable",onClick:I(()=>d.set(j),"onClick"),onMouseEnter:I(()=>u.set(j),"onMouseEnter"),onMouseLeave:I(()=>u.set(void 0),"onMouseLeave")}:B?{class:"selected",onClick:I(()=>d.set(void 0),"onClick")}:{},v=U||B;return Oe("li",$,[Oe(v?"button":"div",v?{type:"button"}:{},[B?ba("chevronLeft"):null,Oe("code",{},[j.element.outerHTML]),U?ba("chevronRight"):null])])})))),d.get()||s.get().length===1){let j=d.get()||s.get()[0],U=j.menu?.filter($=>$.some(v=>!v.selectors||v.selectors.some(A=>j.selectors.includes(A))));U?.length&&k.appendChild(Oe("ul",{class:"menu-list"},U.map($=>Oe("li",{},[Oe("ul",{class:"menu-items"},$.map(({id:v,title:A,description:D,iconLeft:N,iconRight:F,clickEvent:M})=>{let q=M&&(()=>e.emit(M,v,lS(j)));return Oe("li",{},[Oe(q?"button":"div",q?{class:"menu-item",type:"button",onClick:q}:{class:"menu-item"},[N?ba(N):null,Oe("div",{class:"menu-item-content"},[Oe(D?"strong":"span",{},[A]),D&&Oe("span",{},[D])]),F?ba(F):null])])}))]))))}let L=a.get();L?(Object.assign(k.style,{display:"block",left:`${k.style.position==="fixed"?L.x-window.scrollX:L.x}px`,top:`${k.style.position==="fixed"?L.y-window.scrollY:L.y}px`}),rg(k),requestAnimationFrame(()=>iS(k,L,{topOffset:15,centered:!0}))):(sS(k),Object.assign(k.style,{display:"none"}))},"renderMenu");s.subscribe(E),d.subscribe(E);let b=I(k=>{let B=nS(k);r.set(P=>{let L=B.id?P.filter(j=>j.id!==B.id):P;return B.selectors?.length?[...L,B]:L})},"addHighlight"),x=I(k=>{k&&r.set(B=>B.filter(P=>P.id!==k))},"removeHighlight"),S=I(()=>{r.set([]),n.set(new Map),o.set([]),a.set(void 0),i.set(void 0),s.set([]),l.set([]),u.set(void 0),d.set(void 0)},"resetState"),T,_=I((k,B)=>{let P="scrollIntoView-highlight";clearTimeout(T),x(P);let L=t.querySelector(k);if(!L){console.warn(`Cannot scroll into view: ${k} not found`);return}L.scrollIntoView({behavior:"smooth",block:"center",...B});let j=`kf-${Math.random().toString(36).substring(2,15)}`;r.set(U=>[...U,{id:P,priority:1e3,selectors:[k],styles:{outline:"2px solid #1EA7FD",outlineOffset:"-1px",animation:`${j} 3s linear forwards`},keyframes:`@keyframes ${j} {
|
||||
0% { outline: 2px solid #1EA7FD; }
|
||||
20% { outline: 2px solid #1EA7FD00; }
|
||||
40% { outline: 2px solid #1EA7FD; }
|
||||
60% { outline: 2px solid #1EA7FD00; }
|
||||
80% { outline: 2px solid #1EA7FD; }
|
||||
100% { outline: 2px solid #1EA7FD00; }
|
||||
}`}]),T=setTimeout(()=>x(P),3500)},"scrollIntoView"),O=I(k=>{requestAnimationFrame(()=>i.set({x:k.pageX,y:k.pageY}))},"onMouseMove");t.body.addEventListener("mousemove",O),e.on(Zw,b),e.on(Qw,x),e.on(eS,S),e.on(tS,_),e.on(gt,({newPhase:k})=>{k==="loading"&&S()})},"useHighlights");globalThis?.FEATURES?.highlight&&ut?.ready&&ut.ready().then(cS);var og=I(()=>({}),"default"),xa="storybook/measure-addon",JL=`${xa}/tool`,dS="measureEnabled",ZL={RESULT:`${xa}/result`,REQUEST:`${xa}/request`,CLEAR:`${xa}/clear`};function Nl(){let e=H.document.documentElement,t=Math.max(e.scrollHeight,e.offsetHeight);return{width:Math.max(e.scrollWidth,e.offsetWidth),height:t}}I(Nl,"getDocumentWidthAndHeight");function Yg(){let e=H.document.createElement("canvas");e.id="storybook-addon-measure";let t=e.getContext("2d");Sa(t!=null);let{width:r,height:n}=Nl();return Da(e,t,{width:r,height:n}),e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="2147483647",e.style.pointerEvents="none",H.document.body.appendChild(e),{canvas:e,context:t,width:r,height:n}}I(Yg,"createCanvas");function Da(e,t,{width:r,height:n}){e.style.width=`${r}px`,e.style.height=`${n}px`;let o=H.window.devicePixelRatio;e.width=Math.floor(r*o),e.height=Math.floor(n*o),t.scale(o,o)}I(Da,"setCanvasWidthAndHeight");var Ie={};function Kg(){Ie.canvas||(Ie=Yg())}I(Kg,"init");function Ll(){Ie.context&&Ie.context.clearRect(0,0,Ie.width??0,Ie.height??0)}I(Ll,"clear");function Xg(e){Ll(),e(Ie.context)}I(Xg,"draw");function Jg(){Sa(Ie.canvas,"Canvas should exist in the state."),Sa(Ie.context,"Context should exist in the state."),Da(Ie.canvas,Ie.context,{width:0,height:0});let{width:e,height:t}=Nl();Da(Ie.canvas,Ie.context,{width:e,height:t}),Ie.width=e,Ie.height=t}I(Jg,"rescale");function Zg(){Ie.canvas&&(Ll(),Ie.canvas.parentNode?.removeChild(Ie.canvas),Ie={})}I(Zg,"destroy");var ln={margin:"#f6b26b",border:"#ffe599",padding:"#93c47d",content:"#6fa8dc",text:"#232020"},Gt=6;function kl(e,{x:t,y:r,w:n,h:o,r:a}){t=t-n/2,r=r-o/2,n<2*a&&(a=n/2),o<2*a&&(a=o/2),e.beginPath(),e.moveTo(t+a,r),e.arcTo(t+n,r,t+n,r+o,a),e.arcTo(t+n,r+o,t,r+o,a),e.arcTo(t,r+o,t,r,a),e.arcTo(t,r,t+n,r,a),e.closePath()}I(kl,"roundedRect");function Qg(e,{padding:t,border:r,width:n,height:o,top:a,left:i}){let s=n-r.left-r.right-t.left-t.right,l=o-t.top-t.bottom-r.top-r.bottom,u=i+r.left+t.left,d=a+r.top+t.top;return e==="top"?u+=s/2:e==="right"?(u+=s,d+=l/2):e==="bottom"?(u+=s/2,d+=l):e==="left"?d+=l/2:e==="center"&&(u+=s/2,d+=l/2),{x:u,y:d}}I(Qg,"positionCoordinate");function e2(e,t,{margin:r,border:n,padding:o},a,i){let s=I(p=>0,"shift"),l=0,u=0,d=i?1:.5,m=i?a*2:0;return e==="padding"?s=I(p=>o[p]*d+m,"shift"):e==="border"?s=I(p=>o[p]+n[p]*d+m,"shift"):e==="margin"&&(s=I(p=>o[p]+n[p]+r[p]*d+m,"shift")),t==="top"?u=-s("top"):t==="right"?l=s("right"):t==="bottom"?u=s("bottom"):t==="left"&&(l=-s("left")),{offsetX:l,offsetY:u}}I(e2,"offset");function t2(e,t){return Math.abs(e.x-t.x)<Math.abs(e.w+t.w)/2&&Math.abs(e.y-t.y)<Math.abs(e.h+t.h)/2}I(t2,"collide");function r2(e,t,r){return e==="top"?t.y=r.y-r.h-Gt:e==="right"?t.x=r.x+r.w/2+Gt+t.w/2:e==="bottom"?t.y=r.y+r.h+Gt:e==="left"&&(t.x=r.x-r.w/2-Gt-t.w/2),{x:t.x,y:t.y}}I(r2,"overlapAdjustment");function jl(e,t,{x:r,y:n,w:o,h:a},i){return kl(e,{x:r,y:n,w:o,h:a,r:3}),e.fillStyle=`${ln[t]}dd`,e.fill(),e.strokeStyle=ln[t],e.stroke(),e.fillStyle=ln.text,e.fillText(i,r,n),kl(e,{x:r,y:n,w:o,h:a,r:3}),e.fillStyle=`${ln[t]}dd`,e.fill(),e.strokeStyle=ln[t],e.stroke(),e.fillStyle=ln.text,e.fillText(i,r,n),{x:r,y:n,w:o,h:a}}I(jl,"textWithRect");function Ml(e,t){e.font="600 12px monospace",e.textBaseline="middle",e.textAlign="center";let r=e.measureText(t),n=r.actualBoundingBoxAscent+r.actualBoundingBoxDescent,o=r.width+Gt*2,a=n+Gt*2;return{w:o,h:a}}I(Ml,"configureText");function n2(e,t,{type:r,position:n="center",text:o},a,i=!1){let{x:s,y:l}=Qg(n,t),{offsetX:u,offsetY:d}=e2(r,n,t,Gt+1,i);s+=u,l+=d;let{w:m,h:p}=Ml(e,o);if(a&&t2({x:s,y:l,w:m,h:p},a)){let f=r2(n,{x:s,y:l,w:m,h:p},a);s=f.x,l=f.y}return jl(e,r,{x:s,y:l,w:m,h:p},o)}I(n2,"drawLabel");function o2(e,{w:t,h:r}){let n=t*.5+Gt,o=r*.5+Gt;return{offsetX:(e.x==="left"?-1:1)*n,offsetY:(e.y==="top"?-1:1)*o}}I(o2,"floatingOffset");function a2(e,t,{type:r,text:n}){let{floatingAlignment:o,extremities:a}=t,i=a[o.x],s=a[o.y],{w:l,h:u}=Ml(e,n),{offsetX:d,offsetY:m}=o2(o,{w:l,h:u});return i+=d,s+=m,jl(e,r,{x:i,y:s,w:l,h:u},n)}I(a2,"drawFloatingLabel");function cn(e,t,r,n){let o=[];r.forEach((a,i)=>{let s=n&&a.position==="center"?a2(e,t,a):n2(e,t,a,o[i-1],n);o[i]=s})}I(cn,"drawStack");function i2(e,t,r,n){let o=r.reduce((a,i)=>(Object.prototype.hasOwnProperty.call(a,i.position)||(a[i.position]=[]),a[i.position]?.push(i),a),{});o.top&&cn(e,t,o.top,n),o.right&&cn(e,t,o.right,n),o.bottom&&cn(e,t,o.bottom,n),o.left&&cn(e,t,o.left,n),o.center&&cn(e,t,o.center,n)}I(i2,"labelStacks");var Ra={margin:"#f6b26ba8",border:"#ffe599a8",padding:"#93c47d8c",content:"#6fa8dca8"},ag=30;function ct(e){return parseInt(e.rep
Line truncated
|
||||
${e} body {
|
||||
outline: 1px solid #2980b9 !important;
|
||||
}
|
||||
|
||||
${e} article {
|
||||
outline: 1px solid #3498db !important;
|
||||
}
|
||||
|
||||
${e} nav {
|
||||
outline: 1px solid #0088c3 !important;
|
||||
}
|
||||
|
||||
${e} aside {
|
||||
outline: 1px solid #33a0ce !important;
|
||||
}
|
||||
|
||||
${e} section {
|
||||
outline: 1px solid #66b8da !important;
|
||||
}
|
||||
|
||||
${e} header {
|
||||
outline: 1px solid #99cfe7 !important;
|
||||
}
|
||||
|
||||
${e} footer {
|
||||
outline: 1px solid #cce7f3 !important;
|
||||
}
|
||||
|
||||
${e} h1 {
|
||||
outline: 1px solid #162544 !important;
|
||||
}
|
||||
|
||||
${e} h2 {
|
||||
outline: 1px solid #314e6e !important;
|
||||
}
|
||||
|
||||
${e} h3 {
|
||||
outline: 1px solid #3e5e85 !important;
|
||||
}
|
||||
|
||||
${e} h4 {
|
||||
outline: 1px solid #449baf !important;
|
||||
}
|
||||
|
||||
${e} h5 {
|
||||
outline: 1px solid #c7d1cb !important;
|
||||
}
|
||||
|
||||
${e} h6 {
|
||||
outline: 1px solid #4371d0 !important;
|
||||
}
|
||||
|
||||
${e} main {
|
||||
outline: 1px solid #2f4f90 !important;
|
||||
}
|
||||
|
||||
${e} address {
|
||||
outline: 1px solid #1a2c51 !important;
|
||||
}
|
||||
|
||||
${e} div {
|
||||
outline: 1px solid #036cdb !important;
|
||||
}
|
||||
|
||||
${e} p {
|
||||
outline: 1px solid #ac050b !important;
|
||||
}
|
||||
|
||||
${e} hr {
|
||||
outline: 1px solid #ff063f !important;
|
||||
}
|
||||
|
||||
${e} pre {
|
||||
outline: 1px solid #850440 !important;
|
||||
}
|
||||
|
||||
${e} blockquote {
|
||||
outline: 1px solid #f1b8e7 !important;
|
||||
}
|
||||
|
||||
${e} ol {
|
||||
outline: 1px solid #ff050c !important;
|
||||
}
|
||||
|
||||
${e} ul {
|
||||
outline: 1px solid #d90416 !important;
|
||||
}
|
||||
|
||||
${e} li {
|
||||
outline: 1px solid #d90416 !important;
|
||||
}
|
||||
|
||||
${e} dl {
|
||||
outline: 1px solid #fd3427 !important;
|
||||
}
|
||||
|
||||
${e} dt {
|
||||
outline: 1px solid #ff0043 !important;
|
||||
}
|
||||
|
||||
${e} dd {
|
||||
outline: 1px solid #e80174 !important;
|
||||
}
|
||||
|
||||
${e} figure {
|
||||
outline: 1px solid #ff00bb !important;
|
||||
}
|
||||
|
||||
${e} figcaption {
|
||||
outline: 1px solid #bf0032 !important;
|
||||
}
|
||||
|
||||
${e} table {
|
||||
outline: 1px solid #00cc99 !important;
|
||||
}
|
||||
|
||||
${e} caption {
|
||||
outline: 1px solid #37ffc4 !important;
|
||||
}
|
||||
|
||||
${e} thead {
|
||||
outline: 1px solid #98daca !important;
|
||||
}
|
||||
|
||||
${e} tbody {
|
||||
outline: 1px solid #64a7a0 !important;
|
||||
}
|
||||
|
||||
${e} tfoot {
|
||||
outline: 1px solid #22746b !important;
|
||||
}
|
||||
|
||||
${e} tr {
|
||||
outline: 1px solid #86c0b2 !important;
|
||||
}
|
||||
|
||||
${e} th {
|
||||
outline: 1px solid #a1e7d6 !important;
|
||||
}
|
||||
|
||||
${e} td {
|
||||
outline: 1px solid #3f5a54 !important;
|
||||
}
|
||||
|
||||
${e} col {
|
||||
outline: 1px solid #6c9a8f !important;
|
||||
}
|
||||
|
||||
${e} colgroup {
|
||||
outline: 1px solid #6c9a9d !important;
|
||||
}
|
||||
|
||||
${e} button {
|
||||
outline: 1px solid #da8301 !important;
|
||||
}
|
||||
|
||||
${e} datalist {
|
||||
outline: 1px solid #c06000 !important;
|
||||
}
|
||||
|
||||
${e} fieldset {
|
||||
outline: 1px solid #d95100 !important;
|
||||
}
|
||||
|
||||
${e} form {
|
||||
outline: 1px solid #d23600 !important;
|
||||
}
|
||||
|
||||
${e} input {
|
||||
outline: 1px solid #fca600 !important;
|
||||
}
|
||||
|
||||
${e} keygen {
|
||||
outline: 1px solid #b31e00 !important;
|
||||
}
|
||||
|
||||
${e} label {
|
||||
outline: 1px solid #ee8900 !important;
|
||||
}
|
||||
|
||||
${e} legend {
|
||||
outline: 1px solid #de6d00 !important;
|
||||
}
|
||||
|
||||
${e} meter {
|
||||
outline: 1px solid #e8630c !important;
|
||||
}
|
||||
|
||||
${e} optgroup {
|
||||
outline: 1px solid #b33600 !important;
|
||||
}
|
||||
|
||||
${e} option {
|
||||
outline: 1px solid #ff8a00 !important;
|
||||
}
|
||||
|
||||
${e} output {
|
||||
outline: 1px solid #ff9619 !important;
|
||||
}
|
||||
|
||||
${e} progress {
|
||||
outline: 1px solid #e57c00 !important;
|
||||
}
|
||||
|
||||
${e} select {
|
||||
outline: 1px solid #e26e0f !important;
|
||||
}
|
||||
|
||||
${e} textarea {
|
||||
outline: 1px solid #cc5400 !important;
|
||||
}
|
||||
|
||||
${e} details {
|
||||
outline: 1px solid #33848f !important;
|
||||
}
|
||||
|
||||
${e} summary {
|
||||
outline: 1px solid #60a1a6 !important;
|
||||
}
|
||||
|
||||
${e} command {
|
||||
outline: 1px solid #438da1 !important;
|
||||
}
|
||||
|
||||
${e} menu {
|
||||
outline: 1px solid #449da6 !important;
|
||||
}
|
||||
|
||||
${e} del {
|
||||
outline: 1px solid #bf0000 !important;
|
||||
}
|
||||
|
||||
${e} ins {
|
||||
outline: 1px solid #400000 !important;
|
||||
}
|
||||
|
||||
${e} img {
|
||||
outline: 1px solid #22746b !important;
|
||||
}
|
||||
|
||||
${e} iframe {
|
||||
outline: 1px solid #64a7a0 !important;
|
||||
}
|
||||
|
||||
${e} embed {
|
||||
outline: 1px solid #98daca !important;
|
||||
}
|
||||
|
||||
${e} object {
|
||||
outline: 1px solid #00cc99 !important;
|
||||
}
|
||||
|
||||
${e} param {
|
||||
outline: 1px solid #37ffc4 !important;
|
||||
}
|
||||
|
||||
${e} video {
|
||||
outline: 1px solid #6ee866 !important;
|
||||
}
|
||||
|
||||
${e} audio {
|
||||
outline: 1px solid #027353 !important;
|
||||
}
|
||||
|
||||
${e} source {
|
||||
outline: 1px solid #012426 !important;
|
||||
}
|
||||
|
||||
${e} canvas {
|
||||
outline: 1px solid #a2f570 !important;
|
||||
}
|
||||
|
||||
${e} track {
|
||||
outline: 1px solid #59a600 !important;
|
||||
}
|
||||
|
||||
${e} map {
|
||||
outline: 1px solid #7be500 !important;
|
||||
}
|
||||
|
||||
${e} area {
|
||||
outline: 1px solid #305900 !important;
|
||||
}
|
||||
|
||||
${e} a {
|
||||
outline: 1px solid #ff62ab !important;
|
||||
}
|
||||
|
||||
${e} em {
|
||||
outline: 1px solid #800b41 !important;
|
||||
}
|
||||
|
||||
${e} strong {
|
||||
outline: 1px solid #ff1583 !important;
|
||||
}
|
||||
|
||||
${e} i {
|
||||
outline: 1px solid #803156 !important;
|
||||
}
|
||||
|
||||
${e} b {
|
||||
outline: 1px solid #cc1169 !important;
|
||||
}
|
||||
|
||||
${e} u {
|
||||
outline: 1px solid #ff0430 !important;
|
||||
}
|
||||
|
||||
${e} s {
|
||||
outline: 1px solid #f805e3 !important;
|
||||
}
|
||||
|
||||
${e} small {
|
||||
outline: 1px solid #d107b2 !important;
|
||||
}
|
||||
|
||||
${e} abbr {
|
||||
outline: 1px solid #4a0263 !important;
|
||||
}
|
||||
|
||||
${e} q {
|
||||
outline: 1px solid #240018 !important;
|
||||
}
|
||||
|
||||
${e} cite {
|
||||
outline: 1px solid #64003c !important;
|
||||
}
|
||||
|
||||
${e} dfn {
|
||||
outline: 1px solid #b4005a !important;
|
||||
}
|
||||
|
||||
${e} sub {
|
||||
outline: 1px solid #dba0c8 !important;
|
||||
}
|
||||
|
||||
${e} sup {
|
||||
outline: 1px solid #cc0256 !important;
|
||||
}
|
||||
|
||||
${e} time {
|
||||
outline: 1px solid #d6606d !important;
|
||||
}
|
||||
|
||||
${e} code {
|
||||
outline: 1px solid #e04251 !important;
|
||||
}
|
||||
|
||||
${e} kbd {
|
||||
outline: 1px solid #5e001f !important;
|
||||
}
|
||||
|
||||
${e} samp {
|
||||
outline: 1px solid #9c0033 !important;
|
||||
}
|
||||
|
||||
${e} var {
|
||||
outline: 1px solid #d90047 !important;
|
||||
}
|
||||
|
||||
${e} mark {
|
||||
outline: 1px solid #ff0053 !important;
|
||||
}
|
||||
|
||||
${e} bdi {
|
||||
outline: 1px solid #bf3668 !important;
|
||||
}
|
||||
|
||||
${e} bdo {
|
||||
outline: 1px solid #6f1400 !important;
|
||||
}
|
||||
|
||||
${e} ruby {
|
||||
outline: 1px solid #ff7b93 !important;
|
||||
}
|
||||
|
||||
${e} rt {
|
||||
outline: 1px solid #ff2f54 !important;
|
||||
}
|
||||
|
||||
${e} rp {
|
||||
outline: 1px solid #803e49 !important;
|
||||
}
|
||||
|
||||
${e} span {
|
||||
outline: 1px solid #cc2643 !important;
|
||||
}
|
||||
|
||||
${e} br {
|
||||
outline: 1px solid #db687d !important;
|
||||
}
|
||||
|
||||
${e} wbr {
|
||||
outline: 1px solid #db175b !important;
|
||||
}`}I(g2,"outlineCSS");var bS=I((e,t)=>{let r=t.globals||{},n=[!0,"true"].includes(r[f2]),o=t.viewMode==="docs",a=us(()=>g2(o?'[data-story-block="true"]':".sb-show-main"),[t]);return Bt(()=>{let i=o?`addon-outline-docs-${t.id}`:"addon-outline";return n?yS(i,a):lg(i),()=>{lg(i)}},[n,a,t]),e()},"withOutline"),ES=globalThis.FEATURES?.outline?[bS]:[],vS={[f2]:!1},ug=I(()=>({decorators:ES,initialGlobals:vS}),"default"),AS=I(({parameters:e})=>{e?.test?.mockReset===!0?Am():e?.test?.clearMocks===!0?ym():e?.test?.restoreMocks!==!1&&xm()},"resetAllMocksLoader"),Il=I((e,t=0,r)=>{if(t>5||e==null)return e;if(Em(e))return r&&e.mockName(r),e;if(typeof e=="function"&&"isAction"in e&&e.isAction&&!("implicit"in e&&e.implicit)){let n=bm(e);return r&&n.mockName(r),n}if(Array.isArray(e)){t++;for(let n=0;n<e.length;n++)Object.getOwnPropertyDescriptor(e,n)?.writable&&(e[n]=Il(e[n],t));return e}if(typeof e=="object"&&e.constructor===Object){t++;for(let[n,o]of Object.entries(e))Object.getOwnPropertyDescriptor(e,n)?.writable&&(e[n]=Il(o,t,n));return e}return e},"traverseArgs"),xS=I(({initialArgs:e})=>{Il(e)},"nameSpiesAndWrapActionsInSpies"),cg=!1,wS=I(async e=>{globalThis.HTMLElement&&e.canvasElement instanceof globalThis.HTMLElement&&(e.canvas=Sm(e.canvasElement));let t=globalThis.window?.navigator?.clipboard;if(t){e.userEvent=Vn({userEvent:wm.setup()},{intercept:!0}).userEvent,Object.defineProperty(globalThis.window.navigator,"clipboard",{get:I(()=>t,"get"),configurable:!0});let r=HTMLElement.prototype.focus;cg||Object.defineProperties(HTMLElement.prototype,{focus:{configurable:!0,set:I(n=>{r=n,cg=!0},"set"),get:I(()=>r,"get")}})}},"enhanceContext"),dg=I(()=>({loaders:[AS,xS,wS]}),"default"),y2="storybook/viewport",SS="viewport",c8=`${y2}/panel`,d8=`${y2}/tool`,CS={[SS]:{value:void 0,isRotated:!1}},pg=I(()=>({initialGlobals:CS}),"default");function Qr(){return[(sg.default??sg)(),(Kf.default??Kf)(),(og.default??og)(),(ug.default??ug)(),(pg.default??pg)(),(zf.default??zf)(),(Xf.default??Xf)(),(dg.default??dg)()]}I(Qr,"getCoreAnnotations");function DS(e){let t,r={_tag:"Preview",input:e,get composed(){if(t)return t;let{addons:n,...o}=e;return t=Bl(_l([...Qr(),...n??[],o])),t},meta(n){return b2(n,this)}};return globalThis.globalProjectAnnotations=r.composed,r}I(DS,"definePreview");function Wt(e){return e}I(Wt,"definePreviewAddon");function TS(e){return e!=null&&typeof e=="object"&&"_tag"in e&&e?._tag==="Preview"}I(TS,"isPreview");function kS(e){return e!=null&&typeof e=="object"&&"_tag"in e&&e?._tag==="Meta"}I(kS,"isMeta");function b2(e,t){return{_tag:"Meta",input:e,preview:t,get composed(){throw new Error("Not implemented")},story(r={}){return $l(typeof r=="function"?{render:r}:r,this)}}}I(b2,"defineMeta");function Ar(e){return e!=null&&typeof e=="object"&&"_tag"in e&&e?._tag==="Story"}I(Ar,"isStory");function $l(e,t){let r,n=I(()=>(r||(r=Ug(e,t.input,void 0,t.preview.composed)),r),"compose");return{_tag:"Story",input:e,meta:t,__compose:n,get composed(){let o=n(),{args:a,argTypes:i,parameters:s,id:l,tags:u,globals:d,storyName:m}=o;return{args:a,argTypes:i,parameters:s,id:l,tags:u,name:m,globals:d}},get play(){return e.play??t.input?.play??(async()=>{})},get run(){return n().run??(async()=>{})},extend(o){return $l({...this.input,...o,args:{...this.input.args,...o.args},argTypes:lr(this.input.argTypes,o.argTypes),afterEach:[...oe(this.input?.afterEach??[]),...oe(o.afterEach??[])],beforeEach:[...oe(this.input?.beforeEach??[]),...oe(o.beforeEach??[])],decorators:[...oe(this.input?.decorators??[]),...oe(o.decorators??[])],globals:{...this.input.globals,...o.globals},loaders:[...oe(this.input?.loaders??[]),...oe(o.loaders??[])],parameters:lr(this.input.parameters,o.parameters),tags:en(...this.input.tags??[],...o.tags??[])},this.meta)}}}I($l,"defineStory");var Nn=I(e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),"sanitize"),mg=I((e,t)=>{let r=Nn(e);if(r==="")throw new Error(`Invalid ${t} '${e}', must include alphanumeric characters`);return r},"sanitizeSafe"),Xo=I((e,t)=>`${mg(e,"kind")}${t?`--${mg(t,"name")}`:""}`,"toId"),Jo=I(e=>fg(e),"storyNameFromExport");function Rl(e,t){return Array.isArray(t)?t.includes(e):e.match(t)}I(Rl,"matches");function Xr(e,{includeStories:t,excludeStories:r}){return e!=="__esModule"&&(!t||Rl(e,t))&&(!r||!Rl(e,r))}I(Xr,"isExportStory");var p8=I((e,{rootSeparator:t,groupSeparator:r})=>{let[n,o]=e.split(t,2),a=(o||e).split(r).filter(i=>!!i);return{root:o?n:null,groups:a}},"parseKind"),en=I((...e)=>{let t=e.reduce((r,n)=>(n.startsWith("!")?r.delete(n.slice(1)):r.add(n),r),new Set);return Array.from(t)},"combineTags");J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();J();var OS=Object.create,ci=Object.defineProperty,IS=Object.getOwnPropertyDescriptor,RS=Object.getOwnPropertyNames,BS=Object.getPrototypeOf,_S=Object.pr
Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M=!0,q=!1,V;return{s:h(function(){D=D.call(v)},"s"),n:h(function(){var G=D.next();return M=G.done,G},"n"),e:h(function(G){q=!0,V=G},"e"),f:h(function(){try{!M&&D.return!=null&&D.return()}finally{if(q)throw V}},"f")}}h(a,"_createForOfIteratorHelper");function i(v,A){if(v){if(typeof v=="string")return s(v,A);var D=Object.prototype.toString.call(v).slice(8,-1);if(D==="Object"&&v.constructor&&(D=v.constructor.name),D==="Map"||D==="Set")return Array.from(v);if(D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D))return s(v,A)}}h(i,"_unsupportedIterableToArray");function s(v,A){(A==null||A>v.length)&&(A=v.length);for(var D=0,N=new Array(A);D<A;D++)N[D]=v[D];return N}h(s,"_arrayLikeToArray");var l=mC(),u={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:d()};function d(){var v={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return x(0,5).forEach(function(A){x(0,5).forEach(function(D){x(0,5).forEach(function(N){return m(A,D,N,v)})})}),x(0,23).forEach(function(A){var D=A+232,N=p(A*10+8);v[D]="#"+N+N+N}),v}h(d,"getDefaultColors");function m(v,A,D,N){var F=16+v*36+A*6+D,M=v>0?v*40+55:0,q=A>0?A*40+55:0,V=D>0?D*40+55:0;N[F]=f([M,q,V])}h(m,"setStyleColor");function p(v){for(var A=v.toString(16);A.length<2;)A="0"+A;return A}h(p,"toHexString");function f(v){var A=[],D=a(v),N;try{for(D.s();!(N=D.n()).done;){var F=N.value;A.push(p(F))}}catch(M){D.e(M)}finally{D.f()}return"#"+A.join("")}h(f,"toColorHexString");function g(v,A,D,N){var F;return A==="text"?F=_(D,N):A==="display"?F=E(v,D,N):A==="xterm256Foreground"?F=B(v,N.colors[D]):A==="xterm256Background"?F=P(v,N.colors[D]):A==="rgb"&&(F=y(v,D)),F}h(g,"generateOutput");function y(v,A){A=A.substring(2).slice(0,-1);var D=+A.substr(0,2),N=A.substring(5).split(";"),F=N.map(function(M){return("0"+Number(M).toString(16)).substr(-2)}).join("");return k(v,(D===38?"color:#":"background-color:#")+F)}h(y,"handleRgb");function E(v,A,D){A=parseInt(A,10);var N={"-1":h(function(){return"<br/>"},"_"),0:h(function(){return v.length&&b(v)},"_"),1:h(function(){return O(v,"b")},"_"),3:h(function(){return O(v,"i")},"_"),4:h(function(){return O(v,"u")},"_"),8:h(function(){return k(v,"display:none")},"_"),9:h(function(){return O(v,"strike")},"_"),22:h(function(){return k(v,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:h(function(){return L(v,"i")},"_"),24:h(function(){return L(v,"u")},"_"),39:h(function(){return B(v,D.fg)},"_"),49:h(function(){return P(v,D.bg)},"_"),53:h(function(){return k(v,"text-decoration:overline")},"_")},F;return N[A]?F=N[A]():4<A&&A<7?F=O(v,"blink"):29<A&&A<38?F=B(v,D.colors[A-30]):39<A&&A<48?F=P(v,D.colors[A-40]):89<A&&A<98?F=B(v,D.colors[8+(A-90)]):99<A&&A<108&&(F=P(v,D.colors[8+(A-100)])),F}h(E,"handleDisplay");function b(v){var A=v.slice(0);return v.length=0,A.reverse().map(function(D){return"</"+D+">"}).join("")}h(b,"resetStyles");function x(v,A){for(var D=[],N=v;N<=A;N++)D.push(N);return D}h(x,"range");function S(v){return function(A){return(v===null||A.category!==v)&&v!=="all"}}h(S,"notCategory");function T(v){v=parseInt(v,10);var A=null;return v===0?A="all":v===1?A="bold":2<v&&v<5?A="underline":4<v&&v<7?A="blink":v===8?A="hide":v===9?A="strike":29<v&&v<38||v===39||89<v&&v<98?A="foreground-color":(39<v&&v<48||v===49||99<v&&v<108)&&(A="background-color"),A}h(T,"categoryForCode");function _(v,A){return A.escapeXML?l.encodeXML(v):v}h(_,"pushText");function O(v,A,D){return D||(D=""),v.push(A),"<".concat(A).concat(D?' style="'.concat(D,'"'):"",">")}h(O,"pushTag");function k(v,A){return O(v,"span",A)}h(k,"pushStyle");function B(v,A){return O(v,"span","color:"+A)}h(B,"pushForegroundColor");function P(v,A){return O(v,"span","background-color:"+A)}h(P,"pushBackgroundColor");function L(v,A){var D;if(v.slice(-1)[0]===A&&(D=v.pop()),D)return"</"+A+">"}h(L,"closeTag");function j(v,A,D){var N=!1,F=3;function M(){return""}h(M,"remove");function q(me,ue){return D("xterm256Foreground",ue),""}h(q,"removeXterm256Foreground");function V(me,ue){return D("xterm256Background",ue),""}h(V,"removeXterm256Background");function G(me){return A.newline?D("display",-1):D("text",me),""}h(G,"newline");function se(me,ue){N=!0,ue.trim().length===0&&(ue="0"),ue=ue.trimRight(";").split(";");var ht=a(ue),Sn;try{for(ht.s();!(Sn=ht.n()).done;){var Ei=Sn.value;D("display",Ei)}}catch(vi){ht.e(vi)}finally{ht.f()}return""}h(se,"ansiMess");function pe(me){return D("text",me),""}h(pe,"realText");function ae(me){return D("rgb",me),""}h(ae,"rgb");var we=[{pattern:/^\x08+/,sub:M},{pattern:/^\x1b\[[012]?K/,sub:M},{pattern:/^\x1b\[\(B/,sub:M},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:ae},{pattern:/^\x1b\[38;5;(\d+)m/,sub:q},{pattern:/^\x1b\[48;5;(\d+)m/,sub:V},{pattern:/^\n/,sub:G},{pattern:/^\r+\n/,sub:G},{pattern:/^\r/,sub:G},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:se},{patt
Line truncated
|
||||
|
||||
`,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).
|
||||
|
||||
`,3:`Passed an incorrect argument to a color function, please pass a string representation of a color.
|
||||
|
||||
`,4:`Couldn't generate valid rgb string from %s, it returned %s.
|
||||
|
||||
`,5:`Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
|
||||
|
||||
`,6:`Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).
|
||||
|
||||
`,7:`Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).
|
||||
|
||||
`,8:`Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
|
||||
|
||||
`,9:`Please provide a number of steps to the modularScale helper.
|
||||
|
||||
`,10:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
|
||||
|
||||
`,11:`Invalid value passed as base to modularScale, expected number or em string but got "%s"
|
||||
|
||||
`,12:`Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
|
||||
|
||||
`,13:`Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
|
||||
|
||||
`,14:`Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
|
||||
|
||||
`,15:`Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
|
||||
|
||||
`,16:`You must provide a template to this method.
|
||||
|
||||
`,17:`You passed an unsupported selector state to this method.
|
||||
|
||||
`,18:`minScreen and maxScreen must be provided as stringified numbers with the same units.
|
||||
|
||||
`,19:`fromSize and toSize must be provided as stringified numbers with the same units.
|
||||
|
||||
`,20:`expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
|
||||
|
||||
`,21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:`fontFace expects a name of a font-family.
|
||||
|
||||
`,24:`fontFace expects either the path to the font file(s) or a name of a local copy.
|
||||
|
||||
`,25:`fontFace expects localFonts to be an array.
|
||||
|
||||
`,26:`fontFace expects fileFormats to be an array.
|
||||
|
||||
`,27:`radialGradient requries at least 2 color-stops to properly render.
|
||||
|
||||
`,28:`Please supply a filename to retinaImage() as the first argument.
|
||||
|
||||
`,29:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
|
||||
|
||||
`,30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
|
||||
|
||||
`,32:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
|
||||
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
|
||||
|
||||
`,33:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
|
||||
|
||||
`,34:`borderRadius expects a radius value as a string or number as the second argument.
|
||||
|
||||
`,35:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
|
||||
|
||||
`,36:`Property must be a string value.
|
||||
|
||||
`,37:`Syntax Error at %s.
|
||||
|
||||
`,38:`Formula contains a function that needs parentheses at %s.
|
||||
|
||||
`,39:`Formula is missing closing parenthesis at %s.
|
||||
|
||||
`,40:`Formula has too many closing parentheses at %s.
|
||||
|
||||
`,41:`All values in a formula must have the same unit or be unitless.
|
||||
|
||||
`,42:`Please provide a number of steps to the modularScale helper.
|
||||
|
||||
`,43:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
|
||||
|
||||
`,44:`Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
|
||||
|
||||
`,45:`Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
|
||||
|
||||
`,46:`Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
|
||||
|
||||
`,47:`minScreen and maxScreen must be provided as stringified numbers with the same units.
|
||||
|
||||
`,48:`fromSize and toSize must be provided as stringified numbers with the same units.
|
||||
|
||||
`,49:`Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
|
||||
|
||||
`,50:`Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
|
||||
|
||||
`,51:`Expects the first argument object to have the properties prop, fromSize, and toSize.
|
||||
|
||||
`,52:`fontFace expects either the path to the font file(s) or a name of a local copy.
|
||||
|
||||
`,53:`fontFace expects localFonts to be an array.
|
||||
|
||||
`,54:`fontFace expects fileFormats to be an array.
|
||||
|
||||
`,55:`fontFace expects a name of a font-family.
|
||||
|
||||
`,56:`linearGradient requries at least 2 color-stops to properly render.
|
||||
|
||||
`,57:`radialGradient requries at least 2 color-stops to properly render.
|
||||
|
||||
`,58:`Please supply a filename to retinaImage() as the first argument.
|
||||
|
||||
`,59:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
|
||||
|
||||
`,60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:`Property must be a string value.
|
||||
|
||||
`,62:`borderRadius expects a radius value as a string or number as the second argument.
|
||||
|
||||
`,63:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
|
||||
|
||||
`,64:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
|
||||
|
||||
`,65:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').
|
||||
|
||||
`,66:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
|
||||
|
||||
`,67:`You must provide a template to this method.
|
||||
|
||||
`,68:`You passed an unsupported selector state to this method.
|
||||
|
||||
`,69:`Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
|
||||
|
||||
`,70:`Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
|
||||
|
||||
`,71:`Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
|
||||
|
||||
`,72:`Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
|
||||
|
||||
`,73:`Please provide a valid CSS variable.
|
||||
|
||||
`,74:`CSS variable not found and no default was provided.
|
||||
|
||||
`,75:`important requires a valid style object, got a %s instead.
|
||||
|
||||
`,76:`fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
|
||||
|
||||
`,77:`remToPx expects a value in "rem" but you provided it in "%s".
|
||||
|
||||
`,78:`base must be set in "px" or "%" but you set it in "%s".
|
||||
`};function Vy(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=[],a;for(a=1;a<t.length;a+=1)o.push(t[a]);return o.forEach(function(i){n=n.replace(/%[a-z]/,i)}),n}h(Vy,"format");var at=function(e){qy(t,e);function t(r){for(var n,o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return n=e.call(this,Vy.apply(void 0,[CC[r]].concat(a)))||this,$y(n)}return h(t,"PolishedError"),t}(ni(Error));function Eu(e,t){return e.substr(-t.length)===t}h(Eu,"endsWith");var DC=/^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;function vu(e){if(typeof e!="string")return e;var t=e.match(DC);return t?parseFloat(e):e}h(vu,"stripUnit");var TC=h(function(e){return function(t,r){r===void 0&&(r="16px");var n=t,o=r;if(typeof t=="string"){if(!Eu(t,"px"))throw new at(69,e,t);n=vu(t)}if(typeof r=="string"){if(!Eu(r,"px"))throw new at(70,e,r);o=vu(r)}if(typeof n=="string")throw new at(71,t,e);if(typeof o=="string")throw new at(72,r,e);return""+n/o+e}},"pxtoFactory"),zy=TC,M8=zy("em"),$8=zy("rem");function Ya(e){return Math.round(e*255)}h(Ya,"colorToInt");function Gy(e,t,r){return Ya(e)+","+Ya(t)+","+Ya(r)}h(Gy,"convertToInt");function xn(e,t,r,n){if(n===void 0&&(n=Gy),t===0)return n(r,r,r);var o=(e%360+360)%360/60,a=(1-Math.abs(2*r-1))*t,i=a*(1-Math.abs(o%2-1)),s=0,l=0,u=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,u=i):o>=3&&o<4?(l=i,u=a):o>=4&&o<5?(s=i,u=a):o>=5&&o<6&&(s=a,u=i);var d=r-a/2,m=s+d,p=l+d,f=u+d;return n(m,p,f)}h(xn,"hslToRgb");var o0={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function Wy(e){if(typeof e!="string")return e;var t=e.toLowerCase();return o0[t]?"#"+o0[t]:e}h(Wy,"nameToHex");var kC=/^#[a-fA-F0-9]{6}$/,OC=/^#[a-fA-F0-9]{8}$/,IC=/^#[a-fA-F0-9]{3}$/,RC=/^#[a-fA-F0-9]{4}$/,ru=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,BC=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,_C=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,FC=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Rr(e){if(typeof e!="string")throw new at(3);var t=
Line truncated
|
||||
`).match(o),m=!1;return{items:d.map(function(p,f){let g=a.exec(p)[0].length,y=new RegExp("^ {1,"+g+"}","gm"),E=p.replace(y,"").replace(a,""),b=f===d.length-1,x=E.indexOf(`
|
||||
|
||||
`)!==-1||b&&m;m=x;let S=l.inline,T=l.list,_;l.list=!0,x?(l.inline=!1,_=wn(E)+`
|
||||
|
||||
`):(l.inline=!0,_=wn(E));let O=s(_,l);return l.inline=S,l.list=T,O}),ordered:r,start:u}},render:h((i,s,l)=>e(i.ordered?"ol":"ul",{key:l.key,start:i.type===K.orderedList?i.start:void 0},i.items.map(function(u,d){return e("li",{key:d},s(u,l))})),"render")}}h(Su,"Ce");var tD=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),rD=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Db=[hb,fb,gb,yb,Eb,bb,Ab,Sb,Cb],nD=[...Db,/^[^\n]+(?: \n|\n{2,})/,xu,vb,wu];function wn(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}h(wn,"ze");function yn(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}h(yn,"Le");function Tb(e){return $5.test(e)?"right":j5.test(e)?"center":M5.test(e)?"left":null}h(Tb,"Ae");function Cu(e,t,r,n){let o=r.inTable;r.inTable=!0;let a=[[]],i="";function s(){if(!i)return;let l=a[a.length-1];l.push.apply(l,t(i,r)),i=""}return h(s,"a"),e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,u,d)=>{l.trim()==="|"&&(s(),n)?u!==0&&u!==d.length-1&&a.push([]):i+=l}),s(),r.inTable=o,a}h(Cu,"Oe");function kb(e,t,r){r.inline=!0;let n=e[2]?e[2].replace(L5,"").split("|").map(Tb):[],o=e[3]?function(i,s,l){return i.trim().split(`
|
||||
`).map(function(u){return Cu(u,s,l,!0)})}(e[3],t,r):[],a=Cu(e[1],t,r,!!o.length);return r.inline=!1,o.length?{align:n,cells:o,header:a,type:K.table}:{children:a,type:K.paragraph}}h(kb,"Te");function Du(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}h(Du,"Be");function Br(e){return e.inline=1,e}h(Br,"Me");function Yt(e){return Br(function(t,r){return r.inline?e.exec(t):null})}h(Yt,"Re");function Kt(e){return Br(function(t,r){return r.inline||r.simple?e.exec(t):null})}h(Kt,"Ie");function Ft(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}h(Ft,"De");function bn(e){return Br(function(t){return e.exec(t)})}h(bn,"Ue");function Ob(e,t){if(t.inline||t.simple)return null;let r="";e.split(`
|
||||
`).every(o=>(o+=`
|
||||
`,!Db.some(a=>a.test(o))&&(r+=o,!!o.trim())));let n=wn(r);return n==""?null:[r,,n]}h(Ob,"Ne");var oD=/(javascript|vbscript|data(?!:image)):/i;function Ib(e){try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(oD.test(t))return null}catch{return null}return e}h(Ib,"He");function Tu(e){return e.replace(K5,"$1")}h(Tu,"Pe");function eo(e,t,r){let n=r.inline||!1,o=r.simple||!1;r.inline=!0,r.simple=!0;let a=e(t,r);return r.inline=n,r.simple=o,a}h(eo,"_e");function Rb(e,t,r){let n=r.inline||!1,o=r.simple||!1;r.inline=!1,r.simple=!0;let a=e(t,r);return r.inline=n,r.simple=o,a}h(Rb,"Fe");function Bb(e,t,r){let n=r.inline||!1;r.inline=!1;let o=e(t,r);return r.inline=n,o}h(Bb,"We");var nu=h((e,t,r)=>({children:eo(t,e[2],r)}),"Ge");function Xa(){return{}}h(Xa,"Ze");function Ja(){return null}h(Ja,"qe");function _b(...e){return e.filter(Boolean).join(" ")}h(_b,"Qe");function Za(e,t,r){let n=e,o=t.split(".");for(;o.length&&(n=n[o[0]],n!==void 0);)o.shift();return n||r}h(Za,"Ve");function Fb(e="",t={}){function r(p,f,...g){let y=Za(t.overrides,`${p}.props`,{});return t.createElement(function(E,b){let x=Za(b,E);return x?typeof x=="function"||typeof x=="object"&&"render"in x?x:Za(b,`${E}.component`,E):E}(p,t.overrides),mr({},f,y,{className:_b(f?.className,y.className)||void 0}),...g)}h(r,"u");function n(p){p=p.replace(w5,"");let f=!1;t.forceInline?f=!0:t.forceBlock||(f=P5.test(p)===!1);let g=u(l(f?p:`${wn(p).replace(W5,"")}
|
||||
|
||||
`,{inline:f}));for(;typeof g[g.length-1]=="string"&&!g[g.length-1].trim();)g.pop();if(t.wrapper===null)return g;let y=t.wrapper||(f?"span":"div"),E;if(g.length>1||t.forceWrapper)E=g;else{if(g.length===1)return E=g[0],typeof E=="string"?r("span",{key:"outer"},E):E;E=null}return t.createElement(y,{key:"outer"},E)}h(n,"Z");function o(p,f){let g=f.match(c5);return g?g.reduce(function(y,E){let b=E.indexOf("=");if(b!==-1){let x=function(O){return O.indexOf("-")!==-1&&O.match(D5)===null&&(O=O.replace(R5,function(k,B){return B.toUpperCase()})),O}(E.slice(0,b)).trim(),S=function(O){let k=O[0];return(k==='"'||k==="'")&&O.length>=2&&O[O.length-1]===k?O.slice(1,-1):O}(E.slice(b+1).trim()),T=s0[x]||x;if(T==="ref")return y;let _=y[T]=function(O,k,B,P){return k==="style"?function(L){let j=[],U="",$=!1,v=!1,A="";if(!L)return j;for(let N=0;N<L.length;N++){let F=L[N];if(F!=='"'&&F!=="'"||$||(v?F===A&&(v=!1,A=""):(v=!0,A=F)),F==="("&&U.endsWith("url")?$=!0:F===")"&&$&&($=!1),F!==";"||v||$)U+=F;else{let M=U.trim();if(M){let q=M.indexOf(":");if(q>0){let V=M.slice(0,q).trim(),G=M.slice(q+1).trim();j.push([V,G])}}U=""}}let D=U.trim();if(D){let N=D.indexOf(":");if(N>0){let F=D.slice(0,N).trim(),M=D.slice(N+1).trim();j.push([F,M])}}return j}(B).reduce(function(L,[j,U]){return L[j.replace(/(-[a-z])/g,$=>$[1].toUpperCase())]=P(U,O,j),L},{}):u5.indexOf(k)!==-1?P(B,O,k):(B.match(T5)&&(B=B.slice(1,B.length-1)),B==="true"||B!=="false"&&B)}(p,x,S,t.sanitizer);typeof _=="string"&&(xu.test(_)||wu.test(_))&&(y[T]=n(_.trim()))}else E!=="style"&&(y[s0[E]||E]=!0);return y},{}):null}h(o,"q"),t.overrides=t.overrides||{},t.sanitizer=t.sanitizer||Ib,t.slugify=t.slugify||yn,t.namedCodesToUnicode=t.namedCodesToUnicode?mr({},l0,t.namedCodesToUnicode):l0,t.createElement=t.createElement||Y;let a=[],i={},s={[K.blockQuote]:{match:Ft(hb),order:1,parse(p,f,g){let[,y,E]=p[0].replace(m5,"").match(h5);return{alert:y,children:f(E,g)}},render(p,f,g){let y={key:g.key};return p.alert&&(y.className="markdown-alert-"+t.slugify(p.alert.toLowerCase(),yn),p.children.unshift({attrs:{},children:[{type:K.text,text:p.alert}],noInnerParse:!0,type:K.htmlBlock,tag:"header"})),r("blockquote",y,f(p.children,g))}},[K.breakLine]:{match:bn(f5),order:1,parse:Xa,render:h((p,f,g)=>r("br",{key:g.key}),"render")},[K.breakThematic]:{match:Ft(g5),order:1,parse:Xa,render:h((p,f,g)=>r("hr",{key:g.key}),"render")},[K.codeBlock]:{match:Ft(gb),order:0,parse:h(p=>({lang:void 0,text:wn(p[0].replace(/^ {4}/gm,"")).replace(u0,"$1")}),"parse"),render:h((p,f,g)=>r("pre",{key:g.key},r("code",mr({},p.attrs,{className:p.lang?`lang-${p.lang}`:""}),p.text)),"render")},[K.codeFenced]:{match:Ft(fb),order:0,parse:h(p=>({attrs:o("code",p[3]||""),lang:p[2]||void 0,text:p[4],type:K.codeBlock}),"parse")},[K.codeInline]:{match:Kt(y5),order:3,parse:h(p=>({text:p[2].replace(u0,"$1")}),"parse"),render:h((p,f,g)=>r("code",{key:g.key},p.text),"render")},[K.footnote]:{match:Ft(v5),order:0,parse:h(p=>(a.push({footnote:p[2],identifier:p[1]}),{}),"parse"),render:Ja},[K.footnoteReference]:{match:Yt(A5),order:1,parse:h(p=>({target:`#${t.slugify(p[1],yn)}`,text:p[1]}),"parse"),render:h((p,f,g)=>r("a",{key:g.key,href:t.sanitizer(p.target,"a","href")},r("sup",{key:g.key},p.text)),"render")},[K.gfmTask]:{match:Yt(S5),order:1,parse:h(p=>({completed:p[1].toLowerCase()==="x"}),"parse"),render:h((p,f,g)=>r("input",{checked:p.completed,key:g.key,readOnly:!0,type:"checkbox"}),"render")},[K.heading]:{match:Ft(t.enforceAtxHeadings?bb:yb),order:1,parse:h((p,f,g)=>({children:eo(f,p[2],g),id:t.slugify(p[2],yn),level:p[1].length}),"parse"),render:h((p,f,g)=>r(`h${p.level}`,{id:p.id,key:g.key},f(p.children,g)),"render")},[K.headingSetext]:{match:Ft(Eb),order:0,parse:h((p,f,g)=>({children:eo(f,p[1],g),level:p[2]==="="?1:2,type:K.heading}),"parse")},[K.htmlBlock]:{match:bn(xu),order:1,parse(p,f,g){let[,y]=p[3].match(Y5),E=new RegExp(`^${y}`,"gm"),b=p[3].replace(E,""),x=(S=b,nD.some(B=>B.test(S))?Bb:eo);var S;let T=p[1].toLowerCase(),_=l5.indexOf(T)!==-1,O=(_?T:p[1]).trim(),k={attrs:o(O,p[2]),noInnerParse:_,tag:O};return g.inAnchor=g.inAnchor||T==="a",_?k.text=p[3]:k.children=x(f,b,g),g.inAnchor=!1,k},render:h((p,f,g)=>r(p.tag,mr({key:g.key},p.attrs),p.text||(p.children?f(p.children,g):"")),"render")},[K.htmlSelfClosing]:{match:bn(wu),order:1,parse(p){let f=p[1].trim();return{attrs:o(f,p[2]||""),tag:f}},render:h((p,f,g)=>r(p.tag,mr({},p.attrs,{key:g.key})),"render")},[K.htmlComment]:{match:bn(vb),order:1,parse:h(()=>({}),"parse"),render:Ja},[K.image]:{match:Kt(rD),order:1,parse:h(p=>({alt:p[1],target:Tu(p[2]),title:p[3]}),"parse"),render:h((p,f,g)=>r("img",{key:g.key,alt:p.alt||void 0,title:p.title||void 0,src:t.sanitizer(p.target,"img","src")}),"render")},[K.link]:{match:Yt(tD),order:3,parse:h((p,f,g)=>({children:Rb(f,p[1],g),target:Tu(p[2]),title:p[3]}),"parse"),render:h((p,f,g)=>r("a",{key:g.key,href:t.sanitizer(p.target,"a","href"),title:p.title},f(p.children,g)),"render")},[K.linkAngleBraceStyleDetector]:{match:Yt(I5),order:0,parse:h(p
Line truncated
|
||||
`,"render")},[K.paragraph]:{match:Br(Ob),order:3,parse:nu,render:h((p,f,g)=>r("p",{key:g.key},f(p.children,g)),"render")},[K.ref]:{match:Yt(B5),order:0,parse:h(p=>(i[p[1]]={target:p[2],title:p[4]},{}),"parse"),render:Ja},[K.refImage]:{match:Kt(_5),order:0,parse:h(p=>({alt:p[1]||void 0,ref:p[2]}),"parse"),render:h((p,f,g)=>i[p.ref]?r("img",{key:g.key,alt:p.alt,src:t.sanitizer(i[p.ref].target,"img","src"),title:i[p.ref].title}):null,"render")},[K.refLink]:{match:Yt(F5),order:0,parse:h((p,f,g)=>({children:f(p[1],g),fallbackChildren:p[0],ref:p[2]}),"parse"),render:h((p,f,g)=>i[p.ref]?r("a",{key:g.key,href:t.sanitizer(i[p.ref].target,"a","href"),title:i[p.ref].title},f(p.children,g)):r("span",{key:g.key},p.fallbackChildren),"render")},[K.table]:{match:Ft(Ab),order:1,parse:kb,render(p,f,g){let y=p;return r("table",{key:g.key},r("thead",null,r("tr",null,y.header.map(function(E,b){return r("th",{key:b,style:Du(y,b)},f(E,g))}))),r("tbody",null,y.cells.map(function(E,b){return r("tr",{key:b},E.map(function(x,S){return r("td",{key:S,style:Du(y,S)},f(x,g))}))})))}},[K.text]:{match:bn(G5),order:4,parse:h(p=>({text:p[0].replace(C5,(f,g)=>t.namedCodesToUnicode[g]?t.namedCodesToUnicode[g]:f)}),"parse"),render:h(p=>p.text,"render")},[K.textBolded]:{match:Kt(q5),order:2,parse:h((p,f,g)=>({children:f(p[2],g)}),"parse"),render:h((p,f,g)=>r("strong",{key:g.key},f(p.children,g)),"render")},[K.textEmphasized]:{match:Kt(U5),order:3,parse:h((p,f,g)=>({children:f(p[2],g)}),"parse"),render:h((p,f,g)=>r("em",{key:g.key},f(p.children,g)),"render")},[K.textEscaped]:{match:Kt(z5),order:1,parse:h(p=>({text:p[1],type:K.text}),"parse")},[K.textMarked]:{match:Kt(H5),order:3,parse:nu,render:h((p,f,g)=>r("mark",{key:g.key},f(p.children,g)),"render")},[K.textStrikethroughed]:{match:Kt(V5),order:3,parse:nu,render:h((p,f,g)=>r("del",{key:g.key},f(p.children,g)),"render")}};t.disableParsingRawHTML===!0&&(delete s[K.htmlBlock],delete s[K.htmlSelfClosing]);let l=function(p){let f=Object.keys(p);function g(y,E){let b,x,S=[],T="",_="";for(E.prevCapture=E.prevCapture||"";y;){let O=0;for(;O<f.length;){if(T=f[O],b=p[T],E.inline&&!b.match.inline){O++;continue}let k=b.match(y,E);if(k){_=k[0],E.prevCapture+=_,y=y.substring(_.length),x=b.parse(k,g,E),x.type==null&&(x.type=T),S.push(x);break}O++}}return E.prevCapture="",S}return h(g,"n"),f.sort(function(y,E){let b=p[y].order,x=p[E].order;return b!==x?b-x:y<E?-1:1}),function(y,E){return g(function(b){return b.replace(E5,`
|
||||
`).replace(x5,"").replace(N5," ")}(y),E)}}(s),u=(d=function(p,f){return function(g,y,E){let b=p[g.type].render;return f?f(()=>b(g,y,E),g,y,E):b(g,y,E)}}(s,t.renderRule),h(function p(f,g={}){if(Array.isArray(f)){let y=g.key,E=[],b=!1;for(let x=0;x<f.length;x++){g.key=x;let S=p(f[x],g),T=typeof S=="string";T&&b?E[E.length-1]+=S:S!==null&&E.push(S),b=T}return g.key=y,E}return d(f,p,g)},"e"));var d;let m=n(e);return a.length?r("div",null,m,r("footer",{key:"footer"},a.map(function(p){return r("div",{id:t.slugify(p.identifier,yn),key:p.identifier},p.identifier,u(l(p.footnote,{inline:!0})))}))):m}h(Fb,"Xe");var aD=h(e=>{let{children:t="",options:r}=e,n=function(o,a){if(o==null)return{};var i,s,l={},u=Object.keys(o);for(s=0;s<u.length;s++)a.indexOf(i=u[s])>=0||(l[i]=o[i]);return l}(e,s5);return Pe(Fb(t,r),n)},"default");Ot();var iD=R.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`},"@media (forced-colors: active)":{"&:focus":{outline:"1px solid highlight"}}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:de(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${Zn(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${Zn(.05,e.appBorderColor)} 0 0 0 2px inset`,color:Zn(1,e.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:e.boolean.selectedBackground,boxShadow:e.base==="light"?`${Zn(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px","@media (forced-colors: active)":{textDecoration:"underline"}}})),sD=h(e=>e==="true","parse"),lD=h(({name:e,value:t,onChange:r,onBlur:n,onFocus:o,argType:a})=>{let i=Q(()=>r(!1),[r]),s=!!a?.table?.readonly;if(t===void 0)return c.createElement(Je,{variant:"outline",size:"medium",id:so(e),onClick:i,disabled:s},"Set boolean");let l=mt(e),u=typeof t=="string"?sD(t):t;return c.createElement(iD,{"aria-disabled":s,htmlFor:l,"aria-label":e},c.createElement("input",{id:l,type:"checkbox",onChange:d=>r(d.target.checked),checked:u,role:"switch",disabled:s,name:e,onBlur:n,onFocus:o}),c.createElement("span",{"aria-hidden":"true"},"False"),c.createElement("span",{"aria-hidden":"true"},"True"))},"BooleanControl");Ot();var uD=h(e=>{let[t,r,n]=e.split("-"),o=new Date;return o.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),o},"parseDate"),cD=h(e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},"parseTime"),dD=h(e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),o=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${o}`},"formatDate"),pD=h(e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},"formatTime"),c0=R($e.Input)(({readOnly:e})=>({opacity:e?.5:1})),mD=R.div(({theme:e})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:e.base==="light"?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}})),hD=h(({name:e,value:t,onChange:r,onFocus:n,onBlur:o,argType:a})=>{let[i,s]=z(!0),l=ye(),u=ye(),d=!!a?.table?.readonly;X(()=>{i!==!1&&(l&&l.current&&(l.current.value=t?dD(t):""),u&&u.current&&(u.current.value=t?pD(t):""))},[t]);let m=h(g=>{if(!g.target.value)return r();let y=uD(g.target.value),E=new Date(t??"");E.setFullYear(y.getFullYear(),y.getMonth(),y.getDate());let b=E.getTime();b&&r(b),s(!!b)},"onDateChange"),p=h(g=>{if(!g.target.value)return r();let y=cD(g.target.value),E=new Date(t??"");E.setHours(y.getHours()),E.setMinutes(y.getMinutes());let b=E.getTime();b&&r(b),s(!!b)},"onTimeChange"),f=mt(e);return c.createElement(mD,null,c.createElement(c0,{type:"date",max:"9999-12-31",ref:l,id:`${f}-date`,name:`${f}-date`,readOnly:d,onChange:m,onFocus:n,onBlur:o}),c.createElement(c0,{type:"time",id:`${f}-time`,name:`${f}-time`,ref:u,onChange:p,readOnly:d,onFocus:n,onBlur:o}),i?null:c.createElement("div",null,"invalid"))},"DateControl");Ot();var fD=R.label({display:"flex"}),gD=h(e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},"parse"),yD=R($e.Input)(({readOnly:e})=>({opacity:e?.5:1})),bD=h(({name:e,value:t,onChange:r,min:n,max:o,step:a,onBlur:i,onFocus:s,argT
Line truncated
|
||||
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
|
||||
${Nt(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
|
||||
${Nt(.02,e.input.background)} 100%)`:`linear-gradient(to right,
|
||||
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
|
||||
${Or(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
|
||||
${Or(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:6,width:"100%",height:6,cursor:o?"not-allowed":"pointer"},"&::-webkit-slider-thumb":{marginTop:"-6px",width:16,height:16,border:`1px solid ${Tt(e.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${Tt(e.appBorderColor,.2)}`,cursor:o?"not-allowed":"grab",appearance:"none",background:`${e.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${Nt(.05,e.input.background)}`,transform:"scale3d(1.1, 1.1, 1.1) translateY(-1px)",transition:"all 50ms ease-out"},"&:active":{background:`${e.input.background}`,transform:"scale3d(1, 1, 1) translateY(0px)",cursor:o?"not-allowed":"grab"}},"&:focus":{outline:"none","&::-webkit-slider-runnable-track":{borderColor:Tt(e.color.secondary,.4)},"&::-webkit-slider-thumb":{borderColor:e.color.secondary,boxShadow:`0 0px 5px 0px ${e.color.secondary}`}},"&::-moz-range-track":{background:e.base==="light"?`linear-gradient(to right,
|
||||
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
|
||||
${Nt(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
|
||||
${Nt(.02,e.input.background)} 100%)`:`linear-gradient(to right,
|
||||
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
|
||||
${Or(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
|
||||
${Or(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:6,width:"100%",height:6,cursor:o?"not-allowed":"pointer",outline:"none"},"&::-moz-range-thumb":{width:16,height:16,border:`1px solid ${Tt(e.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${Tt(e.appBorderColor,.2)}`,cursor:o?"not-allowed":"grap",background:`${e.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${Nt(.05,e.input.background)}`,transform:"scale3d(1.1, 1.1, 1.1) translateY(-1px)",transition:"all 50ms ease-out"},"&:active":{background:`${e.input.background}`,transform:"scale3d(1, 1, 1) translateY(0px)",cursor:"grabbing"}},"&::-ms-track":{background:e.base==="light"?`linear-gradient(to right,
|
||||
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
|
||||
${Nt(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
|
||||
${Nt(.02,e.input.background)} 100%)`:`linear-gradient(to right,
|
||||
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
|
||||
${Or(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
|
||||
${Or(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${Tt(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),Qb=R.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),n3=R(Qb)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),o3=R.div({display:"flex",alignItems:"center",width:"100%"});function e1(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}h(e1,"getNumberOfDecimalPlaces");var a3=h(({name:e,value:t,onChange:r,min:n=0,max:o=100,step:a=1,onBlur:i,onFocus:s,argType:l})=>{let u=h(f=>{r(gD(f.target.value))},"handleChange"),d=t!==void 0,m=Me(()=>e1(a),[a]),p=!!l?.table?.readonly;return c.createElement(o3,{"aria-readonly":p},c.createElement(Qb,null,n),c.createElement(r3,{id:mt(e),type:"range",disabled:p,onChange:u,name:e,min:n,max:o,step:a,onFocus:s,onBlur:i,value:t??n}),c.createElement(n3,{numberOFDecimalsPlaces:m,max:o},d?t.toFixed(m):"--"," / ",o))},"RangeControl");Ot();var i3=R.label({display:"flex"}),s3=R.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),l3=h(({name:e,value:t,onChange:r,onFocus:n,onBlur:o,maxLength:a,argType:i})=>{let s=h(f=>{r(f.target.value)},"handleChange"),l=!!i?.table?.readonly,[u,d]=z(!1),m=Q(()=>{r(""),d(!0)},[d]);if(t===void 0)return c.createElement(Je,{variant:"outline",size:"medium",disabled:l,id:so(e),onClick:m},"Set string");let p=typeof t=="string";return c.createElement(i3,null,c.createElement($e.Textarea,{id:mt(e),maxLength:a,onChange:s,disabled:l,size:"flex",placeholder:"Edit string...",autoFocus:u,valid:p?void 0:"error",name:e,value:p?t:"",onFocus:n,onBlur:o}),a&&c.createElement(s3,{isMaxed:t?.length===a},t?.length??0," / ",a))},"TextControl");Ot();var u3=R($e.Input)({padding:10});function t1(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}h(t1,"revokeOldUrls");var c3=h(({onChange:e,name:t,accept:r="image/*",value:n,argType:o})=>{let a=ye(null),i=o?.control?.readOnly;function s(l){if(!l.target.files)return;let u=Array.from(l.target.files).map(d=>URL.createObjectURL(d));e(u),t1(n||[])}return h(s,"handleFileChange"),X(()=>{n==null&&a.current&&(a.current.value="")},[n,t]),c.createElement(u3,{ref:a,id:mt(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},"FilesControl"),d3=Ac(()=>Promise.resolve().then(()=>(lC(),Ny))),p3=h(e=>c.createElement(Ec,{fallback:c.createElement("div",null)},c.createElement(d3,{...e})),"ColorControl"),m3={array:b0,object:b0,boolean:lD,color:p3,date:hD,number:bD,check:fn,"inline-check":fn,radio:fn,"inline-radio":fn,select:fn,"multi-select":fn,range:a3,text:l3,file:c3},E0=h(()=>c.createElement(c.Fragment,null,"-"),"NoControl"),h3=h(({row:e,arg:t,updateArgs:r,isHovered:n})=>{let{key:o,control:a}=e,[i,s]=z(!1),[l,u]=z({value:t});X(()=>{i||u({value:t})},[i,t]);let d=Q(y=>(u({value:y}),r({[o]:y}),y),[r,o]),m=Q(()=>s(!1),[]),p=Q(()=>s(!0),[]);if(!a||a.disable){let y=a?.disable!==!0&&e?.type?.name!=="function";return n&&y?c.createElement(Ze,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):c.createElement(E0,null)}let f={name:o,argType:e,value:l.value,onChange:d,onBlur:m,onFocus:p},g=m3[a.type]||E0;return c.createElement(g,{...f,...a,controlType:a.type})},"ArgControl"),f3=R.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:Qt({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),g3=h(({tags:e})=>{let t=(e.params||[]).filter(a=>a.description),r=t.length!==0,n=e.deprecated!=null,o=e.returns!=null&&e.returns.description!=null;return!r&&!o&&!n?null:c.createElement(c.Fragment,null,c.createElement(f3,null,c.createElement("tbody",null,n&&c.createElement("tr",{key:"deprecated"},c.createElement("td",{colSpan:2},c.createElement("strong",null,"Deprecated"),": ",e.deprecated?.toString())),r&&t.map(a=>c.createElement("tr",{key:a.name},c.createElement("td",null,c.createElement("code",null,a.name)),c.createElement("td",null,a.description))),o&&c.createElement("tr",{key:"returns"},c
Line truncated
|
||||
`);return c.createElement("pre",{style:{margin:0,padding:"8px 10px 8px 36px",fontSize:At.size.s1,...t}},n.flatMap((o,a)=>{if(o.startsWith("expect(")){let m=R0(o,7),p=m?7+m.length:0,f=m&&o.slice(p).match(/\.(to|last|nth)[A-Z]\w+\(/);if(f){let g=p+(f.index??0)+f[0].length,y=R0(o,g);if(y)return["expect(",c.createElement(du,{key:`received_${m}`,value:m}),o.slice(p,g),c.createElement(pu,{key:`expected_${y}`,value:y}),o.slice(g+y.length),c.createElement("br",{key:`br${a}`})]}}if(o.match(/^\s*- /))return[c.createElement(pu,{key:o+a,value:o}),c.createElement("br",{key:`br${a}`})];if(o.match(/^\s*\+ /)||o.match(/^Received: $/))return[c.createElement(du,{key:o+a,value:o}),c.createElement("br",{key:`br${a}`})];let[,i,s]=o.match(/^(Expected|Received): (.*)$/)||[];if(i&&s)return i==="Expected"?["Expected: ",c.createElement(pu,{key:o+a,value:cu(s),parsed:!0}),c.createElement("br",{key:`br${a}`})]:["Received: ",c.createElement(du,{key:o+a,value:cu(s),parsed:!0}),c.createElement("br",{key:`br${a}`})];let[,l,u]=o.match(/(Expected number|Received number|Number) of calls: (\d+)$/i)||[];if(l&&u)return[`${l} of calls: `,c.createElement(_r,{key:o+a,value:Number(u)}),c.createElement("br",{key:`br${a}`})];let[,d]=o.match(/^Received has value: (.+)$/)||[];return d?["Received has value: ",c.createElement(_r,{key:o+a,value:cu(d)}),c.createElement("br",{key:`br${a}`})]:[c.createElement("span",{key:o+a,dangerouslySetInnerHTML:{__html:r.toHtml(o)}}),c.createElement("br",{key:`br${a}`})]}))},"MatcherResult"),lO=R.div({width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center"}),R1=h(({status:e})=>{let t=Qe();switch(e){case"done":return c.createElement(yo,{color:t.color.positive,"data-testid":"icon-done"});case"error":return c.createElement(Uc,{color:t.color.negative,"data-testid":"icon-error"});case"active":return c.createElement(jc,{color:t.color.secondary,"data-testid":"icon-active"});case"waiting":return c.createElement(lO,{"data-testid":"icon-waiting"},c.createElement(vo,{color:de(.5,"#CCCCCC"),size:6}));default:return null}},"StatusIcon"),uO=R.div({fontFamily:At.fonts.mono,fontSize:At.size.s1,overflowWrap:"break-word",inlineSize:"calc( 100% - 40px )"}),cO=R("div",{shouldForwardProp:h(e=>!["call","pausedAt"].includes(e.toString()),"shouldForwardProp")})(({theme:e,call:t})=>({position:"relative",display:"flex",flexDirection:"column",borderBottom:`1px solid ${e.appBorderColor}`,fontFamily:At.fonts.base,fontSize:13,...t.status==="error"&&{backgroundColor:e.base==="dark"?de(.93,e.color.negative):e.background.warning},paddingLeft:(t.ancestors?.length??0)*20}),({theme:e,call:t,pausedAt:r})=>r===t.id&&{"&::before":{content:'""',position:"absolute",top:-5,zIndex:1,borderTop:"4.5px solid transparent",borderLeft:`7px solid ${e.color.warning}`,borderBottom:"4.5px solid transparent"},"&::after":{content:'""',position:"absolute",top:-1,zIndex:1,width:"100%",borderTop:`1.5px solid ${e.color.warning}`}}),dO=R.div(({theme:e,isInteractive:t})=>({display:"flex","&:hover":t?{}:{background:e.background.hoverable}})),pO=R("button",{shouldForwardProp:h(e=>!["call"].includes(e.toString()),"shouldForwardProp")})(({theme:e,disabled:t,call:r})=>({flex:1,display:"grid",background:"none",border:0,gridTemplateColumns:"15px 1fr",alignItems:"center",minHeight:40,margin:0,padding:"8px 15px",textAlign:"start",cursor:t||r.status==="error"?"default":"pointer","&:focus-visible":{outline:0,boxShadow:`inset 3px 0 0 0 ${r.status==="error"?e.color.warning:e.color.secondary}`,background:r.status==="error"?"transparent":e.background.hoverable},"& > div":{opacity:r.status==="waiting"?.5:1}})),mO=R.div({display:"flex",alignItems:"center",padding:6}),hO=R(ce)(({theme:e})=>({color:e.textMutedColor,margin:"0 3px"})),fO=R(vt)(({theme:e})=>({fontFamily:e.typography.fonts.base})),mu=R("div")(({theme:e})=>({padding:"8px 10px 8px 36px",fontSize:At.size.s1,color:e.color.defaultText,pre:{margin:0,padding:0}})),gO=R.span(({theme:e})=>({color:e.base==="dark"?"#5EC1FF":"#0271B6"})),yO=R.span(({theme:e})=>({color:e.base==="dark"?"#eee":"#444"})),bO=R.p(({theme:e})=>({color:e.base==="dark"?e.color.negative:e.color.negativeText,fontSize:e.typography.size.s2,maxWidth:500,textWrap:"balance"})),EO=h(({exception:e})=>{let t=yi();if(!e)return null;if(e.callId===Lt)return Y(mu,null,Y("pre",null,Y(gO,null,e.name,":")," ",Y(yO,null,e.message)),Y(bO,null,"The component failed to render properly. Automated component tests will not run until this is resolved. Check the full error message in Storybook\u2019s canvas to debug."));if(fc(e))return Y(B0,{...e});if(hc(e))return Y(mu,null,Y(B0,{message:`${e.message}${e.diff?`
|
||||
|
||||
${e.diff}`:""}`,style:{padding:0}}),Y("p",null,"See the full stack trace in the browser console."));let r=e.message.split(`
|
||||
|
||||
`),n=r.length>1;return Y(mu,null,Y("pre",{dangerouslySetInnerHTML:{__html:t.toHtml(r[0])}}),n&&Y("p",null,"See the full stack trace in the browser console."))},"Exception"),vO=h(({call:e,callsById:t,controls:r,controlStates:n,childCallIds:o,isHidden:a,isCollapsed:i,toggleCollapsed:s,pausedAt:l})=>{let[u,d]=z(!1),m=!n.goto||!e.interceptable||!!e.ancestors?.length;return a||e.id===Lt?null:Y(cO,{call:e,pausedAt:l},Y(dO,{isInteractive:m},Y(pO,{"aria-label":"Interaction step",call:e,onClick:()=>r.goto(e.id),disabled:m,onMouseEnter:()=>n.goto&&d(!0),onMouseLeave:()=>n.goto&&d(!1)},Y(R1,{status:u?"active":e.status}),Y(uO,{style:{marginLeft:6,marginBottom:1}},Y(bc,{call:e,callsById:t}))),Y(mO,null,(o?.length??0)>0&&Y(De,{hasChrome:!1,tooltip:Y(fO,{note:`${i?"Show":"Hide"} interactions`})},Y(hO,{onClick:s,"aria-label":i?"Expand interaction":"Collapse interaction"},i?Y(bo,null):Y(Dc,null))))),e.status==="error"&&e.exception?.callId===e.id&&Y(EO,{exception:e.exception}))},"Interaction"),AO={rendering:"mediumdark",playing:"warning",completed:"positive",errored:"negative",aborted:"purple"},xO={rendering:"Wait",playing:"Runs",completed:"Pass",errored:"Fail",aborted:"Bail"},wO=R.div(({theme:e,status:t})=>({display:"inline-block",padding:"4px 6px 4px 8px",borderRadius:"4px",backgroundColor:e.color[AO[t]],color:"white",fontFamily:At.fonts.base,textTransform:"uppercase",fontSize:At.size.s1,letterSpacing:3,fontWeight:At.weight.bold,minWidth:65,textAlign:"center"})),SO=h(({status:e})=>{let t=xO[e];return c.createElement(wO,{"aria-label":"Status of the test run",status:e},t)},"StatusBadge"),CO=R.div(({theme:e})=>({boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.background.app,position:"sticky",top:0,zIndex:1})),DO=R.nav({height:40,display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:15}),TO=R(Je)(({theme:e})=>({borderRadius:4,padding:6,color:e.textMutedColor,"&:not(:disabled)":{"&:hover,&:focus-visible":{color:e.color.secondary}}})),Jn=R(vt)(({theme:e})=>({fontFamily:e.typography.fonts.base})),no=R(ce)(({theme:e})=>({color:e.textMutedColor,margin:"0 3px"})),kO=R(Ci)({marginTop:0}),OO=R(xi)(({theme:e})=>({color:e.textMutedColor,justifyContent:"flex-end",textAlign:"right",whiteSpace:"nowrap",marginTop:"auto",marginBottom:1,paddingRight:15,fontSize:13})),_0=R.div({display:"flex",alignItems:"center"}),IO=R(no)({marginLeft:9}),RO=R(TO)({marginLeft:9,marginRight:9,marginBottom:1,lineHeight:"12px"}),BO=R(no)(({theme:e,animating:t,disabled:r})=>({opacity:r?.5:1,svg:{animation:t?`${e.animation.rotate360} 200ms ease-out`:void 0}})),_O=h(({controls:e,controlStates:t,status:r,storyFileName:n,onScrollToEnd:o})=>{let a=r==="errored"?"Scroll to error":"Scroll to end",i=Qe();return c.createElement(CO,null,c.createElement(Tn,{backgroundColor:i.background.app},c.createElement(DO,{"aria-label":"Component tests toolbar"},c.createElement(_0,null,c.createElement(SO,{status:r}),c.createElement(RO,{onClick:o,disabled:!o},a),c.createElement(kO,null),c.createElement(De,{trigger:"hover",hasChrome:!1,tooltip:c.createElement(Jn,{note:"Go to start"})},c.createElement(IO,{"aria-label":"Go to start",onClick:e.start,disabled:!t.start},c.createElement($c,null))),c.createElement(De,{trigger:"hover",hasChrome:!1,tooltip:c.createElement(Jn,{note:"Go back"})},c.createElement(no,{"aria-label":"Go back",onClick:e.back,disabled:!t.back},c.createElement(Lc,null))),c.createElement(De,{trigger:"hover",hasChrome:!1,tooltip:c.createElement(Jn,{note:"Go forward"})},c.createElement(no,{"aria-label":"Go forward",onClick:e.next,disabled:!t.next},c.createElement(Mc,null))),c.createElement(De,{trigger:"hover",hasChrome:!1,tooltip:c.createElement(Jn,{note:"Go to end"})},c.createElement(no,{"aria-label":"Go to end",onClick:e.end,disabled:!t.end},c.createElement(Ic,null))),c.createElement(De,{trigger:"hover",hasChrome:!1,tooltip:c.createElement(Jn,{note:"Rerun"})},c.createElement(BO,{"aria-label":"Rerun",onClick:e.rerun},c.createElement(Vc,null)))),n&&c.createElement(_0,null,c.createElement(OO,null,n)))))},"Subnav"),FO=R.div(({theme:{color:e,typography:t,background:r}})=>({textAlign:"start",padding:"11px 15px",fontSize:`${t.size.s2-1}px`,fontWeight:t.weight.regular,lineHeight:"1rem",background:r.app,borderBottom:`1px solid ${e.border}`,color:e.defaultText,backgroundClip:"padding-box",position:"relative",code:{fontSize:`${t.size.s1-1}px`,color:"inherit",margin:"0 0.2em",padding:"0 0.2em",background:"rgba(255, 255, 255, 0.8)",borderRadius:"2px",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1)"}})),PO=h(({browserTestStatus:e})=>{let t=tt().getDocsUrl({subpath:ok,versioned:!0,renderer:!0}),[r,n]=e==="error"?["the CLI","this browser"]:["this browser","the CLI"];return c.createElement(FO,null,"This interaction test passed in ",r,", but the tests failed in ",n,"."," ",c.createElement(Ze,{href:t,target:"_blank",withArrow:!0},"Learn what could cause this"))},"TestDiscrepancyMessage"),NO=R.div(({theme:e})=>({height:"100%",background:e.background.content})),F0=R
Line truncated
|
||||
}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }
|
||||
Reference in new issue
Block a user