@prozorro/prozorro-ui 0.0.2 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +66 -28
  2. package/dist/app/assets/Color-FRDS63T2-Bo-vvTV8.js +1 -0
  3. package/dist/app/assets/DocsRenderer-LL677BLK-DxB60yOs.js +811 -0
  4. package/dist/app/assets/PzText-H75Z6Lud.css +1 -0
  5. package/dist/app/assets/PzText.stories-pNLs8FlM.js +239 -0
  6. package/dist/app/assets/WithTooltip-65CFNBJE-Ty2foy7t.js +9 -0
  7. package/dist/app/assets/formatter-EIJCOSYU-oeR5mOii.js +1 -0
  8. package/dist/app/assets/iframe-B_iz38fI.js +1107 -0
  9. package/dist/app/assets/{preview-DAxGvctC.css → iframe-CNIwQJJc.css} +1 -1
  10. package/dist/app/assets/preload-helper-C1FmrZbK.js +1 -0
  11. package/dist/app/assets/syntaxhighlighter-OH4MV7E3-Can2sBRZ.js +6 -0
  12. package/dist/app/favicon-wrapper.svg +46 -0
  13. package/dist/app/favicon.svg +1 -1
  14. package/dist/app/iframe.html +87 -48
  15. package/dist/app/index.html +27 -59
  16. package/dist/app/index.json +1 -1
  17. package/dist/app/project.json +1 -1
  18. package/dist/app/sb-addons/docs-1/manager-bundle.js +3 -0
  19. package/dist/app/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +630 -0
  20. package/dist/app/sb-common-assets/favicon-wrapper.svg +46 -0
  21. package/dist/app/sb-common-assets/favicon.svg +1 -1
  22. package/dist/app/sb-manager/globals-runtime.js +74601 -40067
  23. package/dist/app/sb-manager/globals.js +13 -37
  24. package/dist/app/sb-manager/manager-stores.js +23 -0
  25. package/dist/app/sb-manager/runtime.js +23779 -9749
  26. package/dist/app/vite-inject-mocker-entry.js +2 -0
  27. package/dist/components/PzText/PzText.vue.d.ts +20 -0
  28. package/dist/components/PzText/index.d.ts +2 -0
  29. package/dist/components/PzText/types.d.ts +6 -0
  30. package/dist/index.d.ts +1 -1
  31. package/dist/package.json +9 -7
  32. package/dist/prozorro-ui.cjs +1 -1
  33. package/dist/prozorro-ui.js +44 -27
  34. package/dist/style.css +1 -1
  35. package/package.json +9 -7
  36. package/src/styles/_reset.scss +26 -0
  37. package/src/styles/abstract/_mixins.scss +50 -0
  38. package/src/styles/abstract/_typography.scss +202 -0
  39. package/src/styles/abstract/_variables.scss +59 -0
  40. package/src/styles/main.scss +7 -0
  41. package/src/styles/vendors/_google-material-icons.scss +42 -0
  42. package/src/styles/vendors/_normalize.scss +338 -0
  43. package/dist/app/assets/Button-DK7ZxByB.css +0 -1
  44. package/dist/app/assets/Button.stories-kOkDzZSR.js +0 -16
  45. package/dist/app/assets/Color-YHDXOIA2-CflMuX2a.js +0 -1
  46. package/dist/app/assets/DocsRenderer-CFRXHY34-CT7H_f1J.js +0 -623
  47. package/dist/app/assets/entry-preview-D3bN2KnO.js +0 -1
  48. package/dist/app/assets/entry-preview-docs-uZNR0dmt.js +0 -16
  49. package/dist/app/assets/iframe-Dy8Zk0Zd.js +0 -211
  50. package/dist/app/assets/index-CYkJ7mS4.js +0 -1
  51. package/dist/app/assets/index-Dc4p7Je0.js +0 -11
  52. package/dist/app/assets/index-DrFu-skq.js +0 -6
  53. package/dist/app/assets/preview-B8lJiyuQ.js +0 -34
  54. package/dist/app/assets/preview-BBWR9nbA.js +0 -1
  55. package/dist/app/assets/preview-BWzBA1C2.js +0 -396
  56. package/dist/app/assets/preview-CQ2_cFel.js +0 -2
  57. package/dist/app/assets/preview-CvbIS5ZJ.js +0 -1
  58. package/dist/app/assets/preview-D-Qz4Vhp.js +0 -240
  59. package/dist/app/assets/preview-D7OYendf.js +0 -1
  60. package/dist/app/assets/preview-DD_OYowb.js +0 -1
  61. package/dist/app/assets/preview-DGUiP6tS.js +0 -7
  62. package/dist/app/assets/vue.esm-bundler-DwA03xYR.js +0 -37
  63. package/dist/app/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  64. package/dist/app/sb-addons/essentials-backgrounds-4/manager-bundle.js +0 -12
  65. package/dist/app/sb-addons/essentials-controls-1/manager-bundle.js +0 -405
  66. package/dist/app/sb-addons/essentials-docs-3/manager-bundle.js +0 -245
  67. package/dist/app/sb-addons/essentials-measure-7/manager-bundle.js +0 -3
  68. package/dist/app/sb-addons/essentials-outline-8/manager-bundle.js +0 -3
  69. package/dist/app/sb-addons/essentials-toolbars-6/manager-bundle.js +0 -3
  70. package/dist/app/sb-addons/essentials-viewport-5/manager-bundle.js +0 -3
  71. package/dist/app/sb-addons/interactions-9/manager-bundle.js +0 -222
  72. package/dist/app/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  73. package/dist/app/sb-manager/globals-module-info.js +0 -1052
  74. package/dist/components/Button/Button.vue.d.ts +0 -10
  75. package/dist/components/Button/index.d.ts +0 -2
  76. package/dist/components/Button/types.d.ts +0 -6
@@ -1 +0,0 @@
1
- import{R as o}from"./DocsRenderer-CFRXHY34-CT7H_f1J.js";import"./iframe-Dy8Zk0Zd.js";import"./index-Dc4p7Je0.js";import"./index-DrFu-skq.js";const e={},c=o.createContext(e);function m(t){const n=o.useContext(c);return o.useMemo(function(){return typeof t=="function"?t(n):{...n,...t}},[n,t])}function s(t){let n;return t.disableParentContext?n=typeof t.components=="function"?t.components(e):t.components||e:n=m(t.components),o.createElement(c.Provider,{value:n},t.children)}export{s as MDXProvider,m as useMDXComponents};
@@ -1,11 +0,0 @@
1
- var kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Je={exports:{}};(function(n,a){(function(o,i){i(a)})(kn,function(o){function i(e){return e.text!==void 0&&e.text!==""?`'${e.type}' with value '${e.text}'`:`'${e.type}'`}class p extends Error{constructor(t){super(`No parslet found for token: ${i(t)}`),this.token=t,Object.setPrototypeOf(this,p.prototype)}getToken(){return this.token}}class u extends Error{constructor(t){super(`The parsing ended early. The next token was: ${i(t)}`),this.token=t,Object.setPrototypeOf(this,u.prototype)}getToken(){return this.token}}class d extends Error{constructor(t,r){let s=`Unexpected type: '${t.type}'.`;r!==void 0&&(s+=` Message: ${r}`),super(s),Object.setPrototypeOf(this,d.prototype)}}function f(e){return t=>t.startsWith(e)?{type:e,text:e}:null}function h(e){let t=0,r;const s=e[0];let l=!1;if(s!=="'"&&s!=='"')return null;for(;t<e.length;){if(t++,r=e[t],!l&&r===s){t++;break}l=!l&&r==="\\"}if(r!==s)throw new Error("Unterminated String");return e.slice(0,t)}const v=new RegExp("[$_\\p{ID_Start}]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}","u"),b=new RegExp("[$\\-\\p{ID_Continue}\\u200C\\u200D]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}","u");function ae(e){let t=e[0];if(!v.test(t))return null;let r=1;do{if(t=e[r],!b.test(t))break;r++}while(r<e.length);return e.slice(0,r)}const $=/^(NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity))/;function X(e){var t,r;return(r=(t=$.exec(e))===null||t===void 0?void 0:t[0])!==null&&r!==void 0?r:null}const W=e=>{const t=ae(e);return t==null?null:{type:"Identifier",text:t}};function N(e){return t=>{if(!t.startsWith(e))return null;const r=t[e.length];return r!==void 0&&b.test(r)?null:{type:e,text:e}}}const oe=e=>{const t=h(e);return t==null?null:{type:"StringValue",text:t}},Vt=e=>e.length>0?null:{type:"EOF",text:""},Ut=e=>{const t=X(e);return t===null?null:{type:"Number",text:t}},$t=[Vt,f("=>"),f("("),f(")"),f("{"),f("}"),f("["),f("]"),f("|"),f("&"),f("<"),f(">"),f(","),f(";"),f("*"),f("?"),f("!"),f("="),f(":"),f("..."),f("."),f("#"),f("~"),f("/"),f("@"),N("undefined"),N("null"),N("function"),N("this"),N("new"),N("module"),N("event"),N("extends"),N("external"),N("infer"),N("typeof"),N("keyof"),N("readonly"),N("import"),N("is"),N("in"),N("asserts"),Ut,W,oe],Kt=/^\s*\n\s*/;class K{static create(t){const r=this.read(t);t=r.text;const s=this.read(t);return t=s.text,new K(t,void 0,r.token,s.token)}constructor(t,r,s,l){this.text="",this.text=t,this.previous=r,this.current=s,this.next=l}static read(t,r=!1){r=r||Kt.test(t),t=t.trim();for(const s of $t){const l=s(t);if(l!==null){const y=Object.assign(Object.assign({},l),{startOfLine:r});return t=t.slice(y.text.length),{text:t,token:y}}}throw new Error("Unexpected Token "+t)}advance(){const t=K.read(this.text);return new K(t.text,this.current,this.next,t.token)}}function P(e){if(e===void 0)throw new Error("Unexpected undefined");if(e.type==="JsdocTypeKeyValue"||e.type==="JsdocTypeParameterList"||e.type==="JsdocTypeProperty"||e.type==="JsdocTypeReadonlyProperty"||e.type==="JsdocTypeObjectField"||e.type==="JsdocTypeJsdocObjectField"||e.type==="JsdocTypeIndexSignature"||e.type==="JsdocTypeMappedType"||e.type==="JsdocTypeTypeParameter")throw new d(e);return e}function se(e){return e.type==="JsdocTypeKeyValue"?Q(e):P(e)}function Dt(e){return e.type==="JsdocTypeName"?e:Q(e)}function Q(e){if(e.type!=="JsdocTypeKeyValue")throw new d(e);return e}function qt(e){var t;if(e.type==="JsdocTypeVariadic"){if(((t=e.element)===null||t===void 0?void 0:t.type)==="JsdocTypeName")return e;throw new d(e)}if(e.type!=="JsdocTypeNumber"&&e.type!=="JsdocTypeName")throw new d(e);return e}function Mt(e){if(e.type==="JsdocTypeTuple"||e.type==="JsdocTypeGeneric"&&e.meta.brackets==="square")return e;throw new d(e)}function ie(e){return e.type==="JsdocTypeIndexSignature"||e.type==="JsdocTypeMappedType"}var m;(function(e){e[e.ALL=0]="ALL",e[e.PARAMETER_LIST=1]="PARAMETER_LIST",e[e.OBJECT=2]="OBJECT",e[e.KEY_VALUE=3]="KEY_VALUE",e[e.INDEX_BRACKETS=4]="INDEX_BRACKETS",e[e.UNION=5]="UNION",e[e.INTERSECTION=6]="INTERSECTION",e[e.PREFIX=7]="PREFIX",e[e.INFIX=8]="INFIX",e[e.TUPLE=9]="TUPLE",e[e.SYMBOL=10]="SYMBOL",e[e.OPTIONAL=11]="OPTIONAL",e[e.NULLABLE=12]="NULLABLE",e[e.KEY_OF_TYPE_OF=13]="KEY_OF_TYPE_OF",e[e.FUNCTION=14]="FUNCTION",e[e.ARROW=15]="ARROW",e[e.ARRAY_BRACKETS=16]="ARRAY_BRACKETS",e[e.GENERIC=17]="GENERIC",e[e.NAME_PATH=18]="NAME_PATH",e[e.PARENTHESIS=19]="PARENTHESIS",e[e.SPECIAL_TYPES=20]="SPECIAL_TYPES"})(m||(m={}));class V{constructor(t,r,s){this.grammar=t,typeof r=="string"?this._lexer=K.create(r):this._lexer=r,this.baseParser=s}get lexer(){return this._lexer}parse(){const t=this.parseType(m.ALL);if(this.lexer.current.type!=="EOF")throw new u(this.lexer.current);return t}parseType(t){return P(this.parseIntermediateType(t))}parseIntermediateType(t){const r=this.tryParslets(null,t);if(r===null)throw new p(this.lexer.current);return this.parseInfixIntermediateType(r,t)}parseInfixIntermediateType(t,r){let s=this.tryParslets(t,r);for(;s!==null;)t=s,s=this.tryParslets(t,r);return t}tryParslets(t,r){for(const s of this.grammar){const l=s(this,r,t);if(l!==null)return l}return null}consume(t){return Array.isArray(t)||(t=[t]),t.includes(this.lexer.current.type)?(this._lexer=this.lexer.advance(),!0):!1}acceptLexerState(t){this._lexer=t.lexer}}function Ie(e){return e==="}"||e==="EOF"||e==="|"||e===","||e===")"||e===">"}const le=(e,t,r)=>{const s=e.lexer.current.type,l=e.lexer.next.type;return r==null&&s==="?"&&!Ie(l)||r!=null&&s==="?"?(e.consume("?"),r==null?{type:"JsdocTypeNullable",element:e.parseType(m.NULLABLE),meta:{position:"prefix"}}:{type:"JsdocTypeNullable",element:P(r),meta:{position:"suffix"}}):null};function J(e){const t=(r,s,l)=>{const y=r.lexer.current.type,T=r.lexer.next.type;if(l===null){if("parsePrefix"in e&&e.accept(y,T))return e.parsePrefix(r)}else if("parseInfix"in e&&e.precedence>s&&e.accept(y,T))return e.parseInfix(r,l);return null};return Object.defineProperty(t,"name",{value:e.name}),t}const H=J({name:"optionalParslet",accept:e=>e==="=",precedence:m.OPTIONAL,parsePrefix:e=>(e.consume("="),{type:"JsdocTypeOptional",element:e.parseType(m.OPTIONAL),meta:{position:"prefix"}}),parseInfix:(e,t)=>(e.consume("="),{type:"JsdocTypeOptional",element:P(t),meta:{position:"suffix"}})}),z=J({name:"numberParslet",accept:e=>e==="Number",parsePrefix:e=>{const t=parseFloat(e.lexer.current.text);return e.consume("Number"),{type:"JsdocTypeNumber",value:t}}}),Bt=J({name:"parenthesisParslet",accept:e=>e==="(",parsePrefix:e=>{if(e.consume("("),e.consume(")"))return{type:"JsdocTypeParameterList",elements:[]};const t=e.parseIntermediateType(m.ALL);if(!e.consume(")"))throw new Error("Unterminated parenthesis");return t.type==="JsdocTypeParameterList"?t:t.type==="JsdocTypeKeyValue"?{type:"JsdocTypeParameterList",elements:[t]}:{type:"JsdocTypeParenthesis",element:P(t)}}}),Ct=J({name:"specialTypesParslet",accept:(e,t)=>e==="?"&&Ie(t)||e==="null"||e==="undefined"||e==="*",parsePrefix:e=>{if(e.consume("null"))return{type:"JsdocTypeNull"};if(e.consume("undefined"))return{type:"JsdocTypeUndefined"};if(e.consume("*"))return{type:"JsdocTypeAny"};if(e.consume("?"))return{type:"JsdocTypeUnknown"};throw new Error("Unacceptable token: "+e.lexer.current.text)}}),Yt=J({name:"notNullableParslet",accept:e=>e==="!",precedence:m.NULLABLE,parsePrefix:e=>(e.consume("!"),{type:"JsdocTypeNotNullable",element:e.parseType(m.NULLABLE),meta:{position:"prefix"}}),parseInfix:(e,t)=>(e.consume("!"),{type:"JsdocTypeNotNullable",element:P(t),meta:{position:"suffix"}})});function Gt({allowTrailingComma:e}){return J({name:"parameterListParslet",accept:t=>t===",",precedence:m.PARAMETER_LIST,parseInfix:(t,r)=>{const s=[se(r)];t.consume(",");do try{const l=t.parseIntermediateType(m.PARAMETER_LIST);s.push(se(l))}catch(l){if(l instanceof p)break;throw l}while(t.consume(","));if(s.length>0&&s.slice(0,-1).some(l=>l.type==="JsdocTypeVariadic"))throw new Error("Only the last parameter may be a rest parameter");return{type:"JsdocTypeParameterList",elements:s}}})}const Xt=J({name:"genericParslet",accept:(e,t)=>e==="<"||e==="."&&t==="<",precedence:m.GENERIC,parseInfix:(e,t)=>{const r=e.consume(".");e.consume("<");const s=[];let l=!1;if(e.consume("infer")){l=!0;const y=e.parseIntermediateType(m.SYMBOL);if(y.type!=="JsdocTypeName")throw new d(y,"A typescript asserts always has to have a name on the left side.");s.push(y)}else do s.push(e.parseType(m.PARAMETER_LIST));while(e.consume(","));if(!e.consume(">"))throw new Error("Unterminated generic parameter list");return Object.assign(Object.assign({type:"JsdocTypeGeneric",left:P(t),elements:s},l?{infer:!0}:{}),{meta:{brackets:"angle",dot:r}})}}),Wt=J({name:"unionParslet",accept:e=>e==="|",precedence:m.UNION,parseInfix:(e,t)=>{e.consume("|");const r=[];do r.push(e.parseType(m.UNION));while(e.consume("|"));return{type:"JsdocTypeUnion",elements:[P(t),...r]}}}),ce=[le,H,z,Bt,Ct,Yt,Gt({allowTrailingComma:!0}),Xt,Wt,H];function Z({allowSquareBracketsOnAnyType:e,allowJsdocNamePaths:t,pathGrammar:r}){return function(l,y,T){if(T==null||y>=m.NAME_PATH)return null;const g=l.lexer.current.type,x=l.lexer.next.type;if(!(g==="."&&x!=="<"||g==="["&&(e||T.type==="JsdocTypeName")||t&&(g==="~"||g==="#")))return null;let O,ne=!1;l.consume(".")?O="property":l.consume("[")?(O="property-brackets",ne=!0):l.consume("~")?O="inner":(l.consume("#"),O="instance");const De=r!==null?new V(r,l.lexer,l):l,S=De.parseIntermediateType(m.NAME_PATH);l.acceptLexerState(De);let M;switch(S.type){case"JsdocTypeName":M={type:"JsdocTypeProperty",value:S.value,meta:{quote:void 0}};break;case"JsdocTypeNumber":M={type:"JsdocTypeProperty",value:S.value.toString(10),meta:{quote:void 0}};break;case"JsdocTypeStringValue":M={type:"JsdocTypeProperty",value:S.value,meta:{quote:S.meta.quote}};break;case"JsdocTypeSpecialNamePath":if(S.specialType==="event")M=S;else throw new d(S,"Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'");break;default:throw new d(S,"Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'")}if(ne&&!l.consume("]")){const qe=l.lexer.current;throw new Error(`Unterminated square brackets. Next token is '${qe.type}' with text '${qe.text}'`)}return{type:"JsdocTypeNamePath",left:P(T),right:M,pathType:O}}}function A({allowedAdditionalTokens:e}){return J({name:"nameParslet",accept:t=>t==="Identifier"||t==="this"||t==="new"||e.includes(t),parsePrefix:t=>{const{type:r,text:s}=t.lexer.current;return t.consume(r),{type:"JsdocTypeName",value:s}}})}const D=J({name:"stringValueParslet",accept:e=>e==="StringValue",parsePrefix:e=>{const t=e.lexer.current.text;return e.consume("StringValue"),{type:"JsdocTypeStringValue",value:t.slice(1,-1),meta:{quote:t[0]==="'"?"single":"double"}}}});function ee({pathGrammar:e,allowedTypes:t}){return J({name:"specialNamePathParslet",accept:r=>t.includes(r),parsePrefix:r=>{const s=r.lexer.current.type;if(r.consume(s),!r.consume(":"))return{type:"JsdocTypeName",value:s};let l,y=r.lexer.current;if(r.consume("StringValue"))l={type:"JsdocTypeSpecialNamePath",value:y.text.slice(1,-1),specialType:s,meta:{quote:y.text[0]==="'"?"single":"double"}};else{let x="";const k=["Identifier","@","/"];for(;k.some(O=>r.consume(O));)x+=y.text,y=r.lexer.current;l={type:"JsdocTypeSpecialNamePath",value:x,specialType:s,meta:{quote:void 0}}}const T=new V(e,r.lexer,r),g=T.parseInfixIntermediateType(l,m.ALL);return r.acceptLexerState(T),P(g)}})}const Re=[A({allowedAdditionalTokens:["external","module"]}),D,z,Z({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:null})],U=[...Re,ee({allowedTypes:["event"],pathGrammar:Re})];function pe(e){let t;if(e.type==="JsdocTypeParameterList")t=e.elements;else if(e.type==="JsdocTypeParenthesis")t=[e.element];else throw new d(e);return t.map(r=>se(r))}function Qt(e){const t=pe(e);if(t.some(r=>r.type==="JsdocTypeKeyValue"))throw new Error("No parameter should be named");return t}function ue({allowNamedParameters:e,allowNoReturnType:t,allowWithoutParenthesis:r,allowNewAsFunctionKeyword:s}){return J({name:"functionParslet",accept:(l,y)=>l==="function"||s&&l==="new"&&y==="(",parsePrefix:l=>{const y=l.consume("new");l.consume("function");const T=l.lexer.current.type==="(";if(!T){if(!r)throw new Error("function is missing parameter list");return{type:"JsdocTypeName",value:"function"}}let g={type:"JsdocTypeFunction",parameters:[],arrow:!1,constructor:y,parenthesis:T};const x=l.parseIntermediateType(m.FUNCTION);if(e===void 0)g.parameters=Qt(x);else{if(y&&x.type==="JsdocTypeFunction"&&x.arrow)return g=x,g.constructor=!0,g;g.parameters=pe(x);for(const k of g.parameters)if(k.type==="JsdocTypeKeyValue"&&!e.includes(k.key))throw new Error(`only allowed named parameters are ${e.join(", ")} but got ${k.type}`)}if(l.consume(":"))g.returnType=l.parseType(m.PREFIX);else if(!t)throw new Error("function is missing return type");return g}})}function ye({allowPostfix:e,allowEnclosingBrackets:t}){return J({name:"variadicParslet",accept:r=>r==="...",precedence:m.PREFIX,parsePrefix:r=>{r.consume("...");const s=t&&r.consume("[");try{const l=r.parseType(m.PREFIX);if(s&&!r.consume("]"))throw new Error("Unterminated variadic type. Missing ']'");return{type:"JsdocTypeVariadic",element:P(l),meta:{position:"prefix",squareBrackets:s}}}catch(l){if(l instanceof p){if(s)throw new Error("Empty square brackets for variadic are not allowed.");return{type:"JsdocTypeVariadic",meta:{position:void 0,squareBrackets:!1}}}else throw l}},parseInfix:e?(r,s)=>(r.consume("..."),{type:"JsdocTypeVariadic",element:P(s),meta:{position:"suffix",squareBrackets:!1}}):void 0})}const _e=J({name:"symbolParslet",accept:e=>e==="(",precedence:m.SYMBOL,parseInfix:(e,t)=>{if(t.type!=="JsdocTypeName")throw new Error("Symbol expects a name on the left side. (Reacting on '(')");e.consume("(");const r={type:"JsdocTypeSymbol",value:t.value};if(!e.consume(")")){const s=e.parseIntermediateType(m.SYMBOL);if(r.element=qt(s),!e.consume(")"))throw new Error("Symbol does not end after value")}return r}}),Fe=J({name:"arrayBracketsParslet",precedence:m.ARRAY_BRACKETS,accept:(e,t)=>e==="["&&t==="]",parseInfix:(e,t)=>(e.consume("["),e.consume("]"),{type:"JsdocTypeGeneric",left:{type:"JsdocTypeName",value:"Array"},elements:[P(t)],meta:{brackets:"square",dot:!1}})});function de({objectFieldGrammar:e,allowKeyTypes:t}){return J({name:"objectParslet",accept:r=>r==="{",parsePrefix:r=>{r.consume("{");const s={type:"JsdocTypeObject",meta:{separator:"comma"},elements:[]};if(!r.consume("}")){let l;const y=new V(e,r.lexer,r);for(;;){y.acceptLexerState(r);let T=y.parseIntermediateType(m.OBJECT);r.acceptLexerState(y),T===void 0&&t&&(T=r.parseIntermediateType(m.OBJECT));let g=!1;if(T.type==="JsdocTypeNullable"&&(g=!0,T=T.element),T.type==="JsdocTypeNumber"||T.type==="JsdocTypeName"||T.type==="JsdocTypeStringValue"){let k;T.type==="JsdocTypeStringValue"&&(k=T.meta.quote),s.elements.push({type:"JsdocTypeObjectField",key:T.value.toString(),right:void 0,optional:g,readonly:!1,meta:{quote:k}})}else if(T.type==="JsdocTypeObjectField"||T.type==="JsdocTypeJsdocObjectField")s.elements.push(T);else throw new d(T);if(r.lexer.current.startOfLine)l="linebreak",r.consume(",")||r.consume(";");else if(r.consume(","))l="comma";else if(r.consume(";"))l="semicolon";else break;if(r.lexer.current.type==="}")break}if(s.meta.separator=l??"comma",l==="linebreak"&&(s.meta.propertyIndent=" "),!r.consume("}"))throw new Error("Unterminated record type. Missing '}'")}return s}})}function me({allowSquaredProperties:e,allowKeyTypes:t,allowReadonly:r,allowOptional:s}){return J({name:"objectFieldParslet",precedence:m.KEY_VALUE,accept:l=>l===":",parseInfix:(l,y)=>{var T;let g=!1,x=!1;s&&y.type==="JsdocTypeNullable"&&(g=!0,y=y.element),r&&y.type==="JsdocTypeReadonlyProperty"&&(x=!0,y=y.element);const k=(T=l.baseParser)!==null&&T!==void 0?T:l;if(k.acceptLexerState(l),y.type==="JsdocTypeNumber"||y.type==="JsdocTypeName"||y.type==="JsdocTypeStringValue"||ie(y)){if(ie(y)&&!e)throw new d(y);k.consume(":");let O;y.type==="JsdocTypeStringValue"&&(O=y.meta.quote);const ne=k.parseType(m.KEY_VALUE);return l.acceptLexerState(k),{type:"JsdocTypeObjectField",key:ie(y)?y:y.value.toString(),right:ne,optional:g,readonly:x,meta:{quote:O}}}else{if(!t)throw new d(y);k.consume(":");const O=k.parseType(m.KEY_VALUE);return l.acceptLexerState(k),{type:"JsdocTypeJsdocObjectField",left:P(y),right:O}}}})}function fe({allowOptional:e,allowVariadic:t}){return J({name:"keyValueParslet",precedence:m.KEY_VALUE,accept:r=>r===":",parseInfix:(r,s)=>{let l=!1,y=!1;if(e&&s.type==="JsdocTypeNullable"&&(l=!0,s=s.element),t&&s.type==="JsdocTypeVariadic"&&s.element!==void 0&&(y=!0,s=s.element),s.type!=="JsdocTypeName")throw new d(s);r.consume(":");const T=r.parseType(m.KEY_VALUE);return{type:"JsdocTypeKeyValue",key:s.value,right:T,optional:l,variadic:y}}})}const Le=[...ce,ue({allowWithoutParenthesis:!0,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),D,ee({allowedTypes:["module","external","event"],pathGrammar:U}),ye({allowEnclosingBrackets:!0,allowPostfix:!0}),A({allowedAdditionalTokens:["keyof"]}),_e,Fe,Z({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:U})],Ht=[...Le,de({objectFieldGrammar:[A({allowedAdditionalTokens:["typeof","module","in"]}),me({allowSquaredProperties:!1,allowKeyTypes:!0,allowOptional:!1,allowReadonly:!1}),...Le],allowKeyTypes:!0}),fe({allowOptional:!0,allowVariadic:!0})],je=J({name:"typeOfParslet",accept:e=>e==="typeof",parsePrefix:e=>(e.consume("typeof"),{type:"JsdocTypeTypeof",element:e.parseType(m.KEY_OF_TYPE_OF)})}),zt=[A({allowedAdditionalTokens:["typeof","module","keyof","event","external","in"]}),le,H,D,z,me({allowSquaredProperties:!1,allowKeyTypes:!1,allowOptional:!1,allowReadonly:!1})],Zt=[...ce,de({allowKeyTypes:!1,objectFieldGrammar:zt}),A({allowedAdditionalTokens:["event","external","in"]}),je,ue({allowWithoutParenthesis:!1,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),ye({allowEnclosingBrackets:!1,allowPostfix:!1}),A({allowedAdditionalTokens:["keyof"]}),ee({allowedTypes:["module"],pathGrammar:U}),Z({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:U}),fe({allowOptional:!1,allowVariadic:!1}),_e],en=J({name:"assertsParslet",accept:e=>e==="asserts",parsePrefix:e=>{e.consume("asserts");const t=e.parseIntermediateType(m.SYMBOL);if(t.type!=="JsdocTypeName")throw new d(t,"A typescript asserts always has to have a name on the left side.");return e.consume("is")?{type:"JsdocTypeAsserts",left:t,right:P(e.parseIntermediateType(m.INFIX))}:{type:"JsdocTypeAssertsPlain",element:t}}});function tn({allowQuestionMark:e}){return J({name:"tupleParslet",accept:t=>t==="[",parsePrefix:t=>{t.consume("[");const r={type:"JsdocTypeTuple",elements:[]};if(t.consume("]"))return r;const s=t.parseIntermediateType(m.ALL);if(s.type==="JsdocTypeParameterList"?s.elements[0].type==="JsdocTypeKeyValue"?r.elements=s.elements.map(Q):r.elements=s.elements.map(P):s.type==="JsdocTypeKeyValue"?r.elements=[Q(s)]:r.elements=[P(s)],!t.consume("]"))throw new Error("Unterminated '['");if(r.elements.some(l=>l.type==="JsdocTypeUnknown"))throw new Error("Question mark in tuple not allowed");return r}})}const nn=J({name:"keyOfParslet",accept:e=>e==="keyof",parsePrefix:e=>(e.consume("keyof"),{type:"JsdocTypeKeyof",element:P(e.parseType(m.KEY_OF_TYPE_OF))})}),rn=J({name:"importParslet",accept:e=>e==="import",parsePrefix:e=>{if(e.consume("import"),!e.consume("("))throw new Error("Missing parenthesis after import keyword");const t=e.parseType(m.PREFIX);if(t.type!=="JsdocTypeStringValue")throw new Error("Only string values are allowed as paths for imports");if(!e.consume(")"))throw new Error("Missing closing parenthesis after import keyword");return{type:"JsdocTypeImport",element:t}}}),an=J({name:"readonlyPropertyParslet",accept:e=>e==="readonly",parsePrefix:e=>(e.consume("readonly"),{type:"JsdocTypeReadonlyProperty",element:e.parseIntermediateType(m.KEY_VALUE)})}),on=J({name:"arrowFunctionParslet",precedence:m.ARROW,accept:e=>e==="=>",parseInfix:(e,t)=>(e.consume("=>"),{type:"JsdocTypeFunction",parameters:pe(t).map(Dt),arrow:!0,constructor:!1,parenthesis:!0,returnType:e.parseType(m.OBJECT)})}),sn=J({name:"genericArrowFunctionParslet",accept:e=>e==="<",parsePrefix:e=>{const t=[];e.consume("<");do{let s,l=e.parseIntermediateType(m.SYMBOL);if(l.type==="JsdocTypeOptional"&&(l=l.element,s=e.parseType(m.SYMBOL)),l.type!=="JsdocTypeName")throw new d(l);let y;e.consume("extends")&&(y=e.parseType(m.SYMBOL),y.type==="JsdocTypeOptional"&&(y=y.element,s=e.parseType(m.SYMBOL)));const T={type:"JsdocTypeTypeParameter",name:l};if(y!==void 0&&(T.constraint=y),s!==void 0&&(T.defaultValue=s),t.push(T),e.consume(">"))break}while(e.consume(","));const r=e.parseIntermediateType(m.SYMBOL);return r.typeParameters=t,r}}),ln=J({name:"intersectionParslet",accept:e=>e==="&",precedence:m.INTERSECTION,parseInfix:(e,t)=>{e.consume("&");const r=[];do r.push(e.parseType(m.INTERSECTION));while(e.consume("&"));return{type:"JsdocTypeIntersection",elements:[P(t),...r]}}}),cn=J({name:"predicateParslet",precedence:m.INFIX,accept:e=>e==="is",parseInfix:(e,t)=>{if(t.type!=="JsdocTypeName")throw new d(t,"A typescript predicate always has to have a name on the left side.");return e.consume("is"),{type:"JsdocTypePredicate",left:t,right:P(e.parseIntermediateType(m.INFIX))}}}),pn=J({name:"objectSquareBracketPropertyParslet",accept:e=>e==="[",parsePrefix:e=>{if(e.baseParser===void 0)throw new Error("Only allowed inside object grammar");e.consume("[");const t=e.lexer.current.text;e.consume("Identifier");let r;if(e.consume(":")){const s=e.baseParser;s.acceptLexerState(e),r={type:"JsdocTypeIndexSignature",key:t,right:s.parseType(m.INDEX_BRACKETS)},e.acceptLexerState(s)}else if(e.consume("in")){const s=e.baseParser;s.acceptLexerState(e),r={type:"JsdocTypeMappedType",key:t,right:s.parseType(m.ARRAY_BRACKETS)},e.acceptLexerState(s)}else throw new Error("Missing ':' or 'in' inside square bracketed property.");if(!e.consume("]"))throw new Error("Unterminated square brackets");return r}}),un=J({name:"readonlyArrayParslet",accept:e=>e==="readonly",parsePrefix:e=>(e.consume("readonly"),{type:"JsdocTypeReadonlyArray",element:Mt(e.parseIntermediateType(m.ALL))})}),yn=J({name:"conditionalParslet",precedence:m.INFIX,accept:e=>e==="extends",parseInfix:(e,t)=>{e.consume("extends");const r=e.parseType(m.KEY_OF_TYPE_OF).element,s=e.parseType(m.INFIX);return e.consume(":"),{type:"JsdocTypeConditional",checksType:P(t),extendsType:r,trueType:s,falseType:e.parseType(m.INFIX)}}}),dn=[an,A({allowedAdditionalTokens:["typeof","module","keyof","event","external","in"]}),le,H,D,z,me({allowSquaredProperties:!0,allowKeyTypes:!1,allowOptional:!0,allowReadonly:!0}),pn],mn=[...ce,de({allowKeyTypes:!1,objectFieldGrammar:dn}),un,je,nn,rn,D,ue({allowWithoutParenthesis:!0,allowNoReturnType:!1,allowNamedParameters:["this","new","args"],allowNewAsFunctionKeyword:!0}),tn({allowQuestionMark:!1}),ye({allowEnclosingBrackets:!1,allowPostfix:!1}),en,yn,A({allowedAdditionalTokens:["event","external","in"]}),ee({allowedTypes:["module"],pathGrammar:U}),Fe,on,sn,Z({allowSquareBracketsOnAnyType:!0,allowJsdocNamePaths:!1,pathGrammar:U}),ln,cn,fe({allowVariadic:!0,allowOptional:!0})];function Ve(e,t){switch(t){case"closure":return new V(Zt,e).parse();case"jsdoc":return new V(Ht,e).parse();case"typescript":return new V(mn,e).parse()}}function fn(e,t=["typescript","closure","jsdoc"]){let r;for(const s of t)try{return Ve(e,s)}catch(l){r=l}throw r}function q(e,t){const r=e[t.type];if(r===void 0)throw new Error(`In this set of transform rules exists no rule for type ${t.type}.`);return r(t,s=>q(e,s))}function w(e){throw new Error("This transform is not available. Are you trying the correct parsing mode?")}function Ue(e){const t={params:[]};for(const r of e.parameters)r.type==="JsdocTypeKeyValue"?r.key==="this"?t.this=r.right:r.key==="new"?t.new=r.right:t.params.push(r):t.params.push(r);return t}function te(e,t,r){return e==="prefix"?r+t:t+r}function I(e,t){switch(t){case"double":return`"${e}"`;case"single":return`'${e}'`;case void 0:return e}}function $e(){return{JsdocTypeParenthesis:(e,t)=>`(${e.element!==void 0?t(e.element):""})`,JsdocTypeKeyof:(e,t)=>`keyof ${t(e.element)}`,JsdocTypeFunction:(e,t)=>{var r;if(e.arrow){if(e.returnType===void 0)throw new Error("Arrow function needs a return type.");let s=`${e.typeParameters!==void 0?`<${(r=e.typeParameters.map(t).join(", "))!==null&&r!==void 0?r:""}>`:""}(${e.parameters.map(t).join(", ")}) => ${t(e.returnType)}`;return e.constructor&&(s="new "+s),s}else{let s=e.constructor?"new":"function";return e.parenthesis&&(s+=`(${e.parameters.map(t).join(", ")})`,e.returnType!==void 0&&(s+=`: ${t(e.returnType)}`)),s}},JsdocTypeName:e=>e.value,JsdocTypeTuple:(e,t)=>`[${e.elements.map(t).join(", ")}]`,JsdocTypeVariadic:(e,t)=>e.meta.position===void 0?"...":te(e.meta.position,t(e.element),"..."),JsdocTypeNamePath:(e,t)=>{const r=t(e.left),s=t(e.right);switch(e.pathType){case"inner":return`${r}~${s}`;case"instance":return`${r}#${s}`;case"property":return`${r}.${s}`;case"property-brackets":return`${r}[${s}]`}},JsdocTypeStringValue:e=>I(e.value,e.meta.quote),JsdocTypeAny:()=>"*",JsdocTypeGeneric:(e,t)=>{if(e.meta.brackets==="square"){const r=e.elements[0],s=t(r);return r.type==="JsdocTypeUnion"||r.type==="JsdocTypeIntersection"?`(${s})[]`:`${s}[]`}else return`${t(e.left)}${e.meta.dot?".":""}<${e.infer===!0?"infer ":""}${e.elements.map(t).join(", ")}>`},JsdocTypeImport:(e,t)=>`import(${t(e.element)})`,JsdocTypeObjectField:(e,t)=>{let r="";return e.readonly&&(r+="readonly "),typeof e.key=="string"?r+=I(e.key,e.meta.quote):r+=t(e.key),e.optional&&(r+="?"),e.right===void 0?r:r+`: ${t(e.right)}`},JsdocTypeJsdocObjectField:(e,t)=>`${t(e.left)}: ${t(e.right)}`,JsdocTypeKeyValue:(e,t)=>{let r=e.key;return e.optional&&(r+="?"),e.variadic&&(r="..."+r),e.right===void 0?r:r+`: ${t(e.right)}`},JsdocTypeSpecialNamePath:e=>`${e.specialType}:${I(e.value,e.meta.quote)}`,JsdocTypeNotNullable:(e,t)=>te(e.meta.position,t(e.element),"!"),JsdocTypeNull:()=>"null",JsdocTypeNullable:(e,t)=>te(e.meta.position,t(e.element),"?"),JsdocTypeNumber:e=>e.value.toString(),JsdocTypeObject:(e,t)=>{var r,s;return`{${(e.meta.separator==="linebreak"&&e.elements.length>1?`
2
- `+((r=e.meta.propertyIndent)!==null&&r!==void 0?r:""):"")+e.elements.map(t).join(e.meta.separator==="comma"?", ":e.meta.separator==="linebreak"?`
3
- `+((s=e.meta.propertyIndent)!==null&&s!==void 0?s:""):"; ")+(e.meta.separator==="linebreak"&&e.elements.length>1?`
4
- `:"")}}`},JsdocTypeOptional:(e,t)=>te(e.meta.position,t(e.element),"="),JsdocTypeSymbol:(e,t)=>`${e.value}(${e.element!==void 0?t(e.element):""})`,JsdocTypeTypeof:(e,t)=>`typeof ${t(e.element)}`,JsdocTypeUndefined:()=>"undefined",JsdocTypeUnion:(e,t)=>e.elements.map(t).join(" | "),JsdocTypeUnknown:()=>"?",JsdocTypeIntersection:(e,t)=>e.elements.map(t).join(" & "),JsdocTypeProperty:e=>I(e.value,e.meta.quote),JsdocTypePredicate:(e,t)=>`${t(e.left)} is ${t(e.right)}`,JsdocTypeIndexSignature:(e,t)=>`[${e.key}: ${t(e.right)}]`,JsdocTypeMappedType:(e,t)=>`[${e.key} in ${t(e.right)}]`,JsdocTypeAsserts:(e,t)=>`asserts ${t(e.left)} is ${t(e.right)}`,JsdocTypeReadonlyArray:(e,t)=>`readonly ${t(e.element)}`,JsdocTypeAssertsPlain:(e,t)=>`asserts ${t(e.element)}`,JsdocTypeConditional:(e,t)=>`${t(e.checksType)} extends ${t(e.extendsType)} ? ${t(e.trueType)} : ${t(e.falseType)}`,JsdocTypeTypeParameter:(e,t)=>`${t(e.name)}${e.constraint!==void 0?` extends ${t(e.constraint)}`:""}${e.defaultValue!==void 0?` = ${t(e.defaultValue)}`:""}`}}const Tn=$e();function hn(e){return q(Tn,e)}const Jn=["null","true","false","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield"];function R(e){const t={type:"NameExpression",name:e};return Jn.includes(e)&&(t.reservedWord=!0),t}const gn={JsdocTypeOptional:(e,t)=>{const r=t(e.element);return r.optional=!0,r},JsdocTypeNullable:(e,t)=>{const r=t(e.element);return r.nullable=!0,r},JsdocTypeNotNullable:(e,t)=>{const r=t(e.element);return r.nullable=!1,r},JsdocTypeVariadic:(e,t)=>{if(e.element===void 0)throw new Error("dots without value are not allowed in catharsis mode");const r=t(e.element);return r.repeatable=!0,r},JsdocTypeAny:()=>({type:"AllLiteral"}),JsdocTypeNull:()=>({type:"NullLiteral"}),JsdocTypeStringValue:e=>R(I(e.value,e.meta.quote)),JsdocTypeUndefined:()=>({type:"UndefinedLiteral"}),JsdocTypeUnknown:()=>({type:"UnknownLiteral"}),JsdocTypeFunction:(e,t)=>{const r=Ue(e),s={type:"FunctionType",params:r.params.map(t)};return r.this!==void 0&&(s.this=t(r.this)),r.new!==void 0&&(s.new=t(r.new)),e.returnType!==void 0&&(s.result=t(e.returnType)),s},JsdocTypeGeneric:(e,t)=>({type:"TypeApplication",applications:e.elements.map(r=>t(r)),expression:t(e.left)}),JsdocTypeSpecialNamePath:e=>R(e.specialType+":"+I(e.value,e.meta.quote)),JsdocTypeName:e=>e.value!=="function"?R(e.value):{type:"FunctionType",params:[]},JsdocTypeNumber:e=>R(e.value.toString()),JsdocTypeObject:(e,t)=>{const r={type:"RecordType",fields:[]};for(const s of e.elements)s.type!=="JsdocTypeObjectField"&&s.type!=="JsdocTypeJsdocObjectField"?r.fields.push({type:"FieldType",key:t(s),value:void 0}):r.fields.push(t(s));return r},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!="string")throw new Error("Index signatures and mapped types are not supported");return{type:"FieldType",key:R(I(e.key,e.meta.quote)),value:e.right===void 0?void 0:t(e.right)}},JsdocTypeJsdocObjectField:(e,t)=>({type:"FieldType",key:t(e.left),value:t(e.right)}),JsdocTypeUnion:(e,t)=>({type:"TypeUnion",elements:e.elements.map(r=>t(r))}),JsdocTypeKeyValue:(e,t)=>({type:"FieldType",key:R(e.key),value:e.right===void 0?void 0:t(e.right)}),JsdocTypeNamePath:(e,t)=>{const r=t(e.left);let s;e.right.type==="JsdocTypeSpecialNamePath"?s=t(e.right).name:s=I(e.right.value,e.right.meta.quote);const l=e.pathType==="inner"?"~":e.pathType==="instance"?"#":".";return R(`${r.name}${l}${s}`)},JsdocTypeSymbol:e=>{let t="",r=e.element,s=!1;return(r==null?void 0:r.type)==="JsdocTypeVariadic"&&(r.meta.position==="prefix"?t="...":s=!0,r=r.element),(r==null?void 0:r.type)==="JsdocTypeName"?t+=r.value:(r==null?void 0:r.type)==="JsdocTypeNumber"&&(t+=r.value.toString()),s&&(t+="..."),R(`${e.value}(${t})`)},JsdocTypeParenthesis:(e,t)=>t(P(e.element)),JsdocTypeMappedType:w,JsdocTypeIndexSignature:w,JsdocTypeImport:w,JsdocTypeKeyof:w,JsdocTypeTuple:w,JsdocTypeTypeof:w,JsdocTypeIntersection:w,JsdocTypeProperty:w,JsdocTypePredicate:w,JsdocTypeAsserts:w,JsdocTypeReadonlyArray:w,JsdocTypeAssertsPlain:w,JsdocTypeConditional:w,JsdocTypeTypeParameter:w};function wn(e){return q(gn,e)}function L(e){switch(e){case void 0:return"none";case"single":return"single";case"double":return"double"}}function Pn(e){switch(e){case"inner":return"INNER_MEMBER";case"instance":return"INSTANCE_MEMBER";case"property":return"MEMBER";case"property-brackets":return"MEMBER"}}function Te(e,t){return t.length===2?{type:e,left:t[0],right:t[1]}:{type:e,left:t[0],right:Te(e,t.slice(1))}}const bn={JsdocTypeOptional:(e,t)=>({type:"OPTIONAL",value:t(e.element),meta:{syntax:e.meta.position==="prefix"?"PREFIX_EQUAL_SIGN":"SUFFIX_EQUALS_SIGN"}}),JsdocTypeNullable:(e,t)=>({type:"NULLABLE",value:t(e.element),meta:{syntax:e.meta.position==="prefix"?"PREFIX_QUESTION_MARK":"SUFFIX_QUESTION_MARK"}}),JsdocTypeNotNullable:(e,t)=>({type:"NOT_NULLABLE",value:t(e.element),meta:{syntax:e.meta.position==="prefix"?"PREFIX_BANG":"SUFFIX_BANG"}}),JsdocTypeVariadic:(e,t)=>{const r={type:"VARIADIC",meta:{syntax:e.meta.position==="prefix"?"PREFIX_DOTS":e.meta.position==="suffix"?"SUFFIX_DOTS":"ONLY_DOTS"}};return e.element!==void 0&&(r.value=t(e.element)),r},JsdocTypeName:e=>({type:"NAME",name:e.value}),JsdocTypeTypeof:(e,t)=>({type:"TYPE_QUERY",name:t(e.element)}),JsdocTypeTuple:(e,t)=>({type:"TUPLE",entries:e.elements.map(t)}),JsdocTypeKeyof:(e,t)=>({type:"KEY_QUERY",value:t(e.element)}),JsdocTypeImport:e=>({type:"IMPORT",path:{type:"STRING_VALUE",quoteStyle:L(e.element.meta.quote),string:e.element.value}}),JsdocTypeUndefined:()=>({type:"NAME",name:"undefined"}),JsdocTypeAny:()=>({type:"ANY"}),JsdocTypeFunction:(e,t)=>{const r=Ue(e),s={type:e.arrow?"ARROW":"FUNCTION",params:r.params.map(l=>{if(l.type==="JsdocTypeKeyValue"){if(l.right===void 0)throw new Error("Function parameter without ':' is not expected to be 'KEY_VALUE'");return{type:"NAMED_PARAMETER",name:l.key,typeName:t(l.right)}}else return t(l)}),new:null,returns:null};return r.this!==void 0?s.this=t(r.this):e.arrow||(s.this=null),r.new!==void 0&&(s.new=t(r.new)),e.returnType!==void 0&&(s.returns=t(e.returnType)),s},JsdocTypeGeneric:(e,t)=>{const r={type:"GENERIC",subject:t(e.left),objects:e.elements.map(t),meta:{syntax:e.meta.brackets==="square"?"SQUARE_BRACKET":e.meta.dot?"ANGLE_BRACKET_WITH_DOT":"ANGLE_BRACKET"}};return e.meta.brackets==="square"&&e.elements[0].type==="JsdocTypeFunction"&&!e.elements[0].parenthesis&&(r.objects[0]={type:"NAME",name:"function"}),r},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!="string")throw new Error("Index signatures and mapped types are not supported");if(e.right===void 0)return{type:"RECORD_ENTRY",key:e.key,quoteStyle:L(e.meta.quote),value:null,readonly:!1};let r=t(e.right);return e.optional&&(r={type:"OPTIONAL",value:r,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key.toString(),quoteStyle:L(e.meta.quote),value:r,readonly:!1}},JsdocTypeJsdocObjectField:()=>{throw new Error("Keys may not be typed in jsdoctypeparser.")},JsdocTypeKeyValue:(e,t)=>{if(e.right===void 0)return{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:null,readonly:!1};let r=t(e.right);return e.optional&&(r={type:"OPTIONAL",value:r,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:r,readonly:!1}},JsdocTypeObject:(e,t)=>{const r=[];for(const s of e.elements)(s.type==="JsdocTypeObjectField"||s.type==="JsdocTypeJsdocObjectField")&&r.push(t(s));return{type:"RECORD",entries:r}},JsdocTypeSpecialNamePath:e=>{if(e.specialType!=="module")throw new Error(`jsdoctypeparser does not support type ${e.specialType} at this point.`);return{type:"MODULE",value:{type:"FILE_PATH",quoteStyle:L(e.meta.quote),path:e.value}}},JsdocTypeNamePath:(e,t)=>{let r=!1,s,l;e.right.type==="JsdocTypeSpecialNamePath"&&e.right.specialType==="event"?(r=!0,s=e.right.value,l=L(e.right.meta.quote)):(s=e.right.value,l=L(e.right.meta.quote));const y={type:Pn(e.pathType),owner:t(e.left),name:s,quoteStyle:l,hasEventPrefix:r};if(y.owner.type==="MODULE"){const T=y.owner;return y.owner=y.owner.value,T.value=y,T}else return y},JsdocTypeUnion:(e,t)=>Te("UNION",e.elements.map(t)),JsdocTypeParenthesis:(e,t)=>({type:"PARENTHESIS",value:t(P(e.element))}),JsdocTypeNull:()=>({type:"NAME",name:"null"}),JsdocTypeUnknown:()=>({type:"UNKNOWN"}),JsdocTypeStringValue:e=>({type:"STRING_VALUE",quoteStyle:L(e.meta.quote),string:e.value}),JsdocTypeIntersection:(e,t)=>Te("INTERSECTION",e.elements.map(t)),JsdocTypeNumber:e=>({type:"NUMBER_VALUE",number:e.value.toString()}),JsdocTypeSymbol:w,JsdocTypeProperty:w,JsdocTypePredicate:w,JsdocTypeMappedType:w,JsdocTypeIndexSignature:w,JsdocTypeAsserts:w,JsdocTypeReadonlyArray:w,JsdocTypeAssertsPlain:w,JsdocTypeConditional:w,JsdocTypeTypeParameter:w};function Nn(e){return q(bn,e)}function En(){return{JsdocTypeIntersection:(e,t)=>({type:"JsdocTypeIntersection",elements:e.elements.map(t)}),JsdocTypeGeneric:(e,t)=>({type:"JsdocTypeGeneric",left:t(e.left),elements:e.elements.map(t),meta:{dot:e.meta.dot,brackets:e.meta.brackets}}),JsdocTypeNullable:e=>e,JsdocTypeUnion:(e,t)=>({type:"JsdocTypeUnion",elements:e.elements.map(t)}),JsdocTypeUnknown:e=>e,JsdocTypeUndefined:e=>e,JsdocTypeTypeof:(e,t)=>({type:"JsdocTypeTypeof",element:t(e.element)}),JsdocTypeSymbol:(e,t)=>{const r={type:"JsdocTypeSymbol",value:e.value};return e.element!==void 0&&(r.element=t(e.element)),r},JsdocTypeOptional:(e,t)=>({type:"JsdocTypeOptional",element:t(e.element),meta:{position:e.meta.position}}),JsdocTypeObject:(e,t)=>({type:"JsdocTypeObject",meta:{separator:"comma"},elements:e.elements.map(t)}),JsdocTypeNumber:e=>e,JsdocTypeNull:e=>e,JsdocTypeNotNullable:(e,t)=>({type:"JsdocTypeNotNullable",element:t(e.element),meta:{position:e.meta.position}}),JsdocTypeSpecialNamePath:e=>e,JsdocTypeObjectField:(e,t)=>({type:"JsdocTypeObjectField",key:e.key,right:e.right===void 0?void 0:t(e.right),optional:e.optional,readonly:e.readonly,meta:e.meta}),JsdocTypeJsdocObjectField:(e,t)=>({type:"JsdocTypeJsdocObjectField",left:t(e.left),right:t(e.right)}),JsdocTypeKeyValue:(e,t)=>({type:"JsdocTypeKeyValue",key:e.key,right:e.right===void 0?void 0:t(e.right),optional:e.optional,variadic:e.variadic}),JsdocTypeImport:(e,t)=>({type:"JsdocTypeImport",element:t(e.element)}),JsdocTypeAny:e=>e,JsdocTypeStringValue:e=>e,JsdocTypeNamePath:e=>e,JsdocTypeVariadic:(e,t)=>{const r={type:"JsdocTypeVariadic",meta:{position:e.meta.position,squareBrackets:e.meta.squareBrackets}};return e.element!==void 0&&(r.element=t(e.element)),r},JsdocTypeTuple:(e,t)=>({type:"JsdocTypeTuple",elements:e.elements.map(t)}),JsdocTypeName:e=>e,JsdocTypeFunction:(e,t)=>{const r={type:"JsdocTypeFunction",arrow:e.arrow,parameters:e.parameters.map(t),constructor:e.constructor,parenthesis:e.parenthesis};return e.returnType!==void 0&&(r.returnType=t(e.returnType)),r},JsdocTypeKeyof:(e,t)=>({type:"JsdocTypeKeyof",element:t(e.element)}),JsdocTypeParenthesis:(e,t)=>({type:"JsdocTypeParenthesis",element:t(e.element)}),JsdocTypeProperty:e=>e,JsdocTypePredicate:(e,t)=>({type:"JsdocTypePredicate",left:t(e.left),right:t(e.right)}),JsdocTypeIndexSignature:(e,t)=>({type:"JsdocTypeIndexSignature",key:e.key,right:t(e.right)}),JsdocTypeMappedType:(e,t)=>({type:"JsdocTypeMappedType",key:e.key,right:t(e.right)}),JsdocTypeAsserts:(e,t)=>({type:"JsdocTypeAsserts",left:t(e.left),right:t(e.right)}),JsdocTypeReadonlyArray:(e,t)=>({type:"JsdocTypeReadonlyArray",element:t(e.element)}),JsdocTypeAssertsPlain:(e,t)=>({type:"JsdocTypeAssertsPlain",element:t(e.element)}),JsdocTypeConditional:(e,t)=>({type:"JsdocTypeConditional",checksType:t(e.checksType),extendsType:t(e.extendsType),trueType:t(e.trueType),falseType:t(e.falseType)}),JsdocTypeTypeParameter:(e,t)=>({type:"JsdocTypeTypeParameter",name:t(e.name),constraint:e.constraint!==void 0?t(e.constraint):void 0,defaultValue:e.defaultValue!==void 0?t(e.defaultValue):void 0})}}const Ke={JsdocTypeAny:[],JsdocTypeFunction:["parameters","returnType"],JsdocTypeGeneric:["left","elements"],JsdocTypeImport:[],JsdocTypeIndexSignature:["right"],JsdocTypeIntersection:["elements"],JsdocTypeKeyof:["element"],JsdocTypeKeyValue:["right"],JsdocTypeMappedType:["right"],JsdocTypeName:[],JsdocTypeNamePath:["left","right"],JsdocTypeNotNullable:["element"],JsdocTypeNull:[],JsdocTypeNullable:["element"],JsdocTypeNumber:[],JsdocTypeObject:["elements"],JsdocTypeObjectField:["right"],JsdocTypeJsdocObjectField:["left","right"],JsdocTypeOptional:["element"],JsdocTypeParenthesis:["element"],JsdocTypeSpecialNamePath:[],JsdocTypeStringValue:[],JsdocTypeSymbol:["element"],JsdocTypeTuple:["elements"],JsdocTypeTypeof:["element"],JsdocTypeUndefined:[],JsdocTypeUnion:["elements"],JsdocTypeUnknown:[],JsdocTypeVariadic:["element"],JsdocTypeProperty:[],JsdocTypePredicate:["left","right"],JsdocTypeAsserts:["left","right"],JsdocTypeReadonlyArray:["element"],JsdocTypeAssertsPlain:["element"],JsdocTypeConditional:["checksType","extendsType","trueType","falseType"],JsdocTypeTypeParameter:["name","constraint","defaultValue"]};function he(e,t,r,s,l){s==null||s(e,t,r);const y=Ke[e.type];for(const T of y){const g=e[T];if(g!==void 0)if(Array.isArray(g))for(const x of g)he(x,e,T,s,l);else he(g,e,T,s,l)}l==null||l(e,t,r)}function vn(e,t,r){he(e,void 0,void 0,t,r)}o.catharsisTransform=wn,o.identityTransformRules=En,o.jtpTransform=Nn,o.parse=Ve,o.stringify=hn,o.stringifyRules=$e,o.transform=q,o.traverse=vn,o.tryParse=fn,o.visitorKeys=Ke})})(Je,Je.exports);var ge=Je.exports,xn=Object.defineProperty,c=(n,a)=>xn(n,"name",{value:a,configurable:!0});const{UnknownArgTypesError:On}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;var Sn=c(n=>n.name==="literal","isLiteral"),An=c(n=>n.value.replace(/['|"]/g,""),"toEnumOption"),In=c(n=>{switch(n.type){case"function":return{name:"function"};case"object":let a={};return n.signature.properties.forEach(o=>{a[o.key]=C(o.value)}),{name:"object",value:a};default:throw new On({type:n,language:"Flow"})}},"convertSig"),C=c(n=>{var p,u,d,f;let{name:a,raw:o}=n,i={};switch(typeof o<"u"&&(i.raw=o),n.name){case"literal":return{...i,name:"other",value:n.value};case"string":case"number":case"symbol":case"boolean":return{...i,name:a};case"Array":return{...i,name:"array",value:n.elements.map(C)};case"signature":return{...i,...In(n)};case"union":return(p=n.elements)!=null&&p.every(Sn)?{...i,name:"enum",value:(u=n.elements)==null?void 0:u.map(An)}:{...i,name:a,value:(d=n.elements)==null?void 0:d.map(C)};case"intersection":return{...i,name:a,value:(f=n.elements)==null?void 0:f.map(C)};default:return{...i,name:"other",value:a}}},"convert");function Me(n,a){let o={},i=Object.keys(n);for(let p=0;p<i.length;p++){let u=i[p],d=n[u];o[u]=a(d,u,n)}return o}c(Me,"mapValues");var Be=/^['"]|['"]$/g,Rn=c(n=>n.replace(Be,""),"trimQuotes"),_n=c(n=>Be.test(n),"includesQuotes"),Ce=c(n=>{let a=Rn(n);return _n(n)||Number.isNaN(Number(a))?a:Number(a)},"parseLiteral"),Fn=/^\(.*\) => /,B=c(n=>{let{name:a,raw:o,computed:i,value:p}=n,u={};switch(typeof o<"u"&&(u.raw=o),a){case"enum":{let f=i?p:p.map(h=>Ce(h.value));return{...u,name:a,value:f}}case"string":case"number":case"symbol":return{...u,name:a};case"func":return{...u,name:"function"};case"bool":case"boolean":return{...u,name:"boolean"};case"arrayOf":case"array":return{...u,name:"array",value:p&&B(p)};case"object":return{...u,name:a};case"objectOf":return{...u,name:a,value:B(p)};case"shape":case"exact":let d=Me(p,f=>B(f));return{...u,name:"object",value:d};case"union":return{...u,name:"union",value:p.map(f=>B(f))};case"instanceOf":case"element":case"elementType":default:{if((a==null?void 0:a.indexOf("|"))>0)try{let v=a.split("|").map(b=>JSON.parse(b));return{...u,name:"enum",value:v}}catch{}let f=p?`${a}(${p})`:a,h=Fn.test(a)?"function":"other";return{...u,name:h,value:f}}}},"convert");const{UnknownArgTypesError:Ln}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;var jn=c(n=>{switch(n.type){case"function":return{name:"function"};case"object":let a={};return n.signature.properties.forEach(o=>{a[o.key]=Y(o.value)}),{name:"object",value:a};default:throw new Ln({type:n,language:"Typescript"})}},"convertSig"),Y=c(n=>{var p,u,d,f;let{name:a,raw:o}=n,i={};switch(typeof o<"u"&&(i.raw=o),n.name){case"string":case"number":case"symbol":case"boolean":return{...i,name:a};case"Array":return{...i,name:"array",value:n.elements.map(Y)};case"signature":return{...i,...jn(n)};case"union":let h;return(p=n.elements)!=null&&p.every(v=>v.name==="literal")?h={...i,name:"enum",value:(u=n.elements)==null?void 0:u.map(v=>Ce(v.value))}:h={...i,name:a,value:(d=n.elements)==null?void 0:d.map(Y)},h;case"intersection":return{...i,name:a,value:(f=n.elements)==null?void 0:f.map(Y)};default:return{...i,name:"other",value:a}}},"convert"),we=c(n=>{let{type:a,tsType:o,flowType:i}=n;try{if(a!=null)return B(a);if(o!=null)return Y(o);if(i!=null)return C(i)}catch(p){console.error(p)}return null},"convert"),Vn=["null","undefined"];function re(n){return Vn.some(a=>a===n)}c(re,"isDefaultValueBlacklisted");var Un=c(n=>{if(!n)return"";if(typeof n=="string")return n;throw new Error(`Description: expected string, got: ${JSON.stringify(n)}`)},"str");function Pe(n){return!!n.__docgenInfo}c(Pe,"hasDocgen");function Ye(n){return n!=null&&Object.keys(n).length>0}c(Ye,"isValidDocgenSection");function Ge(n,a){return Pe(n)?n.__docgenInfo[a]:null}c(Ge,"getDocgenSection");function Xe(n){return Pe(n)?Un(n.__docgenInfo.description):""}c(Xe,"getDocgenDescription");var _;(function(n){n.start="/**",n.nostart="/***",n.delim="*",n.end="*/"})(_=_||(_={}));function We(n){return/^\s+$/.test(n)}c(We,"isSpace");function Qe(n){let a=n.match(/\r+$/);return a==null?["",n]:[n.slice(-a[0].length),n.slice(0,-a[0].length)]}c(Qe,"splitCR");function j(n){let a=n.match(/^\s+/);return a==null?["",n]:[n.slice(0,a[0].length),n.slice(a[0].length)]}c(j,"splitSpace");function He(n){return n.split(/\n/)}c(He,"splitLines");function ze(n={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},n)}c(ze,"seedSpec");function Ze(n={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},n)}c(Ze,"seedTokens");var $n=/^@\S+/;function et({fence:n="```"}={}){let a=tt(n),o=c((i,p)=>a(i)?!p:p,"toggleFence");return c(function(i){let p=[[]],u=!1;for(let d of i)$n.test(d.tokens.description)&&!u?p.push([d]):p[p.length-1].push(d),u=o(d.tokens.description,u);return p},"parseBlock")}c(et,"getParser");function tt(n){return typeof n=="string"?a=>a.split(n).length%2===0:n}c(tt,"getFencer");function nt({startLine:n=0,markers:a=_}={}){let o=null,i=n;return c(function(p){let u=p,d=Ze();if([d.lineEnd,u]=Qe(u),[d.start,u]=j(u),o===null&&u.startsWith(a.start)&&!u.startsWith(a.nostart)&&(o=[],d.delimiter=u.slice(0,a.start.length),u=u.slice(a.start.length),[d.postDelimiter,u]=j(u)),o===null)return i++,null;let f=u.trimRight().endsWith(a.end);if(d.delimiter===""&&u.startsWith(a.delim)&&!u.startsWith(a.end)&&(d.delimiter=a.delim,u=u.slice(a.delim.length),[d.postDelimiter,u]=j(u)),f){let h=u.trimRight();d.end=u.slice(h.length-a.end.length),u=h.slice(0,-a.end.length)}if(d.description=u,o.push({number:i,source:p,tokens:d}),i++,f){let h=o.slice();return o=null,h}return null},"parseSource")}c(nt,"getParser");function rt({tokenizers:n}){return c(function(a){var o;let i=ze({source:a});for(let p of n)if(i=p(i),!((o=i.problems[i.problems.length-1])===null||o===void 0)&&o.critical)break;return i},"parseSpec")}c(rt,"getParser");function at(){return n=>{let{tokens:a}=n.source[0],o=a.description.match(/\s*(@(\S+))(\s*)/);return o===null?(n.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:n.source[0].number,critical:!0}),n):(a.tag=o[1],a.postTag=o[3],a.description=a.description.slice(o[0].length),n.tag=o[2],n)}}c(at,"tagTokenizer");function ot(n="compact"){let a=st(n);return o=>{let i=0,p=[];for(let[f,{tokens:h}]of o.source.entries()){let v="";if(f===0&&h.description[0]!=="{")return o;for(let b of h.description)if(b==="{"&&i++,b==="}"&&i--,v+=b,i===0)break;if(p.push([h,v]),i===0)break}if(i!==0)return o.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:o.source[0].number,critical:!0}),o;let u=[],d=p[0][0].postDelimiter.length;for(let[f,[h,v]]of p.entries())h.type=v,f>0&&(h.type=h.postDelimiter.slice(d)+v,h.postDelimiter=h.postDelimiter.slice(0,d)),[h.postType,h.description]=j(h.description.slice(v.length)),u.push(h.type);return u[0]=u[0].slice(1),u[u.length-1]=u[u.length-1].slice(0,-1),o.type=a(u),o}}c(ot,"typeTokenizer");var Kn=c(n=>n.trim(),"trim");function st(n){return n==="compact"?a=>a.map(Kn).join(""):n==="preserve"?a=>a.join(`
5
- `):n}c(st,"getJoiner");var Dn=c(n=>n&&n.startsWith('"')&&n.endsWith('"'),"isQuoted");function it(){let n=c((a,{tokens:o},i)=>o.type===""?a:i,"typeEnd");return a=>{let{tokens:o}=a.source[a.source.reduce(n,0)],i=o.description.trimLeft(),p=i.split('"');if(p.length>1&&p[0]===""&&p.length%2===1)return a.name=p[1],o.name=`"${p[1]}"`,[o.postName,o.description]=j(i.slice(o.name.length)),a;let u=0,d="",f=!1,h;for(let b of i){if(u===0&&We(b))break;b==="["&&u++,b==="]"&&u--,d+=b}if(u!==0)return a.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:a.source[0].number,critical:!0}),a;let v=d;if(d[0]==="["&&d[d.length-1]==="]"){f=!0,d=d.slice(1,-1);let b=d.split("=");if(d=b[0].trim(),b[1]!==void 0&&(h=b.slice(1).join("=").trim()),d==="")return a.problems.push({code:"spec:name:empty-name",message:"empty name",line:a.source[0].number,critical:!0}),a;if(h==="")return a.problems.push({code:"spec:name:empty-default",message:"empty default value",line:a.source[0].number,critical:!0}),a;if(!Dn(h)&&/=(?!>)/.test(h))return a.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:a.source[0].number,critical:!0}),a}return a.optional=f,a.name=d,o.name=v,h!==void 0&&(a.default=h),[o.postName,o.description]=j(i.slice(o.name.length)),a}}c(it,"nameTokenizer");function lt(n="compact",a=_){let o=be(n);return i=>(i.description=o(i.source,a),i)}c(lt,"descriptionTokenizer");function be(n){return n==="compact"?ct:n==="preserve"?pt:n}c(be,"getJoiner");function ct(n,a=_){return n.map(({tokens:{description:o}})=>o.trim()).filter(o=>o!=="").join(" ")}c(ct,"compactJoiner");var qn=c((n,{tokens:a},o)=>a.type===""?n:o,"lineNo"),Mn=c(({tokens:n})=>(n.delimiter===""?n.start:n.postDelimiter.slice(1))+n.description,"getDescription");function pt(n,a=_){if(n.length===0)return"";n[0].tokens.description===""&&n[0].tokens.delimiter===a.start&&(n=n.slice(1));let o=n[n.length-1];return o!==void 0&&o.tokens.description===""&&o.tokens.end.endsWith(a.end)&&(n=n.slice(0,-1)),n=n.slice(n.reduce(qn,0)),n.map(Mn).join(`
6
- `)}c(pt,"preserveJoiner");function ut({startLine:n=0,fence:a="```",spacing:o="compact",markers:i=_,tokenizers:p=[at(),ot(o),it(),lt(o)]}={}){if(n<0||n%1>0)throw new Error("Invalid startLine");let u=nt({startLine:n,markers:i}),d=et({fence:a}),f=rt({tokenizers:p}),h=be(o);return function(v){let b=[];for(let ae of He(v)){let $=u(ae);if($===null)continue;let X=d($),W=X.slice(1).map(f);b.push({description:h(X[0],i),tags:W,source:$,problems:W.reduce((N,oe)=>N.concat(oe.problems),[])})}return b}}c(ut,"getParser");function yt(n){return n.start+n.delimiter+n.postDelimiter+n.tag+n.postTag+n.type+n.postType+n.name+n.postName+n.description+n.end+n.lineEnd}c(yt,"join");function Bn(){return n=>n.source.map(({tokens:a})=>yt(a)).join(`
7
- `)}c(Bn,"getStringifier");function dt(n,a={}){return ut(a)(n)}c(dt,"parse");function mt(n){return n!=null&&n.includes("@")}c(mt,"containsJsDoc");function ft(n){let a=`/**
8
- `+(n??"").split(`
9
- `).map(i=>` * ${i}`).join(`
10
- `)+`
11
- */`,o=dt(a,{spacing:"preserve"});if(!o||o.length===0)throw new Error("Cannot parse JSDoc tags.");return o[0]}c(ft,"parse");var Cn={tags:["param","arg","argument","returns","ignore","deprecated"]},Yn=c((n,a=Cn)=>{if(!mt(n))return{includesJsDoc:!1,ignore:!1};let o=ft(n),i=Tt(o,a.tags);return i.ignore?{includesJsDoc:!0,ignore:!0}:{includesJsDoc:!0,ignore:!1,description:o.description.trim(),extractedTags:i}},"parseJsDoc");function Tt(n,a){let o={params:null,deprecated:null,returns:null,ignore:!1};for(let i of n.tags)if(!(a!==void 0&&!a.includes(i.tag)))if(i.tag==="ignore"){o.ignore=!0;break}else switch(i.tag){case"param":case"arg":case"argument":{let p=Jt(i);p!=null&&(o.params==null&&(o.params=[]),o.params.push(p));break}case"deprecated":{let p=gt(i);p!=null&&(o.deprecated=p);break}case"returns":{let p=wt(i);p!=null&&(o.returns=p);break}}return o}c(Tt,"extractJsDocTags");function ht(n){return n.replace(/[\.-]$/,"")}c(ht,"normaliseParamName");function Jt(n){if(!n.name||n.name==="-")return null;let a=ve(n.type);return{name:n.name,type:a,description:Ee(n.description),getPrettyName:c(()=>ht(n.name),"getPrettyName"),getTypeName:c(()=>a?ke(a):null,"getTypeName")}}c(Jt,"extractParam");function gt(n){return n.name?Ne(n.name,n.description):null}c(gt,"extractDeprecated");function Ne(n,a){let o=n===""?a:`${n} ${a}`;return Ee(o)}c(Ne,"joinNameAndDescription");function Ee(n){let a=n.replace(/^- /g,"").trim();return a===""?null:a}c(Ee,"normaliseDescription");function wt(n){let a=ve(n.type);return a?{type:a,description:Ne(n.name,n.description),getTypeName:c(()=>ke(a),"getTypeName")}:null}c(wt,"extractReturns");var F=ge.stringifyRules(),Gn=F.JsdocTypeObject;F.JsdocTypeAny=()=>"any";F.JsdocTypeObject=(n,a)=>`(${Gn(n,a)})`;F.JsdocTypeOptional=(n,a)=>a(n.element);F.JsdocTypeNullable=(n,a)=>a(n.element);F.JsdocTypeNotNullable=(n,a)=>a(n.element);F.JsdocTypeUnion=(n,a)=>n.elements.map(a).join("|");function ve(n){try{return ge.parse(n,"typescript")}catch{return null}}c(ve,"extractType");function ke(n){return ge.transform(F,n)}c(ke,"extractTypeName");function xe(n){return n.length>90}c(xe,"isTooLongForTypeSummary");function Pt(n){return n.length>50}c(Pt,"isTooLongForDefaultValueSummary");function E(n,a){return n===a?{summary:n}:{summary:n,detail:a}}c(E,"createSummaryValue");function bt(n,a){if(n!=null){let{value:o}=n;if(!re(o))return Pt(o)?E(a==null?void 0:a.name,o):E(o)}return null}c(bt,"createDefaultValue");function Oe({name:n,value:a,elements:o,raw:i}){return a??(o!=null?o.map(Oe).join(" | "):i??n)}c(Oe,"generateUnionElement");function Nt({name:n,raw:a,elements:o}){return o!=null?E(o.map(Oe).join(" | ")):a!=null?E(a.replace(/^\|\s*/,"")):E(n)}c(Nt,"generateUnion");function Et({type:n,raw:a}){return a!=null?E(a):E(n)}c(Et,"generateFuncSignature");function vt({type:n,raw:a}){return a!=null?xe(a)?E(n,a):E(a):E(n)}c(vt,"generateObjectSignature");function kt(n){let{type:a}=n;return a==="object"?vt(n):Et(n)}c(kt,"generateSignature");function xt({name:n,raw:a}){return a!=null?xe(a)?E(n,a):E(a):E(n)}c(xt,"generateDefault");function Ot(n){if(n==null)return null;switch(n.name){case"union":return Nt(n);case"signature":return kt(n);default:return xt(n)}}c(Ot,"createType");var Xn=c((n,a)=>{let{flowType:o,description:i,required:p,defaultValue:u}=a;return{name:n,type:Ot(o),required:p,description:i,defaultValue:bt(u??null,o??null)}},"createFlowPropDef");function St({defaultValue:n}){if(n!=null){let{value:a}=n;if(!re(a))return E(a)}return null}c(St,"createDefaultValue");function At({tsType:n,required:a}){if(n==null)return null;let o=n.name;return a||(o=o.replace(" | undefined","")),E(["Array","Record","signature"].includes(n.name)?n.raw:o)}c(At,"createType");var Wn=c((n,a)=>{let{description:o,required:i}=a;return{name:n,type:At(a),required:i,description:o,defaultValue:St(a)}},"createTsPropDef");function It(n){return n!=null?E(n.name):null}c(It,"createType");function Rt(n){let{computed:a,func:o}=n;return typeof a>"u"&&typeof o>"u"}c(Rt,"isReactDocgenTypescript");function _t(n){return n?n.name==="string"?!0:n.name==="enum"?Array.isArray(n.value)&&n.value.every(({value:a})=>typeof a=="string"&&a[0]==='"'&&a[a.length-1]==='"'):!1:!1}c(_t,"isStringValued");function Ft(n,a){if(n!=null){let{value:o}=n;if(!re(o))return Rt(n)&&_t(a)?E(JSON.stringify(o)):E(o)}return null}c(Ft,"createDefaultValue");function Se(n,a,o){let{description:i,required:p,defaultValue:u}=o;return{name:n,type:It(a),required:p,description:i,defaultValue:Ft(u,a)}}c(Se,"createBasicPropDef");function G(n,a){var o;if(a!=null&&a.includesJsDoc){let{description:i,extractedTags:p}=a;i!=null&&(n.description=a.description);let u={...p,params:(o=p==null?void 0:p.params)==null?void 0:o.map(d=>({name:d.getPrettyName(),description:d.description}))};Object.values(u).filter(Boolean).length>0&&(n.jsDocTags=u)}return n}c(G,"applyJsDocResult");var Qn=c((n,a,o)=>{let i=Se(n,a.type,a);return i.sbType=we(a),G(i,o)},"javaScriptFactory"),Hn=c((n,a,o)=>{let i=Wn(n,a);return i.sbType=we(a),G(i,o)},"tsFactory"),zn=c((n,a,o)=>{let i=Xn(n,a);return i.sbType=we(a),G(i,o)},"flowFactory"),Zn=c((n,a,o)=>{let i=Se(n,{name:"unknown"},a);return G(i,o)},"unknownFactory"),Lt=c(n=>{switch(n){case"JavaScript":return Qn;case"TypeScript":return Hn;case"Flow":return zn;default:return Zn}},"getPropDefFactory"),jt=c(n=>n.type!=null?"JavaScript":n.flowType!=null?"Flow":n.tsType!=null?"TypeScript":"Unknown","getTypeSystem"),er=c(n=>{let a=jt(n[0]),o=Lt(a);return n.map(i=>{var u;let p=i;return(u=i.type)!=null&&u.elements&&(p={...i,type:{...i.type,value:i.type.elements}}),Ae(p.name,p,a,o)})},"extractComponentSectionArray"),tr=c(n=>{let a=Object.keys(n),o=jt(n[a[0]]),i=Lt(o);return a.map(p=>{let u=n[p];return u!=null?Ae(p,u,o,i):null}).filter(Boolean)},"extractComponentSectionObject"),ir=c((n,a)=>{let o=Ge(n,a);return Ye(o)?Array.isArray(o)?er(o):tr(o):[]},"extractComponentProps");function Ae(n,a,o,i){let p=Yn(a.description);return p.includesJsDoc&&p.ignore?null:{propDef:i(n,a,p),jsDocTags:p.extractedTags,docgenInfo:a,typeSystem:o}}c(Ae,"extractProp");function nr(n){return n!=null?Xe(n):""}c(nr,"extractComponentDescription");const{combineParameters:rr}=__STORYBOOK_MODULE_PREVIEW_API__;var lr=c(n=>{let{component:a,argTypes:o,parameters:{docs:i={}}}=n,{extractArgTypes:p}=i,u=p&&a?p(a):{};return u?rr(u,o):o},"enhanceArgTypes"),ar="storybook/docs",cr=`${ar}/snippet-rendered`,or=(n=>(n.AUTO="auto",n.CODE="code",n.DYNAMIC="dynamic",n))(or||{});export{sr as a,we as b,lr as c,or as g,nr as n,ir as o,cr as y,Pe as z};
@@ -1,6 +0,0 @@
1
- function l(o){for(var f=[],i=1;i<arguments.length;i++)f[i-1]=arguments[i];var n=Array.from(typeof o=="string"?[o]:o);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var s=n.reduce(function(t,g){var a=g.match(/\n([\t ]+|(?!\s).)/g);return a?t.concat(a.map(function(u){var r,e;return(e=(r=u.match(/[\t ]/g))===null||r===void 0?void 0:r.length)!==null&&e!==void 0?e:0})):t},[]);if(s.length){var d=new RegExp(`
2
- [ ]{`+Math.min.apply(Math,s)+"}","g");n=n.map(function(t){return t.replace(d,`
3
- `)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return f.forEach(function(t,g){var a=c.match(/(?:^|\n)( *)$/),u=a?a[1]:"",r=t;typeof t=="string"&&t.includes(`
4
- `)&&(r=String(t).split(`
5
- `).map(function(e,h){return h===0?e:""+u+e}).join(`
6
- `)),c+=r+n[g+1]}),c}export{l as d};
@@ -1,34 +0,0 @@
1
- import{d as P}from"./index-DrFu-skq.js";const{useEffect:_,useMemo:h}=__STORYBOOK_MODULE_PREVIEW_API__,{global:j}=__STORYBOOK_MODULE_GLOBAL__,{logger:X}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var p="backgrounds",U={light:{name:"light",value:"#F8F8F8"},dark:{name:"dark",value:"#333"}},{document:b,window:O}=j,D=()=>{var r;return!!((r=O==null?void 0:O.matchMedia("(prefers-reduced-motion: reduce)"))!=null&&r.matches)},A=r=>{(Array.isArray(r)?r:[r]).forEach(N)},N=r=>{var t;let e=b.getElementById(r);e&&((t=e.parentElement)==null||t.removeChild(e))},F=(r,e)=>{let t=b.getElementById(r);if(t)t.innerHTML!==e&&(t.innerHTML=e);else{let o=b.createElement("style");o.setAttribute("id",r),o.innerHTML=e,b.head.appendChild(o)}},Y=(r,e,t)=>{var a;let o=b.getElementById(r);if(o)o.innerHTML!==e&&(o.innerHTML=e);else{let d=b.createElement("style");d.setAttribute("id",r),d.innerHTML=e;let i=`addon-backgrounds-grid${t?`-docs-${t}`:""}`,n=b.getElementById(i);n?(a=n.parentElement)==null||a.insertBefore(d,n):b.head.appendChild(d)}},W={cellSize:100,cellAmount:10,opacity:.8},w="addon-backgrounds",R="addon-backgrounds-grid",q=D()?"":"transition: background-color 0.3s;",J=(r,e)=>{let{globals:t,parameters:o,viewMode:a,id:d}=e,{options:i=U,disable:n,grid:s=W}=o[p]||{},c=t[p]||{},u=c.value,l=u?i[u]:void 0,$=(l==null?void 0:l.value)||"transparent",f=c.grid||!1,y=!!l&&!n,m=a==="docs"?`#anchor--${d} .docs-story`:".sb-show-main",E=a==="docs"?`#anchor--${d} .docs-story`:".sb-show-main",H=o.layout===void 0||o.layout==="padded",L=a==="docs"?20:H?16:0,{cellAmount:k,cellSize:g,opacity:x,offsetX:v=L,offsetY:S=L}=s,B=a==="docs"?`${w}-docs-${d}`:`${w}-color`,G=a==="docs"?d:null;_(()=>{let M=`
2
- ${m} {
3
- background: ${$} !important;
4
- ${q}
5
- }`;if(!y){A(B);return}Y(B,M,G)},[m,B,G,y,$]);let T=a==="docs"?`${R}-docs-${d}`:`${R}`;return _(()=>{if(!f){A(T);return}let M=[`${g*k}px ${g*k}px`,`${g*k}px ${g*k}px`,`${g}px ${g}px`,`${g}px ${g}px`].join(", "),K=`
6
- ${E} {
7
- background-size: ${M} !important;
8
- background-position: ${v}px ${S}px, ${v}px ${S}px, ${v}px ${S}px, ${v}px ${S}px !important;
9
- background-blend-mode: difference !important;
10
- background-image: linear-gradient(rgba(130, 130, 130, ${x}) 1px, transparent 1px),
11
- linear-gradient(90deg, rgba(130, 130, 130, ${x}) 1px, transparent 1px),
12
- linear-gradient(rgba(130, 130, 130, ${x/2}) 1px, transparent 1px),
13
- linear-gradient(90deg, rgba(130, 130, 130, ${x/2}) 1px, transparent 1px) !important;
14
- }
15
- `;F(T,K)},[k,g,E,T,f,v,S,x]),r()},Q=(r,e=[],t)=>{if(r==="transparent")return"transparent";if(e.find(a=>a.value===r)||r)return r;let o=e.find(a=>a.name===t);if(o)return o.value;if(t){let a=e.map(d=>d.name).join(", ");X.warn(P`
16
- Backgrounds Addon: could not find the default color "${t}".
17
- These are the available colors for your story based on your configuration:
18
- ${a}.
19
- `)}return"transparent"},Z=(r,e)=>{var u;let{globals:t,parameters:o}=e,a=(u=t[p])==null?void 0:u.value,d=o[p],i=h(()=>d.disable?"transparent":Q(a,d.values,d.default),[d,a]),n=h(()=>i&&i!=="transparent",[i]),s=e.viewMode==="docs"?`#anchor--${e.id} .docs-story`:".sb-show-main",c=h(()=>`
20
- ${s} {
21
- background: ${i} !important;
22
- ${D()?"":"transition: background-color 0.3s;"}
23
- }
24
- `,[i,s]);return _(()=>{let l=e.viewMode==="docs"?`addon-backgrounds-docs-${e.id}`:"addon-backgrounds-color";if(!n){A(l);return}Y(l,c,e.viewMode==="docs"?e.id:null)},[n,c,e]),r()},V=(r,e)=>{var y;let{globals:t,parameters:o}=e,a=o[p].grid,d=((y=t[p])==null?void 0:y.grid)===!0&&a.disable!==!0,{cellAmount:i,cellSize:n,opacity:s}=a,c=e.viewMode==="docs",u=o.layout===void 0||o.layout==="padded"?16:0,l=a.offsetX??(c?20:u),$=a.offsetY??(c?20:u),f=h(()=>{let m=e.viewMode==="docs"?`#anchor--${e.id} .docs-story`:".sb-show-main",E=[`${n*i}px ${n*i}px`,`${n*i}px ${n*i}px`,`${n}px ${n}px`,`${n}px ${n}px`].join(", ");return`
25
- ${m} {
26
- background-size: ${E} !important;
27
- background-position: ${l}px ${$}px, ${l}px ${$}px, ${l}px ${$}px, ${l}px ${$}px !important;
28
- background-blend-mode: difference !important;
29
- background-image: linear-gradient(rgba(130, 130, 130, ${s}) 1px, transparent 1px),
30
- linear-gradient(90deg, rgba(130, 130, 130, ${s}) 1px, transparent 1px),
31
- linear-gradient(rgba(130, 130, 130, ${s/2}) 1px, transparent 1px),
32
- linear-gradient(90deg, rgba(130, 130, 130, ${s/2}) 1px, transparent 1px) !important;
33
- }
34
- `},[n]);return _(()=>{let m=e.viewMode==="docs"?`addon-backgrounds-grid-docs-${e.id}`:"addon-backgrounds-grid";if(!d){A(m);return}F(m,f)},[d,f,e]),r()},C,ae=(C=globalThis.FEATURES)!=null&&C.backgroundsStoryGlobals?[J]:[V,Z],I,oe={[p]:{grid:{cellSize:20,opacity:.5,cellAmount:5},disable:!1,...!((I=globalThis.FEATURES)!=null&&I.backgroundsStoryGlobals)&&{values:Object.values(U)}}},ee={[p]:{value:void 0,grid:!1}},z,de=(z=globalThis.FEATURES)!=null&&z.backgroundsStoryGlobals?ee:{[p]:null};export{ae as decorators,de as initialGlobals,oe as parameters};
@@ -1 +0,0 @@
1
- var j="Invariant failed";function S(e,t){if(!e)throw new Error(j)}const{useEffect:T}=__STORYBOOK_MODULE_PREVIEW_API__,{global:d}=__STORYBOOK_MODULE_GLOBAL__;var K="measureEnabled";function Y(){let e=d.document.documentElement,t=Math.max(e.scrollHeight,e.offsetHeight);return{width:Math.max(e.scrollWidth,e.offsetWidth),height:t}}function G(){let e=d.document.createElement("canvas");e.id="storybook-addon-measure";let t=e.getContext("2d");S(t!=null);let{width:o,height:l}=Y();return A(e,t,{width:o,height:l}),e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="2147483647",e.style.pointerEvents="none",d.document.body.appendChild(e),{canvas:e,context:t,width:o,height:l}}function A(e,t,{width:o,height:l}){e.style.width=`${o}px`,e.style.height=`${l}px`;let i=d.window.devicePixelRatio;e.width=Math.floor(o*i),e.height=Math.floor(l*i),t.scale(i,i)}var h={};function U(){h.canvas||(h=G())}function H(){h.context&&h.context.clearRect(0,0,h.width??0,h.height??0)}function V(e){H(),e(h.context)}function Z(){S(h.canvas),S(h.context),A(h.canvas,h.context,{width:0,height:0});let{width:e,height:t}=Y();A(h.canvas,h.context,{width:e,height:t}),h.width=e,h.height=t}function J(){var e;h.canvas&&(H(),(e=h.canvas.parentNode)==null||e.removeChild(h.canvas),h={})}var w={margin:"#f6b26b",border:"#ffe599",padding:"#93c47d",content:"#6fa8dc",text:"#232020"},c=6;function W(e,{x:t,y:o,w:l,h:i,r:n}){t=t-l/2,o=o-i/2,l<2*n&&(n=l/2),i<2*n&&(n=i/2),e.beginPath(),e.moveTo(t+n,o),e.arcTo(t+l,o,t+l,o+i,n),e.arcTo(t+l,o+i,t,o+i,n),e.arcTo(t,o+i,t,o,n),e.arcTo(t,o,t+l,o,n),e.closePath()}function Q(e,{padding:t,border:o,width:l,height:i,top:n,left:r}){let f=l-o.left-o.right-t.left-t.right,a=i-t.top-t.bottom-o.top-o.bottom,s=r+o.left+t.left,u=n+o.top+t.top;return e==="top"?s+=f/2:e==="right"?(s+=f,u+=a/2):e==="bottom"?(s+=f/2,u+=a):e==="left"?u+=a/2:e==="center"&&(s+=f/2,u+=a/2),{x:s,y:u}}function x(e,t,{margin:o,border:l,padding:i},n,r){let f=m=>0,a=0,s=0,u=r?1:.5,g=r?n*2:0;return e==="padding"?f=m=>i[m]*u+g:e==="border"?f=m=>i[m]+l[m]*u+g:e==="margin"&&(f=m=>i[m]+l[m]+o[m]*u+g),t==="top"?s=-f("top"):t==="right"?a=f("right"):t==="bottom"?s=f("bottom"):t==="left"&&(a=-f("left")),{offsetX:a,offsetY:s}}function tt(e,t){return Math.abs(e.x-t.x)<Math.abs(e.w+t.w)/2&&Math.abs(e.y-t.y)<Math.abs(e.h+t.h)/2}function et(e,t,o){return e==="top"?t.y=o.y-o.h-c:e==="right"?t.x=o.x+o.w/2+c+t.w/2:e==="bottom"?t.y=o.y+o.h+c:e==="left"&&(t.x=o.x-o.w/2-c-t.w/2),{x:t.x,y:t.y}}function X(e,t,{x:o,y:l,w:i,h:n},r){return W(e,{x:o,y:l,w:i,h:n,r:3}),e.fillStyle=`${w[t]}dd`,e.fill(),e.strokeStyle=w[t],e.stroke(),e.fillStyle=w.text,e.fillText(r,o,l),W(e,{x:o,y:l,w:i,h:n,r:3}),e.fillStyle=`${w[t]}dd`,e.fill(),e.strokeStyle=w[t],e.stroke(),e.fillStyle=w.text,e.fillText(r,o,l),{x:o,y:l,w:i,h:n}}function C(e,t){e.font="600 12px monospace",e.textBaseline="middle",e.textAlign="center";let o=e.measureText(t),l=o.actualBoundingBoxAscent+o.actualBoundingBoxDescent,i=o.width+c*2,n=l+c*2;return{w:i,h:n}}function ot(e,t,{type:o,position:l="center",text:i},n,r=!1){let{x:f,y:a}=Q(l,t),{offsetX:s,offsetY:u}=x(o,l,t,c+1,r);f+=s,a+=u;let{w:g,h:m}=C(e,i);if(n&&tt({x:f,y:a,w:g,h:m},n)){let v=et(l,{x:f,y:a,w:g},n);f=v.x,a=v.y}return X(e,o,{x:f,y:a,w:g,h:m},i)}function it(e,{w:t,h:o}){let l=t*.5+c,i=o*.5+c;return{offsetX:(e.x==="left"?-1:1)*l,offsetY:(e.y==="top"?-1:1)*i}}function lt(e,t,{type:o,text:l}){let{floatingAlignment:i,extremities:n}=t,r=n[i.x],f=n[i.y],{w:a,h:s}=C(e,l),{offsetX:u,offsetY:g}=it(i,{w:a,h:s});return r+=u,f+=g,X(e,o,{x:r,y:f,w:a,h:s},l)}function E(e,t,o,l){let i=[];o.forEach((n,r)=>{let f=l&&n.position==="center"?lt(e,t,n):ot(e,t,n,i[r-1],l);i[r]=f})}function nt(e,t,o,l){let i=o.reduce((n,r)=>{var f;return Object.prototype.hasOwnProperty.call(n,r.position)||(n[r.position]=[]),(f=n[r.position])==null||f.push(r),n},{});i.top&&E(e,t,i.top,l),i.right&&E(e,t,i.right,l),i.bottom&&E(e,t,i.bottom,l),i.left&&E(e,t,i.left,l),i.center&&E(e,t,i.center,l)}var L={margin:"#f6b26ba8",border:"#ffe599a8",padding:"#93c47d8c",content:"#6fa8dca8"},B=30;function p(e){return parseInt(e.replace("px",""),10)}function b(e){return Number.isInteger(e)?e:e.toFixed(2)}function P(e){return e.filter(t=>t.text!==0&&t.text!=="0")}function ft(e){let t={top:d.window.scrollY,bottom:d.window.scrollY+d.window.innerHeight,left:d.window.scrollX,right:d.window.scrollX+d.window.innerWidth},o={top:Math.abs(t.top-e.top),bottom:Math.abs(t.bottom-e.bottom),left:Math.abs(t.left-e.left),right:Math.abs(t.right-e.right)};return{x:o.left>o.right?"left":"right",y:o.top>o.bottom?"top":"bottom"}}function rt(e){let t=d.getComputedStyle(e),{top:o,left:l,right:i,bottom:n,width:r,height:f}=e.getBoundingClientRect(),{marginTop:a,marginBottom:s,marginLeft:u,marginRight:g,paddingTop:m,paddingBottom:v,paddingLeft:k,paddingRight:F,borderBottomWidth:I,borderTopWidth:D,borderLeftWidth:$,borderRightWidth:N}=t;o=o+d.window.scrollY,l=l+d.window.scrollX,n=n+d.window.scrollY,i=i+d.window.scrollX;let y={top:p(a),bottom:p(s),left:p(u),right:p(g)},q={top:p(m),bottom:p(v),left:p(k),right:p(F)},z={top:p(D),bottom:p(I),left:p($),right:p(N)},_={top:o-y.top,bottom:n+y.bottom,left:l-y.left,right:i+y.right};return{margin:y,padding:q,border:z,top:o,left:l,bottom:n,right:i,width:r,height:f,extremities:_,floatingAlignment:ft(_)}}function at(e,{margin:t,width:o,height:l,top:i,left:n,bottom:r,right:f}){let a=l+t.bottom+t.top;e.fillStyle=L.margin,e.fillRect(n,i-t.top,o,t.top),e.fillRect(f,i-t.top,t.right,a),e.fillRect(n,r,o,t.bottom),e.fillRect(n-t.left,i-t.top,t.left,a);let s=[{type:"margin",text:b(t.top),position:"top"},{type:"margin",text:b(t.right),position:"right"},{type:"margin",text:b(t.bottom),position:"bottom"},{type:"margin",text:b(t.left),position:"left"}];return P(s)}function st(e,{padding:t,border:o,width:l,height:i,top:n,left:r,bottom:f,right:a}){let s=l-o.left-o.right,u=i-t.top-t.bottom-o.top-o.bottom;e.fillStyle=L.padding,e.fillRect(r+o.left,n+o.top,s,t.top),e.fillRect(a-t.right-o.right,n+t.top+o.top,t.right,u),e.fillRect(r+o.left,f-t.bottom-o.bottom,s,t.bottom),e.fillRect(r+o.left,n+t.top+o.top,t.left,u);let g=[{type:"padding",text:t.top,position:"top"},{type:"padding",text:t.right,position:"right"},{type:"padding",text:t.bottom,position:"bottom"},{type:"padding",text:t.left,position:"left"}];return P(g)}function ht(e,{border:t,width:o,height:l,top:i,left:n,bottom:r,right:f}){let a=l-t.top-t.bottom;e.fillStyle=L.border,e.fillRect(n,i,o,t.top),e.fillRect(n,r-t.bottom,o,t.bottom),e.fillRect(n,i+t.top,t.left,a),e.fillRect(f-t.right,i+t.top,t.right,a);let s=[{type:"border",text:t.top,position:"top"},{type:"border",text:t.right,position:"right"},{type:"border",text:t.bottom,position:"bottom"},{type:"border",text:t.left,position:"left"}];return P(s)}function ut(e,{padding:t,border:o,width:l,height:i,top:n,left:r}){let f=l-o.left-o.right-t.left-t.right,a=i-t.top-t.bottom-o.top-o.bottom;return e.fillStyle=L.content,e.fillRect(r+o.left+t.left,n+o.top+t.top,f,a),[{type:"content",position:"center",text:`${b(f)} x ${b(a)}`}]}function dt(e){return t=>{if(e&&t){let o=rt(e),l=at(t,o),i=st(t,o),n=ht(t,o),r=ut(t,o),f=o.width<=B*3||o.height<=B;nt(t,o,[...r,...i,...n,...l],f)}}}function mt(e){V(dt(e))}var gt=(e,t)=>{let o=d.document.elementFromPoint(e,t),l=i=>{if(i&&i.shadowRoot){let n=i.shadowRoot.elementFromPoint(e,t);return i.isEqualNode(n)?i:n.shadowRoot?l(n):n}return i};return l(o)||o},O,M={x:0,y:0};function R(e,t){O=gt(e,t),mt(O)}var pt=(e,t)=>{let{measureEnabled:o}=t.globals;return T(()=>{let l=i=>{window.requestAnimationFrame(()=>{i.stopPropagation(),M.x=i.clientX,M.y=i.clientY})};return document.addEventListener("pointermove",l),()=>{document.removeEventListener("pointermove",l)}},[]),T(()=>{let l=n=>{window.requestAnimationFrame(()=>{n.stopPropagation(),R(n.clientX,n.clientY)})},i=()=>{window.requestAnimationFrame(()=>{Z()})};return t.viewMode==="story"&&o&&(document.addEventListener("pointerover",l),U(),window.addEventListener("resize",i),R(M.x,M.y)),()=>{window.removeEventListener("resize",i),J()}},[o,t.viewMode]),e()},ct=[pt],wt={[K]:!1};export{ct as decorators,wt as initialGlobals};
@@ -1,396 +0,0 @@
1
- import{d as $}from"./index-DrFu-skq.js";const{useMemo:x,useEffect:f}=__STORYBOOK_MODULE_PREVIEW_API__,{global:p}=__STORYBOOK_MODULE_GLOBAL__;var m="outline",u=i=>{(Array.isArray(i)?i:[i]).forEach(r)},r=i=>{let t=typeof i=="string"?i:i.join(""),o=p.document.getElementById(t);o&&o.parentElement&&o.parentElement.removeChild(o)},b=(i,t)=>{let o=p.document.getElementById(i);if(o)o.innerHTML!==t&&(o.innerHTML=t);else{let n=p.document.createElement("style");n.setAttribute("id",i),n.innerHTML=t,p.document.head.appendChild(n)}};function s(i){return $`
2
- ${i} body {
3
- outline: 1px solid #2980b9 !important;
4
- }
5
-
6
- ${i} article {
7
- outline: 1px solid #3498db !important;
8
- }
9
-
10
- ${i} nav {
11
- outline: 1px solid #0088c3 !important;
12
- }
13
-
14
- ${i} aside {
15
- outline: 1px solid #33a0ce !important;
16
- }
17
-
18
- ${i} section {
19
- outline: 1px solid #66b8da !important;
20
- }
21
-
22
- ${i} header {
23
- outline: 1px solid #99cfe7 !important;
24
- }
25
-
26
- ${i} footer {
27
- outline: 1px solid #cce7f3 !important;
28
- }
29
-
30
- ${i} h1 {
31
- outline: 1px solid #162544 !important;
32
- }
33
-
34
- ${i} h2 {
35
- outline: 1px solid #314e6e !important;
36
- }
37
-
38
- ${i} h3 {
39
- outline: 1px solid #3e5e85 !important;
40
- }
41
-
42
- ${i} h4 {
43
- outline: 1px solid #449baf !important;
44
- }
45
-
46
- ${i} h5 {
47
- outline: 1px solid #c7d1cb !important;
48
- }
49
-
50
- ${i} h6 {
51
- outline: 1px solid #4371d0 !important;
52
- }
53
-
54
- ${i} main {
55
- outline: 1px solid #2f4f90 !important;
56
- }
57
-
58
- ${i} address {
59
- outline: 1px solid #1a2c51 !important;
60
- }
61
-
62
- ${i} div {
63
- outline: 1px solid #036cdb !important;
64
- }
65
-
66
- ${i} p {
67
- outline: 1px solid #ac050b !important;
68
- }
69
-
70
- ${i} hr {
71
- outline: 1px solid #ff063f !important;
72
- }
73
-
74
- ${i} pre {
75
- outline: 1px solid #850440 !important;
76
- }
77
-
78
- ${i} blockquote {
79
- outline: 1px solid #f1b8e7 !important;
80
- }
81
-
82
- ${i} ol {
83
- outline: 1px solid #ff050c !important;
84
- }
85
-
86
- ${i} ul {
87
- outline: 1px solid #d90416 !important;
88
- }
89
-
90
- ${i} li {
91
- outline: 1px solid #d90416 !important;
92
- }
93
-
94
- ${i} dl {
95
- outline: 1px solid #fd3427 !important;
96
- }
97
-
98
- ${i} dt {
99
- outline: 1px solid #ff0043 !important;
100
- }
101
-
102
- ${i} dd {
103
- outline: 1px solid #e80174 !important;
104
- }
105
-
106
- ${i} figure {
107
- outline: 1px solid #ff00bb !important;
108
- }
109
-
110
- ${i} figcaption {
111
- outline: 1px solid #bf0032 !important;
112
- }
113
-
114
- ${i} table {
115
- outline: 1px solid #00cc99 !important;
116
- }
117
-
118
- ${i} caption {
119
- outline: 1px solid #37ffc4 !important;
120
- }
121
-
122
- ${i} thead {
123
- outline: 1px solid #98daca !important;
124
- }
125
-
126
- ${i} tbody {
127
- outline: 1px solid #64a7a0 !important;
128
- }
129
-
130
- ${i} tfoot {
131
- outline: 1px solid #22746b !important;
132
- }
133
-
134
- ${i} tr {
135
- outline: 1px solid #86c0b2 !important;
136
- }
137
-
138
- ${i} th {
139
- outline: 1px solid #a1e7d6 !important;
140
- }
141
-
142
- ${i} td {
143
- outline: 1px solid #3f5a54 !important;
144
- }
145
-
146
- ${i} col {
147
- outline: 1px solid #6c9a8f !important;
148
- }
149
-
150
- ${i} colgroup {
151
- outline: 1px solid #6c9a9d !important;
152
- }
153
-
154
- ${i} button {
155
- outline: 1px solid #da8301 !important;
156
- }
157
-
158
- ${i} datalist {
159
- outline: 1px solid #c06000 !important;
160
- }
161
-
162
- ${i} fieldset {
163
- outline: 1px solid #d95100 !important;
164
- }
165
-
166
- ${i} form {
167
- outline: 1px solid #d23600 !important;
168
- }
169
-
170
- ${i} input {
171
- outline: 1px solid #fca600 !important;
172
- }
173
-
174
- ${i} keygen {
175
- outline: 1px solid #b31e00 !important;
176
- }
177
-
178
- ${i} label {
179
- outline: 1px solid #ee8900 !important;
180
- }
181
-
182
- ${i} legend {
183
- outline: 1px solid #de6d00 !important;
184
- }
185
-
186
- ${i} meter {
187
- outline: 1px solid #e8630c !important;
188
- }
189
-
190
- ${i} optgroup {
191
- outline: 1px solid #b33600 !important;
192
- }
193
-
194
- ${i} option {
195
- outline: 1px solid #ff8a00 !important;
196
- }
197
-
198
- ${i} output {
199
- outline: 1px solid #ff9619 !important;
200
- }
201
-
202
- ${i} progress {
203
- outline: 1px solid #e57c00 !important;
204
- }
205
-
206
- ${i} select {
207
- outline: 1px solid #e26e0f !important;
208
- }
209
-
210
- ${i} textarea {
211
- outline: 1px solid #cc5400 !important;
212
- }
213
-
214
- ${i} details {
215
- outline: 1px solid #33848f !important;
216
- }
217
-
218
- ${i} summary {
219
- outline: 1px solid #60a1a6 !important;
220
- }
221
-
222
- ${i} command {
223
- outline: 1px solid #438da1 !important;
224
- }
225
-
226
- ${i} menu {
227
- outline: 1px solid #449da6 !important;
228
- }
229
-
230
- ${i} del {
231
- outline: 1px solid #bf0000 !important;
232
- }
233
-
234
- ${i} ins {
235
- outline: 1px solid #400000 !important;
236
- }
237
-
238
- ${i} img {
239
- outline: 1px solid #22746b !important;
240
- }
241
-
242
- ${i} iframe {
243
- outline: 1px solid #64a7a0 !important;
244
- }
245
-
246
- ${i} embed {
247
- outline: 1px solid #98daca !important;
248
- }
249
-
250
- ${i} object {
251
- outline: 1px solid #00cc99 !important;
252
- }
253
-
254
- ${i} param {
255
- outline: 1px solid #37ffc4 !important;
256
- }
257
-
258
- ${i} video {
259
- outline: 1px solid #6ee866 !important;
260
- }
261
-
262
- ${i} audio {
263
- outline: 1px solid #027353 !important;
264
- }
265
-
266
- ${i} source {
267
- outline: 1px solid #012426 !important;
268
- }
269
-
270
- ${i} canvas {
271
- outline: 1px solid #a2f570 !important;
272
- }
273
-
274
- ${i} track {
275
- outline: 1px solid #59a600 !important;
276
- }
277
-
278
- ${i} map {
279
- outline: 1px solid #7be500 !important;
280
- }
281
-
282
- ${i} area {
283
- outline: 1px solid #305900 !important;
284
- }
285
-
286
- ${i} a {
287
- outline: 1px solid #ff62ab !important;
288
- }
289
-
290
- ${i} em {
291
- outline: 1px solid #800b41 !important;
292
- }
293
-
294
- ${i} strong {
295
- outline: 1px solid #ff1583 !important;
296
- }
297
-
298
- ${i} i {
299
- outline: 1px solid #803156 !important;
300
- }
301
-
302
- ${i} b {
303
- outline: 1px solid #cc1169 !important;
304
- }
305
-
306
- ${i} u {
307
- outline: 1px solid #ff0430 !important;
308
- }
309
-
310
- ${i} s {
311
- outline: 1px solid #f805e3 !important;
312
- }
313
-
314
- ${i} small {
315
- outline: 1px solid #d107b2 !important;
316
- }
317
-
318
- ${i} abbr {
319
- outline: 1px solid #4a0263 !important;
320
- }
321
-
322
- ${i} q {
323
- outline: 1px solid #240018 !important;
324
- }
325
-
326
- ${i} cite {
327
- outline: 1px solid #64003c !important;
328
- }
329
-
330
- ${i} dfn {
331
- outline: 1px solid #b4005a !important;
332
- }
333
-
334
- ${i} sub {
335
- outline: 1px solid #dba0c8 !important;
336
- }
337
-
338
- ${i} sup {
339
- outline: 1px solid #cc0256 !important;
340
- }
341
-
342
- ${i} time {
343
- outline: 1px solid #d6606d !important;
344
- }
345
-
346
- ${i} code {
347
- outline: 1px solid #e04251 !important;
348
- }
349
-
350
- ${i} kbd {
351
- outline: 1px solid #5e001f !important;
352
- }
353
-
354
- ${i} samp {
355
- outline: 1px solid #9c0033 !important;
356
- }
357
-
358
- ${i} var {
359
- outline: 1px solid #d90047 !important;
360
- }
361
-
362
- ${i} mark {
363
- outline: 1px solid #ff0053 !important;
364
- }
365
-
366
- ${i} bdi {
367
- outline: 1px solid #bf3668 !important;
368
- }
369
-
370
- ${i} bdo {
371
- outline: 1px solid #6f1400 !important;
372
- }
373
-
374
- ${i} ruby {
375
- outline: 1px solid #ff7b93 !important;
376
- }
377
-
378
- ${i} rt {
379
- outline: 1px solid #ff2f54 !important;
380
- }
381
-
382
- ${i} rp {
383
- outline: 1px solid #803e49 !important;
384
- }
385
-
386
- ${i} span {
387
- outline: 1px solid #cc2643 !important;
388
- }
389
-
390
- ${i} br {
391
- outline: 1px solid #db687d !important;
392
- }
393
-
394
- ${i} wbr {
395
- outline: 1px solid #db175b !important;
396
- }`}var e=(i,t)=>{let{globals:o}=t,n=[!0,"true"].includes(o[m]),d=t.viewMode==="docs",l=x(()=>s(d?'[data-story-block="true"]':".sb-show-main"),[t]);return f(()=>{let a=d?`addon-outline-docs-${t.id}`:"addon-outline";return n?b(a,l):u(a),()=>{u(a)}},[n,l,t]),i()},h=[e],g={[m]:!1};export{h as decorators,g as initialGlobals};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-CFRXHY34-CT7H_f1J.js","./iframe-Dy8Zk0Zd.js","./index-Dc4p7Je0.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]);
2
- import{_ as a}from"./iframe-Dy8Zk0Zd.js";var i=Object.defineProperty,s=(e,r)=>{for(var t in r)i(e,t,{get:r[t],enumerable:!0})},_={};s(_,{parameters:()=>d});var p=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-CFRXHY34-CT7H_f1J.js").then(r=>r.D),__vite__mapDeps([0,1,2,3]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>p[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters};
@@ -1 +0,0 @@
1
- var o="viewport",a={[o]:{value:void 0,isRotated:!1}},t={viewport:"reset",viewportRotated:!1},e,l=(e=globalThis.FEATURES)!=null&&e.viewportStoryGlobals?a:t;export{l as initialGlobals};