@mgdis/stencil-helpers 2.2.2 → 2.2.4

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.
package/dist/index.umd.js CHANGED
@@ -1,24 +1,24 @@
1
- (function(c,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(c=typeof globalThis<"u"?globalThis:c||self,p(c.StencilHelpersModule={}))})(this,function(c){"use strict";var ht=Object.defineProperty;var me=c=>{throw TypeError(c)};var yt=(c,p,m)=>p in c?ht(c,p,{enumerable:!0,configurable:!0,writable:!0,value:m}):c[p]=m;var y=(c,p,m)=>yt(c,typeof p!="symbol"?p+"":p,m),vt=(c,p,m)=>p.has(c)||me("Cannot "+m);var O=(c,p,m)=>(vt(c,p,"read from private field"),m?m.call(c):p.get(c)),Q=(c,p,m)=>p.has(c)?me("Cannot add the same private member more than once"):p instanceof WeakSet?p.add(c):p.set(c,m);var E,W;const p=(e="",t=10)=>{const s=new Uint8Array(t);crypto.getRandomValues(s);const r=Array.from(s).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,t);return e!==""?`${e}-${r}`:r},m=e=>J(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null;class be{constructor(t=[]){y(this,"classes");y(this,"add",t=>{this.has(t)||this.classes.push(t)});y(this,"delete",t=>{const s=this.classes.indexOf(t);s>-1&&this.classes.splice(s,1)});y(this,"has",t=>this.classes.includes(t));y(this,"join",()=>this.classes.join(" "));this.classes=t}}const Se=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),Te=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),ke='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',Ae=e=>{const t=B(e),s=Z(e);return[e,...t,...s]},B=(e,t=[])=>{if(e.self!==e.top)try{const s=e.parent;return s?(t.push(s),B(s,t)):t}catch(s){return console.error("Different hosts between iframes:",s),t}return t},Z=(e,t=[])=>{if(e.frames.length>0)for(const s of Array.from(e.frames))t.push(s),Z(s,t);return t},J=e=>typeof e=="string"&&e.trim()!=="",Ee=e=>typeof e=="object"?JSON.stringify(e):`${e}`,je=e=>typeof e=="number"&&!Number.isNaN(e),Le=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,Oe=async e=>e();var F={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,formAssociated:!1,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!0,asyncQueue:!1,transformTagName:!1,attachStyles:!0,experimentalSlotFixes:!1},_e=Object.defineProperty,Me=(e,t)=>{for(var s in t)_e(e,s,{get:t[s],enumerable:!0})},Re="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml",Y=(e,t)=>t in e,V="http://www.w3.org/1999/xlink",z=typeof window<"u"?window:{},x=z.document||{head:{}};z.HTMLElement;var j={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,r)=>e.addEventListener(t,s,r),rel:(e,t,s,r)=>e.removeEventListener(t,s,r),ce:(e,t)=>new CustomEvent(e,t)},Fe=e=>e!=null&&e!==void 0,ee=e=>(e=typeof e,e==="object"||e==="function"),xe={};Me(xe,{err:()=>te,map:()=>De,ok:()=>I,unwrap:()=>Ce,unwrapErr:()=>we});var I=e=>({isOk:!0,isErr:!1,value:e}),te=e=>({isOk:!1,isErr:!0,value:e});function De(e,t){if(e.isOk){const s=t(e.value);return s instanceof Promise?s.then(r=>I(r)):I(s)}if(e.isErr){const s=e.value;return te(s)}throw"should never get here"}var Ce=e=>{if(e.isOk)return e.value;throw e.value},we=e=>{if(e.isErr)return e.value;throw e.value},se=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&re(t,e.tagName).forEach(s=>{var r;s.nodeType===1&&s.tagName==="SLOT-FB"&&((r=Ue(s,s["s-sn"],!1))!=null&&r.length?s.hidden=!0:s.hidden=!1)});for(const s of t)s.nodeType===1&&(s.__childNodes||s.childNodes).length&&se(s)},re=(e,t,s)=>{let r=0,n=[],l;for(;r<e.length;r++)l=e[r],l["s-sr"]&&l["s-hn"]===t&&n.push(l),n=[...n,...re(l.childNodes,t)];return n},Ue=(e,t,s=!0)=>{const r=[];for((s&&e["s-sr"]||!e["s-sr"])&&r.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)r.push(e);return r},ne=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",Pe=(e,t,...s)=>{let r=null,n=null,l=null,i=!1,d=!1;const a=[],g=o=>{for(let $=0;$<o.length;$++)r=o[$],Array.isArray(r)?g(r):r!=null&&typeof r!="boolean"&&((i=!ee(r))&&(r=String(r)),i&&d?a[a.length-1].$text$+=r:a.push(i?G(null,r):r),d=i)};g(s);const u=G(e,null);return u.$attrs$=t,a.length>0&&(u.$children$=a),u.$key$=n,u.$name$=l,u},G=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},He={},We=e=>e&&e.$tag$===He,ie=(e,t,s,r,n,l)=>{if(s!==r){let i=Y(e,t),d=t.toLowerCase();if(t==="class"){const a=e.classList,g=le(s);let u=le(r);e["s-si"]?(u.push(e["s-si"]),g.forEach(o=>{o.startsWith(e["s-si"])&&u.push(o)}),u=[...new Set(u)],a.add(...u),delete e["s-si"]):(a.remove(...g.filter(o=>o&&!u.includes(o))),a.add(...u.filter(o=>o&&!g.includes(o))))}else if(t==="style"){for(const a in s)(!r||r[a]==null)&&(a.includes("-")?e.style.removeProperty(a):e.style[a]="");for(const a in r)(!s||r[a]!==s[a])&&(a.includes("-")?e.style.setProperty(a,r[a]):e.style[a]=r[a])}else if(t!=="key")if(t==="ref")r&&r(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Y(z,d)?t=d.slice(2):t=d[2]+t.slice(3),s||r){const a=t.endsWith(oe);t=t.replace(Be,""),s&&j.rel(e,t,s,a),r&&j.ael(e,t,r,a)}}else{const a=ee(r);if((i||a&&r!==null)&&!n)try{if(e.tagName.includes("-"))e[t]=r;else{const u=r??"";t==="list"?i=!1:(s==null||e[t]!=u)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=u:e.setAttribute(t,u))}}catch{}let g=!1;d!==(d=d.replace(/^xlink\:?/,""))&&(t=d,g=!0),r==null||r===!1?(r!==!1||e.getAttribute(t)==="")&&(g?e.removeAttributeNS(V,t):e.removeAttribute(t)):(!i||l&4||n)&&!a&&(r=r===!0?"":r,g?e.setAttributeNS(V,t,r):e.setAttribute(t,r))}}},qe=/\s/,le=e=>(typeof e=="object"&&"baseVal"in e&&(e=e.baseVal),e?e.split(qe):[]),oe="Capture",Be=new RegExp(oe+"$"),ae=(e,t,s)=>{const r=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,n=e&&e.$attrs$||{},l=t.$attrs$||{};for(const i of ce(Object.keys(n)))i in l||ie(r,i,n[i],void 0,s,t.$flags$);for(const i of ce(Object.keys(l)))ie(r,i,n[i],l[i],s,t.$flags$)};function ce(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var D,C,_,w=!1,U=!1,X=!1,b=!1,P=(e,t,s)=>{var r;const n=t.$children$[s];let l=0,i,d,a;if(w||(X=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)i=n.$elm$=x.createTextNode(n.$text$);else if(n.$flags$&1)i=n.$elm$=x.createTextNode("");else{if(b||(b=n.$tag$==="svg"),i=n.$elm$=x.createElementNS(b?Re:Ne,!w&&F.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),b&&n.$tag$==="foreignObject"&&(b=!1),ae(null,n,b),Fe(D)&&i["s-si"]!==D&&i.classList.add(i["s-si"]=D),n.$children$)for(l=0;l<n.$children$.length;++l)d=P(e,n,l),d&&i.appendChild(d);n.$tag$==="svg"?b=!1:i.tagName==="foreignObject"&&(b=!0)}return i["s-hn"]=_,n.$flags$&3&&(i["s-sr"]=!0,i["s-cr"]=C,i["s-sn"]=n.$name$||"",i["s-rf"]=(r=n.$attrs$)==null?void 0:r.ref,a=e&&e.$children$&&e.$children$[s],a&&a.$tag$===n.$tag$&&e.$elm$&&M(e.$elm$,!1),ge(C,i,t.$elm$,e==null?void 0:e.$elm$)),i},M=(e,t)=>{j.$flags$|=1;const s=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&F.experimentalSlotFixes;for(let r=s.length-1;r>=0;r--){const n=s[r];n["s-hn"]!==_&&n["s-ol"]&&(A(R(n).parentNode,n,R(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,X=!0),t&&M(n,t)}j.$flags$&=-2},fe=(e,t,s,r,n,l)=>{let i=e["s-cr"]&&e["s-cr"].parentNode||e,d;for(i.shadowRoot&&i.tagName===_&&(i=i.shadowRoot);n<=l;++n)r[n]&&(d=P(null,s,n),d&&(r[n].$elm$=d,A(i,d,R(t))))},ue=(e,t,s)=>{for(let r=t;r<=s;++r){const n=e[r];if(n){const l=n.$elm$;$e(n),l&&(U=!0,l["s-ol"]?l["s-ol"].remove():M(l,!0),l.remove())}}},ze=(e,t,s,r,n=!1)=>{let l=0,i=0,d=0,a=0,g=t.length-1,u=t[0],o=t[g],$=r.length-1,f=r[0],h=r[$],k,S;for(;l<=g&&i<=$;)if(u==null)u=t[++l];else if(o==null)o=t[--g];else if(f==null)f=r[++i];else if(h==null)h=r[--$];else if(H(u,f,n))L(u,f,n),u=t[++l],f=r[++i];else if(H(o,h,n))L(o,h,n),o=t[--g],h=r[--$];else if(H(u,h,n))(u.$tag$==="slot"||h.$tag$==="slot")&&M(u.$elm$.parentNode,!1),L(u,h,n),A(e,u.$elm$,o.$elm$.nextSibling),u=t[++l],h=r[--$];else if(H(o,f,n))(u.$tag$==="slot"||h.$tag$==="slot")&&M(o.$elm$.parentNode,!1),L(o,f,n),A(e,o.$elm$,u.$elm$),o=t[--g],f=r[++i];else{for(d=-1,a=l;a<=g;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===f.$key$){d=a;break}d>=0?(S=t[d],S.$tag$!==f.$tag$?k=P(t&&t[i],s,d):(L(S,f,n),t[d]=void 0,k=S.$elm$),f=r[++i]):(k=P(t&&t[i],s,i),f=r[++i]),k&&A(R(u.$elm$).parentNode,k,R(u.$elm$))}l>g?fe(e,r[$+1]==null?null:r[$+1].$elm$,s,r,i,$):i>$&&ue(t,l,g)},H=(e,t,s=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:s?(s&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,R=e=>e&&e["s-ol"]||e,L=(e,t,s=!1)=>{const r=t.$elm$=e.$elm$,n=e.$children$,l=t.$children$,i=t.$tag$,d=t.$text$;let a;d===null?(b=i==="svg"?!0:i==="foreignObject"?!1:b,i==="slot"&&!w||ae(e,t,b),n!==null&&l!==null?ze(r,n,t,l,s):l!==null?(e.$text$!==null&&(r.textContent=""),fe(r,null,t,l,0,l.length-1)):!s&&F.updatable&&n!==null&&ue(n,0,n.length-1),b&&i==="svg"&&(b=!1)):(a=r["s-cr"])?a.parentNode.textContent=d:e.$text$!==d&&(r.data=d)},T=[],de=e=>{let t,s,r;const n=e.__childNodes||e.childNodes;for(const l of n){if(l["s-sr"]&&(t=l["s-cr"])&&t.parentNode){s=t.parentNode.__childNodes||t.parentNode.childNodes;const i=l["s-sn"];for(r=s.length-1;r>=0;r--)if(t=s[r],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==l["s-hn"])if(ne(t,i)){let d=T.find(a=>a.$nodeToRelocate$===t);U=!0,t["s-sn"]=t["s-sn"]||i,d?(d.$nodeToRelocate$["s-sh"]=l["s-hn"],d.$slotRefNode$=l):(t["s-sh"]=l["s-hn"],T.push({$slotRefNode$:l,$nodeToRelocate$:t})),t["s-sr"]&&T.map(a=>{ne(a.$nodeToRelocate$,t["s-sn"])&&(d=T.find(g=>g.$nodeToRelocate$===t),d&&!a.$slotRefNode$&&(a.$slotRefNode$=d.$slotRefNode$))})}else T.some(d=>d.$nodeToRelocate$===t)||T.push({$nodeToRelocate$:t})}l.nodeType===1&&de(l)}},$e=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map($e)},A=(e,t,s)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&ge(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,s));function ge(e,t,s,r){var n;let l;if(e&&typeof t["s-sn"]=="string"&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(l=t["s-si"]||e.parentNode["s-sc"])){const i=t["s-sn"],d=t["s-hn"];if((n=s.classList)==null||n.add(l+"-s"),r&&r.classList.contains(l+"-s")){let a=(r.__childNodes||r.childNodes)[0],g=!1;for(;a;){if(a["s-sn"]!==i&&a["s-hn"]===d&&a["s-sr"]){g=!0;break}a=a.nextSibling}g||r.classList.remove(l+"-s")}}}var Ie=(e,t,s=!1)=>{var r,n,l,i,d;const a=e.$hostElement$,g=e.$cmpMeta$,u=e.$vnode$||G(null,null),o=We(t)?t:Pe(null,null,t);if(_=a.tagName,g.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},g.$attrsToReflect$.map(([$,f])=>o.$attrs$[f]=a[$])),s&&o.$attrs$)for(const $ of Object.keys(o.$attrs$))a.hasAttribute($)&&!["key","ref","style","class"].includes($)&&(o.$attrs$[$]=a[$]);o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=u.$elm$=a.shadowRoot||a,D=a["s-sc"],w=(g.$flags$&1)!==0,C=a["s-cr"],U=!1,L(u,o,s);{if(j.$flags$|=1,X){de(o.$elm$);for(const $ of T){const f=$.$nodeToRelocate$;if(!f["s-ol"]){const h=x.createTextNode("");h["s-nr"]=f,A(f.parentNode,f["s-ol"]=h,f)}}for(const $ of T){const f=$.$nodeToRelocate$,h=$.$slotRefNode$;if(h){const k=h.parentNode;let S=h.nextSibling;{let q=(r=f["s-ol"])==null?void 0:r.previousSibling;for(;q;){let v=(n=q["s-nr"])!=null?n:null;if(v&&v["s-sn"]===f["s-sn"]&&k===v.parentNode){for(v=v.nextSibling;v===f||v!=null&&v["s-sr"];)v=v==null?void 0:v.nextSibling;if(!v||!v["s-nr"]){S=v;break}}q=q.previousSibling}}(!S&&k!==f.parentNode||f.nextSibling!==S)&&f!==S&&(!f["s-hn"]&&f["s-ol"]&&(f["s-hn"]=f["s-ol"].parentNode.nodeName),A(k,f,S),f.nodeType===1&&f.tagName!=="SLOT-FB"&&(f.hidden=(l=f["s-ih"])!=null?l:!1)),f&&typeof h["s-rf"]=="function"&&h["s-rf"](f)}else f.nodeType===1&&(s&&(f["s-ih"]=(i=f.hidden)!=null?i:!1),f.hidden=!0)}}U&&se(o.$elm$),j.$flags$&=-2,T.length=0}if(F.experimentalScopedSlotChanges&&g.$flags$&2){const $=o.$elm$.__childNodes||o.$elm$.childNodes;for(const f of $)f["s-hn"]!==_&&!f["s-sh"]&&(s&&f["s-ih"]==null&&(f["s-ih"]=(d=f.hidden)!=null?d:!1),f.hidden=!0)}C=void 0};const Ge=(e,t,s)=>{[null,void 0,"",!1].includes(s)||["innerHTML","style"].includes(t)||e.setAttribute(t,["object","function"].includes(typeof s)?"/!\\ Object props are not rendered in the code example":s)},pe=(e,t,s,r,n)=>{if(t&&typeof t=="string"){const l=document.createElement(t);Object.keys(s||{}).forEach(i=>{Ge(l,i,s[i])}),r==null||r.forEach(i=>{pe(l,i.$tag$,i.$attrs$,i.$children$,i.$text$)}),s!=null&&s.innerHTML&&(l.innerHTML=s.innerHTML),e.appendChild(l)}n&&(e.innerHTML=n)},Xe=(e,t)=>{const s={};if(typeof e!="object")throw new Error("filterArgs - args isn't an object.");for(const r in e)if(!r.startsWith("slot")){const n=e[r],l=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!t||!Object.keys(t).includes(r)||t[r]!==n)&&(s[l]=n)}return s},Ke=(e,t)=>{var r,n;const s=document.getElementById("storybook-root");if(s!==null)return(n=document.querySelector("[lang]"))==null||n.setAttribute("lang",((r=t.globals)==null?void 0:r.locale)||"en"),Ie({$ancestorComponent$:void 0,$flags$:0,$modeName$:void 0,$cmpMeta$:{$flags$:0,$tagName$:s.tagName},$hostElement$:s},e(t)),s.children[s.children.length-1]},Qe=({$tag$:e,$attrs$:t,$children$:s,$text$:r})=>{const n=document.createElement("div");return pe(n,e,t,s,r),n.innerHTML},N=(e,t)=>{if(!t)return;const s=t.split("/");return`${e}${s.slice(2,s.length-1).join("-")}--docs`};class Ze{constructor(t){y(this,"jsonDoc");Q(this,E,t=>this.jsonDoc.components.find(s=>s.tag===t));Q(this,W,t=>{const s=t.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,r=>r.replace(/\|/g," OR ")).split("|").map(r=>r.trim().replace(/ OR /g,"|"));return t.type==="string"?{control:{type:"text"}}:t.type==="number"?{control:{type:"number"}}:t.type==="boolean"?{control:{type:"boolean"}}:t.type.startsWith("{")&&t.type.endsWith("}")?{control:{type:"object"}}:s.length>1?s.includes("string")?{control:{type:"text"}}:s.every(r=>r==null?void 0:r.includes("[]"))?{control:{type:"object"}}:(s.unshift(void 0),{control:{type:"select"},options:s}):{control:{type:"object"}}});y(this,"extractArgTypes",t=>{const s=O(this,E).call(this,t),r=s==null?void 0:s.props.reduce((u,o)=>{const{control:$,options:f}=O(this,W).call(this,o);return{...u,[o.name]:{name:o.attr||o.name,description:o.docs,type:{required:o.required},table:{category:"props",type:{summary:o.type},defaultValue:{summary:o.default}},control:$,options:f}}},{}),n=s==null?void 0:s.events.reduce((u,o)=>({...u,[o.event]:{name:o.event,description:o.docs,table:{category:"events",type:{summary:o.detail}}}}),{}),l=s==null?void 0:s.methods.reduce((u,o)=>({...u,[o.name]:{name:o.name,description:o.docs,table:{category:"methods",type:{summary:o.signature}}}}),{}),i=s==null?void 0:s.slots.reduce((u,o)=>({...u,[o.name]:{name:o.name!==""?o.name:"default",description:o.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),d=s==null?void 0:s.styles.reduce((u,o)=>({...u,[o.name]:{name:o.name,description:o.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),a=s==null?void 0:s.dependencies.reduce((u,o)=>{const $=O(this,E).call(this,o);return{...u,[o]:{name:o,description:`<a href="./?path=/docs/${N("",$==null?void 0:$.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}},{}),g=s==null?void 0:s.dependents.reduce((u,o)=>{const $=O(this,E).call(this,o);return{...u,[o]:{name:o,description:`<a href="./?path=/docs/${N("",$==null?void 0:$.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}},{});return{...r,...n,...l,...i,...d,...a,...g}});y(this,"extractComponentDescription",t=>{const s=O(this,E).call(this,t);return(s==null?void 0:s.readme)||(s==null?void 0:s.docs)});this.jsonDoc=t}}E=new WeakMap,W=new WeakMap;const Je=(e,t)=>{if(t)return`${e}${t}`},he=e=>{let t=e.overview?`${e.overview}
1
+ (function(a,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(a=typeof globalThis<"u"?globalThis:a||self,p(a.StencilHelpersModule={}))})(this,function(a){"use strict";var ht=Object.defineProperty;var me=a=>{throw TypeError(a)};var mt=(a,p,m)=>p in a?ht(a,p,{enumerable:!0,configurable:!0,writable:!0,value:m}):a[p]=m;var y=(a,p,m)=>mt(a,typeof p!="symbol"?p+"":p,m),bt=(a,p,m)=>p.has(a)||me("Cannot "+m);var O=(a,p,m)=>(bt(a,p,"read from private field"),m?m.call(a):p.get(a)),Z=(a,p,m)=>p.has(a)?me("Cannot add the same private member more than once"):p instanceof WeakSet?p.add(a):p.set(a,m);var _,w;const p=(e="",t=10)=>{const s=new Uint8Array(t);crypto.getRandomValues(s);const r=Array.from(s).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,t);return e!==""?`${e}-${r}`:r},m=e=>K(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null;class be{constructor(t=[]){y(this,"classes");y(this,"add",t=>{this.has(t)||this.classes.push(t)});y(this,"delete",t=>{const s=this.classes.indexOf(t);s>-1&&this.classes.splice(s,1)});y(this,"has",t=>this.classes.includes(t));y(this,"join",()=>this.classes.join(" "));this.classes=t}}const Se=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),ke=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),Te='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',Ee=e=>{const t=I(e),s=J(e);return[e,...t,...s]},I=(e,t=[])=>{if(e.self!==e.top)try{const s=e.parent;return s?(t.push(s),I(s,t)):t}catch(s){return console.error("Different hosts between iframes:",s),t}return t},J=(e,t=[])=>{if(e.frames.length>0)for(const s of Array.from(e.frames))t.push(s),J(s,t);return t},K=e=>typeof e=="string"&&e.trim()!=="",_e=e=>typeof e=="object"?JSON.stringify(e):`${e}`,Ae=e=>typeof e=="number"&&!Number.isNaN(e),je=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,Oe=async e=>e();var F={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},Me=Object.defineProperty,Re=(e,t)=>{for(var s in t)Me(e,s,{get:t[s],enumerable:!0})},Le="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml",Q=(e,t)=>t in e,Y="http://www.w3.org/1999/xlink",V=typeof window<"u"?window:{},x=V.document||{head:{}},A={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,r)=>e.addEventListener(t,s,r),rel:(e,t,s,r)=>e.removeEventListener(t,s,r),ce:(e,t)=>new CustomEvent(e,t)},Fe=e=>e!=null&&e!==void 0,ee=e=>(e=typeof e,e==="object"||e==="function"),xe={};Re(xe,{err:()=>te,map:()=>Ce,ok:()=>W,unwrap:()=>De,unwrapErr:()=>He});var W=e=>({isOk:!0,isErr:!1,value:e}),te=e=>({isOk:!1,isErr:!0,value:e});function Ce(e,t){if(e.isOk){const s=t(e.value);return s instanceof Promise?s.then(r=>W(r)):W(s)}if(e.isErr){const s=e.value;return te(s)}throw"should never get here"}var De=e=>{if(e.isOk)return e.value;throw e.value},He=e=>{if(e.isErr)return e.value;throw e.value},se=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&re(t,e.tagName).forEach(s=>{var r;s.nodeType===1&&s.tagName==="SLOT-FB"&&((r=Ue(s,s["s-sn"],!1))!=null&&r.length?s.hidden=!0:s.hidden=!1)});for(const s of t)s.nodeType===1&&(s.__childNodes||s.childNodes).length&&se(s)};function re(e,t,s){let r=0,n=[],i;for(;r<e.length;r++)i=e[r],i["s-sr"]&&i["s-hn"]===t&&s===void 0&&n.push(i),n=[...n,...re(i.childNodes,t,s)];return n}var Ue=(e,t,s=!0)=>{const r=[];for((s&&e["s-sr"]||!e["s-sr"])&&r.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)r.push(e);return r},ne=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",Pe=(e,t,...s)=>{let r=null,n=null,i=null,o=!1,$=!1;const f=[],u=l=>{for(let g=0;g<l.length;g++)r=l[g],Array.isArray(r)?u(r):r!=null&&typeof r!="boolean"&&((o=!ee(r))&&(r=String(r)),o&&$?f[f.length-1].$text$+=r:f.push(o?z(null,r):r),$=o)};u(s);const d=z(e,null);return d.$attrs$=t,f.length>0&&(d.$children$=f),d.$key$=n,d.$name$=i,d},z=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},qe={},we=e=>e&&e.$tag$===qe,ie=(e,t,s,r,n,i,o)=>{if(s!==r){let $=Q(e,t),f=t.toLowerCase();if(t==="class"){const u=e.classList,d=oe(s);let l=oe(r);u.remove(...d.filter(g=>g&&!l.includes(g))),u.add(...l.filter(g=>g&&!d.includes(g)))}else if(t==="style"){for(const u in s)(!r||r[u]==null)&&(u.includes("-")?e.style.removeProperty(u):e.style[u]="");for(const u in r)(!s||r[u]!==s[u])&&(u.includes("-")?e.style.setProperty(u,r[u]):e.style[u]=r[u])}else if(t!=="key")if(t==="ref")r&&r(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Q(V,f)?t=f.slice(2):t=f[2]+t.slice(3),s||r){const u=t.endsWith(le);t=t.replace(Ie,""),s&&A.rel(e,t,s,u),r&&A.ael(e,t,r,u)}}else{const u=ee(r);if(($||u&&r!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==r&&(e[t]=r);else{const l=r??"";t==="list"?$=!1:(s==null||e[t]!=l)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=l:e.setAttribute(t,l))}}catch{}let d=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(t=f,d=!0),r==null||r===!1?(r!==!1||e.getAttribute(t)==="")&&(d?e.removeAttributeNS(Y,t):e.removeAttribute(t)):(!$||i&4||n)&&!u&&(r=r===!0?"":r,d?e.setAttributeNS(Y,t,r):e.setAttribute(t,r))}}},Be=/\s/,oe=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split(Be)),le="Capture",Ie=new RegExp(le+"$"),ae=(e,t,s,r)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},o=t.$attrs$||{};for(const $ of ce(Object.keys(i)))$ in o||ie(n,$,i[$],void 0,s,t.$flags$);for(const $ of ce(Object.keys(o)))ie(n,$,i[$],o[$],s,t.$flags$)};function ce(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var C,D,M,H=!1,U=!1,G=!1,b=!1,P=(e,t,s)=>{var r;const n=t.$children$[s];let i=0,o,$,f;if(H||(G=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=x.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=x.createTextNode("");else{if(b||(b=n.$tag$==="svg"),o=n.$elm$=x.createElementNS(b?Le:Ne,!H&&F.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),b&&n.$tag$==="foreignObject"&&(b=!1),ae(null,n,b),Fe(C)&&o["s-si"]!==C&&o.classList.add(o["s-si"]=C),n.$children$)for(i=0;i<n.$children$.length;++i)$=P(e,n,i),$&&o.appendChild($);n.$tag$==="svg"?b=!1:o.tagName==="foreignObject"&&(b=!0)}return o["s-hn"]=M,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=D,o["s-sn"]=n.$name$||"",o["s-rf"]=(r=n.$attrs$)==null?void 0:r.ref,f=e&&e.$children$&&e.$children$[s],f&&f.$tag$===n.$tag$&&e.$elm$&&R(e.$elm$,!1),ge(D,o,t.$elm$,e==null?void 0:e.$elm$)),o},R=(e,t)=>{A.$flags$|=1;const s=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&F.experimentalSlotFixes;for(let r=s.length-1;r>=0;r--){const n=s[r];n["s-hn"]!==M&&n["s-ol"]&&(E(L(n).parentNode,n,L(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,G=!0),t&&R(n,t)}A.$flags$&=-2},fe=(e,t,s,r,n,i)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,$;for(o.shadowRoot&&o.tagName===M&&(o=o.shadowRoot);n<=i;++n)r[n]&&($=P(null,s,n),$&&(r[n].$elm$=$,E(o,$,L(t))))},$e=(e,t,s)=>{for(let r=t;r<=s;++r){const n=e[r];if(n){const i=n.$elm$;de(n),i&&(U=!0,i["s-ol"]?i["s-ol"].remove():R(i,!0),i.remove())}}},We=(e,t,s,r,n=!1)=>{let i=0,o=0,$=0,f=0,u=t.length-1,d=t[0],l=t[u],g=r.length-1,c=r[0],v=r[g],T,S;for(;i<=u&&o<=g;)if(d==null)d=t[++i];else if(l==null)l=t[--u];else if(c==null)c=r[++o];else if(v==null)v=r[--g];else if(q(d,c,n))j(d,c,n),d=t[++i],c=r[++o];else if(q(l,v,n))j(l,v,n),l=t[--u],v=r[--g];else if(q(d,v,n))(d.$tag$==="slot"||v.$tag$==="slot")&&R(d.$elm$.parentNode,!1),j(d,v,n),E(e,d.$elm$,l.$elm$.nextSibling),d=t[++i],v=r[--g];else if(q(l,c,n))(d.$tag$==="slot"||v.$tag$==="slot")&&R(l.$elm$.parentNode,!1),j(l,c,n),E(e,l.$elm$,d.$elm$),l=t[--u],c=r[++o];else{for($=-1,f=i;f<=u;++f)if(t[f]&&t[f].$key$!==null&&t[f].$key$===c.$key$){$=f;break}$>=0?(S=t[$],S.$tag$!==c.$tag$?T=P(t&&t[o],s,$):(j(S,c,n),t[$]=void 0,T=S.$elm$),c=r[++o]):(T=P(t&&t[o],s,o),c=r[++o]),T&&E(L(d.$elm$).parentNode,T,L(d.$elm$))}i>u?fe(e,r[g+1]==null?null:r[g+1].$elm$,s,r,o,g):o>g&&$e(t,i,u)},q=(e,t,s=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:s?(s&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,L=e=>e&&e["s-ol"]||e,j=(e,t,s=!1)=>{const r=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,o=t.$tag$,$=t.$text$;let f;$===null?(b=o==="svg"?!0:o==="foreignObject"?!1:b,o==="slot"&&!H||ae(e,t,b),n!==null&&i!==null?We(r,n,t,i,s):i!==null?(e.$text$!==null&&(r.textContent=""),fe(r,null,t,i,0,i.length-1)):!s&&F.updatable&&n!==null&&$e(n,0,n.length-1),b&&o==="svg"&&(b=!1)):(f=r["s-cr"])?f.parentNode.textContent=$:e.$text$!==$&&(r.data=$)},k=[],ue=e=>{let t,s,r;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){s=t.parentNode.__childNodes||t.parentNode.childNodes;const o=i["s-sn"];for(r=s.length-1;r>=0;r--)if(t=s[r],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==i["s-hn"])if(ne(t,o)){let $=k.find(f=>f.$nodeToRelocate$===t);U=!0,t["s-sn"]=t["s-sn"]||o,$?($.$nodeToRelocate$["s-sh"]=i["s-hn"],$.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],k.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&k.map(f=>{ne(f.$nodeToRelocate$,t["s-sn"])&&($=k.find(u=>u.$nodeToRelocate$===t),$&&!f.$slotRefNode$&&(f.$slotRefNode$=$.$slotRefNode$))})}else k.some($=>$.$nodeToRelocate$===t)||k.push({$nodeToRelocate$:t})}i.nodeType===1&&ue(i)}},de=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(de)},E=(e,t,s)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&ge(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,s));function ge(e,t,s,r){var n;let i;if(e&&typeof t["s-sn"]=="string"&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(i=t["s-si"]||e.parentNode["s-sc"])){const o=t["s-sn"],$=t["s-hn"];if((n=s.classList)==null||n.add(i+"-s"),r&&r.classList.contains(i+"-s")){let f=(r.__childNodes||r.childNodes)[0],u=!1;for(;f;){if(f["s-sn"]!==o&&f["s-hn"]===$&&f["s-sr"]){u=!0;break}f=f.nextSibling}u||r.classList.remove(i+"-s")}}}var ze=(e,t,s=!1)=>{var r,n,i,o,$;const f=e.$hostElement$,u=e.$cmpMeta$,d=e.$vnode$||z(null,null),l=we(t)?t:Pe(null,null,t);if(M=f.tagName,u.$attrsToReflect$&&(l.$attrs$=l.$attrs$||{},u.$attrsToReflect$.map(([g,c])=>l.$attrs$[c]=f[g])),s&&l.$attrs$)for(const g of Object.keys(l.$attrs$))f.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(l.$attrs$[g]=f[g]);l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=d.$elm$=f.shadowRoot||f,C=f["s-sc"],H=(u.$flags$&1)!==0,D=f["s-cr"],U=!1,j(d,l,s);{if(A.$flags$|=1,G){ue(l.$elm$);for(const g of k){const c=g.$nodeToRelocate$;if(!c["s-ol"]){const v=x.createTextNode("");v["s-nr"]=c,E(c.parentNode,c["s-ol"]=v,c)}}for(const g of k){const c=g.$nodeToRelocate$,v=g.$slotRefNode$;if(v){const T=v.parentNode;let S=v.nextSibling;{let B=(r=c["s-ol"])==null?void 0:r.previousSibling;for(;B;){let h=(n=B["s-nr"])!=null?n:null;if(h&&h["s-sn"]===c["s-sn"]&&T===(h.__parentNode||h.parentNode)){for(h=h.nextSibling;h===c||h!=null&&h["s-sr"];)h=h==null?void 0:h.nextSibling;if(!h||!h["s-nr"]){S=h;break}}B=B.previousSibling}}const vt=c.__parentNode||c.parentNode,yt=c.__nextSibling||c.nextSibling;(!S&&T!==vt||yt!==S)&&c!==S&&(!c["s-hn"]&&c["s-ol"]&&(c["s-hn"]=c["s-ol"].parentNode.nodeName),E(T,c,S),c.nodeType===1&&c.tagName!=="SLOT-FB"&&(c.hidden=(i=c["s-ih"])!=null?i:!1)),c&&typeof v["s-rf"]=="function"&&v["s-rf"](c)}else c.nodeType===1&&(s&&(c["s-ih"]=(o=c.hidden)!=null?o:!1),c.hidden=!0)}}U&&se(l.$elm$),A.$flags$&=-2,k.length=0}if(F.experimentalScopedSlotChanges&&u.$flags$&2){const g=l.$elm$.__childNodes||l.$elm$.childNodes;for(const c of g)c["s-hn"]!==M&&!c["s-sh"]&&(s&&c["s-ih"]==null&&(c["s-ih"]=($=c.hidden)!=null?$:!1),c.hidden=!0)}D=void 0};const Ge=(e,t,s)=>{[null,void 0,"",!1].includes(s)||["innerHTML","style"].includes(t)||e.setAttribute(t,["object","function"].includes(typeof s)?"/!\\ Object props are not rendered in the code example":s)},pe=(e,t,s,r,n)=>{if(t&&typeof t=="string"){const i=document.createElement(t);Object.keys(s||{}).forEach(o=>{Ge(i,o,s[o])}),r==null||r.forEach(o=>{pe(i,o.$tag$,o.$attrs$,o.$children$,o.$text$)}),s!=null&&s.innerHTML&&(i.innerHTML=s.innerHTML),e.appendChild(i)}n&&(e.innerHTML=n)},Xe=(e,t)=>{const s={};if(typeof e!="object")throw new Error("filterArgs - args isn't an object.");for(const r in e)if(!r.startsWith("slot")){const n=e[r],i=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!t||!Object.keys(t).includes(r)||t[r]!==n)&&(s[i]=n)}return s},Ze=(e,t)=>{var r,n;const s=document.getElementById("storybook-root");if(s!==null)return(n=document.querySelector("[lang]"))==null||n.setAttribute("lang",((r=t.globals)==null?void 0:r.locale)||"en"),ze({$cmpMeta$:{$flags$:0,$tagName$:s.tagName},$hostElement$:s},e(t)),s.children[s.children.length-1]},Je=({$tag$:e,$attrs$:t,$children$:s,$text$:r})=>{const n=document.createElement("div");return pe(n,e,t,s,r),n.innerHTML},N=(e,t)=>{if(!t)return;const s=t.split("/");return`${e}${s.slice(2,s.length-1).join("-")}--docs`};class Ke{constructor(t){y(this,"jsonDoc");Z(this,_,t=>this.jsonDoc.components.find(s=>s.tag===t));Z(this,w,t=>{const s=t.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,r=>r.replace(/\|/g," OR ")).split("|").map(r=>r.trim().replace(/ OR /g,"|"));return t.type==="string"?{control:{type:"text"}}:t.type==="number"?{control:{type:"number"}}:t.type==="boolean"?{control:{type:"boolean"}}:t.type.startsWith("{")&&t.type.endsWith("}")?{control:{type:"object"}}:s.length>1?s.includes("string")?{control:{type:"text"}}:s.every(r=>r==null?void 0:r.includes("[]"))?{control:{type:"object"}}:(s.unshift(void 0),{control:{type:"select"},options:s}):{control:{type:"object"}}});y(this,"extractArgTypes",t=>{const s=O(this,_).call(this,t),r=s==null?void 0:s.props.reduce((d,l)=>{const{control:g,options:c}=O(this,w).call(this,l);return{...d,[l.name]:{name:l.attr||l.name,description:l.docs,type:{required:l.required},table:{category:"props",type:{summary:l.type},defaultValue:{summary:l.default}},control:g,options:c}}},{}),n=s==null?void 0:s.events.reduce((d,l)=>({...d,[l.event]:{name:l.event,description:l.docs,table:{category:"events",type:{summary:l.detail}}}}),{}),i=s==null?void 0:s.methods.reduce((d,l)=>({...d,[l.name]:{name:l.name,description:l.docs,table:{category:"methods",type:{summary:l.signature}}}}),{}),o=s==null?void 0:s.slots.reduce((d,l)=>({...d,[l.name]:{name:l.name!==""?l.name:"default",description:l.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),$=s==null?void 0:s.styles.reduce((d,l)=>({...d,[l.name]:{name:l.name,description:l.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),f=s==null?void 0:s.dependencies.reduce((d,l)=>{const g=O(this,_).call(this,l);return{...d,[l]:{name:l,description:`<a href="./?path=/docs/${N("",g==null?void 0:g.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}},{}),u=s==null?void 0:s.dependents.reduce((d,l)=>{const g=O(this,_).call(this,l);return{...d,[l]:{name:l,description:`<a href="./?path=/docs/${N("",g==null?void 0:g.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}},{});return{...r,...n,...i,...o,...$,...f,...u}});y(this,"extractComponentDescription",t=>{const s=O(this,_).call(this,t);return(s==null?void 0:s.readme)||(s==null?void 0:s.docs)});this.jsonDoc=t}}_=new WeakMap,w=new WeakMap;const Qe=(e,t)=>{if(t)return`${e}${t}`},ve=e=>{let t=e.overview?`${e.overview}
2
2
 
3
3
  `:"";const s=e.props.filter(({attr:n})=>n!==void 0);s.length&&(t+=`Attributes:
4
- `,t+=s.map(({attr:n,docs:l})=>`- \`${n}\`: ${l}
4
+ `,t+=s.map(({attr:n,docs:i})=>`- \`${n}\`: ${i}
5
5
  `).join(""),t+=`
6
6
  `);const r=e.props.filter(({attr:n})=>n===void 0);return r.length&&(t+=`Properties:
7
- `,t+=r.map(({name:n,docs:l})=>`- \`${n}\`: ${l}
7
+ `,t+=r.map(({name:n,docs:i})=>`- \`${n}\`: ${i}
8
8
  `).join(""),t+=`
9
9
  `),e.methods.length&&(t+=`Methods:
10
- `,t+=e.methods.map(({name:n,docs:l})=>`- \`${n}\`: ${l}
10
+ `,t+=e.methods.map(({name:n,docs:i})=>`- \`${n}\`: ${i}
11
11
  `).join(""),t+=`
12
12
  `),e.events.length&&(t+=`Events:
13
- `,t+=e.events.map(({event:n,docs:l})=>`- \`${n}\`: ${l}
13
+ `,t+=e.events.map(({event:n,docs:i})=>`- \`${n}\`: ${i}
14
14
  `).join(""),t+=`
15
15
  `),e.listeners.length&&(t+=`Listeners:
16
16
  `,t+=e.listeners.map(({event:n})=>`- \`${n}\`
17
17
  `).join(""),t+=`
18
18
  `),e.slots.length&&(t+=`Slots:
19
- `,t+=e.slots.map(({name:n,docs:l})=>`- \`${n}\`: ${l}
19
+ `,t+=e.slots.map(({name:n,docs:i})=>`- \`${n}\`: ${i}
20
20
  `).join(""),t+=`
21
- `),t},K=e=>`${e.docs}
21
+ `),t},X=e=>`${e.docs}
22
22
 
23
- Type: \`${e.type}\``,Ye=(e,t,s,r)=>({$schema:"https://json.schemastore.org/web-types",name:e,version:t,"description-markup":"markdown",contributions:{html:{elements:s.components.map(n=>{const l=N(r,n.filePath);return{name:n.tag,description:he(n),"doc-url":l,attributes:n.props.filter(i=>i.attr).map(i=>({name:i.attr,description:K(i),"doc-url":l,value:{type:i.type,default:i.default,required:i.required}})),js:{properties:n.props.map(i=>({name:i.name,description:K(i),"doc-url":l,value:{type:i.type,default:i.default,required:i.required}})),events:n.events.map(i=>({name:i.event,description:i.docs}))},css:{properties:n.styles.map(i=>({name:i.name,description:i.docs}))}}})}}}),Ve=(e,t,s)=>[{name:"Storybook",url:N(e,s)},{name:"Sources",url:Je(t,s)}],et=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},tt=(e,t,s)=>({version:1.1,tags:e.components.map(r=>{const n=Ve(t,s,r.filePath);return{name:r.tag,description:he(r),attributes:r.props.map(l=>({name:l.attr||l.name,description:K(l),values:et(l),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),st=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(s=>({name:s.name,description:s.docs})))}),rt=e=>{const t={value:"2023",pattern:"yyyy"},s={value:"12",pattern:"mm"},r={value:"24",pattern:"dd"};return ve([t.value,s.value,r.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(s.value,s.pattern).replace(r.value,r.pattern)},nt=e=>e.toISOString().split("T")[0],it=(e,t,s)=>{const r=e.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(r==null?void 0:r.lang),l=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||s,i=l.split("-").shift();return Object.keys(t).length===0?{locale:l,messages:{lang:s}}:{locale:l,messages:t[i]||t[s]||{lang:s}}},lt=(e,t,s)=>new Intl.NumberFormat(t,{style:"currency",currency:s}).format(e),ot=(e,t,s=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:s}).format(s>0?Number(e==null?void 0:e.toFixed(s)):e),at=(e,t,s=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:s,maximumFractionDigits:s}).format(e),ct=(e,t,s,r="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:s,unitDisplay:r,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),ye=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,ve=(e,t,s)=>typeof e!="string"||e===""||!ye.test(e)?"":new Intl.DateTimeFormat(t,s).format(new Date(e)),ft=(e,t)=>s=>it(s,e,t),ut=({disconnect:e,observe:t,takeRecords:s})=>{class r{constructor(l){y(this,"disconnect",e);y(this,"observe",t);y(this,"takeRecords",s);y(this,"cb");this.cb=l}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:r})}),r},dt=({disconnect:e,observe:t})=>{class s{constructor(n){y(this,"disconnect",e);y(this,"observe",t);y(this,"unobserve");y(this,"cb");this.cb=n}}return[window,global].forEach(r=>{Object.defineProperty(r,"ResizeObserver",{writable:!0,configurable:!0,value:s})}),s};class $t extends Event{constructor(){super(...arguments);y(this,"detail")}}const gt=()=>{class e extends $t{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},pt=e=>{const t=s=>(setTimeout(s,1),e(),0);return[window,global].forEach(s=>{Object.defineProperty(s,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t};c.ClassList=be,c.StorybookPreview=Ze,c.allItemsAreString=Se,c.cleanString=Le,c.createID=p,c.dateRegExp=ye,c.dateToString=nt,c.defineLocales=ft,c.filterArgs=Xe,c.focusableElements=ke,c.getLocaleDatePattern=rt,c.getParentWindows=B,c.getStoryHTML=Qe,c.getStorybookUrl=N,c.getWindows=Ae,c.isTagName=Te,c.isValidNumber=je,c.isValidString=J,c.isValideID=m,c.localeCurrency=lt,c.localeDate=ve,c.localeNumber=ot,c.localePercent=at,c.localeUnit=ct,c.nextTick=Oe,c.setUpRequestAnimationFrameMock=pt,c.setupMutationObserverMock=ut,c.setupResizeObserverMock=dt,c.setupSubmitEventMock=gt,c.stencilWrapper=Ke,c.toString=Ee,c.vsCodeCssGenerator=st,c.vsCodeGenerator=tt,c.webTypesGenerator=Ye,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
23
+ Type: \`${e.type}\``,Ye=(e,t,s,r)=>({$schema:"https://json.schemastore.org/web-types",name:e,version:t,"description-markup":"markdown",contributions:{html:{elements:s.components.map(n=>{const i=N(r,n.filePath);return{name:n.tag,description:ve(n),"doc-url":i,attributes:n.props.filter(o=>o.attr).map(o=>({name:o.attr,description:X(o),"doc-url":i,value:{type:o.type,default:o.default,required:o.required}})),js:{properties:n.props.map(o=>({name:o.name,description:X(o),"doc-url":i,value:{type:o.type,default:o.default,required:o.required}})),events:n.events.map(o=>({name:o.event,description:o.docs}))},css:{properties:n.styles.map(o=>({name:o.name,description:o.docs}))}}})}}}),Ve=(e,t,s)=>[{name:"Storybook",url:N(e,s)},{name:"Sources",url:Qe(t,s)}],et=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},tt=(e,t,s)=>({version:1.1,tags:e.components.map(r=>{const n=Ve(t,s,r.filePath);return{name:r.tag,description:ve(r),attributes:r.props.map(i=>({name:i.attr||i.name,description:X(i),values:et(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),st=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(s=>({name:s.name,description:s.docs})))}),rt=e=>{const t={value:"2023",pattern:"yyyy"},s={value:"12",pattern:"mm"},r={value:"24",pattern:"dd"};return he([t.value,s.value,r.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(s.value,s.pattern).replace(r.value,r.pattern)},nt=e=>e.toISOString().split("T")[0],it=(e,t,s)=>{const r=e.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(r==null?void 0:r.lang),i=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||s,o=i.split("-").shift();return Object.keys(t).length===0?{locale:i,messages:{lang:s}}:{locale:i,messages:t[o]||t[s]||{lang:s}}},ot=(e,t,s)=>new Intl.NumberFormat(t,{style:"currency",currency:s}).format(e),lt=(e,t,s=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:s}).format(s>0?Number(e==null?void 0:e.toFixed(s)):e),at=(e,t,s=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:s,maximumFractionDigits:s}).format(e),ct=(e,t,s,r="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:s,unitDisplay:r,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),ye=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,he=(e,t,s)=>typeof e!="string"||e===""||!ye.test(e)?"":new Intl.DateTimeFormat(t,s).format(new Date(e)),ft=(e,t)=>s=>it(s,e,t),$t=({disconnect:e,observe:t,takeRecords:s})=>{class r{constructor(i){y(this,"disconnect",e);y(this,"observe",t);y(this,"takeRecords",s);y(this,"cb");this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:r})}),r},ut=({disconnect:e,observe:t})=>{class s{constructor(n){y(this,"disconnect",e);y(this,"observe",t);y(this,"unobserve");y(this,"cb");this.cb=n}}return[window,global].forEach(r=>{Object.defineProperty(r,"ResizeObserver",{writable:!0,configurable:!0,value:s})}),s};class dt extends Event{constructor(){super(...arguments);y(this,"detail")}}const gt=()=>{class e extends dt{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},pt=e=>{const t=s=>(setTimeout(s,1),e(),0);return[window,global].forEach(s=>{Object.defineProperty(s,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t};a.ClassList=be,a.StorybookPreview=Ke,a.allItemsAreString=Se,a.cleanString=je,a.createID=p,a.dateRegExp=ye,a.dateToString=nt,a.defineLocales=ft,a.filterArgs=Xe,a.focusableElements=Te,a.getLocaleDatePattern=rt,a.getParentWindows=I,a.getStoryHTML=Je,a.getStorybookUrl=N,a.getWindows=Ee,a.isTagName=ke,a.isValidNumber=Ae,a.isValidString=K,a.isValideID=m,a.localeCurrency=ot,a.localeDate=he,a.localeNumber=lt,a.localePercent=at,a.localeUnit=ct,a.nextTick=Oe,a.setUpRequestAnimationFrameMock=pt,a.setupMutationObserverMock=$t,a.setupResizeObserverMock=ut,a.setupSubmitEventMock=gt,a.stencilWrapper=Ze,a.toString=_e,a.vsCodeCssGenerator=st,a.vsCodeGenerator=tt,a.webTypesGenerator=Ye,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
24
24
  //# sourceMappingURL=index.umd.js.map