1try{ 2(()=>{var o=__REACT__,{Children:Ht,Component:Mt,Fragment:Ft,Profiler:Ut,PureComponent:Wt,StrictMode:Gt,Suspense:Qt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yt,act:zt,cloneElement:Vt,createContext:Kt,createElement:qt,createFactory:Jt,createRef:Zt,forwardRef:Xt,isValidElement:en,lazy:tn,memo:nn,startTransition:on,unstable_act:cn,useCallback:ae,useContext:an,useDebugValue:rn,useDeferredValue:ln,useEffect:D,useId:sn,useImperativeHandle:un,useInsertionEffect:dn,useLayoutEffect:re,useMemo:V,useReducer:pn,useRef:E,useState:k,useSyncExternalStore:mn,useTransition:In,version:yn}=__REACT__;var Sn=__STORYBOOK_API__,{ActiveTabs:bn,Consumer:En,ManagerContext:_n,Provider:Cn,RequestResponseError:Tn,Tag:wn,addons:K,combineParameters:kn,controlOrMetaKey:On,controlOrMetaSymbol:xn,eventMatchesShortcut:An,eventToShortcut:Rn,experimental_MockUniversalStore:Pn,experimental_UniversalStore:Bn,experimental_getStatusStore:Nn,experimental_getTestProviderStore:Dn,experimental_requestResponse:ie,experimental_useStatusStore:Ln,experimental_useTestProviderStore:jn,experimental_useUniversalStore:$n,getService:Hn,internal_checklistStore:Mn,internal_fullStatusStore:Fn,internal_fullTestProviderStore:Un,internal_universalChecklistStore:Wn,internal_universalStatusStore:Gn,internal_universalTestProviderStore:Qn,isMacLike:Yn,isShortcutTaken:zn,keyToSymbol:Vn,merge:Kn,mockChannel:qn,optionOrAltSymbol:Jn,registerService:Zn,shortcutMatchesShortcut:Xn,shortcutToAriaKeyshortcuts:eo,shortcutToHumanString:to,types:le,useAddonState:se,useArgTypes:no,useArgs:oo,useChannel:ue,useGlobalTypes:co,useGlobals:q,useParameter:ao,useServiceCommand:ro,useServiceQuery:io,useSharedState:lo,useStoryPrepared:so,useStorybookApi:J,useStorybookState:uo}=__STORYBOOK_API__;var go=__STORYBOOK_COMPONENTS__,{A:fo,AbstractToolbar:vo,ActionBar:ho,ActionList:So,AddonPanel:de,Badge:pe,Bar:me,Blockquote:bo,Button:U,Card:Eo,ClipboardCode:_o,Code:Co,Collapsible:To,DL:wo,Div:ko,DocumentWrapper:Oo,EmptyTabContent:Z,ErrorFormatter:xo,FlexBar:Ao,Form:Ie,H1:Ro,H2:Po,H3:Bo,H4:No,H5:Do,H6:Lo,HR:jo,IconButton:X,Img:$o,LI:Ho,Link:Mo,ListItem:Fo,Loader:Uo,Modal:Wo,ModalDecorator:Go,OL:Qo,P:Yo,Placeholder:zo,Popover:Vo,PopoverProvider:Ko,Pre:qo,ProgressSpinner:Jo,ResetWrapper:Zo,ScrollArea:Xo,Select:ec,Separator:tc,Spaced:ye,Span:nc,StatelessTab:oc,StatelessTabList:cc,StatelessTabPanel:ac,StatelessTabsView:rc,StorybookIcon:ic,StorybookLogo:lc,SyntaxHighlighter:ge,TT:sc,TabBar:uc,TabButton:dc,TabList:pc,TabPanel:mc,TabWrapper:Ic,Table:yc,Tabs:gc,TabsState:fc,TabsView:vc,ToggleButton:hc,Toolbar:Sc,Tooltip:bc,TooltipLinkList:Ec,TooltipMessage:_c,TooltipNote:ee,TooltipProvider:Cc,UL:Tc,WithTooltip:W,WithTooltipPure:wc,Zoom:kc,codeCommon:Oc,components:xc,convertToReactAriaPlacement:Ac,createCopyToClipboardFunction:Rc,getStoryHref:Pc,interleaveSeparators:Bc,nameSpaceClassNames:Nc,resetComponents:Dc,useCopyButton:Lc,useTabsState:jc,withReset:$c}=__STORYBOOK_COMPONENTS__;var Wc=__STORYBOOK_ICONS__,{AccessibilityAltIcon:Gc,AccessibilityIcon:Qc,AccessibilityIgnoredIcon:Yc,AddIcon:fe,AdminIcon:zc,AlertAltIcon:Vc,AlertIcon:ve,AlignLeftIcon:Kc,AlignRightIcon:qc,AppleIcon:Jc,ArrowBottomLeftIcon:Zc,ArrowBottomRightIcon:Xc,ArrowDownIcon:ea,ArrowLeftIcon:ta,ArrowRightIcon:na,ArrowSolidDownIcon:oa,ArrowSolidLeftIcon:ca,ArrowSolidRightIcon:aa,ArrowSolidUpIcon:ra,ArrowTopLeftIcon:ia,ArrowTopRightIcon:la,ArrowUpIcon:sa,AzureDevOpsIcon:ua,BackIcon:da,BasketIcon:pa,BatchAcceptIcon:ma,BatchDenyIcon:Ia,BeakerIcon:ya,BellIcon:ga,BitbucketIcon:fa,BoldIcon:va,BookIcon:ha,BookmarkHollowIcon:Sa,BookmarkIcon:ba,BottomBarIcon:Ea,BottomBarToggleIcon:_a,BoxIcon:Ca,BranchIcon:Ta,BrowserIcon:wa,BugIcon:ka,ButtonIcon:Oa,CPUIcon:xa,CalendarIcon:Aa,CameraIcon:Ra,CameraStabilizeIcon:Pa,CategoryIcon:Ba,CertificateIcon:Na,ChangedIcon:Da,ChatIcon:La,CheckIcon:B,ChecklistIcon:ja,ChevronDownIcon:$a,ChevronLeftIcon:Ha,ChevronRightIcon:Ma,ChevronSmallDownIcon:Fa,ChevronSmallLeftIcon:Ua,ChevronSmallRightIcon:Wa,ChevronSmallUpIcon:Ga,ChevronUpIcon:Qa,ChromaticIcon:Ya,ChromeIcon:za,CircleHollowIcon:Va,CircleIcon:Ka,ClearIcon:qa,CloseAltIcon:Ja,CloseIcon:Za,CloudHollowIcon:Xa,CloudIcon:er,CogIcon:tr,CollapseIcon:nr,CommandIcon:or,CommentAddIcon:cr,CommentIcon:ar,CommentsIcon:rr,CommitIcon:ir,CompassIcon:lr,ComponentDrivenIcon:sr,ComponentIcon:ur,ContrastIcon:dr,ContrastIgnoredIcon:pr,ControlsIcon:mr,CopyIcon:he,CreditIcon:Ir,CrossIcon:Se,DashboardIcon:yr,DatabaseIcon:gr,DeleteIcon:be,DiamondIcon:fr,DirectionIcon:vr,DiscordIcon:hr,DocChartIcon:Sr,DocListIcon:br,DocumentIcon:Er,DownloadIcon:_r,DragIcon:Cr,EditIcon:Tr,EditorIcon:wr,EllipsisIcon:kr,EmailIcon:Or,ExpandAltIcon:xr,ExpandIcon:Ar,EyeCloseIcon:Rr,EyeIcon:Pr,FaceHappyIcon:Br,FaceNeutralIcon:Nr,FaceSadIcon:Dr,FacebookIcon:Lr,FailedIcon:jr,FastForwardIcon:$r,FigmaIcon:Hr,FilesIcon:Mr,FilterIcon:Fr,FlagIcon:Ur,FolderIcon:Wr,FormIcon:Gr,GDriveIcon:Qr,GiftIcon:Yr,GithubIcon:zr,GitlabIcon:Vr,GlobeIcon:Kr,GoogleIcon:qr,GraphBarIcon:Jr,GraphLineIcon:Zr,GraphqlIcon:Xr,GridAltIcon:ei,GridIcon:ti,GrowIcon:ni,HeartHollowIcon:oi,HeartIcon:ci,HomeIcon:ai,HourglassIcon:ri,InfoIcon:ii,ItalicIcon:li,JumpToIcon:si,KeyIcon:ui,LightningIcon:di,LightningOffIcon:pi,LinkBrokenIcon:mi,LinkIcon:Ii,LinkedinIcon:yi,LinuxIcon:gi,ListOrderedIcon:fi,ListUnorderedIcon:vi,LocationIcon:hi,LockIcon:Si,MarkdownIcon:bi,MarkupIcon:Ei,MediumIcon:_i,MemoryIcon:Ci,MenuIcon:Ti,MergeIcon:wi,MirrorIcon:ki,MobileIcon:Oi,MoonIcon:xi,NutIcon:Ai,OutboxIcon:Ri,OutlineIcon:Pi,PaintBrushAltIcon:Bi,PaintBrushIcon:Ni,PaperClipIcon:Di,ParagraphIcon:Li,PassedIcon:ji,PhoneIcon:$i,PhotoDragIcon:Hi,PhotoIcon:Mi,PhotoStabilizeIcon:Fi,PinAltIcon:Ui,PinIcon:Wi,PlayAllHollowIcon:Gi,PlayBackIcon:Qi,PlayHollowIcon:Yi,PlayIcon:zi,PlayNextIcon:Vi,PlusIcon:Ki,PointerDefaultIcon:qi,PointerHandIcon:Ji,PopOutIcon:Zi,PowerIcon:Xi,PrintIcon:el,ProceedIcon:tl,ProfileIcon:nl,PullRequestIcon:ol,QuestionIcon:cl,RSSIcon:al,RedirectIcon:rl,ReduxIcon:il,RefreshIcon:ll,ReplyIcon:sl,RepoIcon:ul,RequestChangeIcon:dl,RewindIcon:pl,RulerIcon:ml,SaveIcon:Il,SearchIcon:yl,ShareAltIcon:gl,ShareIcon:fl,ShieldIcon:vl,SideBySideIcon:hl,SidebarAltIcon:Sl,SidebarAltToggleIcon:bl,SidebarIcon:El,SidebarToggleIcon:_l,S
2ortDownIcon:Cl,SortUpIcon:Tl,SpeakerIcon:wl,StackedIcon:kl,StarHollowIcon:Ol,StarIcon:xl,StatusFailIcon:Al,StatusIcon:Rl,StatusNewIcon:Pl,StatusPassIcon:Bl,StatusWarnIcon:Nl,StickerIcon:Dl,StopAltHollowIcon:Ll,StopAltIcon:jl,StopIcon:$l,StorybookIcon:Hl,StructureIcon:Ml,SubtractIcon:Fl,SunIcon:Ul,SupportIcon:Wl,SweepIcon:Gl,SwitchAltIcon:Ql,SyncIcon:Ee,TabletIcon:Yl,ThumbsUpIcon:zl,TimeIcon:Vl,TimerIcon:Kl,TransferIcon:ql,TrashIcon:Jl,TwitterIcon:Zl,TypeIcon:Xl,UbuntuIcon:es,UndoIcon:ts,UnfoldIcon:ns,UnlockIcon:os,UnpinIcon:cs,UploadIcon:as,UserAddIcon:rs,UserAltIcon:is,UserIcon:ls,UsersIcon:ss,VSCodeIcon:us,VerifiedIcon:ds,VideoIcon:ps,WandIcon:ms,WatchIcon:Is,WindowsIcon:ys,WrenchIcon:gs,XIcon:fs,YoutubeIcon:vs,ZoomIcon:hs,ZoomOutIcon:Ss,ZoomResetIcon:bs,iconList:Es}=__STORYBOOK_ICONS__;var ks=__STORYBOOK_THEMING__,{CacheProvider:Os,ClassNames:xs,Global:As,ThemeProvider:Rs,background:Ps,color:Bs,convert:Ns,create:Ds,createCache:Ls,createGlobal:js,createReset:$s,css:Hs,darken:Ms,ensure:Fs,getPreferredColorScheme:Us,ignoreSsrWarning:Ws,isPropValid:Gs,jsx:Qs,keyframes:Ys,lighten:zs,srOnlyStyles:Vs,srOnlyUnsetStyles:Ks,styled:u,themes:qs,tokens:Js,typography:Zs,useTheme:Xs,withTheme:eu}=__STORYBOOK_THEMING__;function He(e,t,n){var c=this,a=E(null),i=E(0),r=E(null),s=E([]),d=E(),l=E(),y=E(e),I=E(!0);y.current=e;var p=typeof window<"u",g=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,f=!("trailing"in n)||!!n.trailing,_="maxWait"in n,h="debounceOnServer"in n&&!!n.debounceOnServer,C=_?Math.max(+n.maxWait||0,t):null;D(function(){return I.current=!0,function(){I.current=!1}},[]);var v=V(function(){var T=function(S){var b=s.current,F=d.current;return s.current=d.current=null,i.current=S,l.current=y.current.apply(F,b)},x=function(S,b){g&&cancelAnimationFrame(r.current),r.current=g?requestAnimationFrame(S):setTimeout(S,b)},H=function(S){if(!I.current)return!1;var b=S-a.current;return!a.current||b>=t||b<0||_&&S-i.current>=C},ce=function(S){return r.current=null,f&&s.current?T(S):(s.current=d.current=null,l.current)},z=function S(){var b=Date.now();if(H(b))return ce(b);if(I.current){var F=t-(b-a.current),$e=_?Math.min(F,C-(b-i.current)):F;x(S,$e)}},M=function(){if(p||h){var S=Date.now(),b=H(S);if(s.current=[].slice.call(arguments),d.current=c,a.current=S,b){if(!r.current&&I.current)return i.current=a.current,x(z,t),m?T(a.current):l.current;if(_)return x(z,t),T(a.current)}return r.current||x(z,t),l.current}};return M.cancel=function(){r.current&&(g?cancelAnimationFrame(r.current):clearTimeout(r.current)),i.current=0,s.current=a.current=d.current=r.current=null},M.isPending=function(){return!!r.current},M.flush=function(){return r.current?ce(Date.now()):l.current},M},[m,_,t,C,f,g,p,h]);return v}function Me(e,t){return e===t}function Fe(e,t,n){var c=Me,a=E(e),i=k({})[1],r=He(ae(function(d){a.current=d,i({})},[i]),t,n),s=E(e);return c(s.current,e)||(r(e),s.current=e),[a.current,r]}function j(e){"@babel/helpers - typeof";return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(e)}function Ue(e,t){if(j(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var c=n.call(e,t);if(j(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function We(e){var t=Ue(e,"string");return j(t)=="symbol"?t:t+""}function Ge(e,t,n){return(t=We(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)({}).hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e},oe.apply(null,arguments)}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,c)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 4,393 bytes, line 2
2t%2?_e(Object(n),!0).forEach(function(c){Ge(e,c,n[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach(function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(n,c))})}return e}function Qe(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])];if(t===3)return[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])];if(t>=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var te={};function Ye(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return te[t]||(te[t]=Qe(e)),te[t]}function ze(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>
22?arguments[2]:void 0,c=e.filter(function(i){return i!=="token"}),a=Ye(c);return a.reduce(function(i,r){return N(N({},i),n[r])},t)}function Ce(e){return e.join(" ")}function Ve(e,t){var n=0;return function(c){return n+=1,c.map(function(a,i){return Be({node:a,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function Be(e){var t=e.node,n=e.stylesheet,c=e.style,a=c===void 0?{}:c,i=e.useInlineStyles,r=e.key,s=t.properties,d=t.type,l=t.tagName,y=t.value;if(d==="text")return y;if(l){var I=Ve(n,i),p;if(!i)p=N(N({},s),{},{className:Ce(s.className)});else{var g=Object.keys(n).reduce(function(h,C){return C.split(".").forEach(function(v){h.includes(v)||h.push(v)}),h},[]),m=s.className&&s.className.includes("token")?["token"]:[],f=s.className&&m.concat(s.className.filter(function(h){return!g.includes(h)}));p=N(N({},s),{},{className:Ce(f)||void 0,style:ze(s.className,Object.assign({},s.style,a),n)})}var _=I(t.children);return o.createElement(l,oe({key:r},p),_)}}var Ke=u.div(({theme:e})=>({display:"flex",flexDirection:"column",border:`1px solid ${e.appBorderColor}`})),qe=u.div(({theme:e,isSticky:t})=>({fontSize:e.typography.size.s1,fontWeight:"bold",marginBottom:4,padding:"6px 7px",background:e.barBg,borderBottom:`1px solid ${e.appBorderColor}`,position:"relative",...t?{position:"sticky",top:0,zIndex:1}:{}})),Je=u.div({padding:"6px 7px 10px",height:"100%",tabSize:"8px",pre:{margin:0,borderRadius:0}}),Ze=u.div({position:"absolute",top:"50%",transform:"translateY(-50%)",right:0,zIndex:1}),Xe=u(X)(({theme:e})=>({padding:0,width:20,height:20,marginRight:4})),et=u(ve)(({theme:e})=>({color:e.color.warning,width:12,height:12}));function Te({name:e,codeLines:t,isSticky:n}){let[c,a]=k(!1),[i,r]=k(null),s=t.flatMap(l=>l.text.split(` 3`).map((y,I)=>({text:y,warning:l.warning&&I===0?l.warning:void 0}))),d=s.map(({text:l})=>l).join(` 4`);return o.createElement(Ke,null,o.createElement(qe,{isSticky:n},e,o.createElement(Ze,null,o.createElement(W,{placement:"top",as:"div",hasChrome:!1,trigger:"hover",tooltip:o.createElement(ee,{note:"Copy"})},o.createElement(X,{onClick:()=>navigator.clipboard.writeText(d).then(()=>{a(!0),i&&clearTimeout(i),r(setTimeout(()=>{a(!1),r(null)},2e3))})},c?o.createElement(B,{size:16}):o.createElement(he,{size:16}))))),o.createElement(Je,null,o.createElement(ge,{language:"typescript",renderer:({rows:l,useInlineStyles:y})=>l.map((I,p)=>{let g=s[p]?.warning;if(g){let m={type:"element",tagName:at,properties:{className:[],warning:g},children:[]};I.children.splice(0,1,m)}else p>0&&p<l.length-1&&I.children[0].properties&&(I.children[0].properties.style={marginRight:"16px"});return Be({node:I,stylesheet:{},useInlineStyles:y,key:`code-segement${p}`})})},d)))}var tt=u.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2,marginBottom:12})),nt=u.div(({theme:e})=>({color:e.color.defaultText})),ot=u.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px",padding:15,width:350})),ct={ROLE_WITHOUT_NAME:{title:"Role without name",description:o.createElement("div",null,o.createElement("div",null,o.createElement("strong",null,"getByRole")," without name can match any button, making tests unreliable."),o.createElement("div",{style:{margin:"8px 0"}},"To fix, add ",o.createElement("strong",null,"visible text")," or ",o.createElement("strong",null,"aria-label")," to your element:"),o.createElement("div",{style:{margin:"8px 0"}},o.createElement("div",null,"\u274C ",o.createElement("code",null,"<button />")),o.createElement("div",null,"\u2705 ",o.createElement("code",null,"<button>Submit</button>")),o.createElement("div",null,"\u2705 ",o.createElement("code",null,'<button aria-label="Submit">Icon</button>'))))},QUERY_SELECTOR:{title:"Query selector usage",description:o.createElement("div",null,o.createElement("div",null,o.createElement("strong",null,"querySelector")," is fragile and breaks when HTML structure changes."),o.createElement("div",{style:{margin:"8px 0"}},"To fix, use ",o.createElement("strong",null,"semantic HTML")," or ",o.createElement("strong",null,"aria-label")," ","to make the element accessible:"),o.createElement("div",{style:{margin:"8px 0"}},o.createElement("div",null,"\u274C ",o.createElement("code",null,'<div class="submit-18372">Submit</div>')),o.createElement("div",null,"\u2705 ",o.createElement("code",null,"<button>Submit</button>")),o.createElement("div",null,"\u2705 ",o.createElement("code",null,'<div aria-label="Submit">Icon</div>'))))},TEST_ID:{title:"Test ID usage",description:o.createElement("div",null,o.createElement("div",null,o.createElement("strong",null,"data-testid")," elements are not accessible and do not resemble how your software is used."),o.createElement("div",{style:{margin:"8px 0"}},"To improve, use ",o.createElement("strong",null,"semantic HTML")," or"," ",o.
4createElement("strong",null,"aria-label")," to make the element accessible:"),o.createElement("div",{style:{margin:"8px 0"}},o.createElement("div",null,"\u274C ",o.createElement("code",null,'<div data-testid="submit">Submit</div>')),o.createElement("div",null,"\u2705 ",o.createElement("code",null,"<button>Submit</button>"))))}};function at({warning:e}){let{title:t,description:n}=ct[e];return o.createElement(W,{trigger:"hover",tooltip:o.createElement(ot,null,o.createElement(tt,null,t),o.createElement(nt,null,n))},o.createElement(Xe,null,o.createElement(et,null)))}var we=Object.prototype.hasOwnProperty;function ke(e,t,n){for(n of e.keys())if(L(n,t))return n}function L(e,t){var n,c,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((c=e.length)===t.length)for(;c--&&L(e[c],t[c]););return c===-1}if(n===Set){if(e.size!==t.size)return!1;for(c of e)if(a=c,a&&typeof a=="object"&&(a=ke(t,a),!a)||!t.has(a))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(c of e)if(a=c[0],a&&typeof a=="object"&&(a=ke(t,a),!a)||!L(c[1],t.get(a)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((c=e.byteLength)===t.byteLength)for(;c--&&e.getInt8(c)===t.getInt8(c););return c===-1}if(ArrayBuffer.isView(e)){if((c=e.byteLength)===t.byteLength)for(;c--&&e[c]===t[c];);return c===-1}if(!n||typeof e=="object"){c=0;for(n in e)if(we.call(e,n)&&++c&&!we.call(t,n)||!(n in t)||!L(e[n],t[n]))return!1;return Object.keys(t).length===c}}return e!==e&&t!==t}var w="storybook/test-codegen",rt=`${w}/panel`,Oe=`${w}/is-recording`,xe=`${w}/is-asserting`,Y={INTERACTION:`${w}/interaction`,SAVE_NEW_STORY_REQUEST:`${w}/save-new-story-request`,SAVE_NEW_STORY_RESPONSE:`${w}/save-new-story-response`},it=u.div(({theme:e})=>({height:"100%",background:e.background.content,display:"flex",flexDirection:"column"})),lt=u.div({flex:1,overflow:"auto"}),st=u.div(({theme:e})=>({background:e.background.app,borderBottom:`1px solid ${e.appBorderColor}`,position:"sticky",top:0,zIndex:2})),ut=u.nav(({theme:e})=>({height:40,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 15px"})),O=u(U)(({theme:e})=>({position:"relative",borderRadius:4,padding:"6px 8px",color:e.textMutedColor,"&:not(:disabled)":{"&:hover,&:focus-visible":{color:e.color.secondary}},marginBottom:1,lineHeight:"12px"})),Ne=u.div(({isHidden:e})=>({display:"flex",alignItems:"center",gap:6,opacity:e?0:1})),dt=u(Ne)({left:8,top:"50%",transform:"translateY(-50%)",position:"absolute"}),pt=u(O)(({isAsserting:e})=>({backgroundColor:e?"rgba(0, 128, 0, 0.1)":void 0,color:e?"rgb(0, 128, 0)":void 0})),mt=u(O)({cursor:"not-allowed"}),It=u(U)({color:"white"}),yt=u.div({display:"flex",alignItems:"center",gap:"9px"}),gt=u.div(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px"})),ne=u.span(({theme:e,isRecording:t})=>({width:14,height:14,borderRadius:"50%",backgroundColor:t?e.color.negative:e.color.secondary,display:"inline-block"})),ft=u.div({padding:"16px",display:"flex",flexDirection:"column",gap:"12px"}),vt=u.form({display:"flex",alignItems:"center",gap:8}),Ae=u(B)(({theme:e})=>({width:12,color:e.color.secondary})),ht=u(Ie.Input)(({theme:e})=>({paddingLeft:10,paddingRight:10,fontSize:e.typography.size.s1,height:28,minHeight:"unset",...e.base==="light"&&{color:e.color.darkest},"::placeholder":{color:e.color.mediumdark},"&:invalid:not(:placeholder-shown)":{boxShadow:`${e.color.negative} 0 0 0 1px inset`},"&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{display:"none"}})),St=u(Ee)(({theme:e})=>({animation:`${e.animation.rotate360} 1s linear infinite;`})),bt=u(B)({width:12}),Et=u(U)(({theme:e})=>({color:e.color.negative})),_t=u(Se)(({theme:e})=>({color:e.color.negative})),Ct=u(fe)({width:14}),Tt=e=>JSON.stringify(e,(t,n)=>typeof n=="function"?"__sb_empty_function_arg__":n),wt=({code:e,turnOffRecording:t})=>{let n=J(),[c,a]=k(""),[i,r]=k("button"),s=n.getCurrentStoryData();D(()=>{a(s?.name),r("button")},[s?.name]);let d=async()=>{r("creating");let y={code:e,csfId:s.id,importPath:s.importPath,args:Tt("args"in s?Object.entries(s.args||{}).reduce((p,[g,m])=>(L(m,s.initialArgs?.[g])||(p[g]=m),p),{}):{}),name:c},I=n.getChannel();if(I)try{let{newStoryId:p}=await ie(I,Y.SAVE_NEW_STORY_REQUEST,Y.SAVE_NEW_STORY_RESPONSE,y);p===s.id?(r("success"),setTimeout(()=>{r("button")},2e3)):(r("button"),n.addNotification({id:"create-new-story-file-success",content:{headline:"Story file created",subHeadline:`${c} was created`},duration:8e3,icon:o.createElement(B,null)})),await De(n.selectStory,p)}catch(p){console.error(p),n.addNotification({id:"create-new-story-file-error",content:{headline:"Failed to save story",subHeadline:"Please try again"},duration:8e3,icon:o.createElement(B,null)}),r("error"),setTimeout(()=>{r("button")},2e3)}finally{t()}},l=window.CONFIG_TYPE==="DEVELOPMENT";return o.createElement(vt,null,i==="button"&&l&&o.createElement(O,{onClick:()=>r("input"),variant:"outline"},o.createElement(Ae,{size:16})," Save to story"),i==="button"&&!l&&o.createElement(W,{as:"div",hasChrome:!1,trigger:"hover",tooltip:o.createElement(ee,{note:"Only available in development mode"})},o.createElement(mt,{variant:"outline",type:"button"},o.createElement(Ae,{size:16})," Save to story")),i==="input"&&o.createElement(o.Fragment,null,o.createElement(ht,{placeholder:"Type story name",required:!0,autoFocus:!0,value:c,onChange:y=>a(y.target.value)}),o.createElement(O,{onClick:d,type:"submit",variant:"outline"},"Save")),i==="creating"&&o.createElement(O,{onClick:()=>r("input"),variant:"outline"},o.createElement(St,null)," Saving"),i==="success"&&o.createElement(It,{variant:"solid",type:"button"},o.createElement(bt,null)," Saved"),i==="error"&&o.createElement(Et,{variant:"ghost",type:"button"},o.createElement(_t,null)," Failed to save"))};async function De(e,t,n=1){if(n>10)throw new Error("We could not select the new story. Please try again.");try{await e(t)}catch{return await new Promise(a=>setTimeout(a,500)),De(e,t,n+1)}}var $=e=>e.map(t=>typeof t=="string"?Q(t):typeof t=="object"&&t!==null?Array.isArray(t)?`[${t.map(n=>typeof n=="string"?Q(n):n).join(", ")}]`:`{ ${Object.entries(t).reduce((n,[c,a])=>(typeof a=="object"&&a!==null?n.push(`${c}: ${$([a])}`):n.push(`${c}
4: ${typeof a=="string"?Q(a):a}`),n),[]).join(", ")} }`:String(t)).join(", "),Q=e=>{let t=e.replace(/\\/g,"\\\\");return t.includes(` 5`)?`\`${t.replace(/`/g,"\\`")}\``:`'${t.replace(/'/g,"\\'")}'`},kt=(e,t)=>{let n=[...t];if(e.event.type==="dblclick"){let c=0;for(let a=n.length-1;a>=0&&c<2;a--)n[a].event.type==="click"&&(n.splice(a,1),c++);return n.push(e),n}if(e.event.type==="type"){for(let c=n.length-1;c>=0;c--){let a=n[c],i=a.event.type!=="type",r=a.event.type==="keydown"&&a.event.key==="shift";if(i&&!r)return n.push(e),n;if(a?.event.type==="type"&&Ot(a,e))return a.event.value=e.event.value,n}return n.push(e),n}if(e.event.type==="keyup"){for(let c=n.length-1;c>=0;c--){let a=n[c];if(a.event.type==="keydown"&&a.event.key==="shift")return n.splice(c,1),n}return n}if(e.event.type==="focus"){let c=!1,a=null;for(let i=n.length-1;i>=0;i--){let r=n[i];if(r?.event.type==="keydown"&&r?.event.key==="tab"&&(a=i),r?.event.type==="keydown"&&r?.event.key==="shift"){c=!0;break}}return a!==null&&(n.splice(a,1),n.push({elementQuery:e.elementQuery,event:{type:"focus",shift:c}})),n}return n.push(e),n},Ot=(e,t)=>e.elementQuery.object===t.elementQuery.object&&e.elementQuery.method===t.elementQuery.method&&$(e.elementQuery.args)===$(t.elementQuery.args)&&e.elementQuery.nth===t.elementQuery.nth,Re={click:"click",dblclick:"dblClick",keydown:"keyboard",type:"type",select:"selectOptions",upload:"upload",focus:"focus"},xt=(e,t)=>{let n=[],c=!1,a=!1,i=!1;for(let d of e){let{event:l}=d;if(l.type==="keyup"||l.type==="keydown"&&["shift","tab"].includes(l.key))continue;if(l.type==="assertion"){i=!0;let{queryString:f,asElementPostfix:_,warning:h}=Pe(d.elementQuery,t),C=`expect(${f.replace(_,"")})`.replace("await ","").replace("canvas.find","canvas.query");l.args&&l.args.length>0?C+=`.${l.assertionType}(${$(l.args)})`:C+=`.${l.assertionType}()`,d.elementQuery.object==="body"&&(c=!0),d.elementQuery.object==="canvas"&&(a=!0),n.push({text:`await waitFor(() => ${C})`,warning:h});continue}let y=`await userEvent.${Re[l.type]}`,{queryString:I,assertion:p,warning:g}=Pe(d.elementQuery,t),m="";l.type==="type"?l.value===""?(y=y.replace(Re[l.type],"clear"),m=""):m=`, ${Q(l.value)}`:l.type==="keydown"?(I="",p=null,g=void 0,m=`'${l.key}'`):l.type==="select"?m=`, [${l.options.map(f=>`'${f}'`).join(", ")}]`:l.type==="upload"?m=`, [${l.files.map(f=>`new File(['${f}'], '${f}')`).join(", ")}]`:l.type==="focus"&&(y=y.replace("focus","tab"),I="",p=null,g=void 0,m=l.shift?"{ shift: true }":""),I&&(d.elementQuery.object==="body"?c=!0:a=!0),p&&(n.push({text:p,warning:g}),i=!0),n.push({text:`${y}(${I}${m});`,warning:g})}if(!n.length)return{imports:[],play:[]};let r=["userEvent"];a&&r.push("within"),(i||c)&&r.push("waitFor","expect");let s=[{text:"play: async ({ canvasElement }) => {"}];return c&&s.push({text:G("const body = canvasElement.ownerDocument.body;")}),a&&(c?s.push({text:G("const canvas = within(body);")}):s.push({text:G("const canvas = within(canvasElement.ownerDocument.body);")})),s.push(...n.map(d=>({text:G(d.text),warning:d.warning})),{text:"}"}),{imports:[{text:`import { ${r.join(", ")} } from 'storybook/test';`}],play:s}},G=e=>` ${e}`,Pe=(e,t)=>{let n=" as HTMLElement",c=`${e.object==="canvas"?"await ":""}${e.object}.${e.method}`,a=$(e.args),i;e.method==="querySelector"?i="QUERY_SELECTOR":e.method.includes("ByRole")&&(!e.args[1]||!("name"in e.args[1]))?i="ROLE_WITHOUT_NAME":e.method.includes("ByTestId")&&(i="TEST_ID");let r=e.object==="body"&&t?n:"",s=`${c}(${a})${r}`,d=e.nth===null?s:`(${s})[${e.nth}]`,l=d.replace(r,"");return{assertion:e.object==="body"?`await waitFor(() => expect(${l}).toBeInTheDocument());`:null,queryString:d,asElementPostfix:n,warning:i}},Le=()=>se(w,JSON.stringify([])),je=()=>{let[e,t]=q();return[e[Oe]===!0,n=>{t({[Oe]:n})}]},At=()=>{let[e,t]=q();return[e[xe]===!0,n=>{t({[xe]:n})}]},Rt=()=>{let[e,t]=Le(),[n,c]=je(),[a,i]=At();ue({[Y.INTERACTION]:v=>{t(T=>
5JSON.stringify(kt(v,JSON.parse(T))))}});let r=()=>{n&&a&&i(!1),c(!n)},s=()=>i(!a),d=()=>t(()=>JSON.stringify([])),y=J().getCurrentStoryData(),I=()=>{c(!1),i(!1)};D(()=>{d(),(n||a)&&I()},[y?.id]);let p=[".ts",".tsx"].some(v=>y?.importPath.endsWith(v)),[g]=Fe(e,100),m=V(()=>xt(JSON.parse(g),p),[g,p]),f=E(null);D(()=>{f.current?.parentElement?.style&&(f.current.parentElement.style.height="100%")},[]);let _=E(null),[h,C]=k(!0);return re(()=>{let v=_.current;if(!v||!h)return;let T=new MutationObserver(()=>{h&&setTimeout(()=>{v.scrollTop=v.scrollHeight})});return T.observe(v,{childList:!0,subtree:!0}),()=>T.disconnect()},[m,h]),o.createElement(it,{ref:f},o.createElement(st,null,o.createElement(me,null,o.createElement(ut,null,o.createElement(yt,null,o.createElement(O,{onClick:r},o.createElement(Ne,{isHidden:n},o.createElement(ne,{isRecording:!1}),"Start recording"),o.createElement(dt,{isHidden:!n},o.createElement(ne,{isRecording:!0}),"Stop recording")),o.createElement(pt,{disabled:!n,onClick:s,isAsserting:a},o.createElement(Ct,null),a?"Choose element":"Add assertion"),o.createElement(O,{onClick:d,disabled:!m.play.length},o.createElement(be,null),"Reset")),m.play.length>0&&o.createElement(wt,{code:m,turnOffRecording:I})))),o.createElement(lt,{ref:_,onScroll:v=>{let{scrollTop:T,scrollHeight:x,clientHeight:H}=v.target;C(T+H>=x)}},m.play.length===0&&!n&&o.createElement(Z,{title:"No interactions have been recorded.",description:o.createElement(gt,null,"Click the record button",o.createElement(ne,{isRecording:!1,onClick:r,style:{cursor:"pointer"}}),"to start recording.")}),m.play.length===0&&n&&o.createElement(Z,{title:"Recording is in progress...",description:a?"Click on elements to record assertions.":"Interact with the story to record events."}),m.play.length>0&&o.createElement(ft,null,o.createElement(Te,{name:"Imports",codeLines:m.imports}),o.createElement(Te,{name:"Play Function",codeLines:m.play,isSticky:!0}))))};function Pt(){let[e]=Le(),[t]=je();return o.createElement("div",null,o.createElement(ye,{col:1},o.createElement("span",{style:{display:"inline-block",verticalAlign:"middle"}},"Interaction Recorder"),t&&o.createElement(pe,{status:"neutral"},JSON.parse(e).length)))}K.register(w,e=>{e.getChannel()?.on(Y.SAVE_NEW_STORY_RESPONSE,n=>{if(!n.success)return;let c=e.getCurrentStoryData();c.type==="story"&&(e.resetStoryArgs(c),n.payload.newStoryId&&e.selectStory(n.payload.newStoryId))}),K.add(rt,{type:le.PANEL,title:Pt,match:({viewMode:n})=>n==="story",render:({active:n})=>o.createElement(de,{active:n??!1},o.createElement(Rt,null))})});})(); 6}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.