@mgdis/stencil-helpers 3.0.0 → 3.1.1

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,19 +1,21 @@
1
- (function(u,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(u=typeof globalThis<"u"?globalThis:u||self,d(u.StencilHelpersModule={}))})(this,function(u){"use strict";var Kt=Object.defineProperty;var Ne=u=>{throw TypeError(u)};var Qt=(u,d,_)=>d in u?Kt(u,d,{enumerable:!0,configurable:!0,writable:!0,value:_}):u[d]=_;var b=(u,d,_)=>Qt(u,typeof d!="symbol"?d+"":d,_),Vt=(u,d,_)=>d.has(u)||Ne("Cannot "+_);var z=(u,d,_)=>(Vt(u,d,"read from private field"),_?_.call(u):d.get(u)),oe=(u,d,_)=>d.has(u)?Ne("Cannot add the same private member more than once"):d instanceof WeakSet?d.add(u):d.set(u,_);var T,Z;const d=(e="",t=10)=>{const r=new Uint8Array(t);crypto.getRandomValues(r);const s=Array.from(r).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,t);return e!==""?`${e}-${s}`:s},_=e=>le(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null;class Me{constructor(t=[]){b(this,"classes");b(this,"add",t=>{this.has(t)||this.classes.push(t)});b(this,"delete",t=>{const r=this.classes.indexOf(t);r>-1&&this.classes.splice(r,1)});b(this,"has",t=>this.classes.includes(t));b(this,"join",()=>this.classes.join(" "));this.classes=t}}const Le=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),Fe=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),Ce='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',Ie=e=>{const t=W(e),r=ae(e);return[e,...t,...r]},W=(e,t=[])=>{if(e.self!==e.top)try{const r=e.parent;return r?(t.push(r),W(r,t)):t}catch(r){return console.error("Different hosts between iframes:",r),t}return t},ae=(e,t=[])=>{if(e.frames.length>0)for(const r of Array.from(e.frames))t.push(r),ae(r,t);return t},le=e=>typeof e=="string"&&e.trim()!=="",De=e=>typeof e=="object"?JSON.stringify(e):`${e}`,Ue=e=>typeof e=="number"&&!Number.isNaN(e),Pe=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,He=async e=>e();var C={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},qe=Object.defineProperty,Ze=(e,t)=>{for(var r in t)qe(e,r,{get:t[r],enumerable:!0})},Be="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml",ce=(e,t)=>t in e,fe="http://www.w3.org/1999/xlink",k=typeof window<"u"?window:{},j={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},We=e=>e!=null&&e!==void 0,ue=e=>(e=typeof e,e==="object"||e==="function"),Xe={};Ze(Xe,{err:()=>ge,map:()=>Je,ok:()=>X,unwrap:()=>Ye,unwrapErr:()=>Ke});var X=e=>({isOk:!0,isErr:!1,value:e}),ge=e=>({isOk:!1,isErr:!0,value:e});function Je(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>X(s)):X(r)}if(e.isErr){const r=e.value;return ge(r)}throw"should never get here"}var Ye=e=>{if(e.isOk)return e.value;throw e.value},Ke=e=>{if(e.isErr)return e.value;throw e.value},pe=e=>{const t=ye(e,"childNodes");e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&$e(t,e.tagName).forEach(s=>{s.nodeType===1&&s.tagName==="SLOT-FB"&&(Ve(s,J(s),!1).length?s.hidden=!0:s.hidden=!1)});let r=0;for(r=0;r<t.length;r++){const s=t[r];s.nodeType===1&&ye(s,"childNodes").length&&pe(s)}},Qe=e=>{const t=[];for(let r=0;r<e.length;r++){const s=e[r]["s-nr"]||void 0;s&&s.isConnected&&t.push(s)}return t};function $e(e,t,r){let s=0,n=[],i;for(;s<e.length;s++)i=e[s],i["s-sr"]&&(!t||i["s-hn"]===t)&&r===void 0&&n.push(i),n=[...n,...$e(i.childNodes,t,r)];return n}var Ve=(e,t,r=!0)=>{const s=[];(r&&e["s-sr"]||!e["s-sr"])&&s.push(e);let n=e;for(;n=n.nextSibling;)J(n)===t&&(r||!n["s-sr"])&&s.push(n);return s},de=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",J=e=>typeof e["s-sn"]=="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function et(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=r=>(function(s){const n=[],i=this["s-sn"];s!=null&&s.flatten&&console.error(`
1
+ (function(u,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(u=typeof globalThis<"u"?globalThis:u||self,y(u.StencilHelpersModule={}))})(this,function(u){"use strict";var hr=Object.defineProperty;var De=u=>{throw TypeError(u)};var br=(u,y,v)=>y in u?hr(u,y,{enumerable:!0,configurable:!0,writable:!0,value:v}):u[y]=v;var h=(u,y,v)=>br(u,typeof y!="symbol"?y+"":y,v),Ze=(u,y,v)=>y.has(u)||De("Cannot "+v);var S=(u,y,v)=>(Ze(u,y,"read from private field"),v?v.call(u):y.get(u)),L=(u,y,v)=>y.has(u)?De("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(u):y.set(u,v),te=(u,y,v,Z)=>(Ze(u,y,"write to private field"),Z?Z.call(u,v):y.set(u,v),v);var T,M,D,N,V;const y=(e="",t=10)=>{const r=new Uint8Array(t);crypto.getRandomValues(r);const s=Array.from(r).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,t);return e!==""?`${e}-${s}`:s},v=e=>de(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null;class Z{constructor(t=[]){h(this,"classes");h(this,"add",t=>{this.has(t)||this.classes.push(t)});h(this,"delete",t=>{const r=this.classes.indexOf(t);r>-1&&this.classes.splice(r,1)});h(this,"has",t=>this.classes.includes(t));h(this,"join",()=>this.classes.join(" "));this.classes=t}}const He=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),Ge=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),qe='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',Be=e=>{const t=re(e),r=pe(e);return[e,...t,...r]},re=(e,t=[])=>{if(e.self!==e.top)try{const r=e.parent;return r?(t.push(r),re(r,t)):t}catch(r){return console.error("Different hosts between iframes:",r),t}return t},pe=(e,t=[])=>{if(e.frames.length>0)for(const r of Array.from(e.frames))t.push(r),pe(r,t);return t},de=e=>typeof e=="string"&&e.trim()!=="",Je=e=>typeof e=="object"?JSON.stringify(e):`${e}`,Xe=e=>typeof e=="number"&&!Number.isNaN(e),Ke=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,Ye=async e=>{if(e)return e()},H=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,$e=(e,t,r)=>{const s=".";if(!H(e)||typeof t!="string")return r;const[n,...i]=t.split(s);return i.length?$e(e[n],i.join(s)):e[n]},Qe={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"},ye=10;class he{constructor(t){h(this,"items",[]);h(this,"total");h(this,"top",ye);h(this,"next");h(this,"baseIndex",1);h(this,"getIndexFromCursor",(t="first",r)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const n=this.items.length-this.baseIndex;let i=0,a=0;if(["previous","next"].includes(t)&&r){const f=this.items.findIndex(c=>JSON.stringify(c)===JSON.stringify(r));if(f===-1)return 0;a=f}return t==="first"?i=0:t==="last"?i=n:t==="previous"?i=JSON.stringify(this.items[a])===JSON.stringify(this.items[0])?n:a-this.baseIndex:t==="next"&&(i=JSON.stringify(this.items[a])===JSON.stringify(this.items[n])?0:a+this.baseIndex),i});if(H(t))Array.isArray(t.items)&&(this.items=t.items),typeof t.top=="number"&&(this.top=t.top),this.total=typeof t.total=="number"?t.total:this.items.length,this.next=t.next;else throw new Error("Page - init must match IPage type.")}}class Ve{constructor(t,r){h(this,"items",[]);L(this,T,ye);L(this,M);L(this,D);h(this,"getPage",(t=0,r)=>{const s=typeof r=="function"?this.items.filter(r):this.items;let n;return S(this,M)?n=S(this,M):s.length>t+S(this,T)&&(n=()=>this.getPage(t+S(this,T),r)),new he({items:s.slice(t,t+S(this,T)),total:S(this,D),top:S(this,T),next:n})});Array.isArray(t)&&(this.items=t),r&&(["string","function"].includes(typeof r.next)||H(r.next)&&URL.canParse(r.next))&&te(this,M,r.next),typeof(r==null?void 0:r.top)=="number"&&te(this,T,r.top),typeof(r==null?void 0:r.total)=="number"&&te(this,D,r.total)}}T=new WeakMap,M=new WeakMap,D=new WeakMap;var G={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},et=Object.defineProperty,tt=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},rt="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml",be=(e,t)=>t in e,_e="http://www.w3.org/1999/xlink",j=typeof window<"u"?window:{},z={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},nt=e=>e!=null&&e!==void 0,ve=e=>(e=typeof e,e==="object"||e==="function"),it={};tt(it,{err:()=>we,map:()=>at,ok:()=>se,unwrap:()=>ot,unwrapErr:()=>lt});var se=e=>({isOk:!0,isErr:!1,value:e}),we=e=>({isOk:!1,isErr:!0,value:e});function at(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>se(s)):se(r)}if(e.isErr){const r=e.value;return we(r)}throw"should never get here"}var ot=e=>{if(e.isOk)return e.value;throw e.value},lt=e=>{if(e.isErr)return e.value;throw e.value},me=e=>{const t=Oe(e,"childNodes");e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&Se(t,e.tagName).forEach(s=>{s.nodeType===1&&s.tagName==="SLOT-FB"&&(ft(s,ne(s),!1).length?s.hidden=!0:s.hidden=!1)});let r=0;for(r=0;r<t.length;r++){const s=t[r];s.nodeType===1&&Oe(s,"childNodes").length&&me(s)}},ct=e=>{const t=[];for(let r=0;r<e.length;r++){const s=e[r]["s-nr"]||void 0;s&&s.isConnected&&t.push(s)}return t};function Se(e,t,r){let s=0,n=[],i;for(;s<e.length;s++)i=e[s],i["s-sr"]&&(!t||i["s-hn"]===t)&&r===void 0&&n.push(i),n=[...n,...Se(i.childNodes,t,r)];return n}var ft=(e,t,r=!0)=>{const s=[];(r&&e["s-sr"]||!e["s-sr"])&&s.push(e);let n=e;for(;n=n.nextSibling;)ne(n)===t&&(r||!n["s-sr"])&&s.push(n);return s},Ee=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",ne=e=>typeof e["s-sn"]=="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function ut(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=r=>(function(s){const n=[],i=this["s-sn"];s!=null&&s.flatten&&console.error(`
2
2
  Flattening is not supported for Stencil non-shadow slots.
3
3
  You can use \`.childNodes\` to nested slot fallback content.
4
4
  If you have a particular use case, please open an issue on the Stencil repo.
5
- `);const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:Qe(o.childNodes)).forEach(l=>{i===J(l)&&n.push(l)}),r?n.filter(l=>l.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function ye(e,t){if("__"+t in e){const r=e["__"+t];return typeof r!="function"?r:r.bind(e)}else return typeof e[t]!="function"?e[t]:e[t].bind(e)}var tt=(e,t,...r)=>{let s=null,n=null,i=null,o=!1,f=!1;const l=[],c=a=>{for(let $=0;$<a.length;$++)s=a[$],Array.isArray(s)?c(s):s!=null&&typeof s!="boolean"&&((o=!ue(s))&&(s=String(s)),o&&f?l[l.length-1].$text$+=s:l.push(o?Y(null,s):s),f=o)};c(r);const p=Y(e,null);return p.$attrs$=t,l.length>0&&(p.$children$=l),p.$key$=n,p.$name$=i,p},Y=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},rt={},st=e=>e&&e.$tag$===rt,be=(e,t,r,s,n,i,o)=>{if(r===s)return;let f=ce(e,t),l=t.toLowerCase();if(t==="class"){const c=e.classList,p=ve(r);let a=ve(s);c.remove(...p.filter($=>$&&!a.includes($))),c.add(...a.filter($=>$&&!p.includes($)))}else if(t==="style"){for(const c in r)(!s||s[c]==null)&&(c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(const c in s)(!r||s[c]!==r[c])&&(c.includes("-")?e.style.setProperty(c,s[c]):e.style[c]=s[c])}else if(t!=="key")if(t==="ref")s&&s(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):ce(k,l)?t=l.slice(2):t=l[2]+t.slice(3),r||s){const c=t.endsWith(he);t=t.replace(it,""),r&&j.rel(e,t,r,c),s&&j.ael(e,t,s,c)}}else{const c=ue(s);if((f||c&&s!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const a=s??"";t==="list"?f=!1:(r==null||e[t]!=a)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=a:e.setAttribute(t,a))}}catch{}let p=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,p=!0),s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&(p?e.removeAttributeNS(fe,t):e.removeAttribute(t)):(!f||i&4||n)&&!c&&e.nodeType===1&&(s=s===!0?"":s,p?e.setAttributeNS(fe,t,s):e.setAttribute(t,s))}},nt=/\s/,ve=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split(nt)),he="Capture",it=new RegExp(he+"$"),K=(e,t,r,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},o=t.$attrs$||{};for(const f of _e(Object.keys(i)))f in o||be(n,f,i[f],void 0,r,t.$flags$);for(const f of _e(Object.keys(o)))be(n,f,i[f],o[f],r,t.$flags$)};function _e(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var I,D,N,Q=!1,U=!1,V=!1,h=!1,P=(e,t,r)=>{var s;const n=t.$children$[r];let i=0,o,f,l;if(Q||(V=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=k.document.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=k.document.createTextNode(""),K(null,n,h);else{if(h||(h=n.$tag$==="svg"),!k.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=n.$elm$=k.document.createElementNS(h?Be:Ge,!Q&&C.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),h&&n.$tag$==="foreignObject"&&(h=!1),K(null,n,h),We(I)&&o["s-si"]!==I&&o.classList.add(o["s-si"]=I),n.$children$)for(i=0;i<n.$children$.length;++i)f=P(e,n,i),f&&o.appendChild(f);n.$tag$==="svg"?h=!1:o.tagName==="foreignObject"&&(h=!0)}return o["s-hn"]=N,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=D,o["s-sn"]=n.$name$||"",o["s-rf"]=(s=n.$attrs$)==null?void 0:s.ref,et(o),l=e&&e.$children$&&e.$children$[r],l&&l.$tag$===n.$tag$&&e.$elm$&&M(e.$elm$,!1),Oe(D,o,t.$elm$,e==null?void 0:e.$elm$)),o},M=(e,t)=>{j.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&C.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const n=r[s];n["s-hn"]!==N&&n["s-ol"]&&(A(L(n).parentNode,n,L(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,V=!0),t&&M(n,t)}j.$flags$&=-2},we=(e,t,r,s,n,i)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,f;for(o.shadowRoot&&o.tagName===N&&(o=o.shadowRoot);n<=i;++n)s[n]&&(f=P(null,r,n),f&&(s[n].$elm$=f,A(o,f,L(t))))},Se=(e,t,r)=>{for(let s=t;s<=r;++s){const n=e[s];if(n){const i=n.$elm$;Ee(n),i&&(U=!0,i["s-ol"]?i["s-ol"].remove():M(i,!0),i.remove())}}},ot=(e,t,r,s,n=!1)=>{let i=0,o=0,f=0,l=0,c=t.length-1,p=t[0],a=t[c],$=s.length-1,g=s[0],y=s[$],m,w;for(;i<=c&&o<=$;)if(p==null)p=t[++i];else if(a==null)a=t[--c];else if(g==null)g=s[++o];else if(y==null)y=s[--$];else if(H(p,g,n))R(p,g,n),p=t[++i],g=s[++o];else if(H(a,y,n))R(a,y,n),a=t[--c],y=s[--$];else if(H(p,y,n))(p.$tag$==="slot"||y.$tag$==="slot")&&M(p.$elm$.parentNode,!1),R(p,y,n),A(e,p.$elm$,a.$elm$.nextSibling),p=t[++i],y=s[--$];else if(H(a,g,n))(p.$tag$==="slot"||y.$tag$==="slot")&&M(a.$elm$.parentNode,!1),R(a,g,n),A(e,a.$elm$,p.$elm$),a=t[--c],g=s[++o];else{for(f=-1,l=i;l<=c;++l)if(t[l]&&t[l].$key$!==null&&t[l].$key$===g.$key$){f=l;break}f>=0?(w=t[f],w.$tag$!==g.$tag$?m=P(t&&t[o],r,f):(R(w,g,n),t[f]=void 0,m=w.$elm$),g=s[++o]):(m=P(t&&t[o],r,o),g=s[++o]),m&&A(L(p.$elm$).parentNode,m,L(p.$elm$))}i>c?we(e,s[$+1]==null?null:s[$+1].$elm$,r,s,o,$):o>$&&Se(t,i,c)},H=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,L=e=>e&&e["s-ol"]||e,R=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,o=t.$tag$,f=t.$text$;let l;f===null?(h=o==="svg"?!0:o==="foreignObject"?!1:h,K(e,t,h),n!==null&&i!==null?ot(s,n,t,i,r):i!==null?(e.$text$!==null&&(s.textContent=""),we(s,null,t,i,0,i.length-1)):!r&&C.updatable&&n!==null&&Se(n,0,n.length-1),h&&o==="svg"&&(h=!1)):(l=s["s-cr"])?l.parentNode.textContent=f:e.$text$!==f&&(s.data=f)},O=[],me=e=>{let t,r,s;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const o=i["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==i["s-hn"])if(de(t,o)){let f=O.find(l=>l.$nodeToRelocate$===t);U=!0,t["s-sn"]=t["s-sn"]||o,f?(f.$nodeToRelocate$["s-sh"]=i["s-hn"],f.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],O.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&O.map(l=>{de(l.$nodeToRelocate$,t["s-sn"])&&(f=O.find(c=>c.$nodeToRelocate$===t),f&&!l.$slotRefNode$&&(l.$slotRefNode$=f.$slotRefNode$))})}else O.some(f=>f.$nodeToRelocate$===t)||O.push({$nodeToRelocate$:t})}i.nodeType===1&&me(i)}},Ee=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Ee)},A=(e,t,r)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&Oe(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,r));function Oe(e,t,r,s){var n,i;let o;if(e&&typeof t["s-sn"]=="string"&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(o=t["s-si"]||e.parentNode["s-sc"])){const f=t["s-sn"],l=t["s-hn"];if((n=r.classList)==null||n.add(o+"-s"),s&&((i=s.classList)!=null&&i.contains(o+"-s"))){let c=(s.__childNodes||s.childNodes)[0],p=!1;for(;c;){if(c["s-sn"]!==f&&c["s-hn"]===l&&c["s-sr"]){p=!0;break}c=c.nextSibling}p||s.classList.remove(o+"-s")}}}var at=(e,t,r=!1)=>{var s,n,i,o,f;const l=e.$hostElement$,c=e.$cmpMeta$,p=e.$vnode$||Y(null,null),a=st(t)?t:tt(null,null,t);if(N=l.tagName,c.$attrsToReflect$&&(a.$attrs$=a.$attrs$||{},c.$attrsToReflect$.map(([$,g])=>a.$attrs$[g]=l[$])),r&&a.$attrs$)for(const $ of Object.keys(a.$attrs$))l.hasAttribute($)&&!["key","ref","style","class"].includes($)&&(a.$attrs$[$]=l[$]);a.$tag$=null,a.$flags$|=4,e.$vnode$=a,a.$elm$=p.$elm$=l.shadowRoot||l,I=l["s-sc"],Q=!!(c.$flags$&1)&&!(c.$flags$&128),D=l["s-cr"],U=!1,R(p,a,r);{if(j.$flags$|=1,V){me(a.$elm$);for(const $ of O){const g=$.$nodeToRelocate$;if(!g["s-ol"]&&k.document){const y=k.document.createTextNode("");y["s-nr"]=g,A(g.parentNode,g["s-ol"]=y,g)}}for(const $ of O){const g=$.$nodeToRelocate$,y=$.$slotRefNode$;if(y){const m=y.parentNode;let w=y.nextSibling;{let E=(s=g["s-ol"])==null?void 0:s.previousSibling;for(;E;){let v=(n=E["s-nr"])!=null?n:null;if(v&&v["s-sn"]===g["s-sn"]&&m===(v.__parentNode||v.parentNode)){for(v=v.nextSibling;v===g||v!=null&&v["s-sr"];)v=v==null?void 0:v.nextSibling;if(!v||!v["s-nr"]){w=v;break}}E=E.previousSibling}}const B=g.__parentNode||g.parentNode,G=g.__nextSibling||g.nextSibling;(!w&&m!==B||G!==w)&&g!==w&&(!g["s-hn"]&&g["s-ol"]&&(g["s-hn"]=g["s-ol"].parentNode.nodeName),A(m,g,w),g.nodeType===1&&g.tagName!=="SLOT-FB"&&(g.hidden=(i=g["s-ih"])!=null?i:!1)),g&&typeof y["s-rf"]=="function"&&y["s-rf"](y)}else g.nodeType===1&&(r&&(g["s-ih"]=(o=g.hidden)!=null?o:!1),g.hidden=!0)}}U&&pe(a.$elm$),j.$flags$&=-2,O.length=0}if(C.experimentalScopedSlotChanges&&c.$flags$&2){const $=a.$elm$.__childNodes||a.$elm$.childNodes;for(const g of $)g["s-hn"]!==N&&!g["s-sh"]&&(r&&g["s-ih"]==null&&(g["s-ih"]=(f=g.hidden)!=null?f:!1),g.hidden=!0)}D=void 0};const ee={ignore:[],ignore_with:"_!i-£___£%_",strict:!1,tab_size:2,tag_wrap:!1,tag_wrap_width:80,trim:[]},S="!i-£___£%_",ke=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],te=e=>/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e),Ae=(e,t)=>{if(!e||!t)throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");let r;if(Array.isArray(e))r=structuredClone(e).concat(t);else if(typeof e=="object"){r={...e};for(let s of Object.keys(t))typeof t[s]!="object"?r[s]=t[s]:r[s]=Ae(r[s]||{},t[s])}return r},lt=(e,t)=>Ae(structuredClone(e),t),ct=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(/\n/g,S+"nl!").replace(/\r/g,S+"cr!").replace(/\s/g,S+"ws!"))),e),ft=e=>{const t=/<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;return e=e.replace(t,(r,s,n)=>r.replace(n,i=>i.replace(/</g,S+"lt!").replace(/>/g,S+"gt!"))),e},ut=(e,t)=>{const r=t.ignore,s=t.ignore_with;for(let n=0;n<r.length;n++){const i=new RegExp(`<${r[n]}[^>]*>((.|
6
- )*?)</${r[n]}>`,"g");e=e.replace(i,(o,f)=>o.replace(f,l=>l.replace(/</g,"-"+s+"lt-").replace(/>/g,"-"+s+"gt-").replace(/\n/g,"-"+s+"nl-").replace(/\r/g,"-"+s+"cr-").replace(/\s/g,"-"+s+"ws-")))}return e},gt=(e,t)=>{for(let r=0;r<t.length;r++){const s=new RegExp(`(<${t[r]}[^>]*>)\\s+`,"g"),n=new RegExp(`\\s+(</${t[r]}>)`,"g");e=e.replace(s,"$1").replace(n,"$1")}return e},pt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(S+"nl!","g"),`
7
- `).replace(new RegExp(S+"cr!","g"),"\r").replace(new RegExp(S+"ws!","g")," "))),e),$t=e=>(e=e.replace(/<[\w:\-]+([^>]*)>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(S+"lt!","g"),"<").replace(new RegExp(S+"gt!","g"),">"))),e),dt=(e,t)=>{const r=t.ignore,s=t.ignore_with;for(let n=0;n<r.length;n++){const i=new RegExp(`<${r[n]}[^>]*>((.|
8
- )*?)</${r[n]}>`,"g");e=e.replace(i,(o,f)=>o.replace(f,l=>l.replace(new RegExp("-"+s+"lt-","g"),"<").replace(new RegExp("-"+s+"gt-","g"),">").replace(new RegExp("-"+s+"nl-","g"),`
9
- `).replace(new RegExp("-"+s+"cr-","g"),"\r").replace(new RegExp("-"+s+"ws-","g")," ")))}return e},yt=e=>{var s,n;if(typeof e!="object")throw new Error("Config must be an object.");if(!(Object.hasOwn(e,"ignore")||Object.hasOwn(e,"ignore_with")||Object.hasOwn(e,"strict")||Object.hasOwn(e,"tab_size")||Object.hasOwn(e,"tag_wrap")||Object.hasOwn(e,"tag_wrap_width")||Object.hasOwn(e,"trim")))return ee;let r=e.tab_size;if(r){if(typeof r!="number")throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(r))throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);if(r=Math.floor(r),r<1||r>16)throw new Error("Tab size out of range. Expecting 1 to 16.");e.tab_size=r}if(Object.hasOwn(e,"ignore")&&(!Array.isArray(e.ignore)||!((s=e.ignore)!=null&&s.every(i=>typeof i=="string"))))throw new Error("Ignore config must be an array of strings.");if(Object.hasOwn(e,"ignore_with")&&typeof e.ignore_with!="string")throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);if(Object.hasOwn(e,"strict")&&typeof e.strict!="boolean")throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);if(Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap!="boolean")throw new Error(`tag_wrap config must be a boolean, not ${typeof e.tag_wrap}.`);if(Object.hasOwn(e,"tag_wrap_width")&&typeof e.tag_wrap_width!="number")throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"trim")&&(!Array.isArray(e.trim)||!((n=e.trim)!=null&&n.every(i=>typeof i=="string"))))throw new Error("Trim config must be an array of strings.");return lt(ee,e)},bt=(e,t=!0)=>t&&!te(e)?e:e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g,(r,s)=>ke.indexOf(s)>-1?`${r.substring(0,r.length-1)} />`.replace(/\/\s\//g,"/"):r.replace(/[\s]?\/>/g,`></${s}>`)),vt=(e,t=!1)=>(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>r.replace(s,n=>n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;").replace(/\s/g,"&nbsp;"))),t&&(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>(r=r.replace(s,n=>n.replace(/\n|\t/g,"").replace(/[a-z]+="\s*"/ig,"").replace(/>\s+</g,"><").replace(/\s+/g," ")),r=r.replace(/\s+/g," ").replace(/\s>/g,">").replace(/>\s/g,">").replace(/\s</g,"<").replace(/class=["']\s/g,n=>n.replace(/\s/g,"")).replace(/(class=.*)\s(["'])/g,"$1$2"),r))),e),ht=(e,t=!0)=>t&&!te(e)?e:(e=vt(e),e.replace(/\n|\t/g,"").replace(/>\s+</g,"><").replace(/\s+/g," ").replace(/(.+=)"\s+"/ig,'$1""').replace(/(.+=)'\s+'/ig,"$1''").replace(/\s>/g,">").replace(/<\s\//g,"</").replace(/class=["']\s/g,r=>r.replace(/\s/g,"")).replace(/(class=.*)\s(["'])/g,"$1$2"));let q,re;const x={line:[]},_t=e=>{x.line=[];let t=-1;const r=/(<[^>]+>)|([^<]+)/g;return e=e.replace(r,(s,n,i)=>(n?x.line.push({type:"tag",value:s}):i&&i.trim().length>0&&x.line.push({type:"text",value:s}),t++,`
5
+ `);const a=this["s-cr"].parentElement;return(a.__childNodes?a.childNodes:ct(a.childNodes)).forEach(c=>{i===ne(c)&&n.push(c)}),r?n.filter(c=>c.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function Oe(e,t){if("__"+t in e){const r=e["__"+t];return typeof r!="function"?r:r.bind(e)}else return typeof e[t]!="function"?e[t]:e[t].bind(e)}var gt=(e,t,...r)=>{let s=null,n=null,i=null,a=!1,f=!1;const c=[],l=o=>{for(let d=0;d<o.length;d++)s=o[d],Array.isArray(s)?l(s):s!=null&&typeof s!="boolean"&&((a=!ve(s))&&(s=String(s)),a&&f?c[c.length-1].$text$+=s:c.push(a?ie(null,s):s),f=a)};l(r);const p=ie(e,null);return p.$attrs$=t,c.length>0&&(p.$children$=c),p.$key$=n,p.$name$=i,p},ie=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},pt={},dt=e=>e&&e.$tag$===pt,xe=(e,t,r,s,n,i,a)=>{if(r===s)return;let f=be(e,t),c=t.toLowerCase();if(t==="class"){const l=e.classList,p=Ae(r);let o=Ae(s);l.remove(...p.filter(d=>d&&!o.includes(d))),l.add(...o.filter(d=>d&&!p.includes(d)))}else if(t==="style"){for(const l in r)(!s||s[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in s)(!r||s[l]!==r[l])&&(l.includes("-")?e.style.setProperty(l,s[l]):e.style[l]=s[l])}else if(t!=="key")if(t==="ref")s&&s(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):be(j,c)?t=c.slice(2):t=c[2]+t.slice(3),r||s){const l=t.endsWith(Te);t=t.replace(yt,""),r&&z.rel(e,t,r,l),s&&z.ael(e,t,s,l)}}else{const l=ve(s);if((f||l&&s!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const o=s??"";t==="list"?f=!1:(r==null||e[t]!=o)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=o:e.setAttribute(t,o))}}catch{}let p=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,p=!0),s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&(p?e.removeAttributeNS(_e,t):e.removeAttribute(t)):(!f||i&4||n)&&!l&&e.nodeType===1&&(s=s===!0?"":s,p?e.setAttributeNS(_e,t,s):e.setAttribute(t,s))}},$t=/\s/,Ae=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split($t)),Te="Capture",yt=new RegExp(Te+"$"),ae=(e,t,r,s)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||{},a=t.$attrs$||{};for(const f of ke(Object.keys(i)))f in a||xe(n,f,i[f],void 0,r,t.$flags$);for(const f of ke(Object.keys(a)))xe(n,f,i[f],a[f],r,t.$flags$)};function ke(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var q,B,F,oe=!1,J=!1,le=!1,w=!1,X=(e,t,r)=>{var s;const n=t.$children$[r];let i=0,a,f,c;if(oe||(le=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)a=n.$elm$=j.document.createTextNode(n.$text$);else if(n.$flags$&1)a=n.$elm$=j.document.createTextNode(""),ae(null,n,w);else{if(w||(w=n.$tag$==="svg"),!j.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(a=n.$elm$=j.document.createElementNS(w?rt:st,!oe&&G.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),w&&n.$tag$==="foreignObject"&&(w=!1),ae(null,n,w),nt(q)&&a["s-si"]!==q&&a.classList.add(a["s-si"]=q),n.$children$)for(i=0;i<n.$children$.length;++i)f=X(e,n,i),f&&a.appendChild(f);n.$tag$==="svg"?w=!1:a.tagName==="foreignObject"&&(w=!0)}return a["s-hn"]=F,n.$flags$&3&&(a["s-sr"]=!0,a["s-cr"]=B,a["s-sn"]=n.$name$||"",a["s-rf"]=(s=n.$attrs$)==null?void 0:s.ref,ut(a),c=e&&e.$children$&&e.$children$[r],c&&c.$tag$===n.$tag$&&e.$elm$&&C(e.$elm$,!1),Ie(B,a,t.$elm$,e==null?void 0:e.$elm$)),a},C=(e,t)=>{z.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&G.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const n=r[s];n["s-hn"]!==F&&n["s-ol"]&&(R(P(n).parentNode,n,P(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,le=!0),t&&C(n,t)}z.$flags$&=-2},je=(e,t,r,s,n,i)=>{let a=e["s-cr"]&&e["s-cr"].parentNode||e,f;for(a.shadowRoot&&a.tagName===F&&(a=a.shadowRoot);n<=i;++n)s[n]&&(f=X(null,r,n),f&&(s[n].$elm$=f,R(a,f,P(t))))},Re=(e,t,r)=>{for(let s=t;s<=r;++s){const n=e[s];if(n){const i=n.$elm$;ze(n),i&&(J=!0,i["s-ol"]?i["s-ol"].remove():C(i,!0),i.remove())}}},ht=(e,t,r,s,n=!1)=>{let i=0,a=0,f=0,c=0,l=t.length-1,p=t[0],o=t[l],d=s.length-1,g=s[0],$=s[d],m,E;for(;i<=l&&a<=d;)if(p==null)p=t[++i];else if(o==null)o=t[--l];else if(g==null)g=s[++a];else if($==null)$=s[--d];else if(K(p,g,n))I(p,g,n),p=t[++i],g=s[++a];else if(K(o,$,n))I(o,$,n),o=t[--l],$=s[--d];else if(K(p,$,n))(p.$tag$==="slot"||$.$tag$==="slot")&&C(p.$elm$.parentNode,!1),I(p,$,n),R(e,p.$elm$,o.$elm$.nextSibling),p=t[++i],$=s[--d];else if(K(o,g,n))(p.$tag$==="slot"||$.$tag$==="slot")&&C(o.$elm$.parentNode,!1),I(o,g,n),R(e,o.$elm$,p.$elm$),o=t[--l],g=s[++a];else{for(f=-1,c=i;c<=l;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===g.$key$){f=c;break}f>=0?(E=t[f],E.$tag$!==g.$tag$?m=X(t&&t[a],r,f):(I(E,g,n),t[f]=void 0,m=E.$elm$),g=s[++a]):(m=X(t&&t[a],r,a),g=s[++a]),m&&R(P(p.$elm$).parentNode,m,P(p.$elm$))}i>l?je(e,s[d+1]==null?null:s[d+1].$elm$,r,s,a,d):a>d&&Re(t,i,l)},K=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,P=e=>e&&e["s-ol"]||e,I=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,a=t.$tag$,f=t.$text$;let c;f===null?(w=a==="svg"?!0:a==="foreignObject"?!1:w,ae(e,t,w),n!==null&&i!==null?ht(s,n,t,i,r):i!==null?(e.$text$!==null&&(s.textContent=""),je(s,null,t,i,0,i.length-1)):!r&&G.updatable&&n!==null&&Re(n,0,n.length-1),w&&a==="svg"&&(w=!1)):(c=s["s-cr"])?c.parentNode.textContent=f:e.$text$!==f&&(s.data=f)},x=[],Ne=e=>{let t,r,s;const n=e.__childNodes||e.childNodes;for(const i of n){if(i["s-sr"]&&(t=i["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const a=i["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==i["s-hn"])if(Ee(t,a)){let f=x.find(c=>c.$nodeToRelocate$===t);J=!0,t["s-sn"]=t["s-sn"]||a,f?(f.$nodeToRelocate$["s-sh"]=i["s-hn"],f.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],x.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&x.map(c=>{Ee(c.$nodeToRelocate$,t["s-sn"])&&(f=x.find(l=>l.$nodeToRelocate$===t),f&&!c.$slotRefNode$&&(c.$slotRefNode$=f.$slotRefNode$))})}else x.some(f=>f.$nodeToRelocate$===t)||x.push({$nodeToRelocate$:t})}i.nodeType===1&&Ne(i)}},ze=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(ze)},R=(e,t,r)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&Ie(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,r));function Ie(e,t,r,s){var n,i;let a;if(e&&typeof t["s-sn"]=="string"&&t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(a=t["s-si"]||e.parentNode["s-sc"])){const f=t["s-sn"],c=t["s-hn"];if((n=r.classList)==null||n.add(a+"-s"),s&&((i=s.classList)!=null&&i.contains(a+"-s"))){let l=(s.__childNodes||s.childNodes)[0],p=!1;for(;l;){if(l["s-sn"]!==f&&l["s-hn"]===c&&l["s-sr"]){p=!0;break}l=l.nextSibling}p||s.classList.remove(a+"-s")}}}var bt=(e,t,r=!1)=>{var s,n,i,a,f;const c=e.$hostElement$,l=e.$cmpMeta$,p=e.$vnode$||ie(null,null),o=dt(t)?t:gt(null,null,t);if(F=c.tagName,l.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},l.$attrsToReflect$.map(([d,g])=>o.$attrs$[g]=c[d])),r&&o.$attrs$)for(const d of Object.keys(o.$attrs$))c.hasAttribute(d)&&!["key","ref","style","class"].includes(d)&&(o.$attrs$[d]=c[d]);o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=p.$elm$=c.shadowRoot||c,q=c["s-sc"],oe=!!(l.$flags$&1)&&!(l.$flags$&128),B=c["s-cr"],J=!1,I(p,o,r);{if(z.$flags$|=1,le){Ne(o.$elm$);for(const d of x){const g=d.$nodeToRelocate$;if(!g["s-ol"]&&j.document){const $=j.document.createTextNode("");$["s-nr"]=g,R(g.parentNode,g["s-ol"]=$,g)}}for(const d of x){const g=d.$nodeToRelocate$,$=d.$slotRefNode$;if($){const m=$.parentNode;let E=$.nextSibling;{let _=(s=g["s-ol"])==null?void 0:s.previousSibling;for(;_;){let b=(n=_["s-nr"])!=null?n:null;if(b&&b["s-sn"]===g["s-sn"]&&m===(b.__parentNode||b.parentNode)){for(b=b.nextSibling;b===g||b!=null&&b["s-sr"];)b=b==null?void 0:b.nextSibling;if(!b||!b["s-nr"]){E=b;break}}_=_.previousSibling}}const ee=g.__parentNode||g.parentNode,k=g.__nextSibling||g.nextSibling;(!E&&m!==ee||k!==E)&&g!==E&&(!g["s-hn"]&&g["s-ol"]&&(g["s-hn"]=g["s-ol"].parentNode.nodeName),R(m,g,E),g.nodeType===1&&g.tagName!=="SLOT-FB"&&(g.hidden=(i=g["s-ih"])!=null?i:!1)),g&&typeof $["s-rf"]=="function"&&$["s-rf"]($)}else g.nodeType===1&&(r&&(g["s-ih"]=(a=g.hidden)!=null?a:!1),g.hidden=!0)}}J&&me(o.$elm$),z.$flags$&=-2,x.length=0}if(G.experimentalScopedSlotChanges&&l.$flags$&2){const d=o.$elm$.__childNodes||o.$elm$.childNodes;for(const g of d)g["s-hn"]!==F&&!g["s-sh"]&&(r&&g["s-ih"]==null&&(g["s-ih"]=(f=g.hidden)!=null?f:!1),g.hidden=!0)}B=void 0};const Y={content_wrap:0,ignore:[],ignore_with:"_!i-£___£%_",strict:!1,tab_size:2,tag_wrap:0,tag_wrap_width:80,trim:[]},A="__!i-£___£%__",O="!i-£___£%_",Me=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],ce=e=>/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e),Le=(e,t)=>{if(!e||!t)throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");let r;if(Array.isArray(e))r=structuredClone(e).concat(t);else if(typeof e=="object"){r={...e};for(let s of Object.keys(t))typeof t[s]!="object"?r[s]=t[s]:r[s]=Le(r[s]||{},t[s])}return r},_t=(e,t)=>Le(structuredClone(e),t),vt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(/\n/g,O+"nl!").replace(/\r/g,O+"cr!").replace(/\s/g,O+"ws!"))),e),wt=e=>e.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!"),mt=e=>{const t=/\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g;return e.replace(t,(r,s,n,i,a)=>{const f=n||a;if(!f)return r;const c=f.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!");return r.replace(f,c)})},St=e=>{const t=/<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;return e=e.replace(t,(r,s,n)=>r.replace(n,i=>i.replace(/</g,O+"lt!").replace(/>/g,O+"gt!"))),e},Et=(e,t)=>{const r=t.ignore,s=t.ignore_with;for(let n=0;n<r.length;n++){const i=new RegExp(`<${r[n]}[^>]*>((.|
6
+ )*?)</${r[n]}>`,"g");e=e.replace(i,(a,f)=>a.replace(f,c=>c.replace(/</g,"-"+s+"lt-").replace(/>/g,"-"+s+"gt-").replace(/\n/g,"-"+s+"nl-").replace(/\r/g,"-"+s+"cr-").replace(/\s/g,"-"+s+"ws-")))}return e},Ot=(e,t)=>{for(let r=0;r<t.length;r++){const s=new RegExp(`(<${t[r]}[^>]*>)\\s+`,"g"),n=new RegExp(`\\s+(</${t[r]}>)`,"g");e=e.replace(s,"$1").replace(n,"$1")}return e},xt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(O+"nl!","g"),`
7
+ `).replace(new RegExp(O+"cr!","g"),"\r").replace(new RegExp(O+"ws!","g")," "))),e),At=e=>(e=e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g,t=>t.replace(/__!i-£___£%__[a-z]{2}!/g,r=>r.replace(new RegExp(A+"nl!","g"),`
8
+ `).replace(new RegExp(A+"cr!","g"),"\r").replace(new RegExp(A+"ws!","g")," "))),e),Tt=e=>(e=e.replace(/<[\w:\-]+([^>]*)>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(O+"lt!","g"),"<").replace(new RegExp(O+"gt!","g"),">"))),e),kt=(e,t)=>{const r=t.ignore,s=t.ignore_with;for(let n=0;n<r.length;n++){const i=new RegExp(`<${r[n]}[^>]*>((.|
9
+ )*?)</${r[n]}>`,"g");e=e.replace(i,(a,f)=>a.replace(f,c=>c.replace(new RegExp("-"+s+"lt-","g"),"<").replace(new RegExp("-"+s+"gt-","g"),">").replace(new RegExp("-"+s+"nl-","g"),`
10
+ `).replace(new RegExp("-"+s+"cr-","g"),"\r").replace(new RegExp("-"+s+"ws-","g")," ")))}return e},jt=e=>{var s,n;if(typeof e!="object")throw new Error("Config must be an object.");if(!(Object.hasOwn(e,"content_wrap")||Object.hasOwn(e,"ignore")||Object.hasOwn(e,"ignore_with")||Object.hasOwn(e,"strict")||Object.hasOwn(e,"tab_size")||Object.hasOwn(e,"tag_wrap")||Object.hasOwn(e,"tag_wrap_width")||Object.hasOwn(e,"trim")))return Y;let r=e.tab_size;if(r){if(typeof r!="number")throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(r))throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);if(r=Math.floor(r),r<1||r>16)throw new Error("Tab size out of range. Expecting 1 to 16.");e.tab_size=r}if(Object.hasOwn(e,"content_wrap")&&typeof e.content_wrap!="number")throw new Error(`content_wrap config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"ignore")&&(!Array.isArray(e.ignore)||!((s=e.ignore)!=null&&s.every(i=>typeof i=="string"))))throw new Error("Ignore config must be an array of strings.");if(Object.hasOwn(e,"ignore_with")&&typeof e.ignore_with!="string")throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);if(Object.hasOwn(e,"strict")&&typeof e.strict!="boolean")throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);if(Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap=="boolean"&&(console.warn("tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."),e.tag_wrap_width?e.tag_wrap=e.tag_wrap_width:e.tag_wrap=Y.tag_wrap_width),Object.hasOwn(e,"tag_wrap")&&typeof e.tag_wrap!="number")throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);if(Object.hasOwn(e,"tag_wrap_width")&&console.warn("tag_wrap_width is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."),Object.hasOwn(e,"tag_wrap_width")&&typeof e.tag_wrap_width!="number")throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);if(Object.hasOwn(e,"trim")&&(!Array.isArray(e.trim)||!((n=e.trim)!=null&&n.every(i=>typeof i=="string"))))throw new Error("Trim config must be an array of strings.");return _t(Y,e)},Rt=(e,t,r)=>{const s=e.trim().split(/\s+/);if(s.length===0||s.length===1&&s[0]==="")return"";const n=[];let i="";const a=r;s.forEach(c=>{if(c==="")return;if(c.length>=t){i!==""&&n.push(n.length===0?r+i:a+i),n.push(n.length===0?r+c:a+c),i="";return}const l=i===""?c:i+" "+c;l.length<=t?i=l:(i!==""&&n.push(n.length===0?r+i:a+i),i=c)}),i!==""&&n.push(n.length===0?r+i:a+i);const f=n.join(`
11
+ `);return wt(f)},Nt=(e,t=!0)=>t&&!ce(e)?e:e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g,(r,s)=>Me.indexOf(s)>-1?`${r.substring(0,r.length-1)} />`.replace(/\/\s\//g,"/"):r.replace(/[\s]?\/>/g,`></${s}>`)),zt=(e,t=!1)=>(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>r.replace(s,n=>n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;").replace(/\s/g,"&nbsp;"))),t&&(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>(r=r.replace(s,n=>n.replace(/\n|\t/g,"").replace(/[a-z]+="\s*"/ig,"").replace(/>\s+</g,"><").replace(/\s+/g," ")),r=r.replace(/\s+/g," ").replace(/\s>/g,">").replace(/>\s/g,">").replace(/\s</g,"<").replace(/class=["']\s/g,n=>n.replace(/\s/g,"")).replace(/(class=.*)\s(["'])/g,"$1$2"),r))),e),It=(e,t=!0)=>(t&&!ce(e)||(e=zt(e),e=e.replace(/\n|\t/g,""),e=e.replace(/>\s+</g,"><"),e=e.replace(/ {2,}/g," "),e=e.replace(/ >/g,">"),e=e.replace(/ </g,"<"),e=e.replace(/> /g,">"),e=e.replace(/<\s*\//g,"</"),e=e.replace(/ = /g,"="),e=e.replace(/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,(r,s,n,i)=>{const a=i.trim();return`${s}=${n}${a}${n}`}),e=e.trim()),e);let Q,fe;const U={line:[]},Mt=e=>{U.line=[];let t=-1;const r=/(<[^>]+>)|([^<]+)/g;return e=e.replace(r,(s,n,i)=>(n?U.line.push({type:"tag",value:s}):i&&i.trim().length>0&&U.line.push({type:"text",value:s}),t++,`
10
12
  [#-# : ${t} : ${s} : #-#]
11
- `)),e},wt=e=>(e=bt(e,!1),re.length>0&&(e=gt(e,re)),e=ht(e,!1),e=_t(e),e),St=(e,t)=>{const r=t.tab_size,s=t.tag_wrap,n=t.tag_wrap_width;let i="";x.line.forEach((l,c)=>{e=e.replace(/\n+/g,`
12
- `).replace(`[#-# : ${c} : ${l.value} : #-#]`,p=>{var w,B;let a=0;const $=`[#-# : ${c-1} : ${(w=x.line[c-1])==null?void 0:w.value} : #-#]`;i+="0",c===0&&a++,p.indexOf(`#-# : ${c} : </`)>-1&&a++,$.indexOf("<!doctype")>-1&&a++,$.indexOf("<!--")>-1&&a++,$.indexOf("/> : #-#")>-1&&a++,$.indexOf(`#-# : ${c-1} : </`)>-1&&a++,((B=x.line[c-1])==null?void 0:B.type)==="text"&&a++;const g=i.length-a;if(i=i.substring(0,g),q&&p.indexOf("<!--")>-1)return"";const y=p.replace(`[#-# : ${c} : `,"").replace(" : #-#]","");if(s&&/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g.test(l.value)&&l.value.length>n){const G=/\s{1}[A-Za-z-]+(?:=".*?")?/g,E=l.value.split(G).filter(Boolean),v=l.value.matchAll(G),ne=r*g,Xt=ne+r;let ie=E[0].padStart(E[0].length+ne)+`
13
- `;for(const ze of v){const Yt=ze[0].trim().padStart(ze[0].trim().length+Xt)+`
14
- `;ie+=Yt}const Jt=E[1].padStart(E[1].trim().length+ne+(q&&ke.includes(E[0].slice(1))?1:0));return ie+=Jt,ie}else return y.padStart(y.length+r*g)})}),s&&(e=ct(e)),e=e.replace(/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,l=>l.replace(/\n|\t|\s{2,}/g,"")),s&&(e=pt(e)),q&&(e=e.replace(/\s\/>|\/>/g,">"));const o=e.substring(0,1),f=e.substring(e.length-1);return o===`
15
- `&&(e=e.substring(1,e.length)),f===`
16
- `&&(e=e.substring(0,e.length-1)),e},mt=(e,t)=>{if(!te(e))return e;const r=t?yt(t):ee;q=r.strict;const s=r.ignore.length>0;return re=r.trim,s&&(e=ut(e,r)),e=ft(e),e=wt(e),e=St(e,r),e=$t(e),s&&(e=dt(e,r)),e},Et=(e,t,r)=>{[null,void 0,"",!1].includes(r)||["innerHTML","style",""].includes(t)||e.setAttribute(t,["object","function"].includes(typeof r)?"⚠️ Property must be set through a script or a framework-specific syntax.":r)},Te=(e,t,r,s,n)=>{if(t&&typeof t=="string"){const i=document.createElement(t);Object.keys(r||{}).forEach(o=>{Et(i,o,r[o])}),s==null||s.forEach(o=>{Te(i,o.$tag$,o.$attrs$,o.$children$,o.$text$)}),r!=null&&r.innerHTML&&(i.innerHTML=r.innerHTML),e.appendChild(i)}n&&(e.innerHTML=n)},Ot=(e,t,r=[])=>{const s={};if(typeof e!="object")throw new Error("filterArgs - args isn't an object.");for(const n in e)if(!r.includes(n)){const i=e[n],o=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!t||!Object.keys(t).includes(n)||t[n]!==i)&&(s[o]=i)}return s},kt=(e,t)=>{var s,n;const r=document.getElementById("storybook-root");if(r!==null)return(n=document.querySelector("[lang]"))==null||n.setAttribute("lang",((s=t.globals)==null?void 0:s.locale)||"en"),at({$cmpMeta$:{$flags$:0,$tagName$:r.tagName},$hostElement$:r},e(t)),r.children[r.children.length-1]},At=({$tag$:e,$attrs$:t,$children$:r,$text$:s})=>{const n=document.createElement("div");return Te(n,e,t,r,s),mt(n.innerHTML,{tag_wrap:!0}).replace(/="true"/g,"")},F=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`};class Tt{constructor(t){b(this,"jsonDoc");oe(this,T,t=>this.jsonDoc.components.find(r=>r.tag===t));oe(this,Z,t=>{const r=t.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,s=>s.replace(/\|/g," OR ")).split("|").map(s=>s.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"}}:r.length>1?r.includes("string")?{control:{type:"text"}}:r.every(s=>s==null?void 0:s.includes("[]"))?{control:{type:"object"}}:(r.unshift(void 0),{control:{type:"select"},options:r}):{control:{type:"object"}}});b(this,"extractArgTypes",t=>{const r=z(this,T).call(this,t),s=r==null?void 0:r.props.reduce((p,a)=>{const{control:$,options:g}=z(this,Z).call(this,a);return{...p,[a.name]:{name:a.attr||a.name,description:a.docs,type:{required:a.required},table:{category:"props",type:{summary:a.type},defaultValue:{summary:a.default}},control:$,options:g}}},{}),n=r==null?void 0:r.events.reduce((p,a)=>({...p,[a.event]:{name:a.event,description:a.docs,table:{category:"events",type:{summary:a.detail}}}}),{}),i=r==null?void 0:r.methods.reduce((p,a)=>({...p,[a.name]:{name:a.name,description:a.docs,table:{category:"methods",type:{summary:a.signature}}}}),{}),o=r==null?void 0:r.slots.reduce((p,a)=>({...p,[a.name]:{name:a.name!==""?a.name:"default",description:a.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),f=r==null?void 0:r.styles.reduce((p,a)=>({...p,[a.name]:{name:a.name,description:a.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),l=r==null?void 0:r.dependencies.reduce((p,a)=>{const $=z(this,T).call(this,a);return $?{...p,[a]:{name:a,description:`<a href="./?path=/docs/${F("",$==null?void 0:$.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}:p},{}),c=r==null?void 0:r.dependents.reduce((p,a)=>{const $=z(this,T).call(this,a);return $?{...p,[a]:{name:a,description:`<a href="./?path=/docs/${F("",$==null?void 0:$.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}:p},{});return{...s,...n,...i,...o,...f,...l,...c}});b(this,"extractComponentDescription",t=>{const r=z(this,T).call(this,t);return(r==null?void 0:r.readme)||(r==null?void 0:r.docs)});this.jsonDoc=t}}T=new WeakMap,Z=new WeakMap;const jt=(e,t)=>{if(t)return`${e}${t}`},je=e=>{let t=e.overview?`${e.overview}
13
+ `)),e},Lt=e=>(e=Nt(e,!1),fe.length>0&&(e=Ot(e,fe)),e=It(e,!1),e=Mt(e),e),Ft=(e,t)=>{const r=" ".repeat(t.tab_size),s=t.tag_wrap,n=t.content_wrap;let i="";const a=[],f=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,c=/\s{1}[A-Za-z-]+(?:=".*?")?/g;U.line.forEach((p,o)=>{let d=p.value,g=0;const $=U.line[o-1],m=($==null?void 0:$.value)??"";i+="0",o===0&&g++,d.trim().startsWith("</")&&g++,m.trim().startsWith("<!doctype")&&g++,m.trim().startsWith("<!--")&&g++,m.trim().endsWith("/>")&&g++,m.trim().startsWith("</")&&g++,($==null?void 0:$.type)==="text"&&g++;const ee=Math.max(0,i.length-g);i=i.substring(0,ee);const k=r.repeat(ee);if(Q&&d.trim().startsWith("<!--"))return;let _=d;if(p.type==="text"&&n>0&&_.length>=n)_=Rt(_,n,k);else if(s>0&&_.length>s&&f.test(_)){f.lastIndex=0,c.lastIndex=0;const b=_.split(c).filter(Boolean);if(b.length>=2){const cr=_.matchAll(c),fr=k+r;let ge=k+b[0]+`
14
+ `;for(const $r of cr){const yr=$r[0].trim();ge+=fr+yr+`
15
+ `}const We=b[0].match(/<([A-Za-z_:-]+)/),ur=We?We[1]:"",gr=Me.includes(ur),pr=b[1].trim(),dr=k+(Q&&gr?" ":"");ge+=dr+pr,_=ge}else _=k+_}else _=k+_;a.push(_)});let l=a.join(`
16
+ `);return s>0&&(l=vt(l)),n>0&&/\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(l)&&(l=mt(l)),l=l.replace(/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,p=>p.replace(/\n|\t|\s{2,}/g,"")),n>0&&(l=At(l)),s>0&&(l=xt(l)),Q&&(l=l.replace(/\s\/>|\/>/g,">")),l.startsWith(`
17
+ `)&&(l=l.substring(1)),l.endsWith(`
18
+ `)&&(l=l.substring(0,l.length-1)),l},Ct=(e,t)=>{if(!ce(e))return e;const r=t?jt(t):Y;Q=r.strict;const s=r.ignore.length>0;return fe=r.trim,s&&(e=Et(e,r)),e=St(e),e=Lt(e),e=Ft(e,r),e=Tt(e),s&&(e=kt(e,r)),e},Pt=(e,t,r)=>{[null,void 0,"",!1].includes(r)||["innerHTML","style",""].includes(t)||e.setAttribute(t,["object","function"].includes(typeof r)?"⚠️ Property must be set through a script or a framework-specific syntax.":r)},Fe=(e,t,r,s,n)=>{if(t&&typeof t=="string"){const i=document.createElement(t);Object.keys(r||{}).forEach(a=>{Pt(i,a,r[a])}),s==null||s.forEach(a=>{Fe(i,a.$tag$,a.$attrs$,a.$children$,a.$text$)}),r!=null&&r.innerHTML&&(i.innerHTML=r.innerHTML),e.appendChild(i)}n&&(e.innerHTML=n)},Ut=(e,t,r=[])=>{const s={};if(typeof e!="object")throw new Error("filterArgs - args isn't an object.");for(const n in e)if(!r.includes(n)){const i=e[n],a=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!t||!Object.keys(t).includes(n)||t[n]!==i)&&(s[a]=i)}return s},Wt=(e,t)=>{var s,n;const r=document.getElementById("storybook-root");if(r!==null)return(n=document.querySelector("[lang]"))==null||n.setAttribute("lang",((s=t.globals)==null?void 0:s.locale)||"en"),bt({$cmpMeta$:{$flags$:0,$tagName$:r.tagName},$hostElement$:r},e(t)),r.children[r.children.length-1]},Dt=({$tag$:e,$attrs$:t,$children$:r,$text$:s})=>{const n=document.createElement("div");return Fe(n,e,t,r,s),Ct(n.innerHTML,{tag_wrap:40,content_wrap:120}).replace(/="true"/g,"")},W=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`};class Zt{constructor(t){h(this,"jsonDoc");L(this,N,t=>this.jsonDoc.components.find(r=>r.tag===t));L(this,V,t=>{const r=t.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,s=>s.replace(/\|/g," OR ")).split("|").map(s=>s.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"}}:r.length>1?r.includes("string")?{control:{type:"text"}}:r.every(s=>s==null?void 0:s.includes("[]"))?{control:{type:"object"}}:(r.unshift(void 0),{control:{type:"select"},options:r}):{control:{type:"object"}}});h(this,"extractArgTypes",t=>{const r=S(this,N).call(this,t),s=r==null?void 0:r.props.reduce((p,o)=>{const{control:d,options:g}=S(this,V).call(this,o);return{...p,[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:d,options:g}}},{}),n=r==null?void 0:r.events.reduce((p,o)=>({...p,[o.event]:{name:o.event,description:o.docs,table:{category:"events",type:{summary:o.detail}}}}),{}),i=r==null?void 0:r.methods.reduce((p,o)=>({...p,[o.name]:{name:o.name,description:o.docs,table:{category:"methods",type:{summary:o.signature}}}}),{}),a=r==null?void 0:r.slots.reduce((p,o)=>({...p,[o.name]:{name:o.name!==""?o.name:"default",description:o.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),f=r==null?void 0:r.styles.reduce((p,o)=>({...p,[o.name]:{name:o.name,description:o.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),c=r==null?void 0:r.dependencies.reduce((p,o)=>{const d=S(this,N).call(this,o);return d?{...p,[o]:{name:o,description:`<a href="./?path=/docs/${W("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}:p},{}),l=r==null?void 0:r.dependents.reduce((p,o)=>{const d=S(this,N).call(this,o);return d?{...p,[o]:{name:o,description:`<a href="./?path=/docs/${W("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}:p},{});return{...s,...n,...i,...a,...f,...c,...l}});h(this,"extractComponentDescription",t=>{const r=S(this,N).call(this,t);return(r==null?void 0:r.readme)||(r==null?void 0:r.docs)});this.jsonDoc=t}}N=new WeakMap,V=new WeakMap;const Ht=(e,t)=>{if(t)return`${e}${t}`},Ce=e=>{let t=e.overview?`${e.overview}
17
19
 
18
20
  `:"";const r=e.props.filter(({attr:n})=>n!==void 0);r.length&&(t+=`Attributes:
19
21
  `,t+=r.map(({attr:n,docs:i})=>`- \`${n}\`: ${i}
@@ -33,7 +35,7 @@
33
35
  `),e.slots.length&&(t+=`Slots:
34
36
  `,t+=e.slots.map(({name:n,docs:i})=>`- \`${n}\`: ${i}
35
37
  `).join(""),t+=`
36
- `),t},se=e=>`${e.docs}
38
+ `),t},ue=e=>`${e.docs}
37
39
 
38
- Type: \`${e.type}\``,Rt=(e,t,r,s)=>({$schema:"https://json.schemastore.org/web-types",name:e,version:t,"description-markup":"markdown",contributions:{html:{elements:r.components.map(n=>{const i=F(s,n.filePath);return{name:n.tag,description:je(n),"doc-url":i,attributes:n.props.filter(o=>o.attr).map(o=>({name:o.attr,description:se(o),"doc-url":i,value:{type:o.type,default:o.default,required:o.required}})),js:{properties:n.props.map(o=>({name:o.name,description:se(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}))}}})}}}),xt=(e,t,r)=>[{name:"Storybook",url:F(e,r)},{name:"Sources",url:jt(t,r)}],zt=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},Nt=(e,t,r)=>({version:1.1,tags:e.components.map(s=>{const n=xt(t,r,s.filePath);return{name:s.tag,description:je(s),attributes:s.props.map(i=>({name:i.attr||i.name,description:se(i),values:zt(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),Mt=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(r=>({name:r.name,description:r.docs})))}),Lt=e=>{const t={value:"2023",pattern:"yyyy"},r={value:"12",pattern:"mm"},s={value:"24",pattern:"dd"};return xe([t.value,r.value,s.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(r.value,r.pattern).replace(s.value,s.pattern)},Ft=e=>e.toISOString().split("T")[0],Ct=(e,t,r)=>{const s=e.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(s==null?void 0:s.lang),i=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||r,o=i.split("-").shift();return Object.keys(t).length===0?{locale:i,messages:{lang:r}}:{locale:i,messages:t[o]||t[r]||{lang:r}}},It=(e,t,r)=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),Dt=(e,t,r=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:r}).format(Number(e)),Ut=(e,t,r=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:r,maximumFractionDigits:r}).format(e),Pt=(e,t,r,s="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:r,unitDisplay:s,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),Re=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,xe=(e,t,r)=>typeof e!="string"||e===""||!Re.test(e)?"":new Intl.DateTimeFormat(t,r).format(new Date(e)),Ht=(e,t)=>r=>Ct(r,e,t),qt=({disconnect:e,observe:t,takeRecords:r})=>{class s{constructor(i){b(this,"disconnect",e);b(this,"observe",t);b(this,"takeRecords",r);b(this,"cb");this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:s})}),s},Zt=({disconnect:e,observe:t})=>{class r{constructor(n){b(this,"disconnect",e);b(this,"observe",t);b(this,"unobserve");b(this,"cb");this.cb=n}}return[window,global].forEach(s=>{Object.defineProperty(s,"ResizeObserver",{writable:!0,configurable:!0,value:r})}),r};class Bt extends Event{constructor(){super(...arguments);b(this,"detail")}}const Gt=()=>{class e extends Bt{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},Wt=e=>{const t=r=>(setTimeout(r,1),e(),0);return[window,global].forEach(r=>{Object.defineProperty(r,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t};u.ClassList=Me,u.StorybookPreview=Tt,u.allItemsAreString=Le,u.cleanString=Pe,u.createID=d,u.dateRegExp=Re,u.dateToString=Ft,u.defineLocales=Ht,u.filterArgs=Ot,u.focusableElements=Ce,u.getLocaleDatePattern=Lt,u.getParentWindows=W,u.getStoryHTML=At,u.getStorybookUrl=F,u.getWindows=Ie,u.isTagName=Fe,u.isValidNumber=Ue,u.isValidString=le,u.isValideID=_,u.localeCurrency=It,u.localeDate=xe,u.localeNumber=Dt,u.localePercent=Ut,u.localeUnit=Pt,u.nextTick=He,u.setUpRequestAnimationFrameMock=Wt,u.setupMutationObserverMock=qt,u.setupResizeObserverMock=Zt,u.setupSubmitEventMock=Gt,u.stencilWrapper=kt,u.toString=De,u.vsCodeCssGenerator=Mt,u.vsCodeGenerator=Nt,u.webTypesGenerator=Rt,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
40
+ Type: \`${e.type}\``,Gt=(e,t,r,s)=>({$schema:"https://json.schemastore.org/web-types",name:e,version:t,"description-markup":"markdown",contributions:{html:{elements:r.components.map(n=>{const i=W(s,n.filePath);return{name:n.tag,description:Ce(n),"doc-url":i,attributes:n.props.filter(a=>a.attr).map(a=>({name:a.attr,description:ue(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),js:{properties:n.props.map(a=>({name:a.name,description:ue(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),events:n.events.map(a=>({name:a.event,description:a.docs}))},css:{properties:n.styles.map(a=>({name:a.name,description:a.docs}))}}})}}}),qt=(e,t,r)=>[{name:"Storybook",url:W(e,r)},{name:"Sources",url:Ht(t,r)}],Bt=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},Jt=(e,t,r)=>({version:1.1,tags:e.components.map(s=>{const n=qt(t,r,s.filePath);return{name:s.tag,description:Ce(s),attributes:s.props.map(i=>({name:i.attr||i.name,description:ue(i),values:Bt(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),Xt=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(r=>({name:r.name,description:r.docs})))}),Kt=e=>{const t={value:"2023",pattern:"yyyy"},r={value:"12",pattern:"mm"},s={value:"24",pattern:"dd"};return Ue([t.value,r.value,s.value].join("-"),e,{timeZone:"UTC"}).replace(t.value,t.pattern).replace(r.value,r.pattern).replace(s.value,s.pattern)},Yt=e=>e.toISOString().split("T")[0],Qt=(e,t,r)=>{const s=e.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(s==null?void 0:s.lang),i=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||r,a=i.split("-").shift();return Object.keys(t).length===0?{locale:i,messages:{lang:r}}:{locale:i,messages:t[a]||t[r]||{lang:r}}},Vt=(e,t,r)=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),er=(e,t,r=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:r}).format(Number(e)),tr=(e,t,r=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:r,maximumFractionDigits:r}).format(e),rr=(e,t,r,s="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:r,unitDisplay:s,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),Pe=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,Ue=(e,t,r)=>typeof e!="string"||e===""||!Pe.test(e)?"":new Intl.DateTimeFormat(t,r).format(new Date(e)),sr=(e,t)=>r=>Qt(r,e,t),nr=({disconnect:e,observe:t,takeRecords:r})=>{class s{constructor(i){h(this,"disconnect",e);h(this,"observe",t);h(this,"takeRecords",r);h(this,"cb");this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:s})}),s},ir=({disconnect:e,observe:t})=>{class r{constructor(n){h(this,"disconnect",e);h(this,"observe",t);h(this,"unobserve");h(this,"cb");this.cb=n}}return[window,global].forEach(s=>{Object.defineProperty(s,"ResizeObserver",{writable:!0,configurable:!0,value:r})}),r};class ar extends Event{constructor(){super(...arguments);h(this,"detail")}}const or=()=>{class e extends ar{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},lr=e=>{const t=r=>(setTimeout(r,1),e(),0);return[window,global].forEach(r=>{Object.defineProperty(r,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t};u.ClassList=Z,u.Cursor=Qe,u.Page=he,u.Paginate=Ve,u.StorybookPreview=Zt,u.allItemsAreString=He,u.cleanString=Ke,u.createID=y,u.dateRegExp=Pe,u.dateToString=Yt,u.defineLocales=sr,u.filterArgs=Ut,u.focusableElements=qe,u.getLocaleDatePattern=Kt,u.getObjectValueFromKey=$e,u.getParentWindows=re,u.getStoryHTML=Dt,u.getStorybookUrl=W,u.getWindows=Be,u.isObject=H,u.isTagName=Ge,u.isValidNumber=Xe,u.isValidString=de,u.isValideID=v,u.localeCurrency=Vt,u.localeDate=Ue,u.localeNumber=er,u.localePercent=tr,u.localeUnit=rr,u.nextTick=Ye,u.setUpRequestAnimationFrameMock=lr,u.setupMutationObserverMock=nr,u.setupResizeObserverMock=ir,u.setupSubmitEventMock=or,u.stencilWrapper=Wt,u.toString=Je,u.vsCodeCssGenerator=Xt,u.vsCodeGenerator=Jt,u.webTypesGenerator=Gt,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
39
41
  //# sourceMappingURL=index.umd.js.map