@mgdis/stencil-helpers 3.2.2 → 3.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.es.js +471 -420
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +12 -12
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(f,h){typeof exports=="object"&&typeof module<"u"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):(f=typeof globalThis<"u"?globalThis:f||self,h(f.StencilHelpersModule={}))})(this,function(f){"use strict";var
|
|
1
|
+
(function(f,h){typeof exports=="object"&&typeof module<"u"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):(f=typeof globalThis<"u"?globalThis:f||self,h(f.StencilHelpersModule={}))})(this,function(f){"use strict";var Dr=Object.defineProperty;var Ve=f=>{throw TypeError(f)};var Zr=(f,h,b)=>h in f?Dr(f,h,{enumerable:!0,configurable:!0,writable:!0,value:b}):f[h]=b;var _=(f,h,b)=>Zr(f,typeof h!="symbol"?h+"":h,b),et=(f,h,b)=>h.has(f)||Ve("Cannot "+b);var E=(f,h,b)=>(et(f,h,"read from private field"),b?b.call(f):h.get(f)),F=(f,h,b)=>h.has(f)?Ve("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(f):h.set(f,b),te=(f,h,b,P)=>(et(f,h,"write to private field"),P?P.call(f,b):h.set(f,b),b);var j,L,G,N,V;class h{constructor(t=[]){_(this,"classes");_(this,"add",t=>{this.has(t)||this.classes.push(t)});_(this,"delete",t=>{const r=this.classes.indexOf(t);r>-1&&this.classes.splice(r,1)});_(this,"has",t=>this.classes.includes(t));_(this,"join",()=>this.classes.join(" "));this.classes=t}}const b=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,P=(e,t,r)=>{const s=".";if(!b(e)||typeof t!="string")return r;const[n,...i]=t.split(s);return i.length?P(e[n],i.join(s)):e[n]},tt=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),_e=e=>typeof e=="string"&&e.trim()!=="",rt=e=>typeof e=="object"?JSON.stringify(e):String(e),st=e=>typeof e=="string"?e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):e,nt=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r>0?"-":"")+t.toLowerCase()).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""),it=(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},at=e=>_e(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null,ot=e=>{let t;return typeof e=="string"?t=e:e&&typeof e=="object"&&(b(e)||Array.isArray(e))?t=JSON.stringify(e):e!=null&&typeof e!="boolean"&&typeof e!="object"&&(t=String(e)),t&&nt(t)},lt=async e=>{if(e)return e()},ct={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"},ye=10;class be{constructor(t){_(this,"items",[]);_(this,"total");_(this,"top",ye);_(this,"next");_(this,"baseIndex",1);_(this,"getIndexFromCursor",(t="first",r)=>{if(!Array.isArray(this.items)||!this.items.length)return null;const n=this.items.length-this.baseIndex;let i,a=0;if(["previous","next"].includes(t)&&r){const c=this.items.findIndex(l=>JSON.stringify(l)===JSON.stringify(r));if(c===-1)return 0;a=c}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=0,i});if(b(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 ft{constructor(t,r){_(this,"items",[]);F(this,j,ye);F(this,L);F(this,G);_(this,"getPage",(t=0,r)=>{const s=typeof r=="function"?this.items.filter(r):this.items;let n;return E(this,L)?n=E(this,L):s.length>t+E(this,j)&&(n=()=>this.getPage(t+E(this,j),r)),new be({items:s.slice(t,t+E(this,j)),total:E(this,G),top:E(this,j),next:n})});Array.isArray(t)&&(this.items=t),r&&(["string","function"].includes(typeof r.next)||b(r.next)&&URL.canParse(r.next))&&te(this,L,r.next),typeof(r==null?void 0:r.top)=="number"&&te(this,j,r.top),typeof(r==null?void 0:r.total)=="number"&&te(this,G,r.total)}}j=new WeakMap,L=new WeakMap,G=new WeakMap;const ut=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,gt=e=>e.toISOString().split("T")[0],pt=(e,t)=>t.includes(e==null?void 0:e.tagName.toLowerCase()),dt='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',$t=e=>typeof e=="number"&&!Number.isNaN(e),ht=e=>{const t=re(e),r=ve(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},ve=(e,t=[])=>{if(e.frames.length>0)for(const r of Array.from(e.frames))t.push(r),ve(r,t);return t};var _t=Object.defineProperty,yt=(e,t)=>{for(var r in t)_t(e,r,{get:t[r],enumerable:!0})},bt=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),vt={};yt(vt,{err:()=>me,map:()=>mt,ok:()=>se,unwrap:()=>wt,unwrapErr:()=>St});var se=e=>({isOk:!0,isErr:!1,value:e}),me=e=>({isOk:!1,isErr:!0,value:e});function mt(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 me(r)}throw"should never get here"}var wt=e=>{if(e.isOk)return e.value;throw e.value},St=e=>{if(e.isErr)return e.value;throw e.value},ne=e=>{const t=bt(e);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};ne("::slotted"),ne(":host"),ne(":host-context");const we=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`},Et=(e,t)=>{if(t)return`${e}${t}`},Se=e=>{let t=e.overview?`${e.overview}
|
|
2
2
|
|
|
3
3
|
`:"";const r=e.props.filter(({attr:n})=>n!==void 0);r.length&&(t+=`Attributes:
|
|
4
4
|
`,t+=r.map(({attr:n,docs:i})=>`- \`${n}\`: ${i}
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
`).join(""),t+=`
|
|
21
21
|
`),t},ie=e=>`${e.docs}
|
|
22
22
|
|
|
23
|
-
Type: \`${e.type}\``,
|
|
24
|
-
Flattening is not supported for Stencil non-shadow slots.
|
|
23
|
+
Type: \`${e.type}\``,Ot=(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=we(s,n.filePath);return{name:n.tag,description:Se(n),"doc-url":i,attributes:n.props.filter(a=>a.attr).map(a=>({name:a.attr,description:ie(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),js:{properties:n.props.map(a=>({name:a.name,description:ie(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}))}}})}}}),xt=(e,t,r)=>[{name:"Storybook",url:we(e,r)},{name:"Sources",url:Et(t,r)}],kt=e=>{if(!e.values.some(({value:t})=>t===void 0))return e.values.map(({value:t})=>({name:t}))},At=(e,t,r)=>({version:1.1,tags:e.components.map(s=>{const n=xt(t,r,s.filePath);return{name:s.tag,description:Se(s),attributes:s.props.map(i=>({name:i.attr??i.name,description:ie(i),values:kt(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),jt=e=>({version:1.1,properties:e.components.flatMap(t=>t.styles.map(r=>({name:r.name,description:r.docs})))}),Tt=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,Rt=e=>{const t={value:"2023",pattern:"yyyy"},r={value:"12",pattern:"mm"},s={value:"24",pattern:"dd"};return Ee([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)},Nt=(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}}},It=(e,t,r)=>new Intl.NumberFormat(t,{style:"currency",currency:r}).format(e),zt=(e,t,r=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:r}).format(Number(e)),Mt=(e,t,r=0)=>new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:r,maximumFractionDigits:r}).format(e),Lt=(e,t,r,s="short",n=0)=>new Intl.NumberFormat(t,{style:"unit",unit:r,unitDisplay:s,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),Ee=(e,t,r)=>typeof e!="string"||e===""||!Tt.test(e)?"":new Intl.DateTimeFormat(t,r).format(new Date(e)),Ct=(e,t)=>r=>Nt(r,e,t);var q={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},Ft=Object.defineProperty,Pt=(e,t)=>{for(var r in t)Ft(e,r,{get:t[r],enumerable:!0})},Wt="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml",Oe=(e,t)=>t in e,xe="http://www.w3.org/1999/xlink",T=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)},Dt=e=>e!=null&&e!==void 0,ke=e=>(e=typeof e,e==="object"||e==="function"),Zt=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ht={};Pt(Ht,{err:()=>Ae,map:()=>Bt,ok:()=>ae,unwrap:()=>Gt,unwrapErr:()=>qt});var ae=e=>({isOk:!0,isErr:!1,value:e}),Ae=e=>({isOk:!1,isErr:!0,value:e});function Bt(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>ae(s)):ae(r)}if(e.isErr){const r=e.value;return Ae(r)}throw"should never get here"}var Gt=e=>{if(e.isOk)return e.value;throw e.value},qt=e=>{if(e.isErr)return e.value;throw e.value},je=e=>{const t=Ne(e,"childNodes");e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&Te(t,e.tagName).forEach(s=>{s.nodeType===1&&s.tagName==="SLOT-FB"&&(Kt(s,oe(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&&Ne(s,"childNodes").length&&je(s)}},Jt=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 Te(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,...Te(i.childNodes,t,r)];return n}var Kt=(e,t,r=!0)=>{const s=[];(r&&e["s-sr"]||!e["s-sr"])&&s.push(e);let n=e;for(;n=n.nextSibling;)oe(n)===t&&(r||!n["s-sr"])&&s.push(n);return s},Re=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",oe=e=>typeof e["s-sn"]=="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function Xt(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(`
|
|
24
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
25
25
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
26
26
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
27
|
-
`);const a=this["s-cr"].parentElement;return(a.__childNodes?a.childNodes:Wt(a.childNodes)).forEach(l=>{i===oe(l)&&n.push(l)}),r?n.filter(l=>l.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function Re(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 Zt=(e,t,...r)=>{let s=null,n=null,i=null,a=!1,c=!1;const l=[],u=o=>{for(let d=0;d<o.length;d++)s=o[d],Array.isArray(s)?u(s):s!=null&&typeof s!="boolean"&&((a=!Ae(s))&&(s=String(s)),a&&c?l[l.length-1].$text$+=s:l.push(a?le(null,s):s),c=a)};u(r);const g=le(e,null);return g.$attrs$=t,l.length>0&&(g.$children$=l),g.$key$=n,g.$name$=i,g},le=(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},Ht={},Bt=e=>e&&e.$tag$===Ht,Ne=(e,t,r,s,n,i,a)=>{if(r===s)return;let c=Ee(e,t),l=t.toLowerCase();if(t==="class"){const u=e.classList,g=Ie(r);let o=Ie(s);u.remove(...g.filter(d=>d&&!o.includes(d))),u.add(...o.filter(d=>d&&!g.includes(d)))}else if(t==="style"){for(const u in r)(!s||s[u]==null)&&(u.includes("-")?e.style.removeProperty(u):e.style[u]="");for(const u in s)(!r||s[u]!==r[u])&&(u.includes("-")?e.style.setProperty(u,s[u]):e.style[u]=s[u])}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):Ee(T,l)?t=l.slice(2):t=l[2]+t.slice(3),r||s){const u=t.endsWith(ze);t=t.replace(qt,""),r&&I.rel(e,t,r,u),s&&I.ael(e,t,s,u)}}else{const u=Ae(s);if((c||u&&s!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const o=s??"";t==="list"?c=!1:(r==null||e[t]!=o)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=o:e.setAttribute(t,o))}}catch{}let g=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,g=!0),s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&(g?e.removeAttributeNS(Oe,t):e.removeAttribute(t)):(!c||i&4||n)&&!u&&e.nodeType===1&&(s=s===!0?"":s,g?e.setAttributeNS(Oe,t,s):e.setAttribute(t,s))}},Gt=/\s/,Ie=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split(Gt)),ze="Capture",qt=new RegExp(ze+"$"),ce=(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 c of Me(Object.keys(i)))c in a||Ne(n,c,i[c],void 0,r,t.$flags$);for(const c of Me(Object.keys(a)))Ne(n,c,i[c],a[c],r,t.$flags$)};function Me(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var q,J,W,fe=!1,K=!1,ue=!1,m=!1,X=(e,t,r)=>{var s;const n=t.$children$[r];let i=0,a,c,l;if(fe||(ue=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)a=n.$elm$=T.document.createTextNode(n.$text$);else if(n.$flags$&1)a=n.$elm$=T.document.createTextNode(""),ce(null,n,m);else{if(m||(m=n.$tag$==="svg"),!T.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$=T.document.createElementNS(m?It:zt,!fe&&G.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),m&&n.$tag$==="foreignObject"&&(m=!1),ce(null,n,m),Mt(q)&&a["s-si"]!==q&&a.classList.add(a["s-si"]=q),n.$children$)for(i=0;i<n.$children$.length;++i)c=X(e,n,i),c&&a.appendChild(c);n.$tag$==="svg"?m=!1:a.tagName==="foreignObject"&&(m=!0)}return a["s-hn"]=W,n.$flags$&3&&(a["s-sr"]=!0,a["s-cr"]=J,a["s-sn"]=n.$name$||"",a["s-rf"]=(s=n.$attrs$)==null?void 0:s.ref,Dt(a),l=e&&e.$children$&&e.$children$[r],l&&l.$tag$===n.$tag$&&e.$elm$&&U(e.$elm$,!1),We(J,a,t.$elm$,e==null?void 0:e.$elm$)),a},U=(e,t)=>{I.$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"]!==W&&n["s-ol"]&&(R(D(n).parentNode,n,D(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,ue=!0),t&&U(n,t)}I.$flags$&=-2},Le=(e,t,r,s,n,i)=>{let a=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(a.shadowRoot&&a.tagName===W&&(a=a.shadowRoot);n<=i;++n)s[n]&&(c=X(null,r,n),c&&(s[n].$elm$=c,R(a,c,D(t))))},Ce=(e,t,r)=>{for(let s=t;s<=r;++s){const n=e[s];if(n){const i=n.$elm$;Pe(n),i&&(K=!0,i["s-ol"]?i["s-ol"].remove():U(i,!0),i.remove())}}},Jt=(e,t,r,s,n=!1)=>{let i=0,a=0,c=0,l=0,u=t.length-1,g=t[0],o=t[u],d=s.length-1,p=s[0],$=s[d],E,b;for(;i<=u&&a<=d;)if(g==null)g=t[++i];else if(o==null)o=t[--u];else if(p==null)p=s[++a];else if($==null)$=s[--d];else if(Y(g,p,n))z(g,p,n),g=t[++i],p=s[++a];else if(Y(o,$,n))z(o,$,n),o=t[--u],$=s[--d];else if(Y(g,$,n))(g.$tag$==="slot"||$.$tag$==="slot")&&U(g.$elm$.parentNode,!1),z(g,$,n),R(e,g.$elm$,o.$elm$.nextSibling),g=t[++i],$=s[--d];else if(Y(o,p,n))(g.$tag$==="slot"||$.$tag$==="slot")&&U(o.$elm$.parentNode,!1),z(o,p,n),R(e,o.$elm$,g.$elm$),o=t[--u],p=s[++a];else{for(c=-1,l=i;l<=u;++l)if(t[l]&&t[l].$key$!==null&&t[l].$key$===p.$key$){c=l;break}c>=0?(b=t[c],b.$tag$!==p.$tag$?E=X(t&&t[a],r,c):(z(b,p,n),t[c]=void 0,E=b.$elm$),p=s[++a]):(E=X(t&&t[a],r,a),p=s[++a]),E&&R(D(g.$elm$).parentNode,E,D(g.$elm$))}i>u?Le(e,s[d+1]==null?null:s[d+1].$elm$,r,s,a,d):a>d&&Ce(t,i,u)},Y=(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,D=e=>e&&e["s-ol"]||e,z=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,a=t.$tag$,c=t.$text$;let l;c===null?(m=a==="svg"?!0:a==="foreignObject"?!1:m,ce(e,t,m),n!==null&&i!==null?Jt(s,n,t,i,r):i!==null?(e.$text$!==null&&(s.textContent=""),Le(s,null,t,i,0,i.length-1)):!r&&G.updatable&&n!==null&&Ce(n,0,n.length-1),m&&a==="svg"&&(m=!1)):(l=s["s-cr"])?l.parentNode.textContent=c:e.$text$!==c&&(s.data=c)},O=[],Fe=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(Te(t,a)){let c=O.find(l=>l.$nodeToRelocate$===t);K=!0,t["s-sn"]=t["s-sn"]||a,c?(c.$nodeToRelocate$["s-sh"]=i["s-hn"],c.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],O.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&O.map(l=>{Te(l.$nodeToRelocate$,t["s-sn"])&&(c=O.find(u=>u.$nodeToRelocate$===t),c&&!l.$slotRefNode$&&(l.$slotRefNode$=c.$slotRefNode$))})}else O.some(c=>c.$nodeToRelocate$===t)||O.push({$nodeToRelocate$:t})}i.nodeType===1&&Fe(i)}},Pe=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Pe)},R=(e,t,r)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&We(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,r));function We(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 c=t["s-sn"],l=t["s-hn"];if((n=r.classList)==null||n.add(a+"-s"),s&&((i=s.classList)!=null&&i.contains(a+"-s"))){let u=(s.__childNodes||s.childNodes)[0],g=!1;for(;u;){if(u["s-sn"]!==c&&u["s-hn"]===l&&u["s-sr"]){g=!0;break}u=u.nextSibling}g||s.classList.remove(a+"-s")}}}var Kt=(e,t,r=!1)=>{var s,n,i,a,c;const l=e.$hostElement$,u=e.$cmpMeta$,g=e.$vnode$||le(null,null),o=Bt(t)?t:Zt(null,null,t);if(W=l.tagName,u.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},u.$attrsToReflect$.map(([d,p])=>o.$attrs$[p]=l[d])),r&&o.$attrs$)for(const d of Object.keys(o.$attrs$))l.hasAttribute(d)&&!["key","ref","style","class"].includes(d)&&(o.$attrs$[d]=l[d]);o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=g.$elm$=l.shadowRoot||l,q=l["s-sc"],fe=!!(u.$flags$&1)&&!(u.$flags$&128),J=l["s-cr"],K=!1,z(g,o,r);{if(I.$flags$|=1,ue){Fe(o.$elm$);for(const d of O){const p=d.$nodeToRelocate$;if(!p["s-ol"]&&T.document){const $=T.document.createTextNode("");$["s-nr"]=p,R(p.parentNode,p["s-ol"]=$,p)}}for(const d of O){const p=d.$nodeToRelocate$,$=d.$slotRefNode$;if($){const E=$.parentNode;let b=$.nextSibling;{let B=(s=p["s-ol"])==null?void 0:s.previousSibling;for(;B;){let v=(n=B["s-nr"])!=null?n:null;if(v&&v["s-sn"]===p["s-sn"]&&E===(v.__parentNode||v.parentNode)){for(v=v.nextSibling;v===p||v!=null&&v["s-sr"];)v=v==null?void 0:v.nextSibling;if(!v||!v["s-nr"]){b=v;break}}B=B.previousSibling}}const j=p.__parentNode||p.parentNode,L=p.__nextSibling||p.nextSibling;(!b&&E!==j||L!==b)&&p!==b&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),R(E,p,b),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(i=p["s-ih"])!=null?i:!1)),p&&typeof $["s-rf"]=="function"&&$["s-rf"]($)}else p.nodeType===1&&(r&&(p["s-ih"]=(a=p.hidden)!=null?a:!1),p.hidden=!0)}}K&&xe(o.$elm$),I.$flags$&=-2,O.length=0}if(G.experimentalScopedSlotChanges&&u.$flags$&2){const d=o.$elm$.__childNodes||o.$elm$.childNodes;for(const p of d)p["s-hn"]!==W&&!p["s-sh"]&&(r&&p["s-ih"]==null&&(p["s-ih"]=(c=p.hidden)!=null?c:!1),p.hidden=!0)}J=void 0};const Q={content_wrap:0,ignore:[],ignore_with:"_!i-£___£%_",strict:!1,tab_size:2,tag_wrap:0,tag_wrap_width:80,trim:[]},A="__!i-£___£%__",k="!i-£___£%_",Ue=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],ge=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),De=(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]=De(r[s]||{},t[s])}return r},Xt=(e,t)=>De(structuredClone(e),t),Yt=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(/\n/g,k+"nl!").replace(/\r/g,k+"cr!").replace(/\s/g,k+"ws!"))),e),Qt=e=>e.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!"),Vt=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 c=n||a;if(!c)return r;const l=c.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!");return r.replace(c,l)})},er=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,k+"lt!").replace(/>/g,k+"gt!"))),e},tr=(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},rr=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(k+"nl!","g"),`
|
|
28
|
-
`).replace(new RegExp(
|
|
29
|
-
`).replace(new RegExp(
|
|
30
|
-
`);return
|
|
27
|
+
`);const a=this["s-cr"].parentElement;return(a.__childNodes?a.childNodes:Jt(a.childNodes)).forEach(l=>{i===oe(l)&&n.push(l)}),r?n.filter(l=>l.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function Ne(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 Yt=(e,t,...r)=>{let s=null,n=null,i=null,a=!1,c=!1;const l=[],g=o=>{for(let d=0;d<o.length;d++)s=o[d],Array.isArray(s)?g(s):s!=null&&typeof s!="boolean"&&((a=!ke(s))&&(s=String(s)),a&&c?l[l.length-1].$text$+=s:l.push(a?le(null,s):s),c=a)};g(r);const p=le(e,null);return p.$attrs$=t,l.length>0&&(p.$children$=l),p.$key$=n,p.$name$=i,p},le=(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},Qt={},Vt=e=>e&&e.$tag$===Qt,ce=e=>{const t=Zt(e);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};ce("::slotted"),ce(":host"),ce(":host-context");var Ie=(e,t,r,s,n,i,a)=>{if(r===s)return;let c=Oe(e,t),l=t.toLowerCase();if(t==="class"){const g=e.classList,p=ze(r);let o=ze(s);g.remove(...p.filter(d=>d&&!o.includes(d))),g.add(...o.filter(d=>d&&!p.includes(d)))}else if(t==="style"){for(const g in r)(!s||s[g]==null)&&(g.includes("-")?e.style.removeProperty(g):e.style[g]="");for(const g in s)(!r||s[g]!==r[g])&&(g.includes("-")?e.style.setProperty(g,s[g]):e.style[g]=s[g])}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):Oe(T,l)?t=l.slice(2):t=l[2]+t.slice(3),r||s){const g=t.endsWith(Me);t=t.replace(tr,""),r&&z.rel(e,t,r,g),s&&z.ael(e,t,s,g)}}else{const g=ke(s);if((c||g&&s!==null)&&!n)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const o=s??"";t==="list"?c=!1:(r==null||e[t]!=o)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=o:e.setAttribute(t,o))}}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(xe,t):e.removeAttribute(t)):(!c||i&4||n)&&!g&&e.nodeType===1&&(s=s===!0?"":s,p?e.setAttributeNS(xe,t,s):e.setAttribute(t,s))}},er=/\s/,ze=e=>(typeof e=="object"&&e&&"baseVal"in e&&(e=e.baseVal),!e||typeof e!="string"?[]:e.split(er)),Me="Capture",tr=new RegExp(Me+"$"),fe=(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 c of Le(Object.keys(i)))c in a||Ie(n,c,i[c],void 0,r,t.$flags$);for(const c of Le(Object.keys(a)))Ie(n,c,i[c],a[c],r,t.$flags$)};function Le(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var J,K,W,ue=!1,X=!1,ge=!1,w=!1,Y=(e,t,r)=>{var s;const n=t.$children$[r];let i=0,a,c,l;if(ue||(ge=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)a=n.$elm$=T.document.createTextNode(n.$text$);else if(n.$flags$&1)a=n.$elm$=T.document.createTextNode(""),fe(null,n,w);else{if(w||(w=n.$tag$==="svg"),!T.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$=T.document.createElementNS(w?Wt:Ut,!ue&&q.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),w&&n.$tag$==="foreignObject"&&(w=!1),fe(null,n,w),Dt(J)&&a["s-si"]!==J&&a.classList.add(a["s-si"]=J),n.$children$)for(i=0;i<n.$children$.length;++i)c=Y(e,n,i),c&&a.appendChild(c);n.$tag$==="svg"?w=!1:a.tagName==="foreignObject"&&(w=!0)}return a["s-hn"]=W,n.$flags$&3&&(a["s-sr"]=!0,a["s-cr"]=K,a["s-sn"]=n.$name$||"",a["s-rf"]=(s=n.$attrs$)==null?void 0:s.ref,Xt(a),l=e&&e.$children$&&e.$children$[r],l&&l.$tag$===n.$tag$&&e.$elm$&&U(e.$elm$,!1),Ue(K,a,t.$elm$,e==null?void 0:e.$elm$)),a},U=(e,t)=>{z.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&q.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const n=r[s];n["s-hn"]!==W&&n["s-ol"]&&(R(D(n).parentNode,n,D(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,ge=!0),t&&U(n,t)}z.$flags$&=-2},Ce=(e,t,r,s,n,i)=>{let a=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(a.shadowRoot&&a.tagName===W&&(a=a.shadowRoot);n<=i;++n)s[n]&&(c=Y(null,r,n),c&&(s[n].$elm$=c,R(a,c,D(t))))},Fe=(e,t,r)=>{for(let s=t;s<=r;++s){const n=e[s];if(n){const i=n.$elm$;We(n),i&&(X=!0,i["s-ol"]?i["s-ol"].remove():U(i,!0),i.remove())}}},rr=(e,t,r,s,n=!1)=>{let i=0,a=0,c=0,l=0,g=t.length-1,p=t[0],o=t[g],d=s.length-1,$=s[0],u=s[d],v,m;for(;i<=g&&a<=d;)if(p==null)p=t[++i];else if(o==null)o=t[--g];else if($==null)$=s[++a];else if(u==null)u=s[--d];else if(Q(p,$,n))M(p,$,n),p=t[++i],$=s[++a];else if(Q(o,u,n))M(o,u,n),o=t[--g],u=s[--d];else if(Q(p,u,n))(p.$tag$==="slot"||u.$tag$==="slot")&&U(p.$elm$.parentNode,!1),M(p,u,n),R(e,p.$elm$,o.$elm$.nextSibling),p=t[++i],u=s[--d];else if(Q(o,$,n))(p.$tag$==="slot"||u.$tag$==="slot")&&U(o.$elm$.parentNode,!1),M(o,$,n),R(e,o.$elm$,p.$elm$),o=t[--g],$=s[++a];else{for(c=-1,l=i;l<=g;++l)if(t[l]&&t[l].$key$!==null&&t[l].$key$===$.$key$){c=l;break}c>=0?(m=t[c],m.$tag$!==$.$tag$?v=Y(t&&t[a],r,c):(M(m,$,n),t[c]=void 0,v=m.$elm$),$=s[++a]):(v=Y(t&&t[a],r,a),$=s[++a]),v&&R(D(p.$elm$).parentNode,v,D(p.$elm$))}i>g?Ce(e,s[d+1]==null?null:s[d+1].$elm$,r,s,a,d):a>d&&Fe(t,i,g)},Q=(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,D=e=>e&&e["s-ol"]||e,M=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,n=e.$children$,i=t.$children$,a=t.$tag$,c=t.$text$;let l;c===null?(w=a==="svg"?!0:a==="foreignObject"?!1:w,fe(e,t,w),n!==null&&i!==null?rr(s,n,t,i,r):i!==null?(e.$text$!==null&&(s.textContent=""),Ce(s,null,t,i,0,i.length-1)):!r&&q.updatable&&n!==null&&Fe(n,0,n.length-1),w&&a==="svg"&&(w=!1)):(l=s["s-cr"])?l.parentNode.textContent=c:e.$text$!==c&&(s.data=c)},x=[],Pe=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(Re(t,a)){let c=x.find(l=>l.$nodeToRelocate$===t);X=!0,t["s-sn"]=t["s-sn"]||a,c?(c.$nodeToRelocate$["s-sh"]=i["s-hn"],c.$slotRefNode$=i):(t["s-sh"]=i["s-hn"],x.push({$slotRefNode$:i,$nodeToRelocate$:t})),t["s-sr"]&&x.map(l=>{Re(l.$nodeToRelocate$,t["s-sn"])&&(c=x.find(g=>g.$nodeToRelocate$===t),c&&!l.$slotRefNode$&&(l.$slotRefNode$=c.$slotRefNode$))})}else x.some(c=>c.$nodeToRelocate$===t)||x.push({$nodeToRelocate$:t})}i.nodeType===1&&Pe(i)}},We=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(We)},R=(e,t,r)=>(typeof t["s-sn"]=="string"&&t["s-sr"]&&t["s-cr"]&&Ue(t["s-cr"],t,e,t.parentElement),e==null?void 0:e.insertBefore(t,r));function Ue(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 c=t["s-sn"],l=t["s-hn"];if((n=r.classList)==null||n.add(a+"-s"),s&&((i=s.classList)!=null&&i.contains(a+"-s"))){let g=(s.__childNodes||s.childNodes)[0],p=!1;for(;g;){if(g["s-sn"]!==c&&g["s-hn"]===l&&g["s-sr"]){p=!0;break}g=g.nextSibling}p||s.classList.remove(a+"-s")}}}var sr=(e,t,r=!1)=>{var s,n,i,a,c;const l=e.$hostElement$,g=e.$cmpMeta$,p=e.$vnode$||le(null,null),d=Vt(t)?t:Yt(null,null,t);if(W=l.tagName,g.$attrsToReflect$&&(d.$attrs$=d.$attrs$||{},g.$attrsToReflect$.map(([$,u])=>d.$attrs$[u]=l[$])),r&&d.$attrs$)for(const $ of Object.keys(d.$attrs$))l.hasAttribute($)&&!["key","ref","style","class"].includes($)&&(d.$attrs$[$]=l[$]);d.$tag$=null,d.$flags$|=4,e.$vnode$=d,d.$elm$=p.$elm$=l.shadowRoot||l,J=l["s-sc"],ue=!!(g.$flags$&1)&&!(g.$flags$&128),K=l["s-cr"],X=!1,M(p,d,r);{if(z.$flags$|=1,ge){Pe(d.$elm$);for(const $ of x){const u=$.$nodeToRelocate$;if(!u["s-ol"]&&T.document){const v=T.document.createTextNode("");v["s-nr"]=u,R(u.parentNode,u["s-ol"]=v,u)}}for(const $ of x){const u=$.$nodeToRelocate$,v=$.$slotRefNode$;if(v){const m=v.parentNode;let O=v.nextSibling;{let I=(s=u["s-ol"])==null?void 0:s.previousSibling;for(;I;){let y=(n=I["s-nr"])!=null?n:null;if(y&&y["s-sn"]===u["s-sn"]&&m===(y.__parentNode||y.parentNode)){for(y=y.nextSibling;y===u||y!=null&&y["s-sr"];)y=y==null?void 0:y.nextSibling;if(!y||!y["s-nr"]){O=y;break}}I=I.previousSibling}}const C=u.__parentNode||u.parentNode,Ye=u.__nextSibling||u.nextSibling;(!O&&m!==C||Ye!==O)&&u!==O&&(!u["s-hn"]&&u["s-ol"]&&(u["s-hn"]=u["s-ol"].parentNode.nodeName),R(m,u,O),u.nodeType===1&&u.tagName!=="SLOT-FB"&&(u.hidden=(i=u["s-ih"])!=null?i:!1)),u&&typeof v["s-rf"]=="function"&&v["s-rf"](v)}else u.nodeType===1&&(r&&(u["s-ih"]=(a=u.hidden)!=null?a:!1),u.hidden=!0)}}X&&je(d.$elm$),z.$flags$&=-2,x.length=0}if(q.experimentalScopedSlotChanges&&g.$flags$&2){const $=d.$elm$.__childNodes||d.$elm$.childNodes;for(const u of $)u["s-hn"]!==W&&!u["s-sh"]&&(r&&u["s-ih"]==null&&(u["s-ih"]=(c=u.hidden)!=null?c:!1),u.hidden=!0)}K=void 0};const pe={content_wrap:0,ignore:[],ignore_with:"_!i-£___£%_",strict:!1,tab_size:2,tag_wrap:0,tag_wrap_width:80,trim:[]},k="__!i-£___£%__",A="!i-£___£%_",De=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Ze={checked_html:!1,config:{...pe},ignored:!1},Z=()=>Ze,H=e=>Object.assign(Ze,e),de=e=>(H({checked_html:!0}),/<(?:[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)),He=(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]=He(r[s]||{},t[s])}return r},nr=(e,t)=>{const r=He(e,t);return H({config:r}),r},ir=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(/\n/g,A+"nl!").replace(/\r/g,A+"cr!").replace(/\s/g,A+"ws!"))),e),ar=e=>e.replace(/\n/g,k+"nl!").replace(/\r/g,k+"cr!").replace(/\s/g,k+"ws!"),or=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 c=n||a;if(!c)return r;const l=c.replace(/\n/g,k+"nl!").replace(/\r/g,k+"cr!").replace(/\s/g,k+"ws!");return r.replace(c,l)})},lr=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,A+"lt!").replace(/>/g,A+"gt!"))),e},cr=(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},fr=e=>(e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(t,r)=>t.replace(r,s=>s.replace(new RegExp(A+"nl!","g"),`
|
|
28
|
+
`).replace(new RegExp(A+"cr!","g"),"\r").replace(new RegExp(A+"ws!","g")," "))),e),ur=e=>(e=e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g,t=>t.replace(/__!i-£___£%__[a-z]{2}!/g,r=>r.replace(new RegExp(k+"nl!","g"),`
|
|
29
|
+
`).replace(new RegExp(k+"cr!","g"),"\r").replace(new RegExp(k+"ws!","g")," "))),e),Be=A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),gr=new RegExp(Be+"lt!","g"),pr=new RegExp(Be+"gt!","g"),dr=e=>{const t=/<([\w:\-]+)([^>]*)>/g;return e.replace(t,(r,s,n)=>{const i=n.replace(gr,"<").replace(pr,">");return`<${s}${i}>`})},$r=e=>{var n,i;if(typeof e!="object")throw new Error("Config must be an object.");const t={...pe};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 H({config:t}),t;let s=e.tab_size;if(s){if(typeof s!="number")throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(s))throw new Error(`Tab size ${s} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);if(s=Math.floor(s),s<1||s>16)throw new Error("Tab size out of range. Expecting 1 to 16.");e.tab_size=s}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)||!((n=e.ignore)!=null&&n.every(a=>typeof a=="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=t.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)||!((i=e.trim)!=null&&i.every(a=>typeof a=="string"))))throw new Error("Trim config must be an array of strings.");return nr(t,e)},hr=(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(l=>{if(l==="")return;if(l.length>=t){i!==""&&n.push(n.length===0?r+i:a+i),n.push(n.length===0?r+l:a+l),i="";return}const g=i===""?l:i+" "+l;g.length<=t?i=g:(i!==""&&n.push(n.length===0?r+i:a+i),i=l)}),i!==""&&n.push(n.length===0?r+i:a+i);const c=n.join(`
|
|
30
|
+
`);return ar(c)};function Ge(e,t){H({ignored:!0});let r=e;const s=new Map;let n=0;const i="___HTMLFY_SPECIAL_IGNORE_MARKER_";for(const a of t.ignore){const c=a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`<${c}[^>]*>.*?</${c}>`,"gs");let g;const p=[];for(;(g=l.exec(r))!==null;){const o=`${i}${n++}___`;s.set(o,g[0]),p.push({start:g.index,end:l.lastIndex,marker:o})}for(let o=p.length-1;o>=0;o--){const d=p[o];r=r.substring(0,d.start)+d.marker+r.substring(d.end)}}return{html_with_markers:r,extracted_map:s}}function qe(e,t){H({ignored:!1});let r=e;for(const[s,n]of t)r=r.split(s).join(n);return r}const _r=e=>{const{checked_html:t}=Z();return!t&&!de(e)?e:e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g,(r,s)=>De.indexOf(s)>-1?`${r.substring(0,r.length-1)} />`.replace(/\/\s\//g,"/"):r.replace(/[\s]?\/>/g,`></${s}>`))},yr=(e,t=!1)=>(e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(r,s)=>r.replace(s,n=>n.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\n/g," ").replace(/\r/g," ").replace(/\s/g," "))),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);let Je;const br=(e,t)=>{let r=!1;const{checked_html:s,ignored:n}=Z();if(!s&&!de(e))return e;const i=Z().config,a=i.ignore.length>0;if(!n&&a){const{html_with_markers:c,extracted_map:l}=Ge(e,i);e=c,Je=l,r=!0}return e=yr(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,(c,l,g,p)=>{const o=p.trim();return`${l}=${g}${o}${g}`}),e=e.trim(),r&&(e=qe(e,Je)),e},B={line:[]};let Ke;const vr=e=>{B.line=[];let t=-1;const r=/(<[^>]+>)|([^<]+)/g;return e=e.replace(r,(s,n,i)=>(n?B.line.push({type:"tag",value:s}):i&&i.trim().length>0&&B.line.push({type:"text",value:s}),t++,`
|
|
31
31
|
[#-# : ${t} : ${s} : #-#]
|
|
32
|
-
`)),e}
|
|
33
|
-
`;for(const
|
|
34
|
-
`}const
|
|
35
|
-
`);return
|
|
32
|
+
`)),e},mr=e=>{e=_r(e);const{config:t}=Z();return t.trim.length>0&&(e=cr(e,t.trim)),e=br(e),e=vr(e),e},wr=e=>{const t=" ".repeat(e.tab_size),r=e.tag_wrap,s=e.content_wrap,i=`-${e.ignore_with}`,a=e.strict;let c="";const l=[],g=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,p=/\s{1}[A-Za-z-]+(?:=".*?")?/g;B.line.forEach((d,$)=>{let u=d.value;const v=u.startsWith(i+"lt--")||u.startsWith(i+"gt--")||u.startsWith(i+"nl--")||u.startsWith(i+"cr--")||u.startsWith(i+"ws--")||u.startsWith(i+"tab--");let m=0;const O=B.line[$-1],C=(O==null?void 0:O.value)??"";c+="0",$===0&&m++,u.trim().startsWith("</")&&m++,C.trim().startsWith("<!doctype")&&m++,C.trim().startsWith("<!--")&&m++,C.trim().endsWith("/>")&&m++,C.trim().startsWith("</")&&m++,(O==null?void 0:O.type)==="text"&&m++;const I=Math.max(0,c.length-m);if(c=c.substring(0,I),d.type==="text"&&/^[!,;\.]/.test(u))if(u.length===1){l[l.length-1]=l.at(-1)+u;return}else l[l.length-1]=l.at(-1)+u.charAt(0),u=u.slice(1).trim();const y=t.repeat(I);if(v)l.push(u);else{if(a&&u.trim().startsWith("<!--"))return;let S=u;if(d.type==="text"&&s>0&&S.length>=s)S=hr(S,s,y);else if(r>0&&S.length>r&&g.test(S)){g.lastIndex=0,p.lastIndex=0;const ee=S.split(p).filter(Boolean);if(ee.length>=2){const zr=S.matchAll(p),Mr=y+t;let he=y+ee[0]+`
|
|
33
|
+
`;for(const Wr of zr){const Ur=Wr[0].trim();he+=Mr+Ur+`
|
|
34
|
+
`}const Qe=ee[0].match(/<([A-Za-z_:-]+)/),Lr=Qe?Qe[1]:"",Cr=De.includes(Lr),Fr=ee[1].trim(),Pr=y+(a&&Cr?" ":"");he+=Pr+Fr,S=he}else S=y+S}else S=y+S;l.push(S)}});let o=l.join(`
|
|
35
|
+
`);return r>0&&(o=ir(o)),s>0&&/\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(o)&&(o=or(o)),o=o.replace(/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,d=>d.replace(/\n|\t|\s{2,}/g,"")),s>0&&(o=ur(o)),r>0&&(o=fr(o)),a&&(o=o.replace(/\s\/>|\/>/g,">")),o.startsWith(`
|
|
36
36
|
`)&&(o=o.substring(1)),o.endsWith(`
|
|
37
|
-
`)&&(o=o.substring(0,o.length-1)),o},
|
|
37
|
+
`)&&(o=o.substring(0,o.length-1)),o},Sr=(e,t)=>{let r=!1;const{checked_html:s,ignored:n}=Z();if(!s&&!de(e))return e;const i=t?$r(t):{...pe},a=i.ignore.length>0;if(!n&&a){const{html_with_markers:c,extracted_map:l}=Ge(e,i);e=c,Ke=l,r=!0}return e=lr(e),e=mr(e),e=wr(i),e=dr(e),r&&(e=qe(e,Ke)),e},Er=(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)},Xe=(e,t,r,s,n)=>{if(t&&typeof t=="string"){const i=document.createElement(t);Object.keys(r||{}).forEach(a=>{Er(i,a,r[a])}),s==null||s.forEach(a=>{Xe(i,a.$tag$,a.$attrs$,a.$children$,a.$text$)}),r!=null&&r.innerHTML&&(i.innerHTML=r.innerHTML),e.appendChild(i)}n&&(e.innerHTML=n)},Or=(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},xr=(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"),sr({$cmpMeta$:{$flags$:0,$tagName$:r.tagName},$hostElement$:r},e(t)),r.children[r.children.length-1]},kr=({$tag$:e,$attrs$:t,$children$:r,$text$:s})=>{const n=document.createElement("div");return Xe(n,e,t,r,s),Sr(n.innerHTML,{tag_wrap:40,content_wrap:120}).replace(/="true"/g,"")},$e=(e,t)=>{if(!t)return;const r=t.split("/");return`${e}${r.slice(2,r.length-1).join("-")}--docs`};class Ar{constructor(t){_(this,"jsonDoc");F(this,N,t=>this.jsonDoc.components.find(r=>r.tag===t));F(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"}}});_(this,"extractArgTypes",t=>{const r=E(this,N).call(this,t),s=r==null?void 0:r.props.reduce((p,o)=>{const{control:d,options:$}=E(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:$}}},{}),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}}}}),{}),c=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}}}}),{}),l=r==null?void 0:r.dependencies.reduce((p,o)=>{const d=E(this,N).call(this,o);return d?{...p,[o]:{name:o,description:`<a href="./?path=/docs/${$e("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}:p},{}),g=r==null?void 0:r.dependents.reduce((p,o)=>{const d=E(this,N).call(this,o);return d?{...p,[o]:{name:o,description:`<a href="./?path=/docs/${$e("",d==null?void 0:d.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}:p},{});return{...s,...n,...i,...a,...c,...l,...g}});_(this,"extractComponentDescription",t=>{const r=E(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 jr=({disconnect:e,observe:t,takeRecords:r})=>{class s{constructor(i){_(this,"disconnect",e);_(this,"observe",t);_(this,"takeRecords",r);_(this,"cb");this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:s})}),s},Tr=({disconnect:e,observe:t})=>{class r{constructor(n){_(this,"disconnect",e);_(this,"observe",t);_(this,"unobserve");_(this,"cb");this.cb=n}}return[window,global].forEach(s=>{Object.defineProperty(s,"ResizeObserver",{writable:!0,configurable:!0,value:r})}),r};class Rr extends Event{constructor(){super(...arguments);_(this,"detail")}}const Nr=()=>{class e extends Rr{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},Ir=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};f.ClassList=h,f.Cursor=ct,f.Page=be,f.Paginate=ft,f.StorybookPreview=Ar,f.allItemsAreString=tt,f.cleanString=st,f.createID=it,f.dateRegExp=ut,f.dateToString=gt,f.defineLocales=Ct,f.filterArgs=Or,f.focusableElements=dt,f.formatID=ot,f.getLocaleDatePattern=Rt,f.getObjectValueFromKey=P,f.getParentWindows=re,f.getStoryHTML=kr,f.getStorybookUrl=$e,f.getWindows=ht,f.isObject=b,f.isTagName=pt,f.isValidNumber=$t,f.isValidString=_e,f.isValideID=at,f.localeCurrency=It,f.localeDate=Ee,f.localeNumber=zt,f.localePercent=Mt,f.localeUnit=Lt,f.nextTick=lt,f.setUpRequestAnimationFrameMock=Ir,f.setupMutationObserverMock=jr,f.setupResizeObserverMock=Tr,f.setupSubmitEventMock=Nr,f.stencilWrapper=xr,f.toString=rt,f.vsCodeCssGenerator=jt,f.vsCodeGenerator=At,f.webTypesGenerator=Ot,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
38
38
|
//# sourceMappingURL=index.umd.js.map
|