@spectric/ui 0.0.6 → 0.0.7

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 (85) hide show
  1. package/dist/components/input.d.ts +3 -1
  2. package/dist/components/query_bar/QueryBar.d.ts +2 -3
  3. package/dist/custom-elements.json +2 -2
  4. package/dist/index.es.js +15 -14
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/index.umd.js +16 -16
  7. package/dist/index.umd.js.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/input.ts +19 -2
  10. package/src/components/query_bar/QueryBar.ts +7 -21
  11. package/src/stories/QueryBar.stories.ts +7 -0
  12. package/src/stories/fixtures/data.ts +3 -0
  13. package/dist/assets/Banner-CZ3qKIQC.js +0 -172
  14. package/dist/assets/Banner.stories-BMf4MBpI.js +0 -19
  15. package/dist/assets/BitDisplay.stories-wztXxpxe.js +0 -18
  16. package/dist/assets/Bits-C_TSTjST.js +0 -1
  17. package/dist/assets/Button.stories-gHxjWwVf.js +0 -142
  18. package/dist/assets/Color-F6OSRLHC-AjFOL-zN.js +0 -1
  19. package/dist/assets/DocsRenderer-CFRXHY34-CvW79YxE.js +0 -761
  20. package/dist/assets/Header.stories-Bc09U6g1.js +0 -25
  21. package/dist/assets/Page.stories-DNJKhAFs.js +0 -114
  22. package/dist/assets/QueryBar.stories-Da5C-SV4.js +0 -17
  23. package/dist/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
  24. package/dist/assets/chunk-L4EGOTBX-AI5g0G5Z.js +0 -2
  25. package/dist/assets/data-CwENMT7L.js +0 -3
  26. package/dist/assets/dialog-CFHXbUTQ.js +0 -611
  27. package/dist/assets/directive-helpers-IbK5tOA8.js +0 -5
  28. package/dist/assets/entry-preview-Di-j0SPB.js +0 -4
  29. package/dist/assets/entry-preview-docs-CUBRpM7y.js +0 -1
  30. package/dist/assets/iframe-BQFuVTVZ.js +0 -2
  31. package/dist/assets/index-BCiKWbv6.js +0 -1
  32. package/dist/assets/index-BHYIh-Xd.js +0 -8
  33. package/dist/assets/index-DBGhiA-l.js +0 -1
  34. package/dist/assets/index-DrFu-skq.js +0 -6
  35. package/dist/assets/index-oFsFREWh.js +0 -9
  36. package/dist/assets/input.stories-Cgdv-5bN.js +0 -58
  37. package/dist/assets/lit-element-UdLzEcH-.js +0 -19
  38. package/dist/assets/preview-BWzBA1C2.js +0 -396
  39. package/dist/assets/preview-CGiTbRot.js +0 -2
  40. package/dist/assets/preview-D77C14du.js +0 -34
  41. package/dist/assets/preview-DEMzn_yN.js +0 -1
  42. package/dist/assets/preview-DFmD0pui.js +0 -1
  43. package/dist/assets/preview-DGUiP6tS.js +0 -7
  44. package/dist/assets/preview-DQVTHjv1.js +0 -182
  45. package/dist/assets/preview-aVwhiz9X.js +0 -1
  46. package/dist/assets/tiny-invariant-CopsF_GD.js +0 -1
  47. package/dist/components/input.css.d.ts +0 -2
  48. package/dist/favicon.svg +0 -1
  49. package/dist/iframe.html +0 -639
  50. package/dist/index.html +0 -190
  51. package/dist/index.json +0 -1
  52. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  53. package/dist/nunito-sans-bold.woff2 +0 -0
  54. package/dist/nunito-sans-italic.woff2 +0 -0
  55. package/dist/nunito-sans-regular.woff2 +0 -0
  56. package/dist/project.json +0 -1
  57. package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js +0 -333
  58. package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js.LEGAL.txt +0 -40
  59. package/dist/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  60. package/dist/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  61. package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
  62. package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  63. package/dist/sb-addons/essentials-controls-1/manager-bundle.js +0 -391
  64. package/dist/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -0
  65. package/dist/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
  66. package/dist/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  67. package/dist/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
  68. package/dist/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  69. package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
  70. package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  71. package/dist/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
  72. package/dist/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  73. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  74. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  75. package/dist/sb-common-assets/favicon.svg +0 -1
  76. package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  77. package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  78. package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  79. package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  80. package/dist/sb-manager/globals-module-info.js +0 -1028
  81. package/dist/sb-manager/globals-runtime.js +0 -40861
  82. package/dist/sb-manager/globals.js +0 -48
  83. package/dist/sb-manager/runtime.js +0 -13338
  84. package/dist/sb-preview/globals.js +0 -33
  85. package/dist/sb-preview/runtime.js +0 -7174
@@ -1,5 +0,0 @@
1
- import"./lit-element-UdLzEcH-.js";/**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const e=(i,t)=>t===void 0?(i==null?void 0:i._$litType$)!==void 0:(i==null?void 0:i._$litType$)===t,p=i=>i.strings===void 0;export{e,p as f};
@@ -1,4 +0,0 @@
1
- import{B as _}from"./lit-element-UdLzEcH-.js";import{e as a}from"./directive-helpers-IbK5tOA8.js";import{d as O}from"./index-DrFu-skq.js";const{simulatePageLoad:s,simulateDOMContentLoaded:l}=__STORYBOOK_MODULE_PREVIEW_API__,{global:m}=__STORYBOOK_MODULE_GLOBAL__;var u=Object.defineProperty,h=(n,o)=>{for(var t in o)u(n,t,{get:o[t],enumerable:!0})},y={};h(y,{parameters:()=>g,render:()=>T,renderToCanvas:()=>M});var{Node:L}=m,T=(n,o)=>{let{id:t,component:i}=o;if(!i)throw new Error(`Unable to render story ${t} as the component annotation is missing from the default export`);let d=document.createElement(i);return Object.entries(n).forEach(([p,e])=>{d[p]=e}),d};function M({storyFn:n,kind:o,name:t,showMain:i,showError:d,forceRemount:p},e){let r=n();if(i(),a(r)){(p||!e.querySelector('[id="root-inner"]'))&&(e.innerHTML='<div id="root-inner"></div>');let f=e.querySelector('[id="root-inner"]');_(r,f),s(e)}else if(typeof r=="string")e.innerHTML=r,s(e);else if(r instanceof L){if(e.firstChild===r&&!p)return;e.innerHTML="",e.appendChild(r),l()}else d({title:`Expecting an HTML snippet or DOM node from the story: "${t}" of "${o}".`,description:O`
2
- Did you forget to return the HTML snippet from the story?
3
- Use "() => <your snippet or node>" or when defining the story.
4
- `})}var g={renderer:"web-components"};export{g as parameters,T as render,M as renderToCanvas};
@@ -1 +0,0 @@
1
- import{g as d,i as c,a as m}from"./chunk-L4EGOTBX-AI5g0G5Z.js";import"./entry-preview-Di-j0SPB.js";import{g as l,c as _,y as C}from"./index-BHYIh-Xd.js";import{i as E}from"./tiny-invariant-CopsF_GD.js";import{B as u}from"./lit-element-UdLzEcH-.js";import"./directive-helpers-IbK5tOA8.js";import"./index-DrFu-skq.js";import"./_commonjsHelpers-Cpj98o6Y.js";const{logger:f}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{useEffect:b,addons:v}=__STORYBOOK_MODULE_PREVIEW_API__;function g(r,e){var t,s;let a;switch(e){case"attributes":case"properties":a={name:((t=r.type)==null?void 0:t.text)||r.type};break;case"slots":a={name:"string"};break;default:a={name:"void"};break}return{name:r.name,required:!1,description:r.description,type:a,table:{category:e,type:{summary:((s=r.type)==null?void 0:s.text)||r.type},defaultValue:{summary:r.default!==void 0?r.default:r.defaultValue}}}}function O(r){let e=r.name.replace(/(-|_|:|\.|\s)+(.)?/g,(a,t,s)=>s?s.toUpperCase():"").replace(/^([A-Z])/,a=>a.toLowerCase());return e=`on${e.charAt(0).toUpperCase()+e.substr(1)}`,[{name:e,action:{name:r.name},table:{disable:!0}},g(r,"events")]}function n(r,e){return r&&r.filter(a=>a&&a.name).reduce((a,t)=>{if(t.kind==="method")return a;switch(e){case"events":O(t).forEach(s=>{E(s.name),a[s.name]=s});break;default:a[t.name]=g(t,e);break}return a},{})}var h=(r,e)=>{if(!c(r)||!m(e))return null;let a=e.tags.find(t=>t.name.toUpperCase()===r.toUpperCase());return a||f.warn(`Component not found in custom-elements.json: ${r}`),a},M=(r,e)=>{var t;if(!c(r)||!m(e))return null;let a;return(t=e==null?void 0:e.modules)==null||t.forEach(s=>{var o;(o=s==null?void 0:s.declarations)==null||o.forEach(p=>{p.tagName===r&&(a=p)})}),a||f.warn(`Component not found in custom-elements.json: ${r}`),a},y=(r,e)=>(e==null?void 0:e.version)==="experimental"?h(r,e):M(r,e),A=(r,e)=>{let a=y(r,e);return a&&{...n(a.members??[],"properties"),...n(a.properties??[],"properties"),...n(a.attributes??[],"attributes"),...n(a.events??[],"events"),...n(a.slots??[],"slots"),...n(a.cssProperties??[],"css custom properties"),...n(a.cssParts??[],"css shadow parts")}},S=r=>{let e=d();return A(r,e)},w=r=>{let e=y(r,d());return e&&e.description},I=/<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;function k(r){var t;let e=(t=r==null?void 0:r.parameters.docs)==null?void 0:t.source,a=r==null?void 0:r.parameters.__isArgsStory;return(e==null?void 0:e.type)===l.DYNAMIC?!1:!a||(e==null?void 0:e.code)||(e==null?void 0:e.type)===l.CODE}function L(r,e){var o,p;let a=r(),t=(p=(o=e==null?void 0:e.parameters.docs)==null?void 0:o.source)!=null&&p.excludeDecorators?e.originalStoryFn(e.args,e):a,s;if(b(()=>{let{id:i,unmappedArgs:D}=e;s&&v.getChannel().emit(C,{id:i,source:s,args:D})}),!k(e)){let i=window.document.createElement("div");t instanceof DocumentFragment?u(t.cloneNode(!0),i):u(t,i),s=i.innerHTML.replace(I,"")}return a}var j=[L],G={docs:{extractArgTypes:S,extractComponentDescription:w,story:{inline:!0},source:{type:l.DYNAMIC,language:"html"}}},K=[_];export{K as argTypesEnhancers,j as decorators,G as parameters};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Banner.stories-BMf4MBpI.js","./Banner-CZ3qKIQC.js","./lit-element-UdLzEcH-.js","./BitDisplay.stories-wztXxpxe.js","./dialog-CFHXbUTQ.js","./directive-helpers-IbK5tOA8.js","./Bits-C_TSTjST.js","./Button.stories-gHxjWwVf.js","./Header.stories-Bc09U6g1.js","./Page.stories-DNJKhAFs.js","./data-CwENMT7L.js","./QueryBar.stories-Da5C-SV4.js","./input.stories-Cgdv-5bN.js","./entry-preview-Di-j0SPB.js","./index-DrFu-skq.js","./entry-preview-docs-CUBRpM7y.js","./chunk-L4EGOTBX-AI5g0G5Z.js","./index-BHYIh-Xd.js","./_commonjsHelpers-Cpj98o6Y.js","./tiny-invariant-CopsF_GD.js","./preview-D77C14du.js","./preview-DEMzn_yN.js","./preview-BWzBA1C2.js","./preview-DQVTHjv1.js","./index-oFsFREWh.js"])))=>i.map(i=>d[i]);
2
- import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))u(t);new MutationObserver(t=>{for(const o of t)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&u(s)}).observe(document,{childList:!0,subtree:!0});function l(t){const o={};return t.integrity&&(o.integrity=t.integrity),t.referrerPolicy&&(o.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?o.credentials="include":t.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function u(t){if(t.ep)return;t.ep=!0;const o=l(t);fetch(t.href,o)}})();const R="modulepreload",T=function(r,_){return new URL(r,_).href},d={},e=function(_,l,u){let t=Promise.resolve();if(l&&l.length>0){const s=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),p=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));t=Promise.allSettled(l.map(n=>{if(n=T(n,u),n in d)return;d[n]=!0;const a=n.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(!!u)for(let m=s.length-1;m>=0;m--){const E=s[m];if(E.href===n&&(!a||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${f}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":R,a||(c.as="script"),c.crossOrigin="",c.href=n,p&&c.setAttribute("nonce",p),document.head.appendChild(c),a)return new Promise((m,E)=>{c.addEventListener("load",m),c.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${n}`)))})}))}function o(s){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s}return t.then(s=>{for(const i of s||[])i.status==="rejected"&&o(i.reason);return _().catch(o)})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:P}=__STORYBOOK_MODULE_PREVIEW_API__,O=L({page:"preview"});P.setChannel(O);window.__STORYBOOK_ADDONS_CHANNEL__=O;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=O);const y={"./src/stories/Banner.stories.ts":async()=>e(()=>import("./Banner.stories-BMf4MBpI.js"),__vite__mapDeps([0,1,2]),import.meta.url),"./src/stories/BitDisplay.stories.ts":async()=>e(()=>import("./BitDisplay.stories-wztXxpxe.js"),__vite__mapDeps([3,1,2,4,5,6]),import.meta.url),"./src/stories/Button.stories.ts":async()=>e(()=>import("./Button.stories-gHxjWwVf.js"),__vite__mapDeps([7,1,2,4,5]),import.meta.url),"./src/stories/Header.stories.ts":async()=>e(()=>import("./Header.stories-Bc09U6g1.js"),__vite__mapDeps([8,4,2,1,5]),import.meta.url),"./src/stories/Page.stories.ts":async()=>e(()=>import("./Page.stories-DNJKhAFs.js"),__vite__mapDeps([9,8,4,2,1,5,10,6]),import.meta.url),"./src/stories/QueryBar.stories.ts":async()=>e(()=>import("./QueryBar.stories-Da5C-SV4.js"),__vite__mapDeps([11,4,2,1,5,10]),import.meta.url),"./src/stories/input.stories.ts":async()=>e(()=>import("./input.stories-Cgdv-5bN.js"),__vite__mapDeps([12,4,2,1,5]),import.meta.url)};async function I(r){return y[r]()}const{composeConfigs:S,PreviewWeb:D,ClientApi:g}=__STORYBOOK_MODULE_PREVIEW_API__,V=async(r=[])=>{const _=await Promise.all([r[0]??e(()=>import("./entry-preview-Di-j0SPB.js"),__vite__mapDeps([13,2,5,14]),import.meta.url),r[1]??e(()=>import("./entry-preview-docs-CUBRpM7y.js"),__vite__mapDeps([15,16,13,2,5,14,17,18,19]),import.meta.url),r[2]??e(()=>import("./preview-CGiTbRot.js"),[],import.meta.url),r[3]??e(()=>import("./preview-aVwhiz9X.js"),[],import.meta.url),r[4]??e(()=>import("./preview-D77C14du.js"),__vite__mapDeps([20,14]),import.meta.url),r[5]??e(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),r[6]??e(()=>import("./preview-DEMzn_yN.js"),__vite__mapDeps([21,19]),import.meta.url),r[7]??e(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([22,14]),import.meta.url),r[8]??e(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),r[9]??e(()=>import("./preview-DQVTHjv1.js"),__vite__mapDeps([23,24,18,16,13,2,5,14]),import.meta.url)]);return S(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new D(I,V);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{e as _};
@@ -1 +0,0 @@
1
- import{R as e}from"./index-oFsFREWh.js";import"./_commonjsHelpers-Cpj98o6Y.js";const o={},c=e.createContext(o);function u(n){const t=e.useContext(c);return e.useMemo(function(){return typeof n=="function"?n(t):{...t,...n}},[t,n])}function r(n){let t;return n.disableParentContext?t=typeof n.components=="function"?n.components(o):n.components||o:t=u(n.components),e.createElement(c.Provider,{value:t},n.children)}export{r as MDXProvider,u as useMDXComponents};
@@ -1,8 +0,0 @@
1
- import{c as rn}from"./_commonjsHelpers-Cpj98o6Y.js";var me={exports:{}};(function(r,o){(function(a,l){l(o)})(rn,function(a){function l(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: ${l(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: ${l(t)}`),this.token=t,Object.setPrototypeOf(this,u.prototype)}getToken(){return this.token}}class d extends Error{constructor(t,n){let s=`Unexpected type: '${t.type}'.`;n!==void 0&&(s+=` Message: ${n}`),super(s),Object.setPrototypeOf(this,d.prototype)}}function T(e){return t=>t.startsWith(e)?{type:e,text:e}:null}function h(e){let t=0,n;const s=e[0];let i=!1;if(s!=="'"&&s!=='"')return null;for(;t<e.length;){if(t++,n=e[t],!i&&n===s){t++;break}i=!i&&n==="\\"}if(n!==s)throw new Error("Unterminated String");return e.slice(0,t)}const S=new RegExp("[$_\\p{ID_Start}]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}","u"),E=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 ee(e){let t=e[0];if(!S.test(t))return null;let n=1;do{if(t=e[n],!E.test(t))break;n++}while(n<e.length);return e.slice(0,n)}const K=/^(NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity))/;function B(e){var t,n;return(n=(t=K.exec(e))===null||t===void 0?void 0:t[0])!==null&&n!==void 0?n:null}const C=e=>{const t=ee(e);return t==null?null:{type:"Identifier",text:t}};function P(e){return t=>{if(!t.startsWith(e))return null;const n=t[e.length];return n!==void 0&&E.test(n)?null:{type:e,text:e}}}const te=e=>{const t=h(e);return t==null?null:{type:"StringValue",text:t}},gt=e=>e.length>0?null:{type:"EOF",text:""},wt=e=>{const t=B(e);return t===null?null:{type:"Number",text:t}},Nt=[gt,T("=>"),T("("),T(")"),T("{"),T("}"),T("["),T("]"),T("|"),T("&"),T("<"),T(">"),T(","),T(";"),T("*"),T("?"),T("!"),T("="),T(":"),T("..."),T("."),T("#"),T("~"),T("/"),T("@"),P("undefined"),P("null"),P("function"),P("this"),P("new"),P("module"),P("event"),P("external"),P("typeof"),P("keyof"),P("readonly"),P("import"),P("is"),P("in"),P("asserts"),wt,C,te],Et=/^\s*\n\s*/;class ${static create(t){const n=this.read(t);t=n.text;const s=this.read(t);return t=s.text,new $(t,void 0,n.token,s.token)}constructor(t,n,s,i){this.text="",this.text=t,this.previous=n,this.current=s,this.next=i}static read(t,n=!1){n=n||Et.test(t),t=t.trim();for(const s of Nt){const i=s(t);if(i!==null){const y=Object.assign(Object.assign({},i),{startOfLine:n});return t=t.slice(y.text.length),{text:t,token:y}}}throw new Error("Unexpected Token "+t)}advance(){const t=$.read(this.text);return new $(t.text,this.current,this.next,t.token)}}function w(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")throw new d(e);return e}function ne(e){return e.type==="JsdocTypeKeyValue"?Y(e):w(e)}function Pt(e){return e.type==="JsdocTypeName"?e:Y(e)}function Y(e){if(e.type!=="JsdocTypeKeyValue")throw new d(e);return e}function bt(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 re(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 j{constructor(t,n,s){this.grammar=t,typeof n=="string"?this._lexer=$.create(n):this._lexer=n,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 w(this.parseIntermediateType(t))}parseIntermediateType(t){const n=this.tryParslets(null,t);if(n===null)throw new p(this.lexer.current);return this.parseInfixIntermediateType(n,t)}parseInfixIntermediateType(t,n){let s=this.tryParslets(t,n);for(;s!==null;)t=s,s=this.tryParslets(t,n);return t}tryParslets(t,n){for(const s of this.grammar){const i=s(this,n,t);if(i!==null)return i}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 be(e){return e==="EOF"||e==="|"||e===","||e===")"||e===">"}const oe=(e,t,n)=>{const s=e.lexer.current.type,i=e.lexer.next.type;return n==null&&s==="?"&&!be(i)||n!=null&&s==="?"?(e.consume("?"),n==null?{type:"JsdocTypeNullable",element:e.parseType(m.NULLABLE),meta:{position:"prefix"}}:{type:"JsdocTypeNullable",element:w(n),meta:{position:"suffix"}}):null};function J(e){const t=(n,s,i)=>{const y=n.lexer.current.type,f=n.lexer.next.type;if(i===null){if("parsePrefix"in e&&e.accept(y,f))return e.parsePrefix(n)}else if("parseInfix"in e&&e.precedence>s&&e.accept(y,f))return e.parseInfix(n,i);return null};return Object.defineProperty(t,"name",{value:e.name}),t}const G=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:w(t),meta:{position:"suffix"}})}),W=J({name:"numberParslet",accept:e=>e==="Number",parsePrefix:e=>{const t=parseFloat(e.lexer.current.text);return e.consume("Number"),{type:"JsdocTypeNumber",value:t}}}),xt=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:w(t)}}}),kt=J({name:"specialTypesParslet",accept:(e,t)=>e==="?"&&be(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)}}),St=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:w(t),meta:{position:"suffix"}})});function Ot({allowTrailingComma:e}){return J({name:"parameterListParslet",accept:t=>t===",",precedence:m.PARAMETER_LIST,parseInfix:(t,n)=>{const s=[ne(n)];t.consume(",");do try{const i=t.parseIntermediateType(m.PARAMETER_LIST);s.push(ne(i))}catch(i){if(e&&i instanceof p)break;throw i}while(t.consume(","));if(s.length>0&&s.slice(0,-1).some(i=>i.type==="JsdocTypeVariadic"))throw new Error("Only the last parameter may be a rest parameter");return{type:"JsdocTypeParameterList",elements:s}}})}const It=J({name:"genericParslet",accept:(e,t)=>e==="<"||e==="."&&t==="<",precedence:m.GENERIC,parseInfix:(e,t)=>{const n=e.consume(".");e.consume("<");const s=[];do s.push(e.parseType(m.PARAMETER_LIST));while(e.consume(","));if(!e.consume(">"))throw new Error("Unterminated generic parameter list");return{type:"JsdocTypeGeneric",left:w(t),elements:s,meta:{brackets:"angle",dot:n}}}}),vt=J({name:"unionParslet",accept:e=>e==="|",precedence:m.UNION,parseInfix:(e,t)=>{e.consume("|");const n=[];do n.push(e.parseType(m.UNION));while(e.consume("|"));return{type:"JsdocTypeUnion",elements:[w(t),...n]}}}),se=[oe,G,W,xt,kt,St,Ot({allowTrailingComma:!0}),It,vt,G];function X({allowSquareBracketsOnAnyType:e,allowJsdocNamePaths:t,pathGrammar:n}){return function(i,y,f){if(f==null||y>=m.NAME_PATH)return null;const g=i.lexer.current.type,k=i.lexer.next.type;if(!(g==="."&&k!=="<"||g==="["&&(e||f.type==="JsdocTypeName")||t&&(g==="~"||g==="#")))return null;let O,z=!1;i.consume(".")?O="property":i.consume("[")?(O="property-brackets",z=!0):i.consume("~")?O="inner":(i.consume("#"),O="instance");const Le=n!==null?new j(n,i.lexer,i):i,I=Le.parseIntermediateType(m.NAME_PATH);i.acceptLexerState(Le);let M;switch(I.type){case"JsdocTypeName":M={type:"JsdocTypeProperty",value:I.value,meta:{quote:void 0}};break;case"JsdocTypeNumber":M={type:"JsdocTypeProperty",value:I.value.toString(10),meta:{quote:void 0}};break;case"JsdocTypeStringValue":M={type:"JsdocTypeProperty",value:I.value,meta:{quote:I.meta.quote}};break;case"JsdocTypeSpecialNamePath":if(I.specialType==="event")M=I;else throw new d(I,"Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'");break;default:throw new d(I,"Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'")}if(z&&!i.consume("]")){const Fe=i.lexer.current;throw new Error(`Unterminated square brackets. Next token is '${Fe.type}' with text '${Fe.text}'`)}return{type:"JsdocTypeNamePath",left:w(f),right:M,pathType:O}}}function v({allowedAdditionalTokens:e}){return J({name:"nameParslet",accept:t=>t==="Identifier"||t==="this"||t==="new"||e.includes(t),parsePrefix:t=>{const{type:n,text:s}=t.lexer.current;return t.consume(n),{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 H({pathGrammar:e,allowedTypes:t}){return J({name:"specialNamePathParslet",accept:n=>t.includes(n),parsePrefix:n=>{const s=n.lexer.current.type;if(n.consume(s),!n.consume(":"))return{type:"JsdocTypeName",value:s};let i,y=n.lexer.current;if(n.consume("StringValue"))i={type:"JsdocTypeSpecialNamePath",value:y.text.slice(1,-1),specialType:s,meta:{quote:y.text[0]==="'"?"single":"double"}};else{let k="";const b=["Identifier","@","/"];for(;b.some(O=>n.consume(O));)k+=y.text,y=n.lexer.current;i={type:"JsdocTypeSpecialNamePath",value:k,specialType:s,meta:{quote:void 0}}}const f=new j(e,n.lexer,n),g=f.parseInfixIntermediateType(i,m.ALL);return n.acceptLexerState(f),w(g)}})}const xe=[v({allowedAdditionalTokens:["external","module"]}),D,W,X({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:null})],V=[...xe,H({allowedTypes:["event"],pathGrammar:xe})];function ae(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(n=>ne(n))}function At(e){const t=ae(e);if(t.some(n=>n.type==="JsdocTypeKeyValue"))throw new Error("No parameter should be named");return t}function ie({allowNamedParameters:e,allowNoReturnType:t,allowWithoutParenthesis:n,allowNewAsFunctionKeyword:s}){return J({name:"functionParslet",accept:(i,y)=>i==="function"||s&&i==="new"&&y==="(",parsePrefix:i=>{const y=i.consume("new");i.consume("function");const f=i.lexer.current.type==="(";if(!f){if(!n)throw new Error("function is missing parameter list");return{type:"JsdocTypeName",value:"function"}}let g={type:"JsdocTypeFunction",parameters:[],arrow:!1,constructor:y,parenthesis:f};const k=i.parseIntermediateType(m.FUNCTION);if(e===void 0)g.parameters=At(k);else{if(y&&k.type==="JsdocTypeFunction"&&k.arrow)return g=k,g.constructor=!0,g;g.parameters=ae(k);for(const b of g.parameters)if(b.type==="JsdocTypeKeyValue"&&!e.includes(b.key))throw new Error(`only allowed named parameters are ${e.join(", ")} but got ${b.type}`)}if(i.consume(":"))g.returnType=i.parseType(m.PREFIX);else if(!t)throw new Error("function is missing return type");return g}})}function ce({allowPostfix:e,allowEnclosingBrackets:t}){return J({name:"variadicParslet",accept:n=>n==="...",precedence:m.PREFIX,parsePrefix:n=>{n.consume("...");const s=t&&n.consume("[");try{const i=n.parseType(m.PREFIX);if(s&&!n.consume("]"))throw new Error("Unterminated variadic type. Missing ']'");return{type:"JsdocTypeVariadic",element:w(i),meta:{position:"prefix",squareBrackets:s}}}catch(i){if(i 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 i}},parseInfix:e?(n,s)=>(n.consume("..."),{type:"JsdocTypeVariadic",element:w(s),meta:{position:"suffix",squareBrackets:!1}}):void 0})}const ke=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 n={type:"JsdocTypeSymbol",value:t.value};if(!e.consume(")")){const s=e.parseIntermediateType(m.SYMBOL);if(n.element=bt(s),!e.consume(")"))throw new Error("Symbol does not end after value")}return n}}),Se=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:[w(t)],meta:{brackets:"square",dot:!1}})});function le({objectFieldGrammar:e,allowKeyTypes:t}){return J({name:"objectParslet",accept:n=>n==="{",parsePrefix:n=>{n.consume("{");const s={type:"JsdocTypeObject",meta:{separator:"comma"},elements:[]};if(!n.consume("}")){let i;const y=new j(e,n.lexer,n);for(;;){y.acceptLexerState(n);let f=y.parseIntermediateType(m.OBJECT);n.acceptLexerState(y),f===void 0&&t&&(f=n.parseIntermediateType(m.OBJECT));let g=!1;if(f.type==="JsdocTypeNullable"&&(g=!0,f=f.element),f.type==="JsdocTypeNumber"||f.type==="JsdocTypeName"||f.type==="JsdocTypeStringValue"){let b;f.type==="JsdocTypeStringValue"&&(b=f.meta.quote),s.elements.push({type:"JsdocTypeObjectField",key:f.value.toString(),right:void 0,optional:g,readonly:!1,meta:{quote:b}})}else if(f.type==="JsdocTypeObjectField"||f.type==="JsdocTypeJsdocObjectField")s.elements.push(f);else throw new d(f);if(n.lexer.current.startOfLine)i="linebreak";else if(n.consume(","))i="comma";else if(n.consume(";"))i="semicolon";else break;if(n.lexer.current.type==="}")break}if(s.meta.separator=i??"comma",!n.consume("}"))throw new Error("Unterminated record type. Missing '}'")}return s}})}function pe({allowSquaredProperties:e,allowKeyTypes:t,allowReadonly:n,allowOptional:s}){return J({name:"objectFieldParslet",precedence:m.KEY_VALUE,accept:i=>i===":",parseInfix:(i,y)=>{var f;let g=!1,k=!1;s&&y.type==="JsdocTypeNullable"&&(g=!0,y=y.element),n&&y.type==="JsdocTypeReadonlyProperty"&&(k=!0,y=y.element);const b=(f=i.baseParser)!==null&&f!==void 0?f:i;if(b.acceptLexerState(i),y.type==="JsdocTypeNumber"||y.type==="JsdocTypeName"||y.type==="JsdocTypeStringValue"||re(y)){if(re(y)&&!e)throw new d(y);b.consume(":");let O;y.type==="JsdocTypeStringValue"&&(O=y.meta.quote);const z=b.parseType(m.KEY_VALUE);return i.acceptLexerState(b),{type:"JsdocTypeObjectField",key:re(y)?y:y.value.toString(),right:z,optional:g,readonly:k,meta:{quote:O}}}else{if(!t)throw new d(y);b.consume(":");const O=b.parseType(m.KEY_VALUE);return i.acceptLexerState(b),{type:"JsdocTypeJsdocObjectField",left:w(y),right:O}}}})}function ue({allowOptional:e,allowVariadic:t}){return J({name:"keyValueParslet",precedence:m.KEY_VALUE,accept:n=>n===":",parseInfix:(n,s)=>{let i=!1,y=!1;if(e&&s.type==="JsdocTypeNullable"&&(i=!0,s=s.element),t&&s.type==="JsdocTypeVariadic"&&s.element!==void 0&&(y=!0,s=s.element),s.type!=="JsdocTypeName")throw new d(s);n.consume(":");const f=n.parseType(m.KEY_VALUE);return{type:"JsdocTypeKeyValue",key:s.value,right:f,optional:i,variadic:y}}})}const Oe=[...se,ie({allowWithoutParenthesis:!0,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),D,H({allowedTypes:["module","external","event"],pathGrammar:V}),ce({allowEnclosingBrackets:!0,allowPostfix:!0}),v({allowedAdditionalTokens:["keyof"]}),ke,Se,X({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:V})],Rt=[...Oe,le({objectFieldGrammar:[v({allowedAdditionalTokens:["module","in"]}),pe({allowSquaredProperties:!1,allowKeyTypes:!0,allowOptional:!1,allowReadonly:!1}),...Oe],allowKeyTypes:!0}),ue({allowOptional:!0,allowVariadic:!0})],Ie=J({name:"typeOfParslet",accept:e=>e==="typeof",parsePrefix:e=>(e.consume("typeof"),{type:"JsdocTypeTypeof",element:w(e.parseType(m.KEY_OF_TYPE_OF))})}),_t=[v({allowedAdditionalTokens:["module","keyof","event","external","in"]}),oe,G,D,W,pe({allowSquaredProperties:!1,allowKeyTypes:!1,allowOptional:!1,allowReadonly:!1})],Lt=[...se,le({allowKeyTypes:!1,objectFieldGrammar:_t}),v({allowedAdditionalTokens:["event","external","in"]}),Ie,ie({allowWithoutParenthesis:!1,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),ce({allowEnclosingBrackets:!1,allowPostfix:!1}),v({allowedAdditionalTokens:["keyof"]}),H({allowedTypes:["module"],pathGrammar:V}),X({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:V}),ue({allowOptional:!1,allowVariadic:!1}),ke],Ft=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:w(e.parseIntermediateType(m.INFIX))}}});function Ut({allowQuestionMark:e}){return J({name:"tupleParslet",accept:t=>t==="[",parsePrefix:t=>{t.consume("[");const n={type:"JsdocTypeTuple",elements:[]};if(t.consume("]"))return n;const s=t.parseIntermediateType(m.ALL);if(s.type==="JsdocTypeParameterList"?s.elements[0].type==="JsdocTypeKeyValue"?n.elements=s.elements.map(Y):n.elements=s.elements.map(w):s.type==="JsdocTypeKeyValue"?n.elements=[Y(s)]:n.elements=[w(s)],!t.consume("]"))throw new Error("Unterminated '['");if(!e&&n.elements.some(i=>i.type==="JsdocTypeUnknown"))throw new Error("Question mark in tuple not allowed");return n}})}const jt=J({name:"keyOfParslet",accept:e=>e==="keyof",parsePrefix:e=>(e.consume("keyof"),{type:"JsdocTypeKeyof",element:w(e.parseType(m.KEY_OF_TYPE_OF))})}),Vt=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}}}),Kt=J({name:"readonlyPropertyParslet",accept:e=>e==="readonly",parsePrefix:e=>(e.consume("readonly"),{type:"JsdocTypeReadonlyProperty",element:e.parseType(m.KEY_VALUE)})}),$t=J({name:"arrowFunctionParslet",precedence:m.ARROW,accept:e=>e==="=>",parseInfix:(e,t)=>(e.consume("=>"),{type:"JsdocTypeFunction",parameters:ae(t).map(Pt),arrow:!0,constructor:!1,parenthesis:!0,returnType:e.parseType(m.OBJECT)})}),Dt=J({name:"intersectionParslet",accept:e=>e==="&",precedence:m.INTERSECTION,parseInfix:(e,t)=>{e.consume("&");const n=[];do n.push(e.parseType(m.INTERSECTION));while(e.consume("&"));return{type:"JsdocTypeIntersection",elements:[w(t),...n]}}}),qt=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:w(e.parseIntermediateType(m.INFIX))}}}),Mt=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 n;if(e.consume(":")){const s=e.baseParser;s.acceptLexerState(e),n={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),n={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 n}}),Bt=[Kt,v({allowedAdditionalTokens:["module","event","keyof","event","external","in"]}),oe,G,D,W,pe({allowSquaredProperties:!0,allowKeyTypes:!1,allowOptional:!0,allowReadonly:!0}),Mt],Ct=[...se,le({allowKeyTypes:!1,objectFieldGrammar:Bt}),Ie,jt,Vt,D,ie({allowWithoutParenthesis:!0,allowNoReturnType:!1,allowNamedParameters:["this","new","args"],allowNewAsFunctionKeyword:!0}),Ut({allowQuestionMark:!1}),ce({allowEnclosingBrackets:!1,allowPostfix:!1}),Ft,v({allowedAdditionalTokens:["event","external","in"]}),H({allowedTypes:["module"],pathGrammar:V}),Se,$t,X({allowSquareBracketsOnAnyType:!0,allowJsdocNamePaths:!1,pathGrammar:V}),Dt,qt,ue({allowVariadic:!0,allowOptional:!0})];function ve(e,t){switch(t){case"closure":return new j(Lt,e).parse();case"jsdoc":return new j(Rt,e).parse();case"typescript":return new j(Ct,e).parse()}}function Yt(e,t=["typescript","closure","jsdoc"]){let n;for(const s of t)try{return ve(e,s)}catch(i){n=i}throw n}function q(e,t){const n=e[t.type];if(n===void 0)throw new Error(`In this set of transform rules exists no rule for type ${t.type}.`);return n(t,s=>q(e,s))}function x(e){throw new Error("This transform is not available. Are you trying the correct parsing mode?")}function Ae(e){const t={params:[]};for(const n of e.parameters)n.type==="JsdocTypeKeyValue"?n.key==="this"?t.this=n.right:n.key==="new"?t.new=n.right:t.params.push(n):t.params.push(n);return t}function Q(e,t,n){return e==="prefix"?n+t:t+n}function A(e,t){switch(t){case"double":return`"${e}"`;case"single":return`'${e}'`;case void 0:return e}}function Re(){return{JsdocTypeParenthesis:(e,t)=>`(${e.element!==void 0?t(e.element):""})`,JsdocTypeKeyof:(e,t)=>`keyof ${t(e.element)}`,JsdocTypeFunction:(e,t)=>{if(e.arrow){if(e.returnType===void 0)throw new Error("Arrow function needs a return type.");let n=`(${e.parameters.map(t).join(", ")}) => ${t(e.returnType)}`;return e.constructor&&(n="new "+n),n}else{let n=e.constructor?"new":"function";return e.parenthesis&&(n+=`(${e.parameters.map(t).join(", ")})`,e.returnType!==void 0&&(n+=`: ${t(e.returnType)}`)),n}},JsdocTypeName:e=>e.value,JsdocTypeTuple:(e,t)=>`[${e.elements.map(t).join(", ")}]`,JsdocTypeVariadic:(e,t)=>e.meta.position===void 0?"...":Q(e.meta.position,t(e.element),"..."),JsdocTypeNamePath:(e,t)=>{const n=t(e.left),s=t(e.right);switch(e.pathType){case"inner":return`${n}~${s}`;case"instance":return`${n}#${s}`;case"property":return`${n}.${s}`;case"property-brackets":return`${n}[${s}]`}},JsdocTypeStringValue:e=>A(e.value,e.meta.quote),JsdocTypeAny:()=>"*",JsdocTypeGeneric:(e,t)=>{if(e.meta.brackets==="square"){const n=e.elements[0],s=t(n);return n.type==="JsdocTypeUnion"||n.type==="JsdocTypeIntersection"?`(${s})[]`:`${s}[]`}else return`${t(e.left)}${e.meta.dot?".":""}<${e.elements.map(t).join(", ")}>`},JsdocTypeImport:(e,t)=>`import(${t(e.element)})`,JsdocTypeObjectField:(e,t)=>{let n="";return e.readonly&&(n+="readonly "),typeof e.key=="string"?n+=A(e.key,e.meta.quote):n+=t(e.key),e.optional&&(n+="?"),e.right===void 0?n:n+`: ${t(e.right)}`},JsdocTypeJsdocObjectField:(e,t)=>`${t(e.left)}: ${t(e.right)}`,JsdocTypeKeyValue:(e,t)=>{let n=e.key;return e.optional&&(n+="?"),e.variadic&&(n="..."+n),e.right===void 0?n:n+`: ${t(e.right)}`},JsdocTypeSpecialNamePath:e=>`${e.specialType}:${A(e.value,e.meta.quote)}`,JsdocTypeNotNullable:(e,t)=>Q(e.meta.position,t(e.element),"!"),JsdocTypeNull:()=>"null",JsdocTypeNullable:(e,t)=>Q(e.meta.position,t(e.element),"?"),JsdocTypeNumber:e=>e.value.toString(),JsdocTypeObject:(e,t)=>`{${e.elements.map(t).join((e.meta.separator==="comma"?",":";")+" ")}}`,JsdocTypeOptional:(e,t)=>Q(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=>A(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)}`}}const Gt=Re();function Wt(e){return q(Gt,e)}const Xt=["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 Xt.includes(e)&&(t.reservedWord=!0),t}const Ht={JsdocTypeOptional:(e,t)=>{const n=t(e.element);return n.optional=!0,n},JsdocTypeNullable:(e,t)=>{const n=t(e.element);return n.nullable=!0,n},JsdocTypeNotNullable:(e,t)=>{const n=t(e.element);return n.nullable=!1,n},JsdocTypeVariadic:(e,t)=>{if(e.element===void 0)throw new Error("dots without value are not allowed in catharsis mode");const n=t(e.element);return n.repeatable=!0,n},JsdocTypeAny:()=>({type:"AllLiteral"}),JsdocTypeNull:()=>({type:"NullLiteral"}),JsdocTypeStringValue:e=>R(A(e.value,e.meta.quote)),JsdocTypeUndefined:()=>({type:"UndefinedLiteral"}),JsdocTypeUnknown:()=>({type:"UnknownLiteral"}),JsdocTypeFunction:(e,t)=>{const n=Ae(e),s={type:"FunctionType",params:n.params.map(t)};return n.this!==void 0&&(s.this=t(n.this)),n.new!==void 0&&(s.new=t(n.new)),e.returnType!==void 0&&(s.result=t(e.returnType)),s},JsdocTypeGeneric:(e,t)=>({type:"TypeApplication",applications:e.elements.map(n=>t(n)),expression:t(e.left)}),JsdocTypeSpecialNamePath:e=>R(e.specialType+":"+A(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 n={type:"RecordType",fields:[]};for(const s of e.elements)s.type!=="JsdocTypeObjectField"&&s.type!=="JsdocTypeJsdocObjectField"?n.fields.push({type:"FieldType",key:t(s),value:void 0}):n.fields.push(t(s));return n},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!="string")throw new Error("Index signatures and mapped types are not supported");return{type:"FieldType",key:R(A(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(n=>t(n))}),JsdocTypeKeyValue:(e,t)=>({type:"FieldType",key:R(e.key),value:e.right===void 0?void 0:t(e.right)}),JsdocTypeNamePath:(e,t)=>{const n=t(e.left);let s;e.right.type==="JsdocTypeSpecialNamePath"?s=t(e.right).name:s=A(e.right.value,e.right.meta.quote);const i=e.pathType==="inner"?"~":e.pathType==="instance"?"#":".";return R(`${n.name}${i}${s}`)},JsdocTypeSymbol:e=>{let t="",n=e.element,s=!1;return(n==null?void 0:n.type)==="JsdocTypeVariadic"&&(n.meta.position==="prefix"?t="...":s=!0,n=n.element),(n==null?void 0:n.type)==="JsdocTypeName"?t+=n.value:(n==null?void 0:n.type)==="JsdocTypeNumber"&&(t+=n.value.toString()),s&&(t+="..."),R(`${e.value}(${t})`)},JsdocTypeParenthesis:(e,t)=>t(w(e.element)),JsdocTypeMappedType:x,JsdocTypeIndexSignature:x,JsdocTypeImport:x,JsdocTypeKeyof:x,JsdocTypeTuple:x,JsdocTypeTypeof:x,JsdocTypeIntersection:x,JsdocTypeProperty:x,JsdocTypePredicate:x,JsdocTypeAsserts:x};function Qt(e){return q(Ht,e)}function F(e){switch(e){case void 0:return"none";case"single":return"single";case"double":return"double"}}function zt(e){switch(e){case"inner":return"INNER_MEMBER";case"instance":return"INSTANCE_MEMBER";case"property":return"MEMBER";case"property-brackets":return"MEMBER"}}function ye(e,t){return t.length===2?{type:e,left:t[0],right:t[1]}:{type:e,left:t[0],right:ye(e,t.slice(1))}}const Zt={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 n={type:"VARIADIC",meta:{syntax:e.meta.position==="prefix"?"PREFIX_DOTS":e.meta.position==="suffix"?"SUFFIX_DOTS":"ONLY_DOTS"}};return e.element!==void 0&&(n.value=t(e.element)),n},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:F(e.element.meta.quote),string:e.element.value}}),JsdocTypeUndefined:()=>({type:"NAME",name:"undefined"}),JsdocTypeAny:()=>({type:"ANY"}),JsdocTypeFunction:(e,t)=>{const n=Ae(e),s={type:e.arrow?"ARROW":"FUNCTION",params:n.params.map(i=>{if(i.type==="JsdocTypeKeyValue"){if(i.right===void 0)throw new Error("Function parameter without ':' is not expected to be 'KEY_VALUE'");return{type:"NAMED_PARAMETER",name:i.key,typeName:t(i.right)}}else return t(i)}),new:null,returns:null};return n.this!==void 0?s.this=t(n.this):e.arrow||(s.this=null),n.new!==void 0&&(s.new=t(n.new)),e.returnType!==void 0&&(s.returns=t(e.returnType)),s},JsdocTypeGeneric:(e,t)=>{const n={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&&(n.objects[0]={type:"NAME",name:"function"}),n},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:F(e.meta.quote),value:null,readonly:!1};let n=t(e.right);return e.optional&&(n={type:"OPTIONAL",value:n,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key.toString(),quoteStyle:F(e.meta.quote),value:n,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 n=t(e.right);return e.optional&&(n={type:"OPTIONAL",value:n,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:n,readonly:!1}},JsdocTypeObject:(e,t)=>{const n=[];for(const s of e.elements)(s.type==="JsdocTypeObjectField"||s.type==="JsdocTypeJsdocObjectField")&&n.push(t(s));return{type:"RECORD",entries:n}},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:F(e.meta.quote),path:e.value}}},JsdocTypeNamePath:(e,t)=>{let n=!1,s,i;e.right.type==="JsdocTypeSpecialNamePath"&&e.right.specialType==="event"?(n=!0,s=e.right.value,i=F(e.right.meta.quote)):(s=e.right.value,i=F(e.right.meta.quote));const y={type:zt(e.pathType),owner:t(e.left),name:s,quoteStyle:i,hasEventPrefix:n};if(y.owner.type==="MODULE"){const f=y.owner;return y.owner=y.owner.value,f.value=y,f}else return y},JsdocTypeUnion:(e,t)=>ye("UNION",e.elements.map(t)),JsdocTypeParenthesis:(e,t)=>({type:"PARENTHESIS",value:t(w(e.element))}),JsdocTypeNull:()=>({type:"NAME",name:"null"}),JsdocTypeUnknown:()=>({type:"UNKNOWN"}),JsdocTypeStringValue:e=>({type:"STRING_VALUE",quoteStyle:F(e.meta.quote),string:e.value}),JsdocTypeIntersection:(e,t)=>ye("INTERSECTION",e.elements.map(t)),JsdocTypeNumber:e=>({type:"NUMBER_VALUE",number:e.value.toString()}),JsdocTypeSymbol:x,JsdocTypeProperty:x,JsdocTypePredicate:x,JsdocTypeMappedType:x,JsdocTypeIndexSignature:x,JsdocTypeAsserts:x};function en(e){return q(Zt,e)}function tn(){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 n={type:"JsdocTypeSymbol",value:e.value};return e.element!==void 0&&(n.element=t(e.element)),n},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 n={type:"JsdocTypeVariadic",meta:{position:e.meta.position,squareBrackets:e.meta.squareBrackets}};return e.element!==void 0&&(n.element=t(e.element)),n},JsdocTypeTuple:(e,t)=>({type:"JsdocTypeTuple",elements:e.elements.map(t)}),JsdocTypeName:e=>e,JsdocTypeFunction:(e,t)=>{const n={type:"JsdocTypeFunction",arrow:e.arrow,parameters:e.parameters.map(t),constructor:e.constructor,parenthesis:e.parenthesis};return e.returnType!==void 0&&(n.returnType=t(e.returnType)),n},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)})}}const _e={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"]};function de(e,t,n,s,i){s==null||s(e,t,n);const y=_e[e.type];for(const f of y){const g=e[f];if(g!==void 0)if(Array.isArray(g))for(const k of g)de(k,e,f,s,i);else de(g,e,f,s,i)}i==null||i(e,t,n)}function nn(e,t,n){de(e,void 0,void 0,t,n)}a.catharsisTransform=Qt,a.identityTransformRules=tn,a.jtpTransform=en,a.parse=ve,a.stringify=Wt,a.stringifyRules=Re,a.transform=q,a.traverse=nn,a.tryParse=Yt,a.visitorKeys=_e})})(me,me.exports);var fe=me.exports,on=Object.defineProperty,c=(r,o)=>on(r,"name",{value:o,configurable:!0});__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;function sn(r,o){let a={},l=Object.keys(r);for(let p=0;p<l.length;p++){let u=l[p],d=r[u];a[u]=o(d,u,r)}return a}c(sn,"mapValues");__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;var an=["null","undefined"];function Z(r){return an.some(o=>o===r)}c(Z,"isDefaultValueBlacklisted");var cn=c(r=>{if(!r)return"";if(typeof r=="string")return r;throw new Error(`Description: expected string, got: ${JSON.stringify(r)}`)},"str");function Te(r){return!!r.__docgenInfo}c(Te,"hasDocgen");function ln(r){return r!=null&&Object.keys(r).length>0}c(ln,"isValidDocgenSection");function pn(r,o){return Te(r)?r.__docgenInfo[o]:null}c(pn,"getDocgenSection");function Ue(r){return Te(r)?cn(r.__docgenInfo.description):""}c(Ue,"getDocgenDescription");var _;(function(r){r.start="/**",r.nostart="/***",r.delim="*",r.end="*/"})(_=_||(_={}));function je(r){return/^\s+$/.test(r)}c(je,"isSpace");function Ve(r){let o=r.match(/\r+$/);return o==null?["",r]:[r.slice(-o[0].length),r.slice(0,-o[0].length)]}c(Ve,"splitCR");function U(r){let o=r.match(/^\s+/);return o==null?["",r]:[r.slice(0,o[0].length),r.slice(o[0].length)]}c(U,"splitSpace");function Ke(r){return r.split(/\n/)}c(Ke,"splitLines");function $e(r={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},r)}c($e,"seedSpec");function De(r={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},r)}c(De,"seedTokens");var un=/^@\S+/;function qe({fence:r="```"}={}){let o=Me(r),a=c((l,p)=>o(l)?!p:p,"toggleFence");return c(function(l){let p=[[]],u=!1;for(let d of l)un.test(d.tokens.description)&&!u?p.push([d]):p[p.length-1].push(d),u=a(d.tokens.description,u);return p},"parseBlock")}c(qe,"getParser");function Me(r){return typeof r=="string"?o=>o.split(r).length%2===0:r}c(Me,"getFencer");function Be({startLine:r=0,markers:o=_}={}){let a=null,l=r;return c(function(p){let u=p,d=De();if([d.lineEnd,u]=Ve(u),[d.start,u]=U(u),a===null&&u.startsWith(o.start)&&!u.startsWith(o.nostart)&&(a=[],d.delimiter=u.slice(0,o.start.length),u=u.slice(o.start.length),[d.postDelimiter,u]=U(u)),a===null)return l++,null;let T=u.trimRight().endsWith(o.end);if(d.delimiter===""&&u.startsWith(o.delim)&&!u.startsWith(o.end)&&(d.delimiter=o.delim,u=u.slice(o.delim.length),[d.postDelimiter,u]=U(u)),T){let h=u.trimRight();d.end=u.slice(h.length-o.end.length),u=h.slice(0,-o.end.length)}if(d.description=u,a.push({number:l,source:p,tokens:d}),l++,T){let h=a.slice();return a=null,h}return null},"parseSource")}c(Be,"getParser");function Ce({tokenizers:r}){return c(function(o){var a;let l=$e({source:o});for(let p of r)if(l=p(l),!((a=l.problems[l.problems.length-1])===null||a===void 0)&&a.critical)break;return l},"parseSpec")}c(Ce,"getParser");function Ye(){return r=>{let{tokens:o}=r.source[0],a=o.description.match(/\s*(@(\S+))(\s*)/);return a===null?(r.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:r.source[0].number,critical:!0}),r):(o.tag=a[1],o.postTag=a[3],o.description=o.description.slice(a[0].length),r.tag=a[2],r)}}c(Ye,"tagTokenizer");function Ge(r="compact"){let o=We(r);return a=>{let l=0,p=[];for(let[T,{tokens:h}]of a.source.entries()){let S="";if(T===0&&h.description[0]!=="{")return a;for(let E of h.description)if(E==="{"&&l++,E==="}"&&l--,S+=E,l===0)break;if(p.push([h,S]),l===0)break}if(l!==0)return a.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:a.source[0].number,critical:!0}),a;let u=[],d=p[0][0].postDelimiter.length;for(let[T,[h,S]]of p.entries())h.type=S,T>0&&(h.type=h.postDelimiter.slice(d)+S,h.postDelimiter=h.postDelimiter.slice(0,d)),[h.postType,h.description]=U(h.description.slice(S.length)),u.push(h.type);return u[0]=u[0].slice(1),u[u.length-1]=u[u.length-1].slice(0,-1),a.type=o(u),a}}c(Ge,"typeTokenizer");var yn=c(r=>r.trim(),"trim");function We(r){return r==="compact"?o=>o.map(yn).join(""):r==="preserve"?o=>o.join(`
2
- `):r}c(We,"getJoiner");var dn=c(r=>r&&r.startsWith('"')&&r.endsWith('"'),"isQuoted");function Xe(){let r=c((o,{tokens:a},l)=>a.type===""?o:l,"typeEnd");return o=>{let{tokens:a}=o.source[o.source.reduce(r,0)],l=a.description.trimLeft(),p=l.split('"');if(p.length>1&&p[0]===""&&p.length%2===1)return o.name=p[1],a.name=`"${p[1]}"`,[a.postName,a.description]=U(l.slice(a.name.length)),o;let u=0,d="",T=!1,h;for(let E of l){if(u===0&&je(E))break;E==="["&&u++,E==="]"&&u--,d+=E}if(u!==0)return o.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:o.source[0].number,critical:!0}),o;let S=d;if(d[0]==="["&&d[d.length-1]==="]"){T=!0,d=d.slice(1,-1);let E=d.split("=");if(d=E[0].trim(),E[1]!==void 0&&(h=E.slice(1).join("=").trim()),d==="")return o.problems.push({code:"spec:name:empty-name",message:"empty name",line:o.source[0].number,critical:!0}),o;if(h==="")return o.problems.push({code:"spec:name:empty-default",message:"empty default value",line:o.source[0].number,critical:!0}),o;if(!dn(h)&&/=(?!>)/.test(h))return o.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:o.source[0].number,critical:!0}),o}return o.optional=T,o.name=d,a.name=S,h!==void 0&&(o.default=h),[a.postName,a.description]=U(l.slice(a.name.length)),o}}c(Xe,"nameTokenizer");function He(r="compact",o=_){let a=he(r);return l=>(l.description=a(l.source,o),l)}c(He,"descriptionTokenizer");function he(r){return r==="compact"?Qe:r==="preserve"?ze:r}c(he,"getJoiner");function Qe(r,o=_){return r.map(({tokens:{description:a}})=>a.trim()).filter(a=>a!=="").join(" ")}c(Qe,"compactJoiner");var mn=c((r,{tokens:o},a)=>o.type===""?r:a,"lineNo"),fn=c(({tokens:r})=>(r.delimiter===""?r.start:r.postDelimiter.slice(1))+r.description,"getDescription");function ze(r,o=_){if(r.length===0)return"";r[0].tokens.description===""&&r[0].tokens.delimiter===o.start&&(r=r.slice(1));let a=r[r.length-1];return a!==void 0&&a.tokens.description===""&&a.tokens.end.endsWith(o.end)&&(r=r.slice(0,-1)),r=r.slice(r.reduce(mn,0)),r.map(fn).join(`
3
- `)}c(ze,"preserveJoiner");function Ze({startLine:r=0,fence:o="```",spacing:a="compact",markers:l=_,tokenizers:p=[Ye(),Ge(a),Xe(),He(a)]}={}){if(r<0||r%1>0)throw new Error("Invalid startLine");let u=Be({startLine:r,markers:l}),d=qe({fence:o}),T=Ce({tokenizers:p}),h=he(a);return function(S){let E=[];for(let ee of Ke(S)){let K=u(ee);if(K===null)continue;let B=d(K),C=B.slice(1).map(T);E.push({description:h(B[0],l),tags:C,source:K,problems:C.reduce((P,te)=>P.concat(te.problems),[])})}return E}}c(Ze,"getParser");function et(r){return r.start+r.delimiter+r.postDelimiter+r.tag+r.postTag+r.type+r.postType+r.name+r.postName+r.description+r.end+r.lineEnd}c(et,"join");function Tn(){return r=>r.source.map(({tokens:o})=>et(o)).join(`
4
- `)}c(Tn,"getStringifier");function tt(r,o={}){return Ze(o)(r)}c(tt,"parse");function nt(r){return r!=null&&r.includes("@")}c(nt,"containsJsDoc");function rt(r){let o=`/**
5
- `+(r??"").split(`
6
- `).map(l=>` * ${l}`).join(`
7
- `)+`
8
- */`,a=tt(o,{spacing:"preserve"});if(!a||a.length===0)throw new Error("Cannot parse JSDoc tags.");return a[0]}c(rt,"parse");var hn={tags:["param","arg","argument","returns","ignore","deprecated"]},Jn=c((r,o=hn)=>{if(!nt(r))return{includesJsDoc:!1,ignore:!1};let a=rt(r),l=ot(a,o.tags);return l.ignore?{includesJsDoc:!0,ignore:!0}:{includesJsDoc:!0,ignore:!1,description:a.description.trim(),extractedTags:l}},"parseJsDoc");function ot(r,o){let a={params:null,deprecated:null,returns:null,ignore:!1};for(let l of r.tags)if(!(o!==void 0&&!o.includes(l.tag)))if(l.tag==="ignore"){a.ignore=!0;break}else switch(l.tag){case"param":case"arg":case"argument":{let p=at(l);p!=null&&(a.params==null&&(a.params=[]),a.params.push(p));break}case"deprecated":{let p=it(l);p!=null&&(a.deprecated=p);break}case"returns":{let p=ct(l);p!=null&&(a.returns=p);break}}return a}c(ot,"extractJsDocTags");function st(r){return r.replace(/[\.-]$/,"")}c(st,"normaliseParamName");function at(r){if(!r.name||r.name==="-")return null;let o=we(r.type);return{name:r.name,type:o,description:ge(r.description),getPrettyName:c(()=>st(r.name),"getPrettyName"),getTypeName:c(()=>o?Ne(o):null,"getTypeName")}}c(at,"extractParam");function it(r){return r.name?Je(r.name,r.description):null}c(it,"extractDeprecated");function Je(r,o){let a=r===""?o:`${r} ${o}`;return ge(a)}c(Je,"joinNameAndDescription");function ge(r){let o=r.replace(/^- /g,"").trim();return o===""?null:o}c(ge,"normaliseDescription");function ct(r){let o=we(r.type);return o?{type:o,description:Je(r.name,r.description),getTypeName:c(()=>Ne(o),"getTypeName")}:null}c(ct,"extractReturns");var L=fe.stringifyRules(),gn=L.JsdocTypeObject;L.JsdocTypeAny=()=>"any";L.JsdocTypeObject=(r,o)=>`(${gn(r,o)})`;L.JsdocTypeOptional=(r,o)=>o(r.element);L.JsdocTypeNullable=(r,o)=>o(r.element);L.JsdocTypeNotNullable=(r,o)=>o(r.element);L.JsdocTypeUnion=(r,o)=>r.elements.map(o).join("|");function we(r){try{return fe.parse(r,"typescript")}catch{return null}}c(we,"extractType");function Ne(r){return fe.transform(L,r)}c(Ne,"extractTypeName");function Ee(r){return r.length>90}c(Ee,"isTooLongForTypeSummary");function lt(r){return r.length>50}c(lt,"isTooLongForDefaultValueSummary");function N(r,o){return r===o?{summary:r}:{summary:r,detail:o}}c(N,"createSummaryValue");function wn(r,o){if(r!=null){let{value:a}=r;if(!Z(a))return lt(a)?N(o==null?void 0:o.name,a):N(a)}return null}c(wn,"createDefaultValue");function Pe({name:r,value:o,elements:a,raw:l}){return o??(a!=null?a.map(Pe).join(" | "):l??r)}c(Pe,"generateUnionElement");function pt({name:r,raw:o,elements:a}){return a!=null?N(a.map(Pe).join(" | ")):o!=null?N(o.replace(/^\|\s*/,"")):N(r)}c(pt,"generateUnion");function ut({type:r,raw:o}){return o!=null?N(o):N(r)}c(ut,"generateFuncSignature");function yt({type:r,raw:o}){return o!=null?Ee(o)?N(r,o):N(o):N(r)}c(yt,"generateObjectSignature");function dt(r){let{type:o}=r;return o==="object"?yt(r):ut(r)}c(dt,"generateSignature");function mt({name:r,raw:o}){return o!=null?Ee(o)?N(r,o):N(o):N(r)}c(mt,"generateDefault");function Nn(r){if(r==null)return null;switch(r.name){case"union":return pt(r);case"signature":return dt(r);default:return mt(r)}}c(Nn,"createType");function En({defaultValue:r}){if(r!=null){let{value:o}=r;if(!Z(o))return N(o)}return null}c(En,"createDefaultValue");function Pn({tsType:r,required:o}){if(r==null)return null;let a=r.name;return o||(a=a.replace(" | undefined","")),N(["Array","Record","signature"].includes(r.name)?r.raw:a)}c(Pn,"createType");function ft(r){return r!=null?N(r.name):null}c(ft,"createType");function Tt(r){let{computed:o,func:a}=r;return typeof o>"u"&&typeof a>"u"}c(Tt,"isReactDocgenTypescript");function ht(r){return r?r.name==="string"?!0:r.name==="enum"?Array.isArray(r.value)&&r.value.every(({value:o})=>typeof o=="string"&&o[0]==='"'&&o[o.length-1]==='"'):!1:!1}c(ht,"isStringValued");function Jt(r,o){if(r!=null){let{value:a}=r;if(!Z(a))return Tt(r)&&ht(o)?N(JSON.stringify(a)):N(a)}return null}c(Jt,"createDefaultValue");function bn(r,o,a){let{description:l,required:p,defaultValue:u}=a;return{name:r,type:ft(o),required:p,description:l,defaultValue:Jt(u,o)}}c(bn,"createBasicPropDef");function xn(r,o){var a;if(o!=null&&o.includesJsDoc){let{description:l,extractedTags:p}=o;l!=null&&(r.description=o.description);let u={...p,params:(a=p==null?void 0:p.params)==null?void 0:a.map(d=>({name:d.getPrettyName(),description:d.description}))};Object.values(u).filter(Boolean).length>0&&(r.jsDocTags=u)}return r}c(xn,"applyJsDocResult");function kn(r,o,a,l){let p=Jn(o.description);return p.includesJsDoc&&p.ignore?null:{propDef:l(r,o,p),jsDocTags:p.extractedTags,docgenInfo:o,typeSystem:a}}c(kn,"extractProp");function Sn(r){return r!=null?Ue(r):""}c(Sn,"extractComponentDescription");const{combineParameters:On}=__STORYBOOK_MODULE_PREVIEW_API__;var Rn=c(r=>{let{component:o,argTypes:a,parameters:{docs:l={}}}=r,{extractArgTypes:p}=l,u=p&&o?p(o):{};return u?On(u,a):a},"enhanceArgTypes"),In="storybook/docs",_n=`${In}/snippet-rendered`,vn=(r=>(r.AUTO="auto",r.CODE="code",r.DYNAMIC="dynamic",r))(vn||{});export{Rn as c,vn as g,_n as y};
@@ -1 +0,0 @@
1
- import{m as i,a as l,G as m,K as c,P as T,g as b,L as d,b as S,v as B,w as L,c as C,E as H,$ as u,y as g,d as y,N as I,e as h,D as k,x as P,C as W,f as A,S as F,R as x,I as D,h as R,i as f,A as v,F as E,j as M,k as N,l as q,W as w,n as O,T as U,t as Z,o as j,p as z,q as G,r as J,s as K,u as Q,z as V,B as X,H as Y,J as _,M as $,V as aa,O as sa,Q as oa,U as ta,X as ea,Y as ra,Z as na,_ as pa,a0 as ia,a1 as la,a2 as ma,a3 as ca,a4 as Ta,a5 as ba,a6 as da,a7 as Sa,a8 as Ba,a9 as La,aa as Ca,ab as Ha,ac as ua,ad as ga}from"./DocsRenderer-CFRXHY34-CvW79YxE.js";import"./iframe-BQFuVTVZ.js";import"../sb-preview/runtime.js";import"./index-oFsFREWh.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./index-BHYIh-Xd.js";import"./index-DrFu-skq.js";export{i as A,l as ActionBar,m as AddonPanel,c as Badge,T as Bar,b as Blockquote,d as Button,S as ClipboardCode,B as Code,L as DL,C as Div,H as DocumentWrapper,u as EmptyTabContent,g as ErrorFormatter,y as FlexBar,I as Form,h as H1,k as H2,P as H3,W as H4,A as H5,F as H6,x as HR,D as IconButton,R as IconButtonSkeleton,f as Icons,v as Img,E as LI,M as Link,N as ListItem,q as Loader,w as Modal,O as OL,U as P,Z as Placeholder,j as Pre,z as ResetWrapper,G as ScrollArea,J as Separator,K as Spaced,Q as Span,V as StorybookIcon,X as StorybookLogo,Y as Symbols,_ as SyntaxHighlighter,$ as TT,aa as TabBar,sa as TabButton,oa as TabWrapper,ta as Table,ea as Tabs,ra as TabsState,na as TooltipLinkList,pa as TooltipMessage,ia as TooltipNote,la as UL,ma as WithTooltip,ca as WithTooltipPure,Ta as Zoom,ba as codeCommon,da as components,Sa as createCopyToClipboardFunction,Ba as getStoryHref,La as icons,Ca as interleaveSeparators,Ha as nameSpaceClassNames,ua as resetComponents,ga as withReset};
@@ -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,9 +0,0 @@
1
- import{g as z}from"./_commonjsHelpers-Cpj98o6Y.js";var G=Object.create,A=Object.defineProperty,H=Object.getOwnPropertyDescriptor,J=Object.getOwnPropertyNames,W=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty,Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),X=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of J(t))!K.call(e,n)&&n!==r&&A(e,n,{get:()=>t[n],enumerable:!(i=H(t,n))||i.enumerable});return e},Y=(e,t,r)=>(r=e!=null?G(W(e)):{},X(!e||!e.__esModule?A(r,"default",{value:e,enumerable:!0}):r,e)),Z=Q(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isEqual=function(){var t=Object.prototype.toString,r=Object.getPrototypeOf,i=Object.getOwnPropertySymbols?function(n){return Object.keys(n).concat(Object.getOwnPropertySymbols(n))}:Object.keys;return function(n,a){return function l(u,o,f){var d,h,p,E=t.call(u),T=t.call(o);if(u===o)return!0;if(u==null||o==null)return!1;if(f.indexOf(u)>-1&&f.indexOf(o)>-1)return!0;if(f.push(u,o),E!=T||(d=i(u),h=i(o),d.length!=h.length||d.some(function(j){return!l(u[j],o[j],f)})))return!1;switch(E.slice(8,-1)){case"Symbol":return u.valueOf()==o.valueOf();case"Date":case"Number":return+u==+o||+u!=+u&&+o!=+o;case"RegExp":case"Function":case"String":case"Boolean":return""+u==""+o;case"Set":case"Map":d=u.entries(),h=o.entries();do if(!l((p=d.next()).value,h.next().value,f))return!1;while(!p.done);return!0;case"ArrayBuffer":u=new Uint8Array(u),o=new Uint8Array(o);case"DataView":u=new Uint8Array(u.buffer),o=new Uint8Array(o.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(u.length!=o.length)return!1;for(p=0;p<u.length;p++)if((p in u||p in o)&&(p in u!=p in o||!l(u[p],o[p],f)))return!1;return!0;case"Object":return l(r(u),r(o),f);default:return!1}}(n,a,[])}}()}),x=Y(Z()),I=e=>e.map(t=>typeof t<"u").filter(Boolean).length,ee=(e,t)=>{let{exists:r,eq:i,neq:n,truthy:a}=e;if(I([r,i,n,a])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:r,eq:i,neq:n})}`);if(typeof i<"u")return(0,x.isEqual)(t,i);if(typeof n<"u")return!(0,x.isEqual)(t,n);if(typeof r<"u"){let l=typeof t<"u";return r?l:!l}return typeof a>"u"||a?!!t:!t},be=(e,t,r)=>{if(!e.if)return!0;let{arg:i,global:n}=e.if;if(I([i,n])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:i,global:n})}`);let a=i?t[i]:r[n];return ee(e.if,a)},te=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),k=(e,t)=>{let r=te(e);if(r==="")throw new Error(`Invalid ${t} '${e}', must include alphanumeric characters`);return r},$e=(e,t)=>`${k(e,"kind")}${t?`--${k(t,"name")}`:""}`,U={exports:{}},c={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var v=Symbol.for("react.element"),re=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),ie=Symbol.for("react.provider"),ce=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),fe=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),R=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=R&&e[R]||e["@@iterator"],typeof e=="function"?e:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,F={};function y(e,t,r){this.props=e,this.context=t,this.refs=F,this.updater=r||q}y.prototype.isReactComponent={};y.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function N(){}N.prototype=y.prototype;function w(e,t,r){this.props=e,this.context=t,this.refs=F,this.updater=r||q}var O=w.prototype=new N;O.constructor=w;D(O,y.prototype);O.isPureReactComponent=!0;var C=Array.isArray,V=Object.prototype.hasOwnProperty,S={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function B(e,t,r){var i,n={},a=null,l=null;if(t!=null)for(i in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(a=""+t.key),t)V.call(t,i)&&!M.hasOwnProperty(i)&&(n[i]=t[i]);var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){for(var o=Array(u),f=0;f<u;f++)o[f]=arguments[f+2];n.children=o}if(e&&e.defaultProps)for(i in u=e.defaultProps,u)n[i]===void 0&&(n[i]=u[i]);return{$$typeof:v,type:e,key:a,ref:l,props:n,_owner:S.current}}function ye(e,t){return{$$typeof:v,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function g(e){return typeof e=="object"&&e!==null&&e.$$typeof===v}function de(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var P=/\/+/g;function $(e,t){return typeof e=="object"&&e!==null&&e.key!=null?de(""+e.key):t.toString(36)}function _(e,t,r,i,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case v:case re:l=!0}}if(l)return l=e,n=n(l),e=i===""?"."+$(l,0):i,C(n)?(r="",e!=null&&(r=e.replace(P,"$&/")+"/"),_(n,t,r,"",function(f){return f})):n!=null&&(g(n)&&(n=ye(n,r+(!n.key||l&&l.key===n.key?"":(""+n.key).replace(P,"$&/")+"/")+e)),t.push(n)),1;if(l=0,i=i===""?".":i+":",C(e))for(var u=0;u<e.length;u++){a=e[u];var o=i+$(a,u);l+=_(a,t,r,o,n)}else if(o=pe(e),typeof o=="function")for(e=o.call(e),u=0;!(a=e.next()).done;)a=a.value,o=i+$(a,u++),l+=_(a,t,r,o,n);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function m(e,t,r){if(e==null)return e;var i=[],n=0;return _(e,i,"","",function(a){return t.call(r,a,n++)}),i}function ve(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var s={current:null},b={transition:null},he={ReactCurrentDispatcher:s,ReactCurrentBatchConfig:b,ReactCurrentOwner:S};function L(){throw Error("act(...) is not supported in production builds of React.")}c.Children={map:m,forEach:function(e,t,r){m(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return m(e,function(){t++}),t},toArray:function(e){return m(e,function(t){return t})||[]},only:function(e){if(!g(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};c.Component=y;c.Fragment=ne;c.Profiler=oe;c.PureComponent=w;c.StrictMode=ue;c.Suspense=le;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=he;c.act=L;c.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=D({},e.props),n=e.key,a=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,l=S.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(o in t)V.call(t,o)&&!M.hasOwnProperty(o)&&(i[o]=t[o]===void 0&&u!==void 0?u[o]:t[o])}var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){u=Array(o);for(var f=0;f<o;f++)u[f]=arguments[f+2];i.children=u}return{$$typeof:v,type:e.type,key:n,ref:a,props:i,_owner:l}};c.createContext=function(e){return e={$$typeof:ce,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ie,_context:e},e.Consumer=e};c.createElement=B;c.createFactory=function(e){var t=B.bind(null,e);return t.type=e,t};c.createRef=function(){return{current:null}};c.forwardRef=function(e){return{$$typeof:ae,render:e}};c.isValidElement=g;c.lazy=function(e){return{$$typeof:se,_payload:{_status:-1,_result:e},_init:ve}};c.memo=function(e,t){return{$$typeof:fe,type:e,compare:t===void 0?null:t}};c.startTransition=function(e){var t=b.transition;b.transition={};try{e()}finally{b.transition=t}};c.unstable_act=L;c.useCallback=function(e,t){return s.current.useCallback(e,t)};c.useContext=function(e){return s.current.useContext(e)};c.useDebugValue=function(){};c.useDeferredValue=function(e){return s.current.useDeferredValue(e)};c.useEffect=function(e,t){return s.current.useEffect(e,t)};c.useId=function(){return s.current.useId()};c.useImperativeHandle=function(e,t,r){return s.current.useImperativeHandle(e,t,r)};c.useInsertionEffect=function(e,t){return s.current.useInsertionEffect(e,t)};c.useLayoutEffect=function(e,t){return s.current.useLayoutEffect(e,t)};c.useMemo=function(e,t){return s.current.useMemo(e,t)};c.useReducer=function(e,t,r){return s.current.useReducer(e,t,r)};c.useRef=function(e){return s.current.useRef(e)};c.useState=function(e){return s.current.useState(e)};c.useSyncExternalStore=function(e,t,r){return s.current.useSyncExternalStore(e,t,r)};c.useTransition=function(){return s.current.useTransition()};c.version="18.3.1";U.exports=c;var me=U.exports;const we=z(me);export{$e as G,te as O,be as P,we as R,me as r};
@@ -1,58 +0,0 @@
1
- import{o as a,I as u}from"./dialog-CFHXbUTQ.js";import"./Banner-CZ3qKIQC.js";import{x as s}from"./lit-element-UdLzEcH-.js";import"./directive-helpers-IbK5tOA8.js";const x={title:"UI/Input",tags:["autodocs"],component:"spectric-input",render:e=>s`
2
- <spectric-input
3
- label=${a(e.label)}
4
- placeholder=${a(e.placeholder)}
5
- helperText=${a(e.helperText)}
6
- pattern=${a(e.pattern)}
7
- name=${a(e.name)}
8
- invalidText=${a(e.invalidText)}
9
- maxCount=${a(e.maxCount)}
10
- @input=${t=>{console.log(t)}}
11
- @change=${t=>console.log(t)}
12
- ?showPasswordVisibilityToggle=${e.showPasswordVisibilityToggle}
13
- ?readonly=${e.readonly}
14
- ?disabled=${e.disabled}
15
- variant=${a(e.variant)}
16
- >
17
- ${e.label}
18
- </spectric-input>
19
- `,args:{label:"Input label"},argTypes:{variant:{options:Object.values(u)}}},n={args:{label:"Input label",placeholder:"Type here",readonly:!1,helperText:"Input any text"}},m=Object.values(u);function b(e){return e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase())}const r={render:e=>s`
20
- ${m.map(t=>s`
21
- <spectric-input
22
- label=${a(b(t+" Input"))}
23
- ?disabled=${e.disabled}
24
- variant=${t}
25
-
26
- @change=${$=>{console.log($)}}
27
- >
28
- ${t}
29
- </spectric-input>`)}
30
- `,args:{showPasswordVisibilityToggle:!0,variant:"text"}};var l,o,i;n.parameters={...n.parameters,docs:{...(l=n.parameters)==null?void 0:l.docs,source:{originalSource:`{
31
- args: {
32
- label: 'Input label',
33
- placeholder: "Type here",
34
- readonly: false,
35
- helperText: "Input any text"
36
- }
37
- }`,...(i=(o=n.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};var p,c,d;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{
38
- render: args => html\`
39
- \${variants.map(v => {
40
- return html\`
41
- <spectric-input
42
- label=\${ifDefined(toTitleCase(v + " Input"))}
43
- ?disabled=\${args.disabled}
44
- variant=\${v}
45
-
46
- @change=\${e => {
47
- console.log(e);
48
- }}
49
- >
50
- \${v}
51
- </spectric-input>\`;
52
- })}
53
- \`,
54
- args: {
55
- showPasswordVisibilityToggle: true,
56
- variant: "text"
57
- }
58
- }`,...(d=(c=r.parameters)==null?void 0:c.docs)==null?void 0:d.source}}};const y=["Basic","Variants"];export{n as Basic,r as Variants,y as __namedExportsOrder,x as default};
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const T=globalThis,D=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),V=new WeakMap;let tt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(D&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=V.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&V.set(e,t))}return t}toString(){return this.cssText}};const ot=n=>new tt(typeof n=="string"?n:n+"",void 0,I),wt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,o)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[o+1],n[0]);return new tt(e,n,I)},ht=(n,t)=>{if(D)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=T.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)}},W=D?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ot(e)})(n):n;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:at,defineProperty:lt,getOwnPropertyDescriptor:ct,getOwnPropertyNames:dt,getOwnPropertySymbols:pt,getPrototypeOf:$t}=Object,f=globalThis,q=f.trustedTypes,ut=q?q.emptyScript:"",M=f.reactiveElementPolyfillSupport,b=(n,t)=>n,B={toAttribute(n,t){switch(t){case Boolean:n=n?ut:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},et=(n,t)=>!at(n,t),J={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:et};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),f.litPropertyMetadata??(f.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=J){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&lt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=ct(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return i==null?void 0:i.call(this)},set(r){const l=i==null?void 0:i.call(this);o.call(this,r),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??J}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=$t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const e=this.properties,s=[...dt(e),...pt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(W(i))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ht(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:B).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const r=s.getPropertyOptions(i),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((o=r.converter)==null?void 0:o.fromAttribute)!==void 0?r.converter:B;this._$Em=i,this[i]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??et)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,r]of i)r.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,M==null||M({ReactiveElement:y}),(f.reactiveElementVersions??(f.reactiveElementVersions=[])).push("2.0.4");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const C=globalThis,N=C.trustedTypes,K=N?N.createPolicy("lit-html",{createHTML:n=>n}):void 0,st="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+_,_t=`<${it}>`,g=document,w=()=>g.createComment(""),P=n=>n===null||typeof n!="object"&&typeof n!="function",j=Array.isArray,ft=n=>j(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",k=`[
14
- \f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,F=/>/g,A=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,nt=/^(?:script|style|textarea|title)$/i,At=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),Pt=At(1),v=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),X=new WeakMap,m=g.createTreeWalker(g,129);function rt(n,t){if(!j(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return K!==void 0?K.createHTML(t):t}const mt=(n,t)=>{const e=n.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",r=S;for(let l=0;l<e;l++){const h=n[l];let c,p,a=-1,$=0;for(;$<h.length&&(r.lastIndex=$,p=r.exec(h),p!==null);)$=r.lastIndex,r===S?p[1]==="!--"?r=Z:p[1]!==void 0?r=F:p[2]!==void 0?(nt.test(p[2])&&(i=RegExp("</"+p[2],"g")),r=A):p[3]!==void 0&&(r=A):r===A?p[0]===">"?(r=i??S,a=-1):p[1]===void 0?a=-2:(a=r.lastIndex-p[2].length,c=p[1],r=p[3]===void 0?A:p[3]==='"'?Q:G):r===Q||r===G?r=A:r===Z||r===F?r=S:(r=A,i=void 0);const u=r===A&&n[l+1].startsWith("/>")?" ":"";o+=r===S?h+_t:a>=0?(s.push(c),h.slice(0,a)+st+h.slice(a)+_+u):h+_+(a===-2?l:u)}return[rt(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class U{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const l=t.length-1,h=this.parts,[c,p]=mt(t,e);if(this.el=U.createElement(c,s),m.currentNode=this.el.content,e===2||e===3){const a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(i=m.nextNode())!==null&&h.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const a of i.getAttributeNames())if(a.endsWith(st)){const $=p[r++],u=i.getAttribute(a).split(_),H=/([.?@])?(.*)/.exec($);h.push({type:1,index:o,name:H[2],strings:u,ctor:H[1]==="."?yt:H[1]==="?"?vt:H[1]==="@"?Et:R}),i.removeAttribute(a)}else a.startsWith(_)&&(h.push({type:6,index:o}),i.removeAttribute(a));if(nt.test(i.tagName)){const a=i.textContent.split(_),$=a.length-1;if($>0){i.textContent=N?N.emptyScript:"";for(let u=0;u<$;u++)i.append(a[u],w()),m.nextNode(),h.push({type:2,index:++o});i.append(a[$],w())}}}else if(i.nodeType===8)if(i.data===it)h.push({type:2,index:o});else{let a=-1;for(;(a=i.data.indexOf(_,a+1))!==-1;)h.push({type:7,index:o}),a+=_.length-1}o++}}static createElement(t,e){const s=g.createElement("template");return s.innerHTML=t,s}}function E(n,t,e=n,s){var r,l;if(t===v)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const o=P(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=E(n,i._$AS(n,t.values),i,s)),t}class gt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??g).importNode(e,!0);m.currentNode=i;let o=m.nextNode(),r=0,l=0,h=s[0];for(;h!==void 0;){if(r===h.index){let c;h.type===2?c=new x(o,o.nextSibling,this,t):h.type===1?c=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(c=new St(o,this,t)),this._$AV.push(c),h=s[++l]}r!==(h==null?void 0:h.index)&&(o=m.nextNode(),r++)}return m.currentNode=g,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),P(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ft(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement(rt(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const r=new gt(i,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=X.get(t.strings);return e===void 0&&X.set(t.strings,e=new U(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new x(this.O(w()),this.O(w()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(o===void 0)t=E(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{const l=t;let h,c;for(t=o[0],h=0;h<o.length-1;h++)c=E(this,l[s+h],e,h),c===v&&(c=this._$AH[h]),r||(r=!P(c)||c!==this._$AH[h]),c===d?t=d:t!==d&&(t+=(c??"")+o[h+1]),this._$AH[h]=c}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class vt extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Et extends R{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??d)===v)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class St{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const L=C.litHtmlPolyfillSupport;L==null||L(U,x),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.2.1");const bt=(n,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new x(t.insertBefore(w(),o),o,void 0,e??{})}return i._$AI(n),i};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */class O extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}}var Y;O._$litElement$=!0,O.finalized=!0,(Y=globalThis.litElementHydrateSupport)==null||Y.call(globalThis,{LitElement:O});const z=globalThis.litElementPolyfillSupport;z==null||z({LitElement:O});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");export{bt as B,d as E,v as T,et as f,wt as i,O as r,B as u,Pt as x};