Anvil/sb-addons/essentials-controls-2/manager-bundle.js

413 lines
497 KiB
JavaScript
Raw Normal View History

2024-06-16 17:30:30 +02:00
try{
2024-07-31 10:01:28 +02:00
(()=>{var B2=Object.create;var Da=Object.defineProperty;var L2=Object.getOwnPropertyDescriptor;var q2=Object.getOwnPropertyNames;var M2=Object.getPrototypeOf,U2=Object.prototype.hasOwnProperty;var et=(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 Tt=(e,t)=>()=>(e&&(t=e(e=0)),t);var J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hl=(e,t)=>{for(var r in t)Da(e,r,{get:t[r],enumerable:!0})},J2=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of q2(t))!U2.call(e,o)&&o!==r&&Da(e,o,{get:()=>t[o],enumerable:!(n=L2(t,o))||n.enumerable});return e};var ao=(e,t,r)=>(r=e!=null?B2(M2(e)):{},J2(t||!e||!e.__esModule?Da(r,"default",{value:e,enumerable:!0}):r,e));var S=Tt(()=>{});var A=Tt(()=>{});var T=Tt(()=>{});var $2,Gl,z2,Wl,V2,H2,mn,rr,G2,gn,W2,Kl,K2,Yl,Y2,X2,nr,Q2,Xl,tt,bn,Fa=Tt(()=>{S();A();T();$2=Object.create,Gl=Object.defineProperty,z2=Object.getOwnPropertyDescriptor,Wl=Object.getOwnPropertyNames,V2=Object.getPrototypeOf,H2=Object.prototype.hasOwnProperty,mn=(e=>typeof et<"u"?et:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof et<"u"?et:t)[r]}):e)(function(e){if(typeof et<"u")return et.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),rr=(e,t)=>function(){return t||(0,e[Wl(e)[0]])((t={exports:{}}).exports,t),t.exports},G2=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wl(t))!H2.call(e,o)&&o!==r&&Gl(e,o,{get:()=>t[o],enumerable:!(n=z2(t,o))||n.enumerable});return e},gn=(e,t,r)=>(r=e!=null?$2(V2(e)):{},G2(t||!e||!e.__esModule?Gl(r,"default",{value:e,enumerable:!0}):r,e)),W2=Object.create,Kl=Object.defineProperty,K2=Object.getOwnPropertyDescriptor,Yl=Object.getOwnPropertyNames,Y2=Object.getPrototypeOf,X2=Object.prototype.hasOwnProperty,nr=(e,t)=>function(){return t||(0,e[Yl(e)[0]])((t={exports:{}}).exports,t),t.exports},Q2=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Yl(t))!X2.call(e,o)&&o!==r&&Kl(e,o,{get:()=>t[o],enumerable:!(n=K2(t,o))||n.enumerable});return e},Xl=(e,t,r)=>(r=e!=null?W2(Y2(e)):{},Q2(t||!e||!e.__esModule?Kl(r,"default",{value:e,enumerable:!0}):r,e)),tt=e=>`control-${e.replace(/\s+/g,"-")}`,bn=e=>`set-${e.replace(/\s+/g,"-")}`});var E,Ql,jt,F6,j6,N6,B6,Zl,L6,Oe,vn,ja,q6,M6,U6,J6,eu,$6,z6,V6,$e,tu,H6,G6,ze,W6,K6,Y6,ru,Nt,X6,Xe,he,Q6,Z6,e8,io=Tt(()=>{S();A();T();E=__REACT__,{Children:Ql,Component:jt,Fragment:F6,Profiler:j6,PureComponent:N6,StrictMode:B6,Suspense:Zl,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:L6,cloneElement:Oe,createContext:vn,createElement:ja,createFactory:q6,createRef:M6,forwardRef:U6,isValidElement:J6,lazy:eu,memo:$6,startTransition:z6,unstable_act:V6,useCallback:$e,useContext:tu,useDebugValue:H6,useDeferredValue:G6,useEffect:ze,useId:W6,useImperativeHandle:K6,useInsertionEffect:Y6,useLayoutEffect:ru,useMemo:Nt,useReducer:X6,useRef:Xe,useState:he,useSyncExternalStore:Q6,useTransition:Z6,version:e8}=__REACT__});var au={};Hl(au,{A:()=>t1,ActionBar:()=>Na,AddonPanel:()=>Ba,Badge:()=>La,Bar:()=>qa,Blockquote:()=>r1,Button:()=>Bt,ClipboardCode:()=>n1,Code:()=>o1,DL:()=>a1,Div:()=>i1,DocumentWrapper:()=>s1,EmptyTabContent:()=>Ma,ErrorFormatter:()=>l1,FlexBar:()=>Ua,Form:()=>dt,H1:()=>u1,H2:()=>Ja,H3:()=>c1,H4:()=>p1,H5:()=>d1,H6:()=>f1,HR:()=>y1,IconButton:()=>ht,IconButtonSkeleton:()=>h1,Icons:()=>m1,Img:()=>g1,LI:()=>b1,Link:()=>ar,ListItem:()=>v1,Loader:()=>x1,Modal:()=>mt,OL:()=>E1,P:()=>w1,Placeholder:()=>S1,Pre:()=>A1,ResetWrapper:()=>$a,ScrollArea:()=>T1,Separator:()=>C1,Spaced:()=>za,Span:()=>_1,StorybookIcon:()=>O1,StorybookLogo:()=>I1,Symbols:()=>P1,SyntaxHighlighter:()=>so,TT:()=>k1,TabBar:()=>R1,TabButton:()=>D1,TabWrapper:()=>F1,Table:()=>j1,Tabs:()=>N1,TabsState:()=>B1,TooltipLinkList:()=>L1,TooltipMessage:()=>q1,TooltipNote:()=>ir,UL:()=>M1,WithTooltip:()=>Lt,WithTooltipPure:()=>Va,Zoom:()=>Ha,codeCommon:()=>Ir,components:()=>Ga,createCopyToClipboardFunction:()=>U1,defa
[ ]{`+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)( *)$/),c=u?u[1]:"",d=s;typeof s=="string"&&s.includes(`
`)&&(d=String(s).split(`
`).map(function(y,f){return f===0?y:""+c+y}).join(`
`)),i+=d+n[l+1]}),i}Pe(De,"dedent");function Vi({code:e,category:t}){let r=String(e).padStart(4,"0");return`SB_${t}_${r}`}Pe(Vi,"parseErrorCode");var Mh=class Uh extends Error{category;code;data={};documentation;fromStorybook=!0;get fullErrorCode(){return Vi({code:this.code,category:this.category})}get name(){let t=this.constructor.name;return`${this.fullErrorCode} (${t})`}constructor(t){super(Uh.getFullMessage(t)),this.category=t.category,this.documentation=t.documentation??!1,this.code=t.code}static getFullMessage({documentation:t,code:r,category:n,message:o}){let a;return t===!0?a=`https://storybook.js.org/error/${Vi({code:r,category:n})}`:typeof t=="string"?a=t:Array.isArray(t)&&(a=`
${t.map(i=>` - ${i}`).join(`
`)}`),`${o}${a!=null?`
More info: ${a}
`:""}`}};Pe(Mh,"StorybookError");var Me=Mh,OP=(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))(OP||{}),Jh=class extends Me{constructor(t){super({category:"PREVIEW_API",code:1,message:De`
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}};Pe(Jh,"MissingStoryAfterHmrError");var $h=Jh,IP=class extends Me{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:De`
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}};Pe(IP,"ImplicitActionsDuringRendering");var zh=class extends Me{constructor(){super({category:"PREVIEW_API",code:3,message:De`
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
You probably meant to call \`await preview.extract()\` which does the above for you.`})}};Pe(zh,"CalledExtractOnStoreError");var Vh=zh,Hh=class extends Me{constructor(){super({category:"PREVIEW_API",code:4,message:De`
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"})}};Pe(Hh,"MissingRenderToCanvasError");var Gh=Hh,Wh=class extends Me{constructor(t){super({category:"PREVIEW_API",code:5,message:De`
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}};Pe(Wh,"CalledPreviewMethodBeforeInitializationError");var rt=Wh,Kh=class extends Me{constructor(t){super({category:"PREVIEW_API",code:6,message:De`
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}};Pe(Kh,"StoryIndexFetchError");var Yh=Kh,Xh=class extends Me{constructor(t){super({category:"PREVIEW_API",code:7,message:De`
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}};Pe(Xh,"MdxFileWithNoCsfReferencesError");var Qh=Xh,Zh=class extends Me{constructor(){super({category:"PREVIEW_API",code:8,message:De`
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.`})}};Pe(Zh,"EmptyIndexError");var em=Zh,tm=class extends Me{constructor(t){super({category:"PREVIEW_API",code:9,message:De`
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}};Pe(tm,"NoStoryMatchError");var rm=tm,nm=class extends Me{constructor(t){super({category:"PREVIEW_API",code:10,message:De`
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}};Pe(nm,"MissingStoryFromCsfFileError");var om=nm,am=class extends Me{constructor(){super({category:"PREVIEW_API",code:11,message:De`
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`})}};Pe(am,"StoryStoreAccessedBeforeInitializationError");var im=am,sm=class extends Me{constructor(t){super({category:"PREVIEW_API",code:12,message:De`
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}};Pe(sm,"MountMustBeDestructuredError");var Mo=sm,PP=class extends Me{constructor(){super({category:"PREVIEW_API",code:13,message:De`
You must configure testingLibraryRender to use play in portable stories.
import { render } from '@testing-library/[renderer]';
setProjectAnnotations({
testingLibraryRender: render,
});
For other testing renderers, you can configure \`renderToCanvas\` like so:
import { render } from 'your-test-renderer';
setProjectAnnotations({
renderToCanvas: ({ storyFn }) => {
const Story = storyFn();
// Svelte
render(Story.Component, Story.props);
// Vue
render(Story);
// or for React
render(<Story/>);
},
});`})}};Pe(PP,"TestingLibraryMustBeConfiguredError");var lm=class extends Me{constructor(t){super({category:"PREVIEW_API",code:14,message:De`
No render function available for storyId '${t.id}'
`}),this.data=t}};Pe(lm,"NoRenderFunctionError");var um=lm,cm=class extends Me{constructor(){super({category:"PREVIEW_API",code:15,message:De`
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.
`})}};Pe(cm,"NoStoryMountedError");var pm=cm,kP=class extends Me{constructor(){super({category:"FRAMEWORK_NEXTJS",code:1,documentation:"https://storybook.js.org/docs/get-started/nextjs#faq",message:De`
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.
`})}};Pe(kP,"NextJsSharpError");var RP=class extends Me{constructor(t){super({category:"FRAMEWORK_NEXTJS",code:2,message:De`
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}};Pe(RP,"NextjsRouterMocksNotAvailable");var dm=class extends Me{constructor(t){super({category:"DOCS-TOOLS",code:1,documentation:"https://github.com/storybookjs/storybook/issues/26606",message:De`
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}};Pe(dm,"UnknownArgTypesError");var Uo=dm;S();A();T();var DP=Object.create,mm=Object.defineProperty,FP=Object.getOwnPropertyDescriptor,jP=Object.getOwnPropertyNames,NP=Object.getPrototypeOf,BP=Object.prototype.hasOwnProperty,LP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jP(t))!BP.call(e,o)&&o!==r&&mm(e,o,{get:()=>t[o],enumerable:!(n=FP(t,o))||n.enumerable});return e},MP=(e,t,r)=>(r=e!=null?DP(NP(e)):{},qP(t||!e||!e.__esModule?mm(r,"default",{value:e,enumerable:!0}):r,e)),UP=LP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isEqual=function(){var t=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(s,l,u){var c,d,y,f=t.call(s),h=t.call(l);if(s===l)return!0;if(s==null||l==null)return!1;if(u.indexOf(s)>-1&&u.indexOf(l)>-1)return!0;if(u.push(s,l),f!=h||(c=n(s),d=n(l),c.length!=d.length||c.some(function(g){return!i(s[g],l[g],u)})))return!1;switch(f.slice(8,-1)){case"Symbol":return s.valueOf()==l.valueOf();case"Date":case"Number":return+s==+l||+s!=+s&&+l!=+l;case"RegExp":case"Function":case"String":case"Boolean":return""+s==""+l;case"Set":case"Map":c=s.entries(),d=l.entries();do if(!i((y=c.next()).value,d.next().value,u))return!1;while(!y.done);return!0;case"ArrayBuffer":s=new Uint8Array(s),l=new Uint8Array(l);case"DataView":s=new Uint8Array(s.buffer),l=new Uint8Array(l.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(s.length!=l.length)return!1;for(y=0;y<s.length;y++)if((y in s||y in l)&&(y in s!=y in l||!i(s[y],l[y],u)))return!1;return!0;case"Object":return i(r(s),r(l),u);default:return!1}}(o,a,[])}}()});function JP(e){return e.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(t,r,n,o)=>`${r} ${n}${o}`).replace(/([a-z])([A-Z])/g,(t,r,n)=>`${r} ${n}`).replace(/([a-z])([0-9])/gi,(t,r,n)=>`${r} ${n}`).replace(/([0-9])([a-z])/gi,(t,r,n)=>`${r} ${n}`).replace(/(\s|^)(\w)/g,(t,r,n)=>`${r}${n.toUpperCase()}`).replace(/ +/g," ").trim()}var fm=MP(UP()),gm=e=>e.map(t=>typeof t<"u").filter(Boolean).length,$P=(e,t)=>{let{exists:r,eq:n,neq:o,truthy:a}=e;if(gm([r,n,o,a])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:r,eq:n,neq:o})}`);if(typeof n<"u")return(0,fm.isEqual)(t,n);if(typeof o<"u")return!(0,fm.isEqual)(t,o);if(typeof r<"u"){let i=typeof t<"u";return r?i:!i}return typeof a>"u"||a?!!t:!t},bm=(e,t,r)=>{if(!e.if)return!0;let{arg:n,global:o}=e.if;if(gm([n,o])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:n,global:o})}`);let a=n?t[n]:r[o];return $P(e.if,a)},Hi=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),ym=(e,t)=>{let r=Hi(e);if(r==="")throw new Error(`Invalid ${t} '${e}', must include alphanumeric characters`);return r},vm=(e,t)=>`${ym(e,"kind")}${t?`--${ym(t,"name")}`:""}`,xm=e=>JP(e);function hm(e,t){return Array.isArray(t)?t.includes(e):e.match(t)}function Jo(e,{includeStories:t,excludeStories:r}){return e!=="__esModule"&&(!t||hm(e,t))&&(!r||!hm(e,r))}var Em=(...e)=>{let t=e.reduce((r,n)=>(n.startsWith("!")?r.delete(n.slice(1)):r.add(n),r),new Set);return Array.from(t)};var zP=Object.create,ds=Object.defineProperty,VP=Object.getOwnPropertyDescriptor,HP=Object.getOwnPropertyNames,GP=Object.getPrototypeOf,WP=Object.prototype.hasOwnProperty,m=(e,t)=>ds(e,"name",{value:t,configurable:!0}),$o=(e=>typeof et<"u"?et:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof et<"u"?et:t)[r]}):e)(function(e){if(typeof et<"u")return et.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),KP=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(l
`)>=0)return!1;return!0}m(un,"singleLineValues");function no($,H){var ue;if($.indent===" ")ue=" ";else if(typeof $.indent=="number"&&$.indent>0)ue=G.call(Array($.indent+1)," ");else return null;return{base:ue,prev:G.call(Array(H+1),ue)}}m(no,"getIndent");function wr($,H){if($.length===0)return"";var ue=`
`+H.prev+H.base;return ue+G.call($,","+ue)+`
`+H.prev}m(wr,"indentedJoin");function Qt($,H){var ue=we($),de=[];if(ue){de.length=$.length;for(var Ae=0;Ae<$.length;Ae++)de[Ae]=ce($,Ae)?H($[Ae],$):""}var se=typeof R=="function"?R($):[],ot;if(M){ot={};for(var yt=0;yt<se.length;yt++)ot["$"+se[yt]]=se[yt]}for(var ke in $)ce($,ke)&&(ue&&String(Number(ke))===ke&&ke<$.length||M&&ot["$"+ke]instanceof Symbol||(D.call(/[^\w$]/,ke)?de.push(H(ke,$)+": "+H($[ke],$)):de.push(ke+": "+H($[ke],$))));if(typeof R=="function")for(var xe=0;xe<se.length;xe++)te.call($,se[xe])&&de.push("["+H(se[xe])+"]: "+H($[se[xe]],$));return de}m(Qt,"arrObjKeys")}),XR=L((e,t)=>{"use strict";var r=Kr(),n=WR(),o=YR(),a=Un(),i=r("%WeakMap%",!0),s=r("%Map%",!0),l=n("WeakMap.prototype.get",!0),u=n("WeakMap.prototype.set",!0),c=n("WeakMap.prototype.has",!0),d=n("Map.prototype.get",!0),y=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),h=m(function(v,O){for(var C=v,I;(I=C.next)!==null;C=I)if(I.key===O)return C.next=I.next,I.next=v.next,v.next=I,I},"listGetNode"),g=m(function(v,O){var C=h(v,O);return C&&C.value},"listGet"),_=m(function(v,O,C){var I=h(v,O);I?I.value=C:v.next={key:O,next:v.next,value:C}},"listSet"),x=m(function(v,O){return!!h(v,O)},"listHas");t.exports=m(function(){var v,O,C,I={assert:m(function(P){if(!I.has(P))throw new a("Side channel does not contain "+o(P))},"assert"),get:m(function(P){if(i&&P&&(typeof P=="object"||typeof P=="function")){if(v)return l(v,P)}else if(s){if(O)return d(O,P)}else if(C)return g(C,P)},"get"),has:m(function(P){if(i&&P&&(typeof P=="object"||typeof P=="function")){if(v)return c(v,P)}else if(s){if(O)return f(O,P)}else if(C)return x(C,P);return!1},"has"),set:m(function(P,F){i&&P&&(typeof P=="object"||typeof P=="function")?(v||(v=new i),u(v,P,F)):s?(O||(O=new s),y(O,P,F)):(C||(C={key:{},next:null}),_(C,P,F))},"set")};return I},"getSideChannel")}),_s=L((e,t)=>{"use strict";var r=String.prototype.replace,n=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports={default:o.RFC3986,formatters:{RFC1738:m(function(a){return r.call(a,n,"+")},"RFC1738"),RFC3986:m(function(a){return String(a)},"RFC3986")},RFC1738:o.RFC1738,RFC3986:o.RFC3986}}),dg=L((e,t)=>{"use strict";var r=_s(),n=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var v=[],O=0;O<256;++O)v.push("%"+((O<16?"0":"")+O.toString(16)).toUpperCase());return v}(),i=m(function(v){for(;v.length>1;){var O=v.pop(),C=O.obj[O.prop];if(o(C)){for(var I=[],P=0;P<C.length;++P)typeof C[P]<"u"&&I.push(C[P]);O.obj[O.prop]=I}}},"compactQueue"),s=m(function(v,O){for(var C=O&&O.plainObjects?Object.create(null):{},I=0;I<v.length;++I)typeof v[I]<"u"&&(C[I]=v[I]);return C},"arrayToObject"),l=m(function v(O,C,I){if(!C)return O;if(typeof C!="object"){if(o(O))O.push(C);else if(O&&typeof O=="object")(I&&(I.plainObjects||I.allowPrototypes)||!n.call(Object.prototype,C))&&(O[C]=!0);else return[O,C];return O}if(!O||typeof O!="object")return[O].concat(C);var P=O;return o(O)&&!o(C)&&(P=s(O,I)),o(O)&&o(C)?(C.forEach(function(F,D){if(n.call(O,D)){var U=O[D];U&&typeof U=="object"&&F&&typeof F=="object"?O[D]=v(U,F,I):O.push(F)}else O[D]=F}),O):Object.keys(C).reduce(function(F,D){var U=C[D];return n.call(F,D)?F[D]=v(F[D],U,I):F[D]=U,F},P)},"merge"),u=m(function(v,O){return Object.keys(O).reduce(function(C,I){return C[I]=O[I],C},v)},"assignSingleSource"),c=m(function(v,O,C){var I=v.replace(/\+/g," ");if(C==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},"decode"),d=1024,y=m(function(v,O,C,I,P){if(v.length===0)return v;var F=v;if(typeof v=="symbol"?F=Symbol.prototype.toString.call(v):typeof v!="string"&&(F=String(v)),C==="iso-8859-1")return escape(F).replace(/%u[0-9a-f]{4}/gi,function(R){return"%26%23"+parseInt(R.slice(2),16)+"%3B"});for(var D="",U=0;U<F.length;U+=d){for(var G=F.length>=d?F.slice(U,U+d):F,X=[],Q=0;Q<G.length;++Q){var V=G.charCodeAt(Q);if(V===45||V===46||V===95||V===126||V>=48&&V<=57||V>=65&&V<=90||V>=97&&V<=122||P===r.RFC1738&&(V===40||V===41)){X[X.length]=G.charAt(Q);continue}if(V<128){X[X.length]=a[V];continue}if(V<2048){X[X.length]=a[192|V>>6]+a[128|V&63];con
`,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:"\u01
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ne=!0,re=!1,Z;return{s:m(function(){M=M.call(R)},"s"),n:m(function(){var ae=M.next();return ne=ae.done,ae},"n"),e:m(function(ae){re=!0,Z=ae},"e"),f:m(function(){try{!ne&&M.return!=null&&M.return()}finally{if(re)throw Z}},"f")}}m(a,"_createForOfIteratorHelper");function i(R,q){if(R){if(typeof R=="string")return s(R,q);var M=Object.prototype.toString.call(R).slice(8,-1);if(M==="Object"&&R.constructor&&(M=R.constructor.name),M==="Map"||M==="Set")return Array.from(R);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return s(R,q)}}m(i,"_unsupportedIterableToArray");function s(R,q){(q==null||q>R.length)&&(q=R.length);for(var M=0,Y=new Array(q);M<q;M++)Y[M]=R[M];return Y}m(s,"_arrayLikeToArray");var l=n5(),u={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:c()};function c(){var R={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 v(0,5).forEach(function(q){v(0,5).forEach(function(M){v(0,5).forEach(function(Y){return d(q,M,Y,R)})})}),v(0,23).forEach(function(q){var M=q+232,Y=y(q*10+8);R[M]="#"+Y+Y+Y}),R}m(c,"getDefaultColors");function d(R,q,M,Y){var te=16+R*36+q*6+M,ne=R>0?R*40+55:0,re=q>0?q*40+55:0,Z=M>0?M*40+55:0;Y[te]=f([ne,re,Z])}m(d,"setStyleColor");function y(R){for(var q=R.toString(16);q.length<2;)q="0"+q;return q}m(y,"toHexString");function f(R){var q=[],M=a(R),Y;try{for(M.s();!(Y=M.n()).done;){var te=Y.value;q.push(y(te))}}catch(ne){M.e(ne)}finally{M.f()}return"#"+q.join("")}m(f,"toColorHexString");function h(R,q,M,Y){var te;return q==="text"?te=I(M,Y):q==="display"?te=_(R,M,Y):q==="xterm256Foreground"?te=D(R,Y.colors[M]):q==="xterm256Background"?te=U(R,Y.colors[M]):q==="rgb"&&(te=g(R,M)),te}m(h,"generateOutput");function g(R,q){q=q.substring(2).slice(0,-1);var M=+q.substr(0,2),Y=q.substring(5).split(";"),te=Y.map(function(ne){return("0"+Number(ne).toString(16)).substr(-2)}).join("");return F(R,(M===38?"color:#":"background-color:#")+te)}m(g,"handleRgb");function _(R,q,M){q=parseInt(q,10);var Y={"-1":m(function(){return"<br/>"},"_"),0:m(function(){return R.length&&x(R)},"_"),1:m(function(){return P(R,"b")},"_"),3:m(function(){return P(R,"i")},"_"),4:m(function(){return P(R,"u")},"_"),8:m(function(){return F(R,"display:none")},"_"),9:m(function(){return P(R,"strike")},"_"),22:m(function(){return F(R,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:m(function(){return G(R,"i")},"_"),24:m(function(){return G(R,"u")},"_"),39:m(function(){return D(R,M.fg)},"_"),49:m(function(){return U(R,M.bg)},"_"),53:m(function(){return F(R,"text-decoration:overline")},"_")},te;return Y[q]?te=Y[q]():4<q&&q<7?te=P(R,"blink"):29<q&&q<38?te=D(R,M.colors[q-30]):39<q&&q<48?te=U(R,M.colors[q-40]):89<q&&q<98?te=D(R,M.colors[8+(q-90)]):99<q&&q<108&&(te=U(R,M.colors[8+(q-100)])),te}m(_,"handleDisplay");function x(R){var q=R.slice(0);return R.length=0,q.reverse().map(function(M){return"</"+M+">"}).join("")}m(x,"resetStyles");function v(R,q){for(var M=[],Y=R;Y<=q;Y++)M.push(Y);return M}m(v,"range");function O(R){return function(q){return(R===null||q.category!==R)&&R!=="all"}}m(O,"notCategory");function C(R){R=parseInt(R,10);var q=null;return R===0?q="all":R===1?q="bold":2<R&&R<5?q="underline":4<R&&R<7?q="blink":R===8?q="hide":R===9?q="strike":29<R&&R<38||R===39||89<R&&R<98?q="foreground-color":(39<R&&R<48||R===49||99<R&&R<108)&&(q="background-color"),q}m(C,"categoryForCode");function I(R,q){return q.escapeXML?l.encodeXML(R):R}m(I,"pushText");function P(R,q,M){return M||(M=""),R.push(q),"<".concat(q).concat(M?' style="'.concat(M,'"'):"",">")}m(P,"pushTag");function F(R,q){return P(R,"span",q)}m(F,"pushStyle");function D(R,q){return P(R,"span","color:"+q)}m(D,"pushForegroundColor");function U(R,q){return P(R,"span","background-color:"+q)}m(U,"pushBackgroundColor");function G(R,q){var M;if(R.slice(-1)[0]===q&&(M=R.pop()),M)return"</"+q+">"}m(G,"closeTag");function X(R,q,M){var Y=!1,te=3;function ne(){re
Previous: ${o.deps}
Incoming: ${r}`),(r==null||o.deps==null||!l5(r,o.deps))&&(t(o),o.deps=r),o}throw Is()}m(xg,"useHook");function Jn(e,t,r){let{memoizedState:n}=xg(e,o=>{o.memoizedState=t()},r);return n}m(Jn,"useMemoLike");function u5(e,t){return Jn("useMemo",e,t)}m(u5,"useMemo");function Bn(e,t){return Jn("useCallback",()=>e,t)}m(Bn,"useCallback");function ks(e,t){return Jn(e,()=>({current:t}),[])}m(ks,"useRefLike");function c5(e){return ks("useRef",e)}m(c5,"useRef");function Eg(){let e=Ps();if(e!=null&&e.currentPhase!=="NONE")e.hasUpdates=!0;else try{pr.getChannel().emit(co)}catch{me.warn("State updates of Storybook preview hooks work only in browser")}}m(Eg,"triggerUpdate");function Rs(e,t){let r=ks(e,typeof t=="function"?t():t),n=m(o=>{r.current=typeof o=="function"?o(r.current):o,Eg()},"setState");return[r.current,n]}m(Rs,"useStateLike");function p5(e){return Rs("useState",e)}m(p5,"useState");function d5(e,t,r){let n=r!=null?()=>r(t):t,[o,a]=Rs("useReducer",n);return[o,m(i=>a(s=>e(s,i)),"dispatch")]}m(d5,"useReducer");function wg(e,t){let r=na(),n=Jn("useEffect",()=>({create:e}),t);r.currentEffects.includes(n)||r.currentEffects.push(n)}m(wg,"useEffect");function f5(e,t=[]){let r=pr.getChannel();return wg(()=>(Object.entries(e).forEach(([n,o])=>r.on(n,o)),()=>{Object.entries(e).forEach(([n,o])=>r.removeListener(n,o))}),[...Object.keys(e),...t]),Bn(r.emit.bind(r),[r])}m(f5,"useChannel");function oa(){let{currentContext:e}=na();if(e==null)throw Is();return e}m(oa,"useStoryContext");function y5(e,t){let{parameters:r}=oa();if(e)return r[e]??t}m(y5,"useParameter");function h5(){let e=pr.getChannel(),{id:t,args:r}=oa(),n=Bn(a=>e.emit(ho,{storyId:t,updatedArgs:a}),[e,t]),o=Bn(a=>e.emit(po,{storyId:t,argNames:a}),[e,t]);return[r,n,o]}m(h5,"useArgs");function m5(){let e=pr.getChannel(),{globals:t}=oa(),r=Bn(n=>e.emit(yo,{globals:n}),[e]);return[t,r]}m(m5,"useGlobals");var Ere=m(({name:e,parameterName:t,wrapper:r,skipIfNoParametersOrOptions:n=!1})=>{let o=m(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"),Ki=Qe(Lm(),1),g5=Qe(ra(),1),Am=Qe(_R(),1),b5=Qe(Lm(),1),v5=(0,b5.default)(1)(e=>Object.values(e).reduce((t,r)=>(t[r.importPath]=t[r.importPath]||r,t),{})),Sg=class{entries;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 $h({storyId:t});return r}importPathToEntry(t){return v5(this.entries)[t]}};m(Sg,"StoryIndexStore");var x5=Sg,Tm=Object.prototype.hasOwnProperty;function ts(e,t,r){for(r of e.keys())if(Vr(r,t))return r}m(ts,"find");function Vr(e,t){var r,n,o;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&Vr(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(o=n,o&&typeof o=="object"&&(o=ts(t,o),!o)||!t.has(o))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(o=n[0],o&&typeof o=="object"&&(o=ts(t,o),!o)||!Vr(n[1],t.get(o)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(Tm.call(e,r)&&++n&&!Tm.call(t,r)||!(r in t)||!Vr(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}m(Vr,"dequal");var Ho=Qe(As(),1);function lt(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(c){var d,y;return(y=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&y!==void 0?y: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)( *)$/),c=u?u[1]:"",d=s;typeof s=="string"&&s.includes(`
`)&&(d=String(s).split(`
`).map(function(y,f){return f===0?y:""+c+y}).join(`
`)),i+=d+n[l+1]}),i}m(lt,"dedent");var $r=Symbol("incompatible"),rs=m((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)?$r:e.reduce((n,o,a)=>{let i=rs(o,{type:r.value});return i!==$r&&(n[a]=i),n},new Array(e.length));case"object":return typeof e=="string"||typeof e=="number"?e:!r.value||typeof e!="object"?$r:Object.entries(e).reduce((n,[o,a])=>{let i=rs(a,{type:r.value[o]});return i===$r?n:Object.assign(n,{[o]:i})},{});default:return $r}},"map"),E5=m((e,t)=>Object.entries(e).reduce((r,[n,o])=>{if(!t[n])return r;let a=rs(o,t[n]);return a===$r?r:Object.assign(r,{[n]:a})},{}),"mapArgsToTypes"),ns=m((e,t)=>Array.isArray(e)&&Array.isArray(t)?t.reduce((r,n,o)=>(r[o]=ns(e[o],t[o]),r),[...e]).filter(r=>r!==void 0):!(0,Ho.default)(e)||!(0,Ho.default)(t)?t:Object.keys({...e,...t}).reduce((r,n)=>{if(n in t){let o=ns(e[n],t[n]);o!==void 0&&(r[n]=o)}else r[n]=e[n];return r},{}),"combineArgs"),w5=m((e,t)=>Object.entries(t).reduce((r,[n,{options:o}])=>{function a(){return n in e&&(r[n]=e[n]),r}if(m(a,"allowArg"),!o)return a();if(!Array.isArray(o))return Ut.error(lt`
Invalid argType: '${n}.options' should be an array.
More info: https://storybook.js.org/docs/react/api/argtypes
`),a();if(o.some(d=>d&&["object","function"].includes(typeof d)))return Ut.error(lt`
Invalid argType: '${n}.options' should only contain primitives. Use a 'mapping' for complex values.
More info: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values
`),a();let i=Array.isArray(e[n]),s=i&&e[n].findIndex(d=>!o.includes(d)),l=i&&s===-1;if(e[n]===void 0||o.includes(e[n])||l)return a();let u=i?`${n}[${s}]`:n,c=o.map(d=>typeof d=="string"?`'${d}'`:String(d)).join(", ");return Ut.warn(`Received illegal value for '${u}'. Supported options: ${c}`),r},{}),"validateOptions"),jn=Symbol("Deeply equal"),Go=m((e,t)=>{if(typeof e!=typeof t)return t;if(Vr(e,t))return jn;if(Array.isArray(e)&&Array.isArray(t)){let r=t.reduce((n,o,a)=>{let i=Go(e[a],o);return i!==jn&&(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(0,Ho.default)(e)&&(0,Ho.default)(t)?Object.keys({...e,...t}).reduce((r,n)=>{let o=Go(e?.[n],t?.[n]);return o===jn?r:Object.assign(r,{[n]:o})},{}):t},"deepDiff"),Ag="UNTARGETED";function Tg({args:e,argTypes:t}){let r={};return Object.entries(e).forEach(([n,o])=>{let{target:a=Ag}=t[n]||{};r[a]=r[a]||{},r[a][n]=o}),r}m(Tg,"groupArgsByTarget");function Cg(e){return Object.keys(e).forEach(t=>e[t]===void 0&&delete e[t]),e}m(Cg,"deleteUndefined");var _g=class{initialArgsByStoryId={};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=Go(this.initialArgsByStoryId[t.id],this.argsByStoryId[t.id]);this.initialArgsByStoryId[t.id]=t.initialArgs,this.argsByStoryId[t.id]=t.initialArgs,r!==jn&&this.updateFromDelta(t,r)}}updateFromDelta(t,r){let n=w5(r,t.argTypes);this.argsByStoryId[t.id]=ns(this.argsByStoryId[t.id],n)}updateFromPersisted(t,r){let n=E5(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]=Cg({...this.argsByStoryId[t],...r})}};m(_g,"ArgsStore");var S5=_g,Og=m((e={})=>Object.entries(e).reduce((t,[r,{defaultValue:n}])=>(typeof n<"u"&&(t[r]=n),t),{}),"getValuesFromArgTypes"),Ig=class{allowedGlobalNames;initialGlobals;globals;constructor({globals:t={},globalTypes:r={}}){this.set({globals:t,globalTypes:r})}set({globals:t={},globalTypes:r={}}){let n=this.initialGlobals&&Go(this.initialGlobals,this.globals);this.allowedGlobalNames=new Set([...Object.keys(t),...Object.keys(r)]);let o=Og(r);this.initialGlobals={...o,...t},this.globals=this.initialGlobals,n&&n!==jn&&this.updateFromPersisted(n)}filterAllowedGlobals(t){return Object.entries(t).reduce((r,[n,o])=>(this.allowedGlobalNames.has(n)?r[n]=o:me.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)}}};m(Ig,"GlobalsStore");var A5=Ig,T5=Qe(ra(),1),C5=m(e=>typeof e=="string"?{name:e}:e,"normalizeType"),_5=m(e=>typeof e=="string"?{type:e}:e,"normalizeControl"),O5=m((e,t)=>{let{type:r,control:n,...o}=e,a={name:t,...o};return r&&(a.type=C5(r)),n?a.control=_5(n):n===!1&&(a.control={disable:!0}),a},"normalizeInputType"),Wo=m(e=>(0,T5.default)(e,O5),"normalizeInputTypes"),Fe=m(e=>Array.isArray(e)?e:e?[e]:[],"normalizeArrays"),I5=lt`
2024-06-16 17:30:30 +02:00
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.
2024-07-31 10:01:28 +02:00
`;function Ds(e,t,r){let n=t,o=typeof t=="function"?t:null,{story:a}=n;a&&(me.debug("deprecated story",a),Ct(I5));let i=xm(e),s=typeof n!="function"&&n.name||n.storyName||a?.name||i,l=[...Fe(n.decorators),...Fe(a?.decorators)],u={...a?.parameters,...n.parameters},c={...a?.args,...n.args},d={...a?.argTypes,...n.argTypes},y=[...Fe(n.loaders),...Fe(a?.loaders)],f=[...Fe(n.beforeEach),...Fe(a?.beforeEach)],{render:h,play:g,tags:_=[]}=n,x=u.__id||vm(r.id,i);return{moduleExport:t,id:x,name:s,tags:_,decorators:l,parameters:u,args:c,argTypes:Wo(d),loaders:y,beforeEach:f,...h&&{render:h},...o&&{userStoryFn:o},...g&&{play:g}}}m(Ds,"normalizeStory");function Fs(e,t=e.title,r){let{id:n,argTypes:o}=e;return{id:Hi(n||t),...e,title:t,...o&&{argTypes:Wo(o)},parameters:{fileName:r,...e.parameters}}}m(Fs,"normalizeComponentAnnotations");var P5=m(e=>{let{globals:t,globalTypes:r}=e;(t||r)&&me.error("Global args/argTypes can only be set globally",JSON.stringify({globals:t,globalTypes:r}))},"checkGlobals"),k5=m(e=>{let{options:t}=e;t?.storySort&&me.error("The storySort option parameter can only be set globally")},"checkStorySort"),Cm=m(e=>{e&&(P5(e),k5(e))},"checkDisallowedParameters");function Pg(e,t,r){let{default:n,__namedExportsOrder:o,...a}=e,i=Fs(n,r,t);Cm(i.parameters);let s={meta:i,stories:{},moduleExports:e};return Object.keys(a).forEach(l=>{if(Jo(l,i)){let u=Ds(l,a[l],i);Cm(u.parameters),s.stories[u.id]=u}}),s}m(Pg,"processCSFFile");var Yi=Qe(As(),1),Ot=m((...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:(0,Yi.default)(s)&&(0,Yi.default)(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=>(0,Yi.default)(i))?n[o]=Ot(...a):n[o]=a[a.length-1]}),n},"combineParameters");function kg(e,t,r){let n=r(e);return o=>t(n,o)}m(kg,"decorateStory");function Rg({componentId:e,title:t,kind:r,id:n,name:o,story:a,parameters:i,initialArgs:s,argTypes:l,...u}={}){return u}m(Rg,"sanitizeStoryContextUpdate");function Dg(e,t){let r={},n=m(a=>i=>{if(!r.value)throw new Error("Decorated function called without init");return r.value={...r.value,...Rg(i)},a(r.value)},"bindWithContext"),o=t.reduce((a,i)=>kg(a,i,n),e);return a=>(r.value=a,o(a))}m(Dg,"defaultDecorateStory");function Fg(e){return e!=null&&jg(e).includes("mount")}m(Fg,"mountDestructured");function jg(e){let t=e.toString().match(/[^(]*\(([^)]*)/);if(!t)return[];let r=os(t[1]);if(!r.length)return[];let n=r[0];return n.startsWith("{")&&n.endsWith("}")?os(n.slice(1,-1).replace(/\s/g,"")).map(o=>o.replace(/:.*|=.*/g,"")):[]}m(jg,"getUsedProps");function os(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}m(os,"splitByComma");function js(e,t,r){let{moduleExport:n,id:o,name:a}=e||{},i=Ns(e,t,r),s=m(async I=>{let P={};for(let F of[..."__STORYBOOK_TEST_LOADERS__"in Ue&&Array.isArray(Ue.__STORYBOOK_TEST_LOADERS__)?[Ue.__STORYBOOK_TEST_LOADERS__]:[],Fe(r.loaders),Fe(t.loaders),Fe(e.loaders)]){if(I.abortSignal.aborted)return P;let D=await Promise.all(F.map(U=>U(I)));Object.assign(P,...D)}return P},"applyLoaders"),l=m(async I=>{let P=new Array;for(let F of[...Fe(r.beforeEach),...Fe(t.beforeEach),...Fe(e.beforeEach)]){if(I.abortSignal.aborted)return P;let D=await F(I);D&&P.push(D)}return P},"applyBeforeEach"),u=m(I=>I.originalStoryFn(I.args,I),"undecoratedStoryFn"),{applyDecorators:c=Dg,runStep:d}=r,y=[...Fe(e?.decorators),...Fe(t?.decorators),...Fe(r?.decorators)],f=e?.userStoryFn||e?.render||t.render||r.render,h=s5(c)(u,y),g=m(I=>h(I),"unboundStoryFn"),_=e?.play??t?.play,x=Fg(_);if(!f&&!x)throw new um({id:o});let v=m(I=>async()=>(await I.renderToCanvas(),I.canvas),"defaultMount"),O=e.mount??t.mount??r.mount??v,C=r.testingLibraryRender;return{...i,moduleExport:n,id:o,name:a,story:a,originalStoryFn:f,undecoratedSt
2024-06-16 17:30:30 +02:00
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/react/writing-stories/args#mapping-to-complex-arg-values
- Custom args: https://storybook.js.org/docs/react/essentials/controls#fully-custom-args
2024-07-31 10:01:28 +02:00
`),{name:"other",value:"cyclic object"}):(r.add(e),Array.isArray(e)?{name:"array",value:e.length>0?is(e[0],t,new Set(r)):{name:"other",value:"unknown"}}:{name:"object",value:(0,as.default)(e,o=>is(o,t,new Set(r)))}):{name:"object",value:{}}},"inferType"),Bg=m(e=>{let{id:t,argTypes:r={},initialArgs:n={}}=e,o=(0,as.default)(n,(i,s)=>({name:s,type:is(i,`${t}.${s}`,new Set)})),a=(0,as.default)(r,(i,s)=>({name:s}));return Ot(o,a,r)},"inferArgTypes");Bg.secondPass=!0;var R5=Qe(ra(),1),D5=Qe(DR(),1),_m=m((e,t)=>Array.isArray(t)?t.includes(e):e.match(t),"matches"),F5=m((e,t,r)=>!t&&!r?e:e&&(0,D5.default)(e,(n,o)=>{let a=n.name||o;return(!t||_m(a,t))&&(!r||!_m(a,r))}),"filterArgTypes"),j5=m((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"&&me.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"),Lg=m(e=>{let{argTypes:t,parameters:{__isArgsStory:r,controls:{include:n=null,exclude:o=null,matchers:a={}}={}}}=e;if(!r)return t;let i=F5(t,n,o),s=(0,R5.default)(i,(l,u)=>l?.type&&j5(l,u,a));return Ot(s,i)},"inferControls");Lg.secondPass=!0;function Ko({argTypes:e,globalTypes:t,argTypesEnhancers:r,decorators:n,loaders:o,beforeEach:a,globals:i,initialGlobals:s,...l}){return i&&Object.keys(i).length>0&&Ct(lt`
The preview.js 'globals' field is deprecated and will be removed in Storybook 9.0.
Please use 'initialGlobals' instead. Learn more:
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#previewjs-globals-renamed-to-initialglobals
`),{...e&&{argTypes:Wo(e)},...t&&{globalTypes:Wo(t)},decorators:Fe(n),loaders:Fe(o),beforeEach:Fe(a),argTypesEnhancers:[...r||[],Bg,Lg],initialGlobals:Ot(s,i),...l}}m(Ko,"normalizeProjectAnnotations");function qg(e){return async(t,r,n)=>{await e.reduceRight((o,a)=>async()=>a(t,o,n),async()=>r(n))()}}m(qg,"composeStepRunners");var N5=m(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 Hr(e,t){return e.map(r=>r.default?.[t]??r[t]).filter(Boolean)}m(Hr,"getField");function Jt(e,t,r={}){return Hr(e,t).reduce((n,o)=>{let a=Fe(o);return r.reverseFileOrder?[...a,...n]:[...n,...a]},[])}m(Jt,"getArrayField");function zr(e,t){return Object.assign({},...Hr(e,t))}m(zr,"getObjectField");function lr(e,t){return Hr(e,t).pop()}m(lr,"getSingletonField");function Ls(e){let t=Jt(e,"argTypesEnhancers"),r=Hr(e,"runStep"),n=Jt(e,"beforeAll");return{parameters:Ot(...Hr(e,"parameters")),decorators:Jt(e,"decorators",{reverseFileOrder:!(Ue.FEATURES?.legacyDecoratorFileOrder??!1)}),args:zr(e,"args"),argsEnhancers:Jt(e,"argsEnhancers"),argTypes:zr(e,"argTypes"),argTypesEnhancers:[...t.filter(o=>!o.secondPass),...t.filter(o=>o.secondPass)],globals:zr(e,"globals"),initialGlobals:zr(e,"initialGlobals"),globalTypes:zr(e,"globalTypes"),loaders:Jt(e,"loaders"),beforeAll:N5(n),beforeEach:Jt(e,"beforeEach"),render:lr(e,"render"),renderToCanvas:lr(e,"renderToCanvas"),renderToDOM:lr(e,"renderToDOM"),applyDecorators:lr(e,"applyDecorators"),runStep:qg(r),tags:Jt(e,"tags"),mount:lr(e,"mount"),testingLibraryRender:lr(e,"testingLibraryRender")}}m(Ls,"composeConfigs");var Yo={},B5="ComposedStory",L5="Unnamed Story";function Mg(e){return e?"default"in e?e.default:e:{}}m(Mg,"extractAnnotation");function q5(e){let t=Array.isArray(e)?e:[e];return Yo=Ls(t.map(Mg)),Yo}m(q5,"setProjectAnnotations");var ur=[];function M5(e,t,r,n,o){if(e===void 0)throw new Error("Expected a story but received undefined.");t.title=t.title??B5;let a=Fs(t),i=o||e.storyName||e.story?.name||e.name||L5,s=Ds(i,e,a),l=n&&!Yo?.testingLibraryRender&&!r?.testingLibraryRender,u=Ko(Ls([{...n,renderToCanvas:l?void 0:n?.renderToCanvas},Yo,r??{}])),c=js(s,a,u),d=Og(u.globalTypes),y=m(()=>{let x=Bs({hooks:new vg,globals:{...d,...u.initialGlobals},args:{...c.initialArgs},viewMode:"story",loaded:{},abortSignal:new AbortController().signal,step:m((v,O)=>c.runStep(v,O,x),"step"),canvasElement:globalThis?.document?.body,canvas:{},...c,context:null,mount:null});return x.context=x,c.renderToCanvas&&(x.renderToCanvas=async()=>{let v=await c.renderToCanvas?.({componentId:c.componentId,title:c.title,id:c.id,name:c.name,tags:c.tags,showError:m(O=>{},"showError"),showException:m(O=>{},"showException"),forceRemount:!0,storyContext:x,storyFn:m(()=>c.unboundStoryFn(x),"storyFn"),unboundStoryFn:c.unboundStoryFn},x.canvasElement);v&&ur.push(v)}),x.mount=c.mount(x),x},"initializeContext"),f,h=m(async x=>{let v=y();return f&&(v.loaded=f.loaded),Object.assign(v,x),c.playFunction(v)},"backwardsCompatiblePlay"),g=m(x=>{let v=y();return Object.assign(v,x),Ug(c,v)},"newPlay"),_=!c.renderToCanvas&&c.playFunction?h:!c.renderToCanvas&&!c.playFunction?void 0:g;return Object.assign(m(function(x){let v=y();return f&&(v.loaded=f.loaded),v.args={...v.initialArgs,...x},c.unboundStoryFn(v)},"storyFn"),{id:c.id,storyName:i,load:m(async()=>{for(let v of[...ur].reverse())await v();ur.length=0;let x=y();x.loaded=await c.applyLoaders(x),ur.push(...(await c.applyBeforeEach(x)).filter(Boolean)),f=x},"load"),args:c.initialArgs,parameters:c.parameters,argTypes:c.argTypes,play:_,tags:c.tags})}m(M5,"composeStory");function U5(e,t,r){let{default:n,__esModule:o,__namedExportsOrder:a,...i}=e;return Object.entries(i).reduce((s,[l,u])=>Jo(l,n)?Object.assign(s,{[l]:r(u,n,t,l)}):s,{})}m(U5,"composeStories");function J5(e){return e.extend({mount:m(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(lt`
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
`);await r.evaluate(async s=>{let l=await globalThis.__pwUnwrapObject?.(s);return("__pw_type"in l?l.type:l)?.load?.()},o);let i=await t(o,...a);return await r.evaluate(async s=>{let l=await globalThis.__pwUnwrapObject?.(s),u="__pw_type"in l?l.type:l,c=document.querySelector("#root");return u?.play?.({canvasElement:c})},o),i})},"mount")})}m(J5,"createPlaywrightTest");async function Ug(e,t){for(let o of[...ur].reverse())await o();if(ur.length=0,t.loaded=await e.applyLoaders(t),t.abortSignal.aborted)return;ur.push(...(await e.applyBeforeEach(t)).filter(Boolean));let r=e.playFunction,n=e.usesMount;n||await t.mount(),!t.abortSignal.aborted&&r&&(n||(t.mount=async()=>{throw new Mo({playFunction:r.toString()})}),await r(t))}m(Ug,"playStory");var Om=1e3,$5=1e4,Jg=class{constructor(t,r,n){this.importFn=r,this.storyIndex=new x5(t),this.projectAnnotations=Ko(n);let{initialGlobals:o,globalTypes:a}=this.projectAnnotations;this.args=new S5,this.globals=new A5({globals:o,globalTypes:a}),this.hooks={},this.cleanupCallbacks={},this.processCSFFileWithCache=(0,Ki.default)(Om)(Pg),this.prepareMetaWithCache=(0,Ki.default)(Om)(Ng),this.prepareStoryWithCache=(0,Ki.default)($5)(js)}storyIndex;projectAnnotations;globals;args;hooks;cleanupCallbacks;cachedCSFFiles;processCSFFileWithCache;prepareMetaWithCache;prepareStoryWithCache;setProjectAnnotations(t){this.projectAnnotations=Ko(t);let{initialGlobals:r,globalTypes:n}=t;this.globals.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 om({storyId:t});let o=r.meta,a=this.prepareStoryWithCache(n,o,this.projectAnnotations);return this.args.setInitial(a),this.hooks[a.id]=this.hooks[a.id]||new vg,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}={}){return Bs({...t,args:r?t.initialArgs:this.args.get(t.id),globals:this.globals.get(),hooks:this.hooks[t.id]})}addCleanupCallbacks(t,r){this.cleanupCallbacks[t.id]=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 Vh;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,[c,d])=>c==="moduleExport"||typeof d=="function"?u:Array.isArray(d)?Object.assign(u,{[c]:d.slice().sort()}):Object.assign(u,{[c]:d}),{args:l.initialArgs})),n},{})}getSetStoriesPayload(){let t=this.extract({includeDocsOnly:!0}),r=Object.va
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=$g(String(e));if(o.exec(i)){if(!r){let s=i.replace(n,""),l=ss([a,s]).split("/");return l=V5(l),l.join("/")}return a?ss([a,r]):r}},"userOrAutoTitleFromSpecifier"),zre=m((e,t,r)=>{for(let n=0;n<t.length;n+=1){let o=H5(e,t[n],r);if(o)return o}return r||void 0},"userOrAutoTitle"),Im=/\s*\/\s*/,G5=m((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(Im),i=r.title.trim().split(Im);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 d=o.indexOf(l),y=o.indexOf(u),f=o.indexOf("*");return d!==-1||y!==-1?(d===-1&&(f!==-1?d=f:d=o.length),y===-1&&(f!==-1?y=f:y=o.length),d-y):n==="configure"?0:l.localeCompare(u,e.locales?e.locales:void 0,{numeric:!0,sensitivity:"accent"})}let c=o.indexOf(l);c===-1&&(c=o.indexOf("*")),o=c!==-1&&Array.isArray(o[c+1])?o[c+1]:[],s+=1}return 0},"storySort"),W5=m((e,t,r)=>{if(t){let n;typeof t=="function"?n=t:n=G5(t),e.sort(n)}else e.sort((n,o)=>r.indexOf(n.importPath)-r.indexOf(o.importPath));return e},"sortStoriesCommon"),Vre=m((e,t,r)=>{try{return W5(e,t,r)}catch(n){throw new Error(lt`
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"),aa=new Error("prepareAborted"),{AbortController:Pm}=globalThis;function ls(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)}}}m(ls,"serializeError");var zg=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.abortController=new Pm,l&&(this.story=l,this.phase="preparing")}type="story";story;phase;abortController;canvasElement;notYetRendered=!0;rerenderEnqueued=!1;disableKeyListeners=!1;teardownRender=m(()=>{},"teardownRender");torndown=!1;async runPhase(t,r,n){this.phase=r,this.channel.emit(kr,{newPhase:this.phase,storyId:this.id}),n&&(await n(),this.checkIfAborted(t))}checkIfAborted(t){return t.aborted?(this.phase="aborted",this.channel.emit(kr,{newPhase:this.phase,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),aa}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"].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:c,applyBeforeEach:d,unboundStoryFn:y,playFunction:f,runStep:h}=o;r&&!t&&(this.cancelRender(),this.abortController=new Pm);let g=this.abortController.signal,_=!1,x=o.usesMount;try{let v={...this.storyContext(),viewMode:this.viewMode,abortSignal:g,canvasElement:n,loaded:{},step:m((D,U)=>h(D,U,v),"step"),context:null,canvas:{},renderToCanvas:m(async()=>{let D=await this.renderToScreen(O,n);this.teardownRender=D||(()=>{}),_=!0},"renderToCanvas"),mount:m(async(...D)=>{this.callbacks.showStoryDuringRender?.();let U=null;return await this.runPhase(g,"rendering",async()=>{U=await o.mount(v)(...D)}),x&&await this.runPhase(g,"playing"),U},"mount")};v.context=v;let O={componentId:i,title:s,kind:s,id:a,name:l,story:l,tags:u,...this.callbacks,showError:m(D=>(this.phase="errored",this.callbacks.showError(D)),"showError"),showException:m(D=>(this.phase="errored",this.callbacks.showException(D)),"showException"),forceRemount:r||this.notYetRendered,storyContext:v,storyFn:m(()=>y(v),"storyFn"),unboundStoryFn:y};if(await this.runPhase(g,"loading",async()=>{v.loaded=await c(v)}),g.aborted)return;let C=await d(v);if(this.store.addCleanupCallbacks(o,C),this.checkIfAborted(g)||(!_&&!x&&await v.mount(),this.notYetRendered=!1,g.aborted))return;let I=this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors===!0,P=new Set,F=m(D=>P.add("error"in D?D.error:D.reason),"onError");if(this.renderOptions.autoplay&&r&&f&&this.phase!=="errored"){window.addEventListener("error",F),window.addEventListener("unhandledrejection",F),this.disableKeyListeners=!0;try{if(x?await f(v):(v.mount=async()=>{throw new Mo({playFunction:f.toString()})},await this.runPhase(g,"playing",async()=>f(v))),!_)throw new pm;this.checkIfAborted(g),!I&&P.size>0?await this.runPhase(g,"errored"):await this.runPhase(g,"played")}catch(D){if(this.callbacks.showStoryDuringRender?.(),await this.runPhase(g,"errored",async()=>{this.channel.emit(du,ls(D))}),this.story.parameters.throwPlayFunctionExceptions!==!1)throw D;console.error(D)}if(!I&&P.size>0&&this.channel.emit(Tu,Array.from(P).map(ls)),this.disableKeyListeners=!1,window.removeEventListener("unhandl
- 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}}storyIdByName=m(t=>{let r=this.nameToStoryId.get(t);if(r)return r;throw new Error(`No story found with that name: ${t}`)},"storyIdByName");componentStories=m(()=>this.componentStoriesValue,"componentStories");componentStoriesFromCSFFile=m(t=>this.store.componentStoriesFromCSFFile({csfFile:t}),"componentStoriesFromCSFFile");storyById=m(t=>{if(!t){if(!this.primaryStory)throw new Error("No primary story defined for docs entry. Did you forget to use `<Meta>`?");return this.primaryStory}let r=this.storyIdToCSFFile.get(t);if(!r)throw new Error(`Called \`storyById\` for story that was never loaded: ${t}`);return this.store.storyFromCSFFile({storyId:t,csfFile:r})},"storyById");getStoryContext=m(t=>({...this.store.getStoryContext(t),loaded:{},viewMode:"docs"}),"getStoryContext");loadStory=m(t=>this.store.loadStory({storyId:t}),"loadStory")};m(Gg,"DocsContext");var Wg=Gg,Kg=class{constructor(t,r,n,o){this.channel=t,this.store=r,this.entry=n,this.callbacks=o,this.id=n.id}type="docs";subtype="csf";id;story;rerender;teardownRender;torndown=!1;disableKeyListeners=!1;preparing=!1;csfFiles;isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:t,csfFiles:r=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw aa;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 Wg(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=m(async()=>{try{await i(n,o,t),this.channel.emit(uo,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}};m(Kg,"CsfDocsRender");var km=Kg,Yg=class{constructor(t,r,n,o){this.channel=t,this.store=r,this.entry=n,this.callbacks=o,this.id=n.id}type="docs";subtype="mdx";id;exports;rerender;teardownRender;torndown=!1;disableKeyListeners=!1;preparing=!1;csfFiles;isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:t,csfFiles:r=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw aa;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 Wg(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=m(async()=>{try{await s(n,a,t),this.channel.emit(uo,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
Omitted potentially unsafe URL args.
More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url
`),r),{})},"parseArgsParam"),{history:ab,document:_t}=Ue;function ib(e){let t=(e||"").match(/^\/story\/(.+)/);if(!t)throw new Error(`Invalid path '${e}', must start with '/story/'`);return t[1]}m(ib,"pathToId");var sb=m(({selection:e,extraParams:t})=>{let r=typeof _t<"u"?_t.location.search:"",{path:n,selectedKind:o,selectedStory:a,...i}=us.default.parse(r,{ignoreQueryPrefix:!0});return us.default.stringify({...i,...t,...e&&{id:e.storyId,viewMode:e.viewMode}},{encode:!1,addQueryPrefix:!0})},"getQueryString"),iD=m(e=>{if(!e)return;let t=sb({selection:e}),{hash:r=""}=_t.location;_t.title=e.storyId,ab.replaceState({},"",`${_t.location.pathname}${t}${r}`)},"setPath"),sD=m(e=>e!=null&&typeof e=="object"&&Array.isArray(e)===!1,"isObject"),Nn=m(e=>{if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e))return Nn(e[0]);if(sD(e))return Nn(Object.values(e).filter(Boolean))}},"getFirstString"),lD=m(()=>{if(typeof _t<"u"){let e=us.default.parse(_t.location.search,{ignoreQueryPrefix:!0}),t=typeof e.args=="string"?Fm(e.args):void 0,r=typeof e.globals=="string"?Fm(e.globals):void 0,n=Nn(e.viewMode);(typeof n!="string"||!n.match(/docs|story/))&&(n="story");let o=Nn(e.path),a=o?ib(o):Nn(e.id);if(a)return{storySpecifier:a,args:t,globals:r,viewMode:n}}return null},"getSelectionSpecifierFromPath"),lb=class{selectionSpecifier;selection;constructor(){this.selectionSpecifier=lD()}setSelection(t){this.selection=t,iD(this.selection)}setQueryParams(t){let r=sb({extraParams:t}),{hash:n=""}=_t.location;ab.replaceState({},"",`${_t.location.pathname}${r}${n}`)}};m(lb,"UrlStore");var uD=lb,cD=Qe(o5(),1),pD=Qe(Os(),1),{document:Ge}=Ue,jm=100,ub=(e=>(e.MAIN="MAIN",e.NOPREVIEW="NOPREVIEW",e.PREPARING_STORY="PREPARING_STORY",e.PREPARING_DOCS="PREPARING_DOCS",e.ERROR="ERROR",e))(ub||{}),Qi={PREPARING_STORY:"sb-show-preparing-story",PREPARING_DOCS:"sb-show-preparing-docs",MAIN:"sb-show-main",NOPREVIEW:"sb-show-nopreview",ERROR:"sb-show-errordisplay"},Zi={centered:"sb-main-centered",fullscreen:"sb-main-fullscreen",padded:"sb-main-padded"},Nm=new cD.default({escapeXML:!0}),cb=class{currentLayoutClass;testing=!1;preparingTimeout;constructor(){if(typeof Ge<"u"){let{__SPECIAL_TEST_PARAMETER__:t}=pD.default.parse(Ge.location.search,{ignoreQueryPrefix:!0});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),Ge.documentElement.scrollTop=0,Ge.documentElement.scrollLeft=0,this.storyRoot()}storyRoot(){return Ge.getElementById("storybook-root")}prepareForDocs(){return this.showMain(),this.showDocs(),this.applyLayout("fullscreen"),Ge.documentElement.scrollTop=0,Ge.documentElement.scrollLeft=0,this.docsRoot()}docsRoot(){return Ge.getElementById("storybook-docs")}applyLayout(t="padded"){if(t==="none"){Ge.body.classList.remove(this.currentLayoutClass),this.currentLayoutClass=null;return}this.checkIfLayoutExists(t);let r=Zi[t];Ge.body.classList.remove(this.currentLayoutClass),Ge.body.classList.add(r),this.currentLayoutClass=r}checkIfLayoutExists(t){Zi[t]||me.warn(lt`
The desired layout: ${t} is not a valid option.
The possible options are: ${Object.keys(Zi).join(", ")}, none.
`)}showMode(t){clearTimeout(this.preparingTimeout),Object.keys(ub).forEach(r=>{r===t?Ge.body.classList.add(Qi[r]):Ge.body.classList.remove(Qi[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/,"")),Ge.getElementById("error-message").innerHTML=Nm.toHtml(n),Ge.getElementById("error-stack").innerHTML=Nm.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"),jm)}showPreparingDocs({immediate:t=!1}={}){clearTimeout(this.preparingTimeout),t?this.showMode("PREPARING_DOCS"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_DOCS"),jm)}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(){Ge.body.classList.add(Qi.MAIN)}};m(cb,"WebView");var dD=cb,fD=class extends tD{constructor(t,r){super(t,r,new uD,new dD),this.importFn=t,this.getProjectAnnotations=r,Ue.__STORYBOOK_PREVIEW__=this}};m(fD,"PreviewWeb");var{document:cr}=Ue,yD=["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"],hD="script",Bm="scripts-root";function ps(){let e=cr.createEvent("Event");e.initEvent("DOMContentLoaded",!0,!0),cr.dispatchEvent(e)}m(ps,"simulateDOMContentLoaded");function pb(e,t,r){let n=cr.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):cr.head.appendChild(n),e.parentNode.removeChild(e),e.src||t()}m(pb,"insertScript");function qs(e,t,r=0){e[r](()=>{r++,r===e.length?t():qs(e,t,r)})}m(qs,"insertScriptsSequentially");function mD(e){let t=cr.getElementById(Bm);t?t.innerHTML="":(t=cr.createElement("div"),t.id=Bm,cr.body.appendChild(t));let r=Array.from(e.querySelectorAll(hD));if(r.length){let n=[];r.forEach(o=>{let a=o.getAttribute("type");(!a||yD.includes(a))&&n.push(i=>pb(o,i,t))}),n.length&&qs(n,ps,void 0)}else ps()}m(mD,"simulatePageLoad");S();A();T();S();A();T();var gD=Object.create,Ms=Object.defineProperty,bD=Object.getOwnPropertyDescriptor,vD=Object.getOwnPropertyNames,xD=Object.getPrototypeOf,ED=Object.prototype.hasOwnProperty,b=(e,t)=>Ms(e,"name",{value:t,configurable:!0}),K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vD(t))!ED.call(e,o)&&o!==r&&Ms(e,o,{get:()=>t[o],enumerable:!(n=bD(t,o))||n.enumerable});return e},db=(e,t,r)=>(r=e!=null?gD(xD(e)):{},wD(t||!e||!e.__esModule?Ms(r,"default",{value:e,enumerable:!0}):r,e)),fb=K((e,t)=>{var r=typeof window=="object"&&window&&window.Object===Object&&window;t.exports=r}),kt=K((e,t)=>{var r=fb(),n=typeof self=="object"&&self&&self.Object===Object&&self,o=r||n||Function("return this")();t.exports=o}),sa=K((e,t)=>{var r=kt(),n=r.Symbol;t.exports=n}),SD=K((e,t)=>{var r=sa(),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,i=r?r.toStringTag:void 0;function s(l){var u=o.call(l,i),c=l[i];try{l[i]=void 0;var d=!0}catch{}var y=a.call(l);return d&&(u?l[i]=c:delete l[i]),y}b(s,"getRawTag"),t.exports=s}),AD=K((e,t)=>{var r=Object.prototype,n=r.toString;function o(a){return n.call(a)}b(o,"objectToString"),t.exports=o}),Hn=K((e,t)=>{var r=sa(),n=SD(),o=AD(),a="[object Null]",i="[object Undefined]",s=r?r.toStringTag:void 0;function l(u){return u==null?u===void 0?i:a:s&&s in Object(u)?n(u):o(u)}b(l,"baseGetTag"),t.exports=l}),Us=K((e,t)=>{function r(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}b(r,"isObject"),t.exports=r}),yb=K((e,t)=>{var r=Hn(),n=Us(),o="[object AsyncFunction]",a="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(
`):e}b(Gb,"getJoiner");var mj=b(e=>e&&e.startsWith('"')&&e.endsWith('"'),"isQuoted");function Wb(){let e=b((t,{tokens:r},n)=>r.type===""?t:n,"typeEnd");return t=>{let{tokens:r}=t.source[t.source.reduce(e,0)],n=r.description.trimLeft(),o=n.split('"');if(o.length>1&&o[0]===""&&o.length%2===1)return t.name=o[1],r.name=`"${o[1]}"`,[r.postName,r.description]=fr(n.slice(r.name.length)),t;let a=0,i="",s=!1,l;for(let c of n){if(a===0&&Nb(c))break;c==="["&&a++,c==="]"&&a--,i+=c}if(a!==0)return t.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:t.source[0].number,critical:!0}),t;let u=i;if(i[0]==="["&&i[i.length-1]==="]"){s=!0,i=i.slice(1,-1);let c=i.split("=");if(i=c[0].trim(),c[1]!==void 0&&(l=c.slice(1).join("=").trim()),i==="")return t.problems.push({code:"spec:name:empty-name",message:"empty name",line:t.source[0].number,critical:!0}),t;if(l==="")return t.problems.push({code:"spec:name:empty-default",message:"empty default value",line:t.source[0].number,critical:!0}),t;if(!mj(l)&&/=(?!>)/.test(l))return t.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:t.source[0].number,critical:!0}),t}return t.optional=s,t.name=i,r.name=u,l!==void 0&&(t.default=l),[r.postName,r.description]=fr(n.slice(r.name.length)),t}}b(Wb,"nameTokenizer");function Kb(e="compact",t=$t){let r=Ys(e);return n=>(n.description=r(n.source,t),n)}b(Kb,"descriptionTokenizer");function Ys(e){return e==="compact"?Yb:e==="preserve"?Xb:e}b(Ys,"getJoiner");function Yb(e,t=$t){return e.map(({tokens:{description:r}})=>r.trim()).filter(r=>r!=="").join(" ")}b(Yb,"compactJoiner");var gj=b((e,{tokens:t},r)=>t.type===""?e:r,"lineNo"),bj=b(({tokens:e})=>(e.delimiter===""?e.start:e.postDelimiter.slice(1))+e.description,"getDescription");function Xb(e,t=$t){if(e.length===0)return"";e[0].tokens.description===""&&e[0].tokens.delimiter===t.start&&(e=e.slice(1));let r=e[e.length-1];return r!==void 0&&r.tokens.description===""&&r.tokens.end.endsWith(t.end)&&(e=e.slice(0,-1)),e=e.slice(e.reduce(gj,0)),e.map(bj).join(`
`)}b(Xb,"preserveJoiner");function Qb({startLine:e=0,fence:t="```",spacing:r="compact",markers:n=$t,tokenizers:o=[Vb(),Hb(r),Wb(),Kb(r)]}={}){if(e<0||e%1>0)throw new Error("Invalid startLine");let a=$b({startLine:e,markers:n}),i=Ub({fence:t}),s=zb({tokenizers:o}),l=Ys(r);return function(u){let c=[];for(let d of Lb(u)){let y=a(d);if(y===null)continue;let f=i(y),h=f.slice(1).map(s);c.push({description:l(f[0],n),tags:h,source:y,problems:h.reduce((g,_)=>g.concat(_.problems),[])})}return c}}b(Qb,"getParser");function Zb(e){return e.start+e.delimiter+e.postDelimiter+e.tag+e.postTag+e.type+e.postType+e.name+e.postName+e.description+e.end+e.lineEnd}b(Zb,"join");function e0(){return e=>e.source.map(({tokens:t})=>Zb(t)).join(`
`)}b(e0,"getStringifier");var vj={line:0,start:0,delimiter:0,postDelimiter:0,tag:0,postTag:0,name:0,postName:0,type:0,postType:0,description:0,end:0,lineEnd:0},Cne=Object.keys(vj);function t0(e,t={}){return Qb(t)(e)}b(t0,"parse");var _ne=e0(),Xs=db(rj(),1);function r0(e){return e!=null&&e.includes("@")}b(r0,"containsJsDoc");function n0(e){let t=`/**
`+(e??"").split(`
`).map(n=>` * ${n}`).join(`
`)+`
*/`,r=t0(t,{spacing:"preserve"});if(!r||r.length===0)throw new Error("Cannot parse JSDoc tags.");return r[0]}b(n0,"parse");var xj={tags:["param","arg","argument","returns","ignore","deprecated"]},Ej=b((e,t=xj)=>{if(!r0(e))return{includesJsDoc:!1,ignore:!1};let r=n0(e),n=o0(r,t.tags);return n.ignore?{includesJsDoc:!0,ignore:!0}:{includesJsDoc:!0,ignore:!1,description:r.description.trim(),extractedTags:n}},"parseJsDoc");function o0(e,t){let r={params:null,deprecated:null,returns:null,ignore:!1};for(let n of e.tags)if(!(t!==void 0&&!t.includes(n.tag)))if(n.tag==="ignore"){r.ignore=!0;break}else switch(n.tag){case"param":case"arg":case"argument":{let o=i0(n);o!=null&&(r.params==null&&(r.params=[]),r.params.push(o));break}case"deprecated":{let o=s0(n);o!=null&&(r.deprecated=o);break}case"returns":{let o=l0(n);o!=null&&(r.returns=o);break}default:break}return r}b(o0,"extractJsDocTags");function a0(e){return e.replace(/[\.-]$/,"")}b(a0,"normaliseParamName");function i0(e){if(!e.name||e.name==="-")return null;let t=el(e.type);return{name:e.name,type:t,description:Zs(e.description),getPrettyName:b(()=>a0(e.name),"getPrettyName"),getTypeName:b(()=>t?tl(t):null,"getTypeName")}}b(i0,"extractParam");function s0(e){return e.name?Qs(e.name,e.description):null}b(s0,"extractDeprecated");function Qs(e,t){let r=e===""?t:`${e} ${t}`;return Zs(r)}b(Qs,"joinNameAndDescription");function Zs(e){let t=e.replace(/^- /g,"").trim();return t===""?null:t}b(Zs,"normaliseDescription");function l0(e){let t=el(e.type);return t?{type:t,description:Qs(e.name,e.description),getTypeName:b(()=>tl(t),"getTypeName")}:null}b(l0,"extractReturns");var Vt=(0,Xs.stringifyRules)(),wj=Vt.JsdocTypeObject;Vt.JsdocTypeAny=()=>"any";Vt.JsdocTypeObject=(e,t)=>`(${wj(e,t)})`;Vt.JsdocTypeOptional=(e,t)=>t(e.element);Vt.JsdocTypeNullable=(e,t)=>t(e.element);Vt.JsdocTypeNotNullable=(e,t)=>t(e.element);Vt.JsdocTypeUnion=(e,t)=>e.elements.map(t).join("|");function el(e){try{return(0,Xs.parse)(e,"typescript")}catch{return null}}b(el,"extractType");function tl(e){return(0,Xs.transform)(Vt,e)}b(tl,"extractTypeName");function rl(e){return e.length>90}b(rl,"isTooLongForTypeSummary");function u0(e){return e.length>50}b(u0,"isTooLongForDefaultValueSummary");function je(e,t){return e===t?{summary:e}:{summary:e,detail:t}}b(je,"createSummaryValue");var One=b(e=>e.replace(/\\r\\n/g,"\\n"),"normalizeNewlines");function nl({name:e,value:t,elements:r,raw:n}){return t??(r!=null?r.map(nl).join(" | "):n??e)}b(nl,"generateUnionElement");function c0({name:e,raw:t,elements:r}){return r!=null?je(r.map(nl).join(" | ")):t!=null?je(t.replace(/^\|\s*/,"")):je(e)}b(c0,"generateUnion");function p0({type:e,raw:t}){return t!=null?je(t):je(e)}b(p0,"generateFuncSignature");function d0({type:e,raw:t}){return t!=null?rl(t)?je(e,t):je(t):je(e)}b(d0,"generateObjectSignature");function f0(e){let{type:t}=e;return t==="object"?d0(e):p0(e)}b(f0,"generateSignature");function y0({name:e,raw:t}){return t!=null?rl(t)?je(e,t):je(t):je(e)}b(y0,"generateDefault");function h0(e){if(e==null)return null;switch(e.name){case"union":return c0(e);case"signature":return f0(e);default:return y0(e)}}b(h0,"createType");function m0(e,t){if(e!=null){let{value:r}=e;if(!fa(r))return u0(r)?je(t?.name,r):je(r)}return null}b(m0,"createDefaultValue");var Sj=b((e,t)=>{let{flowType:r,description:n,required:o,defaultValue:a}=t;return{name:e,type:h0(r),required:o,description:n,defaultValue:m0(a??null,r??null)}},"createFlowPropDef");function g0({tsType:e,required:t}){if(e==null)return null;let r=e.name;return t||(r=r.replace(" | undefined","")),je(["Array","Record","signature"].includes(e.name)?e.raw:r)}b(g0,"createType");function b0({defaultValue:e}){if(e!=null){let{value:t}=e;if(!fa(t))return je(t)}return null}b(b0,"createDefaultValue");var Aj=b((e,t)=>{let{description:r,required:n}=t;return{name:e,type:g0(t),required:n,description:r,defaultValue:b0(t)}},"createTsPropDef");function v0(e){return e!=null?je(e.name):null}b(v0,"createType");function x0(e){let{computed:t,func:r}=e;return typeof t>"u"&&typeof r>"u"}b(x0,"isReactDocgenTypescript");fun
`,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 zN(){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}var Et=function(e){MN(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,zN.apply(void 0,[$N[r]].concat(a)))||this,qN(n)}return t}(Ol(Error));function hl(e){return Math.round(e*255)}function VN(e,t,r){return hl(e)+","+hl(t)+","+hl(r)}function eo(e,t,r,n){if(n===void 0&&(n=VN),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 c=r-a/2,d=s+c,y=l+c,f=u+c;return n(d,y,f)}var iv={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 HN(e){if(typeof e!="string")return e;var t=e.toLowerCase();return iv[t]?"#"+iv[t]:e}var GN=/^#[a-fA-F0-9]{6}$/,WN=/^#[a-fA-F0-9]{8}$/,KN=/^#[a-fA-F0-9]{3}$/,YN=/^#[a-fA-F0-9]{4}$/,ml=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,XN=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,QN=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$
`).match(o),d=!1;return{items:c.map(function(y,f){let h=a.exec(y)[0].length,g=new RegExp("^ {1,"+h+"}","gm"),_=y.replace(g,"").replace(a,""),x=f===c.length-1,v=_.indexOf(`
`)!==-1||x&&d;d=v;let O=l.inline,C=l.list,I;l.list=!0,v?(l.inline=!1,I=_.replace(dv,`
`)):(l.inline=!0,I=_.replace(dv,""));let P=s(I,l);return l.inline=O,l.list=C,P}),ordered:r,start:u}},render:(i,s,l)=>e(i.ordered?"ol":"ul",{key:l.key,start:i.type==="20"?i.start:void 0},i.items.map(function(u,c){return e("li",{key:c},s(u,l))}))}}var EB=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),wB=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,c2=[Hv,Gv,Wv,Kv,Xv,Yv,Qv,Zv,a2,l2,i2,u2],SB=[...c2,/^[^\n]+(?: \n|\n{2,})/,kl,Rl];function AB(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()}function TB(e){return lB.test(e)?"right":iB.test(e)?"center":sB.test(e)?"left":null}function yv(e,t,r){let n=r.inTable;r.inTable=!0;let o=t(e.trim(),r);r.inTable=n;let a=[[]];return o.forEach(function(i,s){i.type==="26"?s!==0&&s!==o.length-1&&a.push([]):(i.type!=="27"||o[s+1]!=null&&o[s+1].type!=="26"||(i.text=i.text.replace(aB,"")),a[a.length-1].push(i))}),a}function CB(e,t,r){r.inline=!0;let n=yv(e[1],t,r),o=e[2].replace(oB,"").split("|").map(TB),a=function(i,s,l){return i.trim().split(`
`).map(function(u){return yv(u,s,l)})}(e[3],t,r);return r.inline=!1,{align:o,cells:a,header:n,type:"25"}}function hv(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Ht(e){return function(t,r){return r.inline?e.exec(t):null}}function Gt(e){return function(t,r){return r.inline||r.simple?e.exec(t):null}}function Rt(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function Xn(e){return function(t){return e.exec(t)}}function _B(e,t,r){if(t.inline||t.simple||r&&!r.endsWith(`
`))return null;let n="";e.split(`
`).every(a=>!c2.some(i=>i.test(a))&&(n+=a+`
`,a.trim()));let o=n.trimEnd();return o==""?null:[n,o]}function Qr(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function mv(e){return e.replace(gB,"$1")}function Sa(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}function OB(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}function IB(e,t,r){return r.inline=!1,e(t,r)}var bl=(e,t,r)=>({children:Sa(t,e[1],r)});function vl(){return{}}function xl(){return null}function PB(...e){return e.filter(Boolean).join(" ")}function El(e,t,r){let n=e,o=t.split(".");for(;o.length&&(n=n[o[0]],n!==void 0);)o.shift();return n||r}function kB(e="",t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||AB,t.namedCodesToUnicode=t.namedCodesToUnicode?br({},pv,t.namedCodesToUnicode):pv;let r=t.createElement||ja;function n(f,h,...g){let _=El(t.overrides,`${f}.props`,{});return r(function(x,v){let O=El(v,x);return O?typeof O=="function"||typeof O=="object"&&"render"in O?O:El(v,`${x}.component`,x):x}(f,t.overrides),br({},h,_,{className:PB(h?.className,_.className)||void 0}),...g)}function o(f){f=f.replace(J3,"");let h=!1;t.forceInline?h=!0:t.forceBlock||(h=tB.test(f)===!1);let g=c(u(h?f:`${f.trimEnd().replace(hB,"")}
`,{inline:h}));for(;typeof g[g.length-1]=="string"&&!g[g.length-1].trim();)g.pop();if(t.wrapper===null)return g;let _=t.wrapper||(h?"span":"div"),x;if(g.length>1||t.forceWrapper)x=g;else{if(g.length===1)return x=g[0],typeof x=="string"?n("span",{key:"outer"},x):x;x=null}return ja(_,{key:"outer"},x)}function a(f){let h=f.match(P3);return h?h.reduce(function(g,_,x){let v=_.indexOf("=");if(v!==-1){let O=function(F){return F.indexOf("-")!==-1&&F.match(V3)===null&&(F=F.replace(Y3,function(D,U){return U.toUpperCase()})),F}(_.slice(0,v)).trim(),C=function(F){let D=F[0];return(D==='"'||D==="'")&&F.length>=2&&F[F.length-1]===D?F.slice(1,-1):F}(_.slice(v+1).trim()),I=cv[O]||O,P=g[I]=function(F,D){return F==="style"?D.split(/;\s?/).reduce(function(U,G){let X=G.slice(0,G.indexOf(":"));return U[X.trim().replace(/(-[a-z])/g,Q=>Q[1].toUpperCase())]=G.slice(X.length+1).trim(),U},{}):F==="href"||F==="src"?Qr(D):(D.match(H3)&&(D=D.slice(1,D.length-1)),D==="true"||D!=="false"&&D)}(O,C);typeof P=="string"&&(kl.test(P)||Rl.test(P))&&(g[I]=Oe(o(P.trim()),{key:x}))}else _!=="style"&&(g[cv[_]||_]=!0);return g},{}):null}let i=[],s={},l={0:{match:Rt(Hv),order:1,parse:(f,h,g)=>({children:h(f[0].replace(D3,""),g)}),render:(f,h,g)=>n("blockquote",{key:g.key},h(f.children,g))},1:{match:Xn(F3),order:1,parse:vl,render:(f,h,g)=>n("br",{key:g.key})},2:{match:Rt(j3),order:1,parse:vl,render:(f,h,g)=>n("hr",{key:g.key})},3:{match:Rt(Wv),order:0,parse:f=>({lang:void 0,text:f[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(f,h,g)=>n("pre",{key:g.key},n("code",br({},f.attrs,{className:f.lang?`lang-${f.lang}`:""}),f.text))},4:{match:Rt(Gv),order:0,parse:f=>({attrs:a(f[3]||""),lang:f[2]||void 0,text:f[4],type:"3"})},5:{match:Gt(N3),order:3,parse:f=>({text:f[2]}),render:(f,h,g)=>n("code",{key:g.key},f.text)},6:{match:Rt(q3),order:0,parse:f=>(i.push({footnote:f[2],identifier:f[1]}),{}),render:xl},7:{match:Ht(M3),order:1,parse:f=>({target:`#${t.slugify(f[1])}`,text:f[1]}),render:(f,h,g)=>n("a",{key:g.key,href:Qr(f.target)},n("sup",{key:g.key},f.text))},8:{match:Ht($3),order:1,parse:f=>({completed:f[1].toLowerCase()==="x"}),render:(f,h,g)=>n("input",{checked:f.completed,key:g.key,readOnly:!0,type:"checkbox"})},9:{match:Rt(t.enforceAtxHeadings?Yv:Kv),order:1,parse:(f,h,g)=>({children:Sa(h,f[2],g),id:t.slugify(f[2]),level:f[1].length}),render:(f,h,g)=>n(`h${f.level}`,{id:f.id,key:g.key},h(f.children,g))},10:{match:Rt(Xv),order:0,parse:(f,h,g)=>({children:Sa(h,f[1],g),level:f[2]==="="?1:2,type:"9"})},11:{match:Xn(kl),order:1,parse(f,h,g){let[,_]=f[3].match(mB),x=new RegExp(`^${_}`,"gm"),v=f[3].replace(x,""),O=(C=v,SB.some(D=>D.test(C))?IB:Sa);var C;let I=f[1].toLowerCase(),P=I3.indexOf(I)!==-1,F={attrs:a(f[2]),noInnerParse:P,tag:(P?I:f[1]).trim()};return g.inAnchor=g.inAnchor||I==="a",P?F.text=f[3]:F.children=O(h,v,g),g.inAnchor=!1,F},render:(f,h,g)=>n(f.tag,br({key:g.key},f.attrs),f.text||h(f.children,g))},13:{match:Xn(Rl),order:1,parse:f=>({attrs:a(f[2]||""),tag:f[1].trim()}),render:(f,h,g)=>n(f.tag,br({},f.attrs,{key:g.key}))},12:{match:Xn(Qv),order:1,parse:()=>({}),render:xl},14:{match:Gt(wB),order:1,parse:f=>({alt:f[1],target:mv(f[2]),title:f[3]}),render:(f,h,g)=>n("img",{key:g.key,alt:f.alt||void 0,title:f.title||void 0,src:Qr(f.target)})},15:{match:Ht(EB),order:3,parse:(f,h,g)=>({children:OB(h,f[1],g),target:mv(f[2]),title:f[3]}),render:(f,h,g)=>n("a",{key:g.key,href:Qr(f.target),title:f.title},h(f.children,g))},16:{match:Ht(K3),order:0,parse:f=>({children:[{text:f[1],type:"27"}],target:f[1],type:"15"})},17:{match:(f,h)=>h.inAnchor?null:Ht(G3)(f,h),order:0,parse:f=>({children:[{text:f[1],type:"27"}],target:f[1],title:void 0,type:"15"})},18:{match:Ht(W3),order:0,parse(f){let h=f[1],g=f[1];return k3.test(g)||(g="mailto:"+g),{children:[{text:h.replace("mailto:",""),type:"27"}],target:g,type:"15"}}},20:fv(n,1),33:fv(n,2),19:{match:Rt(B3),order:3,parse:vl,render:()=>`
`},21:{match:_B,order:3,parse:bl,render:(f,h,g)=>n("p",{key:g.key},h(f.children,g))},22:{match:Ht(X3),order:0,parse:f=>(s[f[1]]={target:f[2],title:f[4]},{}),render:xl},23:{match:Gt(Q3),order:0,parse:f=>({alt:f[1]||void 0,ref:f[2]}),render:(f,h,g)=>s[f.ref]?n("img",{key:g.key,alt:f.alt,src:Qr(s[f.ref].target),title:s[f.ref].title}):null},24:{match:Ht(Z3),order:0,parse:(f,h,g)=>({children:h(f[1],g),fallbackChildren:h(f[0].replace(eB,"\\$1"),g),ref:f[2]}),render:(f,h,g)=>s[f.ref]?n("a",{key:g.key,href:Qr(s[f.ref].target),title:s[f.ref].title},h(f.children,g)):n("span",{key:g.key},h(f.fallbackChildren,g))},25:{match:Rt(Zv),order:1,parse:CB,render:(f,h,g)=>n("table",{key:g.key},n("thead",null,n("tr",null,f.header.map(function(_,x){return n("th",{key:x,style:hv(f,x)},h(_,g))}))),n("tbody",null,f.cells.map(function(_,x){return n("tr",{key:x},_.map(function(v,O){return n("td",{key:O,style:hv(f,O)},h(v,g))}))})))},26:{match:function(f,h){return h.inTable?(h.inline=!0,nB.exec(f)):null},order:1,parse:function(){return{type:"26"}},render:()=>" | "},27:{match:Xn(yB),order:4,parse:f=>({text:f[0].replace(z3,(h,g)=>t.namedCodesToUnicode[g]?t.namedCodesToUnicode[g]:h)}),render:f=>f.text},28:{match:Gt(uB),order:2,parse:(f,h,g)=>({children:h(f[2],g)}),render:(f,h,g)=>n("strong",{key:g.key},h(f.children,g))},29:{match:Gt(cB),order:3,parse:(f,h,g)=>({children:h(f[2],g)}),render:(f,h,g)=>n("em",{key:g.key},h(f.children,g))},30:{match:Gt(fB),order:1,parse:f=>({text:f[1],type:"27"})},31:{match:Gt(pB),order:3,parse:bl,render:(f,h,g)=>n("mark",{key:g.key},h(f.children,g))},32:{match:Gt(dB),order:3,parse:bl,render:(f,h,g)=>n("del",{key:g.key},h(f.children,g))}};t.disableParsingRawHTML===!0&&(delete l[11],delete l[13]);let u=function(f){let h=Object.keys(f);function g(_,x){let v=[],O="";for(;_;){let C=0;for(;C<h.length;){let I=h[C],P=f[I],F=P.match(_,x,O);if(F){let D=F[0];_=_.substring(D.length);let U=P.parse(F,g,x);U.type==null&&(U.type=I),v.push(U),O=D;break}C++}}return v}return h.sort(function(_,x){let v=f[_].order,O=f[x].order;return v!==O?v-O:_<x?-1:1}),function(_,x){return g(function(v){return v.replace(L3,`
`).replace(U3,"").replace(rB," ")}(_),x)}}(l),c=(d=function(f,h){return function(g,_,x){let v=f[g.type].render;return h?h(()=>v(g,_,x),g,_,x):v(g,_,x)}}(l,t.renderRule),function f(h,g={}){if(Array.isArray(h)){let _=g.key,x=[],v=!1;for(let O=0;O<h.length;O++){g.key=O;let C=f(h[O],g),I=typeof C=="string";I&&v?x[x.length-1]+=C:C!==null&&x.push(C),v=I}return g.key=_,x}return d(h,f,g)});var d;let y=o(e);return i.length?n("div",null,y,n("footer",{key:"footer"},i.map(function(f){return n("div",{id:t.slugify(f.identifier),key:f.identifier},f.identifier,c(u(f.footnote,{inline:!0})))}))):y}var RB=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,O3);return Oe(kB(t,r),n)},DB=gn(qv(),1),FB=Object.create,p2=Object.defineProperty,jB=Object.getOwnPropertyDescriptor,d2=Object.getOwnPropertyNames,NB=Object.getPrototypeOf,BB=Object.prototype.hasOwnProperty,ct=(e,t)=>function(){return t||(0,e[d2(e)[0]])((t={exports:{}}).exports,t),t.exports},LB=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of d2(t))!BB.call(e,o)&&o!==r&&p2(e,o,{get:()=>t[o],enumerable:!(n=jB(t,o))||n.enumerable});return e},Ll=(e,t,r)=>(r=e!=null?FB(NB(e)):{},LB(t||!e||!e.__esModule?p2(r,"default",{value:e,enumerable:!0}):r,e)),qB=gn(qv(),1),f2=ct({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var a=42;r[n]=a;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,n);if(s.value!==a||s.enumerable!==!0)return!1}return!0}}}),y2=ct({"node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=f2();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),MB=ct({"node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,a="[object Function]";t.exports=function(i){var s=this;if(typeof s!="function"||o.call(s)!==a)throw new TypeError(r+s);for(var l=n.call(arguments,1),u,c=function(){if(this instanceof u){var g=s.apply(this,l.concat(n.call(arguments)));return Object(g)===g?g:this}else return s.apply(i,l.concat(n.call(arguments)))},d=Math.max(0,s.length-l.length),y=[],f=0;f<d;f++)y.push("$"+f);if(u=Function("binder","return function ("+y.join(",")+"){ return binder.apply(this,arguments); }")(c),s.prototype){var h=function(){};h.prototype=s.prototype,u.prototype=new h,h.prototype=null}return u}}}),ql=ct({"node_modules/function-bind/index.js"(e,t){var r=MB();t.exports=Function.prototype.bind||r}}),UB=ct({"node_modules/has/src/index.js"(e,t){var r=ql();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),h2=ct({"node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,a=TypeError,i=function(Q){try{return o('"use strict"; return ('+Q+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new a},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,c=y2()(),d=Object.getPrototypeOf||function(Q){return Q.__proto__},y={},f=typeof Uint8Array>"u"?r:d(Uint8Array),h={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":c?d([][Symbol.iterator]()):r,
`&&t!=="`")&&(t=null),o&&(e[i]==="/"&&e[i-1]!=="\\"||e[i]===`
`)&&(o=!1),r&&e[i-1]==="/"&&e[i-2]==="*"&&(r=!1),n&&e[i]===`
`&&(n=!1)),!r&&!n&&(a+=e[i]);else a=e;return a};(0,qB.default)(1e4)(e=>Lq(e).replace(/\n\s*/g,"").trim());var qq=nr({"../../node_modules/tocbot/src/js/default-options.js"(e,t){t.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(r){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(r){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0}}}),Mq=nr({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,o=[].some,a=document.body,i,s=!0,l=" ";function u(C,I){var P=I.appendChild(d(C));if(C.children.length){var F=y(C.isCollapsed);C.children.forEach(function(D){u(D,F)}),P.appendChild(F)}}function c(C,I){var P=!1,F=y(P);if(I.forEach(function(D){u(D,F)}),i=C||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),I.length===0?i:i.appendChild(F)}function d(C){var I=document.createElement("li"),P=document.createElement("a");return r.listItemClass&&I.setAttribute("class",r.listItemClass),r.onClick&&(P.onclick=r.onClick),r.includeTitleTags&&P.setAttribute("title",C.textContent),r.includeHtml&&C.childNodes.length?n.call(C.childNodes,function(F){P.appendChild(F.cloneNode(!0))}):P.textContent=C.textContent,P.setAttribute("href",r.basePath+"#"+C.id),P.setAttribute("class",r.linkClass+l+"node-name--"+C.nodeName+l+r.extraLinkClasses),I.appendChild(P),I}function y(C){var I=r.orderedList?"ol":"ul",P=document.createElement(I),F=r.listClass+l+r.extraListClasses;return C&&(F=F+l+r.collapsibleClass,F=F+l+r.isCollapsedClass),P.setAttribute("class",F),P}function f(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var C;C=document.querySelector(r.scrollContainer).scrollTop}else C=document.documentElement.scrollTop||a.scrollTop;var I=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),C>r.fixedSidebarOffset?I.className.indexOf(r.positionFixedClass)===-1&&(I.className+=l+r.positionFixedClass):I.className=I.className.replace(l+r.positionFixedClass,"")}function h(C){var I=0;return C!==null&&(I=C.offsetTop,r.hasInnerContainers&&(I+=h(C.offsetParent))),I}function g(C,I){return C&&C.className!==I&&(C.className=I),C}function _(C){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var I;I=document.querySelector(r.scrollContainer).scrollTop}else I=document.documentElement.scrollTop||a.scrollTop;r.positionFixedSelector&&f();var P=C,F;if(s&&i!==null&&P.length>0){o.call(P,function(R,q){if(h(R)>I+r.headingsOffset+10){var M=q===0?q:q-1;return F=P[M],!0}else if(q===P.length-1)return F=P[P.length-1],!0});var D=i.querySelector("."+r.activeLinkClass),U=i.querySelector("."+r.linkClass+".node-name--"+F.nodeName+'[href="'+r.basePath+"#"+F.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(D===U)return;var G=i.querySelectorAll("."+r.linkClass);n.call(G,function(R){g(R,R.className.replace(l+r.activeLinkClass,""))});var X=i.querySelectorAll("."+r.listItemClass);n.call(X,function(R){g(R,R.className.replace(l+r.activeListItemClass,""))}),U&&U.className.indexOf(r.activeLinkClass)===-1&&(U.className+=l+r.activeLinkClass);var Q=U&&U.parentNode;Q&&Q.className.indexOf(r.activeListItemClass)===-1&&(Q.className+=l+r.activeListItemClass);var V=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(V,function(R){R.className.indexOf(r.isCollapsedClass)===-1&&(R.className+=l+r.isCollapsedClass)}),U&&U.nextSibling&&U.nextSibling.cla
2024-06-16 17:30:30 +02:00
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
2024-07-31 10:01:28 +02:00
${vt(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
${vt(.02,e.input.background)} 100%)`:`linear-gradient(to right,
2024-06-16 17:30:30 +02:00
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
2024-07-31 10:01:28 +02:00
${gr(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
${gr(.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 ${Dt(e.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${Dt(e.appBorderColor,.2)}`,cursor:o?"not-allowed":"grab",appearance:"none",background:`${e.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${vt(.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:Dt(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,
2024-06-16 17:30:30 +02:00
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
2024-07-31 10:01:28 +02:00
${vt(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
${vt(.02,e.input.background)} 100%)`:`linear-gradient(to right,
2024-06-16 17:30:30 +02:00
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
2024-07-31 10:01:28 +02:00
${gr(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
${gr(.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 ${Dt(e.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${Dt(e.appBorderColor,.2)}`,cursor:o?"not-allowed":"grap",background:`${e.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${vt(.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,
2024-06-16 17:30:30 +02:00
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
2024-07-31 10:01:28 +02:00
${vt(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
${vt(.02,e.input.background)} 100%)`:`linear-gradient(to right,
2024-06-16 17:30:30 +02:00
${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%,
2024-07-31 10:01:28 +02:00
${gr(.02,e.input.background)} ${(n-t)/(r-t)*100}%,
${gr(.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 ${Dt(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),D2=W.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),g4=W(D2)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),b4=W.div({display:"flex",alignItems:"center",width:"100%"});function v4(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var x4=({name:e,value:t,onChange:r,min:n=0,max:o=100,step:a=1,onBlur:i,onFocus:s,argType:l})=>{let u=f=>{r(PM(f.target.value))},c=t!==void 0,d=Nt(()=>v4(a),[a]),y=!!l?.table?.readonly;return E.createElement(b4,{"aria-readonly":y},E.createElement(D2,null,n),E.createElement(m4,{id:tt(e),type:"range",disabled:y,onChange:u,name:e,value:t,min:n,max:o,step:a,onFocus:s,onBlur:i}),E.createElement(g4,{numberOFDecimalsPlaces:d,max:o},c?t.toFixed(d):"--"," / ",o))},E4=W.label({display:"flex"}),w4=W.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),S4=({name:e,value:t,onChange:r,onFocus:n,onBlur:o,maxLength:a,argType:i})=>{let s=f=>{r(f.target.value)},l=!!i?.table?.readonly,[u,c]=he(!1),d=$e(()=>{r(""),c(!0)},[c]);if(t===void 0)return E.createElement(Bt,{variant:"outline",size:"medium",disabled:l,id:bn(e),onClick:d},"Set string");let y=typeof t=="string";return E.createElement(E4,null,E.createElement(dt.Textarea,{id:tt(e),maxLength:a,onChange:s,disabled:l,size:"flex",placeholder:"Edit string...",autoFocus:u,valid:y?null:"error",name:e,value:y?t:"",onFocus:n,onBlur:o}),a&&E.createElement(w4,{isMaxed:t?.length===a},t?.length??0," / ",a))},A4=W(dt.Input)({padding:10});function T4(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var C4=({onChange:e,name:t,accept:r="image/*",value:n,argType:o})=>{let a=Xe(null),i=o?.control?.readOnly;function s(l){if(!l.target.files)return;let u=Array.from(l.target.files).map(c=>URL.createObjectURL(c));e(u),T4(n)}return ze(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),E.createElement(A4,{ref:a,id:tt(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},_4=eu(()=>Promise.resolve().then(()=>(av(),ov))),O4=e=>E.createElement(Zl,{fallback:E.createElement("div",null)},E.createElement(_4,{...e})),I4={array:Pv,object:Pv,boolean:wM,color:O4,date:OM,number:RM,check:Zr,"inline-check":Zr,radio:Zr,"inline-radio":Zr,select:Zr,"multi-select":Zr,range:x4,text:S4,file:C4},kv=()=>E.createElement(E.Fragment,null,"-"),P4=({row:e,arg:t,updateArgs:r,isHovered:n})=>{let{key:o,control:a}=e,[i,s]=he(!1),[l,u]=he({value:t});ze(()=>{i||u({value:t})},[i,t]);let c=$e(g=>(u({value:g}),r({[o]:g}),g),[r,o]),d=$e(()=>s(!1),[]),y=$e(()=>s(!0),[]);if(!a||a.disable){let g=a?.disable!==!0&&e?.type?.name!=="function";return n&&g?E.createElement(ar,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):E.createElement(kv,null)}let f={name:o,argType:e,value:l.value,onChange:c,onBlur:d,onFocus:y},h=I4[a.type]||kv;return E.createElement(h,{...f,...a,controlType:a.type})},k4=W.span({fontWeight:"bold"}),R4=W.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),D4=W.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Ir({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),F4=W.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ve(.1,e.color.defaultText):ve(.2,e.color.defaultText),marginTop:t?4:0}
2024-06-16 17:30:30 +02:00
}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }