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