@mgdis/stencil-helpers 3.2.11 → 3.2.13
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 +963 -3296
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +24 -40
- package/dist/index.umd.js.map +1 -1
- package/package.json +11 -11
package/dist/index.umd.js
CHANGED
|
@@ -1,43 +1,27 @@
|
|
|
1
|
-
(function(w,Re){typeof exports=="object"&&typeof module<"u"?Re(exports):typeof define=="function"&&define.amd?define(["exports"],Re):(w=typeof globalThis<"u"?globalThis:w||self,Re(w.StencilHelpersModule={}))})(this,(function(w){"use strict";class Re{classes;constructor(e=[]){this.classes=e}add=e=>{this.has(e)||this.classes.push(e)};delete=e=>{const s=this.classes.indexOf(e);s>-1&&this.classes.splice(s,1)};has=e=>this.classes.includes(e);join=()=>this.classes.join(" ")}const Ne=t=>typeof t=="object"&&!Array.isArray(t)&&t!==null,jt=(t,e,s)=>{if(!Ne(t)||typeof e!="string")return s;const[n,...i]=e.split(".");return i.length?jt(t[n],i.join("."),s):t[n]??s},Js=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"),Pt=t=>typeof t=="string"&&t.trim()!=="",Ks=t=>typeof t=="object"?JSON.stringify(t):String(t),Xs=t=>typeof t=="string"?t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g,""):t,Ys=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,s)=>(s>0?"-":"")+e.toLowerCase()).replace(/[^a-z0-9-]+/g,"-").replace(/--+/g,"-").replace(/(?:^-)|(?:-$)/g,""),Qs=(t="",e=10)=>{const s=new Uint8Array(e);crypto.getRandomValues(s);const r=Array.from(s).map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,e);return t!==""?`${t}-${r}`:r},Vs=t=>Pt(t)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t)!==null,er=t=>{let e;return typeof t=="string"?e=t:t&&typeof t=="object"&&(Ne(t)||Array.isArray(t))?e=JSON.stringify(t):t!=null&&typeof t!="boolean"&&typeof t!="object"&&(e=String(t)),e&&Ys(e)},tr=async t=>{if(t)return t()},sr={FIRST:"first",NEXT:"next",PREVIOUS:"previous",LAST:"last"},Dt=10;class It{items=[];total;top=Dt;next;baseIndex=1;constructor(e){if(Ne(e))Array.isArray(e.items)&&(this.items=e.items),typeof e.top=="number"&&(this.top=e.top),this.total=typeof e.total=="number"?e.total:this.items.length,this.next=e.next;else throw new Error("Page - init must match IPage type.")}getIndexFromCursor=(e="first",s)=>{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(e)&&s){const o=this.items.findIndex(l=>JSON.stringify(l)===JSON.stringify(s));if(o===-1)return 0;a=o}return e==="first"?i=0:e==="last"?i=n:e==="previous"?i=JSON.stringify(this.items[a])===JSON.stringify(this.items[0])?n:a-this.baseIndex:e==="next"?i=JSON.stringify(this.items[a])===JSON.stringify(this.items[n])?0:a+this.baseIndex:i=0,i}}class rr{items=[];#e=Dt;#t;#s;constructor(e,s){Array.isArray(e)&&(this.items=e),s&&(["string","function"].includes(typeof s.next)||Ne(s.next)&&URL.canParse(s.next))&&(this.#t=s.next),typeof s?.top=="number"&&(this.#e=s.top),typeof s?.total=="number"&&(this.#s=s.total)}getPage=(e=0,s)=>{const r=typeof s=="function"?this.items.filter(s):this.items;let n;return this.#t?n=this.#t:r.length>e+this.#e&&(n=()=>this.getPage(e+this.#e,s)),new It({items:r.slice(e,e+this.#e),total:this.#s,top:this.#e,next:n})}}const nr=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,ir=t=>t.toISOString().split("T")[0],ar=(t,e)=>e.includes(t?.tagName.toLowerCase()),or='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button',lr=t=>typeof t=="number"&&!Number.isNaN(t),cr=t=>{const e=pt(t),s=Wt(t);return[t,...e,...s]},pt=(t,e=[])=>{if(t.self!==t.top)try{const s=t.parent;return s?(e.push(s),pt(s,e)):e}catch(s){return console.error("Different hosts between iframes:",s),e}return e},Wt=(t,e=[])=>{if(t.frames.length>0)for(const s of Array.from(t.frames))e.push(s),Wt(s,e);return e};var hr=Object.create,Xe=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyNames,fr=Object.getPrototypeOf,pr=Object.prototype.hasOwnProperty,Gt=t=>{throw TypeError(t)},gr=(t,e,s)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ht=(t,e)=>function(){return e||(0,t[zt(t)[0]])((e={exports:{}}).exports,e),e.exports},dr=(t,e)=>{for(var s in e)Xe(t,s,{get:e[s],enumerable:!0})},$r=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zt(e))!pr.call(t,n)&&n!==s&&Xe(t,n,{get:()=>e[n],enumerable:!(r=ur(e,n))||r.enumerable});return t},vr=(t,e,s)=>(s=t!=null?hr(fr(t)):{},$r(Xe(s,"default",{value:t,enumerable:!0}),t)),mr=(t,e,s)=>gr(t,e+"",s),gt=(t,e,s)=>e.has(t)||Gt("Cannot "+s),v=(t,e,s)=>(gt(t,e,"read from private field"),s?s.call(t):e.get(t)),q=(t,e,s)=>e.has(t)?Gt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),N=(t,e,s,r)=>(gt(t,e,"write to private field"),e.set(t,s),s),le=(t,e,s)=>(gt(t,e,"access private method"),s),_r=Ht({"node_modules/balanced-match/index.js"(t,e){e.exports=s;function s(i,a,o){i instanceof RegExp&&(i=r(i,o)),a instanceof RegExp&&(a=r(a,o));var l=n(i,a,o);return l&&{start:l[0],end:l[1],pre:o.slice(0,l[0]),body:o.slice(l[0]+i.length,l[1]),post:o.slice(l[1]+a.length)}}function r(i,a){var o=a.match(i);return o?o[0]:null}s.range=n;function n(i,a,o){var l,h,c,u,d,g=o.indexOf(i),f=o.indexOf(a,g+1),p=g;if(g>=0&&f>0){if(i===a)return[g,f];for(l=[],c=o.length;p>=0&&!d;)p==g?(l.push(p),g=o.indexOf(i,p+1)):l.length==1?d=[l.pop(),f]:(h=l.pop(),h<c&&(c=h,u=f),f=o.indexOf(a,p+1)),p=g<f&&g>=0?g:f;l.length&&(d=[c,u])}return d}}}),yr=Ht({"node_modules/brace-expansion/index.js"(t,e){var s=_r();e.exports=d;var r="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",o="\0PERIOD"+Math.random()+"\0";function l($){return parseInt($,10)==$?parseInt($,10):$.charCodeAt(0)}function h($){return $.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(i).split("\\,").join(a).split("\\.").join(o)}function c($){return $.split(r).join("\\").split(n).join("{").split(i).join("}").split(a).join(",").split(o).join(".")}function u($){if(!$)return[""];var b=[],S=s("{","}",$);if(!S)return $.split(",");var _=S.pre,z=S.body,C=S.post,x=_.split(",");x[x.length-1]+="{"+z+"}";var j=u(C);return C.length&&(x[x.length-1]+=j.shift(),x.push.apply(x,j)),b.push.apply(b,x),b}function d($){return $?($.substr(0,2)==="{}"&&($="\\{\\}"+$.substr(2)),E(h($),!0).map(c)):[]}function g($){return"{"+$+"}"}function f($){return/^-?0\d/.test($)}function p($,b){return $<=b}function y($,b){return $>=b}function E($,b){var S=[],_=s("{","}",$);if(!_)return[$];var z=_.pre,C=_.post.length?E(_.post,!1):[""];if(/\$$/.test(_.pre))for(var x=0;x<C.length;x++){var j=z+"{"+_.body+"}"+C[x];S.push(j)}else{var Ae=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(_.body),$e=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(_.body),V=Ae||$e,Be=_.body.indexOf(",")>=0;if(!V&&!Be)return _.post.match(/,(?!,).*\}/)?($=_.pre+"{"+_.body+i+_.post,E($)):[$];var O;if(V)O=_.body.split(/\.\./);else if(O=u(_.body),O.length===1&&(O=E(O[0],!1).map(g),O.length===1))return C.map(function(Ct){return _.pre+O[0]+Ct});var G;if(V){var ve=l(O[0]),Ue=l(O[1]),Mt=Math.max(O[0].length,O[1].length),Ze=O.length==3?Math.abs(l(O[2])):1,qe=p,Lt=Ue<ve;Lt&&(Ze*=-1,qe=y);var kt=O.some(f);G=[];for(var ee=ve;qe(ee,Ue);ee+=Ze){var R;if($e)R=String.fromCharCode(ee),R==="\\"&&(R="");else if(R=String(ee),kt){var Je=Mt-R.length;if(Je>0){var Ke=new Array(Je+1).join("0");ee<0?R="-"+Ke+R.slice(1):R=Ke+R}}G.push(R)}}else{G=[];for(var B=0;B<O.length;B++)G.push.apply(G,E(O[B],!1))}for(var B=0;B<G.length;B++)for(var x=0;x<C.length;x++){var j=z+G[B]+C[x];(!b||V||j)&&S.push(j)}}return S}}}),Er=vr(yr()),wr=1024*64,Ye=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>wr)throw new TypeError("pattern is too long")},br={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Me=t=>t.replace(/[[\]\\-]/g,"\\$&"),Sr=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ft=t=>t.join(""),Or=(t,e)=>{const s=e;if(t.charAt(s)!=="[")throw new Error("not in a brace expression");const r=[],n=[];let i=s+1,a=!1,o=!1,l=!1,h=!1,c=s,u="";e:for(;i<t.length;){const p=t.charAt(i);if((p==="!"||p==="^")&&i===s+1){h=!0,i++;continue}if(p==="]"&&a&&!l){c=i+1;break}if(a=!0,p==="\\"&&!l){l=!0,i++;continue}if(p==="["&&!l){for(const[y,[E,$,b]]of Object.entries(br))if(t.startsWith(y,i)){if(u)return["$.",!1,t.length-s,!0];i+=y.length,b?n.push(E):r.push(E),o=o||$;continue e}}if(l=!1,u){p>u?r.push(Me(u)+"-"+Me(p)):p===u&&r.push(Me(p)),u="",i++;continue}if(t.startsWith("-]",i+1)){r.push(Me(p+"-")),i+=2;continue}if(t.startsWith("-",i+1)){u=p,i+=2;continue}r.push(Me(p)),i++}if(c<i)return["",!1,0,!1];if(!r.length&&!n.length)return["$.",!1,t.length-s,!0];if(n.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!h){const p=r[0].length===2?r[0].slice(-1):r[0];return[Sr(p),!1,c-s,!1]}const d="["+(h?"^":"")+Ft(r)+"]",g="["+(h?"":"^")+Ft(n)+"]";return[r.length&&n.length?"("+d+"|"+g+")":r.length?d:g,o,c-s,!0]},Le=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),xr=new Set(["!","?","+","*","@"]),Bt=t=>xr.has(t),Tr="(?!(?:^|/)\\.\\.?(?:$|/))",Qe="(?!\\.)",Ar=new Set(["[","."]),Rr=new Set(["..","."]),Nr=new Set("().*{}+?[]^$\\!"),Mr=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dt="[^/]",Ut=dt+"*?",Zt=dt+"+?",P,I,ne,T,L,ce,ye,he,te,Ee,Ve,ke,qt,we,et,$t,Jt,ie=class me{constructor(e,s,r={}){q(this,ke),mr(this,"type"),q(this,P),q(this,I),q(this,ne,!1),q(this,T,[]),q(this,L),q(this,ce),q(this,ye),q(this,he,!1),q(this,te),q(this,Ee),q(this,Ve,!1),this.type=e,e&&N(this,I,!0),N(this,L,s),N(this,P,v(this,L)?v(v(this,L),P):this),N(this,te,v(this,P)===this?r:v(v(this,P),te)),N(this,ye,v(this,P)===this?[]:v(v(this,P),ye)),e==="!"&&!v(v(this,P),he)&&v(this,ye).push(this),N(this,ce,v(this,L)?v(v(this,L),T).length:0)}get hasMagic(){if(v(this,I)!==void 0)return v(this,I);for(const e of v(this,T))if(typeof e!="string"&&(e.type||e.hasMagic))return N(this,I,!0);return v(this,I)}toString(){return v(this,Ee)!==void 0?v(this,Ee):this.type?N(this,Ee,this.type+"("+v(this,T).map(e=>String(e)).join("|")+")"):N(this,Ee,v(this,T).map(e=>String(e)).join(""))}push(...e){for(const s of e)if(s!==""){if(typeof s!="string"&&!(s instanceof me&&v(s,L)===this))throw new Error("invalid part: "+s);v(this,T).push(s)}}toJSON(){var e;const s=this.type===null?v(this,T).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...v(this,T).map(r=>r.toJSON())];return this.isStart()&&!this.type&&s.unshift([]),this.isEnd()&&(this===v(this,P)||v(v(this,P),he)&&((e=v(this,L))==null?void 0:e.type)==="!")&&s.push({}),s}isStart(){var e;if(v(this,P)===this)return!0;if(!((e=v(this,L))!=null&&e.isStart()))return!1;if(v(this,ce)===0)return!0;const s=v(this,L);for(let r=0;r<v(this,ce);r++){const n=v(s,T)[r];if(!(n instanceof me&&n.type==="!"))return!1}return!0}isEnd(){var e,s,r;if(v(this,P)===this||((e=v(this,L))==null?void 0:e.type)==="!")return!0;if(!((s=v(this,L))!=null&&s.isEnd()))return!1;if(!this.type)return(r=v(this,L))==null?void 0:r.isEnd();const n=v(this,L)?v(v(this,L),T).length:0;return v(this,ce)===n-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const s=new me(this.type,e);for(const r of v(this,T))s.copyIn(r);return s}static fromGlob(e,s={}){var r;const n=new me(null,void 0,s);return le(r=me,we,et).call(r,e,n,0,s),n}toMMPattern(){if(this!==v(this,P))return v(this,P).toMMPattern();const e=this.toString(),[s,r,n,i]=this.toRegExpSource();if(!(n||v(this,I)||v(this,te).nocase&&!v(this,te).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(v(this,te).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${s}$`,o),{_src:s,_glob:e})}get options(){return v(this,te)}toRegExpSource(e){var s;const r=e??!!v(this,te).dot;if(v(this,P)===this&&le(this,ke,qt).call(this),!this.type){const h=this.isStart()&&this.isEnd(),c=v(this,T).map(f=>{var p;const[y,E,$,b]=typeof f=="string"?le(p=me,we,Jt).call(p,f,v(this,I),h):f.toRegExpSource(e);return N(this,I,v(this,I)||$),N(this,ne,v(this,ne)||b),y}).join("");let u="";if(this.isStart()&&typeof v(this,T)[0]=="string"&&!(v(this,T).length===1&&Rr.has(v(this,T)[0]))){const p=Ar,y=r&&p.has(c.charAt(0))||c.startsWith("\\.")&&p.has(c.charAt(2))||c.startsWith("\\.\\.")&&p.has(c.charAt(4)),E=!r&&!e&&p.has(c.charAt(0));u=y?Tr:E?Qe:""}let d="";return this.isEnd()&&v(v(this,P),he)&&((s=v(this,L))==null?void 0:s.type)==="!"&&(d="(?:$|\\/)"),[u+c+d,Le(c),N(this,I,!!v(this,I)),v(this,ne)]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let a=le(this,ke,$t).call(this,r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){const h=this.toString();return N(this,T,[h]),this.type=null,N(this,I,void 0),[h,Le(this.toString()),!1,!1]}let o=!n||e||r||!Qe?"":le(this,ke,$t).call(this,!0);o===a&&(o=""),o&&(a=`(?:${a})(?:${o})*?`);let l="";if(this.type==="!"&&v(this,Ve))l=(this.isStart()&&!r?Qe:"")+Zt;else{const h=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Qe:"")+Ut+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;l=i+a+h}return[l,Le(a),N(this,I,!!v(this,I)),v(this,ne)]}};P=new WeakMap,I=new WeakMap,ne=new WeakMap,T=new WeakMap,L=new WeakMap,ce=new WeakMap,ye=new WeakMap,he=new WeakMap,te=new WeakMap,Ee=new WeakMap,Ve=new WeakMap,ke=new WeakSet,qt=function(){if(this!==v(this,P))throw new Error("should only call on root");if(v(this,he))return this;this.toString(),N(this,he,!0);let t;for(;t=v(this,ye).pop();){if(t.type!=="!")continue;let e=t,s=v(e,L);for(;s;){for(let r=v(e,ce)+1;!s.type&&r<v(s,T).length;r++)for(const n of v(t,T)){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(v(s,T)[r])}e=s,s=v(e,L)}}return this},we=new WeakSet,et=function(t,e,s,r){var n,i;let a=!1,o=!1,l=-1,h=!1;if(e.type===null){let f=s,p="";for(;f<t.length;){const y=t.charAt(f++);if(a||y==="\\"){a=!a,p+=y;continue}if(o){f===l+1?(y==="^"||y==="!")&&(h=!0):y==="]"&&!(f===l+2&&h)&&(o=!1),p+=y;continue}else if(y==="["){o=!0,l=f,h=!1,p+=y;continue}if(!r.noext&&Bt(y)&&t.charAt(f)==="("){e.push(p),p="";const E=new ie(y,e);f=le(n=ie,we,et).call(n,t,E,f,r),e.push(E);continue}p+=y}return e.push(p),f}let c=s+1,u=new ie(null,e);const d=[];let g="";for(;c<t.length;){const f=t.charAt(c++);if(a||f==="\\"){a=!a,g+=f;continue}if(o){c===l+1?(f==="^"||f==="!")&&(h=!0):f==="]"&&!(c===l+2&&h)&&(o=!1),g+=f;continue}else if(f==="["){o=!0,l=c,h=!1,g+=f;continue}if(Bt(f)&&t.charAt(c)==="("){u.push(g),g="";const p=new ie(f,u);u.push(p),c=le(i=ie,we,et).call(i,t,p,c,r);continue}if(f==="|"){u.push(g),g="",d.push(u),u=new ie(null,e);continue}if(f===")")return g===""&&v(e,T).length===0&&N(e,Ve,!0),u.push(g),g="",e.push(...d,u),c;g+=f}return e.type=null,N(e,I,void 0),N(e,T,[t.substring(s-1)]),c},$t=function(t){return v(this,T).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[s,r,n,i]=e.toRegExpSource(t);return N(this,ne,v(this,ne)||i),s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},Jt=function(t,e,s=!1){let r=!1,n="",i=!1;for(let a=0;a<t.length;a++){const o=t.charAt(a);if(r){r=!1,n+=(Nr.has(o)?"\\":"")+o;continue}if(o==="\\"){a===t.length-1?n+="\\\\":r=!0;continue}if(o==="["){const[l,h,c,u]=Or(t,a);if(c){n+=l,i=i||h,a+=c-1,e=e||u;continue}}if(o==="*"){s&&t==="*"?n+=Zt:n+=Ut,e=!0;continue}if(o==="?"){n+=dt,e=!0;continue}n+=Mr(o)}return[n,Le(t),!!e,i]},q(ie,we);var Kt=ie,Lr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),H=(t,e,s={})=>(Ye(e),!s.nocomment&&e.charAt(0)==="#"?!1:new tt(e,s).match(t)),kr=/^\*+([^+@!?\*\[\(]*)$/,Cr=t=>e=>!e.startsWith(".")&&e.endsWith(t),jr=t=>e=>e.endsWith(t),Pr=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Dr=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Ir=/^\*+\.\*+$/,Wr=t=>!t.startsWith(".")&&t.includes("."),zr=t=>t!=="."&&t!==".."&&t.includes("."),Gr=/^\.\*+$/,Hr=t=>t!=="."&&t!==".."&&t.startsWith("."),Fr=/^\*+$/,Br=t=>t.length!==0&&!t.startsWith("."),Ur=t=>t.length!==0&&t!=="."&&t!=="..",Zr=/^\?+([^+@!?\*\[\(]*)?$/,qr=([t,e=""])=>{const s=Xt([t]);return e?(e=e.toLowerCase(),r=>s(r)&&r.toLowerCase().endsWith(e)):s},Jr=([t,e=""])=>{const s=Yt([t]);return e?(e=e.toLowerCase(),r=>s(r)&&r.toLowerCase().endsWith(e)):s},Kr=([t,e=""])=>{const s=Yt([t]);return e?r=>s(r)&&r.endsWith(e):s},Xr=([t,e=""])=>{const s=Xt([t]);return e?r=>s(r)&&r.endsWith(e):s},Xt=([t])=>{const e=t.length;return s=>s.length===e&&!s.startsWith(".")},Yt=([t])=>{const e=t.length;return s=>s.length===e&&s!=="."&&s!==".."},Qt=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vt={win32:{sep:"\\"},posix:{sep:"/"}},Yr=Qt==="win32"?Vt.win32.sep:Vt.posix.sep;H.sep=Yr;var K=Symbol("globstar **");H.GLOBSTAR=K;var Qr="[^/]",Vr=Qr+"*?",en="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",tn="(?:(?!(?:\\/|^)\\.).)*?",sn=(t,e={})=>s=>H(s,t,e);H.filter=sn;var X=(t,e={})=>Object.assign({},t,e),rn=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return H;const e=H;return Object.assign((r,n,i={})=>e(r,n,X(t,i)),{Minimatch:class extends e.Minimatch{constructor(n,i={}){super(n,X(t,i))}static defaults(n){return e.defaults(X(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,i,a={}){super(n,i,X(t,a))}static fromGlob(n,i={}){return e.AST.fromGlob(n,X(t,i))}},unescape:(r,n={})=>e.unescape(r,X(t,n)),escape:(r,n={})=>e.escape(r,X(t,n)),filter:(r,n={})=>e.filter(r,X(t,n)),defaults:r=>e.defaults(X(t,r)),makeRe:(r,n={})=>e.makeRe(r,X(t,n)),braceExpand:(r,n={})=>e.braceExpand(r,X(t,n)),match:(r,n,i={})=>e.match(r,n,X(t,i)),sep:e.sep,GLOBSTAR:K})};H.defaults=rn;var es=(t,e={})=>(Ye(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Er.default)(t));H.braceExpand=es;var nn=(t,e={})=>new tt(t,e).makeRe();H.makeRe=nn;var an=(t,e,s={})=>{const r=new tt(e,s);return t=t.filter(n=>r.match(n)),r.options.nonull&&!t.length&&t.push(e),t};H.match=an;var ts=/[?*]|[+@!]\(.*?\)|\[|\]/,on=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),tt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,s={}){Ye(e),s=s||{},this.options=s,this.pattern=e,this.platform=s.platform||Qt,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!s.windowsPathsNoEscape||s.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!s.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!s.nonegate,this.comment=!1,this.empty=!1,this.partial=!!s.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=s.windowsNoMagicRoot!==void 0?s.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const s of e)if(typeof s!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,s=this.options;if(!s.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],s.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map((i,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=i[0]===""&&i[1]===""&&(i[2]==="?"||!ts.test(i[2]))&&!ts.test(i[3]),h=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(c=>this.parse(c))];if(h)return[i[0],...i.slice(1).map(c=>this.parse(c))]}return i.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){const a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let n=0;n<e[r].length;n++)e[r][n]==="**"&&(e[r][n]="*");const{optimizationLevel:s=1}=this.options;return s>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):s>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(s=>{let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let n=r;for(;s[n+1]==="**";)n++;n!==r&&s.splice(r,n-r)}return s})}levelOneOptimize(e){return e.map(s=>(s=s.reduce((r,n)=>{const i=r[r.length-1];return n==="**"&&i==="**"?r:n===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(n),r)},[]),s.length===0?[""]:s))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let s=!1;do{if(s=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const i=e[n];n===1&&i===""&&e[0]===""||(i==="."||i==="")&&(s=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(s=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){const n=e[r-1];n&&n!=="."&&n!==".."&&n!=="**"&&(s=!0,e.splice(r-1,2),r-=2)}}while(s);return e.length===0?[""]:e}firstPhasePreProcess(e){let s=!1;do{s=!1;for(let r of e){let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let a=n;for(;r[a+1]==="**";)a++;a>n&&r.splice(n+1,a-n);let o=r[n+1];const l=r[n+2],h=r[n+3];if(o!==".."||!l||l==="."||l===".."||!h||h==="."||h==="..")continue;s=!0,r.splice(n,1);const c=r.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){const o=r[a];a===1&&o===""&&r[0]===""||(o==="."||o==="")&&(s=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(s=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){const a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){s=!0;const l=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...l),r.length===0&&r.push(""),i-=2}}}}while(s);return e}secondPhasePreProcess(e){for(let s=0;s<e.length-1;s++)for(let r=s+1;r<e.length;r++){const n=this.partsMatch(e[s],e[r],!this.preserveMultipleSlashes);n&&(e[s]=n,e[r]=[])}return e.filter(s=>s.length)}partsMatch(e,s,r=!1){let n=0,i=0,a=[],o="";for(;n<e.length&&i<s.length;)if(e[n]===s[i])a.push(o==="b"?s[i]:e[n]),n++,i++;else if(r&&e[n]==="**"&&s[i]===e[n+1])a.push(e[n]),n++;else if(r&&s[i]==="**"&&e[n]===s[i+1])a.push(s[i]),i++;else if(e[n]==="*"&&s[i]&&(this.options.dot||!s[i].startsWith("."))&&s[i]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,i++}else if(s[i]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(s[i]),n++,i++}else return!1;return e.length===s.length&&a}parseNegate(){if(this.nonegate)return;const e=this.pattern;let s=!1,r=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)s=!s,r++;r&&(this.pattern=e.slice(r)),this.negate=s}matchOne(e,s,r=!1){const n=this.options;if(this.isWindows){const p=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=!p&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof s[0]=="string"&&/^[a-z]:$/i.test(s[0]),$=!E&&s[0]===""&&s[1]===""&&s[2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3]),b=y?3:p?0:void 0,S=$?3:E?0:void 0;if(typeof b=="number"&&typeof S=="number"){const[_,z]=[e[b],s[S]];_.toLowerCase()===z.toLowerCase()&&(s[S]=_,S>b?s=s.slice(S):b>S&&(e=e.slice(b)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:s}),this.debug("matchOne",e.length,s.length);for(var a=0,o=0,l=e.length,h=s.length;a<l&&o<h;a++,o++){this.debug("matchOne loop");var c=s[o],u=e[a];if(this.debug(s,c,u),c===!1)return!1;if(c===K){this.debug("GLOBSTAR",[s,c,u]);var d=a,g=o+1;if(g===h){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<l;){var f=e[d];if(this.debug(`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
`,e
|
|
7
|
-
`).
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`).join(
|
|
11
|
-
`),
|
|
12
|
-
`,e
|
|
13
|
-
`).
|
|
14
|
-
`),t.events.length&&(e+=`Events:
|
|
15
|
-
`,e+=t.events.map(({event:n,docs:i})=>`- \`${n}\`: ${i}
|
|
16
|
-
`).join(""),e+=`
|
|
17
|
-
`),t.listeners.length&&(e+=`Listeners:
|
|
18
|
-
`,e+=t.listeners.map(({event:n})=>`- \`${n}\`
|
|
19
|
-
`).join(""),e+=`
|
|
20
|
-
`),t.slots.length&&(e+=`Slots:
|
|
21
|
-
`,e+=t.slots.map(({name:n,docs:i})=>`- \`${n}\`: ${i}
|
|
22
|
-
`).join(""),e+=`
|
|
23
|
-
`),e},_t=t=>`${t.docs}
|
|
24
|
-
|
|
25
|
-
Type: \`${t.type}\``,gn=(t,e,s,r)=>({$schema:"https://json.schemastore.org/web-types",name:t,version:e,"description-markup":"markdown",contributions:{html:{elements:s.components.map(n=>{const i=rs(r,n.filePath);return{name:n.tag,description:ns(n),"doc-url":i,attributes:n.props.filter(a=>a.attr).map(a=>({name:a.attr,description:_t(a),"doc-url":i,value:{type:a.type,default:a.default,required:a.required}})),js:{properties:n.props.map(a=>({name:a.name,description:_t(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}))}}})}}}),dn=(t,e,s)=>[{name:"Storybook",url:rs(t,s)},{name:"Sources",url:pn(e,s)}],$n=t=>{if(!t.values.some(({value:e})=>e===void 0))return t.values.map(({value:e})=>({name:e}))},vn=(t,e,s)=>({version:1.1,tags:t.components.map(r=>{const n=dn(e,s,r.filePath);return{name:r.tag,description:ns(r),attributes:r.props.map(i=>({name:i.attr??i.name,description:_t(i),values:$n(i),references:n})),references:n}}),globalAttributes:[],valueSets:[]}),mn=t=>({version:1.1,properties:t.components.flatMap(e=>e.styles.map(s=>({name:s.name,description:s.docs})))}),_n=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,yn=t=>{const e={value:"2023",pattern:"yyyy"},s={value:"12",pattern:"mm"},r={value:"24",pattern:"dd"};return is([e.value,s.value,r.value].join("-"),t,{timeZone:"UTC"}).replace(e.value,e.pattern).replace(s.value,s.pattern).replace(r.value,r.pattern)},En=(t,e,s)=>{const r=t.closest("[lang]"),n=Intl.NumberFormat.supportedLocalesOf(r?.lang),i=n.length>0&&typeof n[0]=="string"?n[0]:navigator.language||s,a=i.split("-").shift();return Object.keys(e).length===0?{locale:i,messages:{lang:s}}:{locale:i,messages:e[a]??e[s]??{lang:s}}},wn=(t,e,s)=>new Intl.NumberFormat(e,{style:"currency",currency:s}).format(t),bn=(t,e,s=0)=>new Intl.NumberFormat(e,{minimumFractionDigits:s}).format(Number(t)),Sn=(t,e,s=0)=>new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:s,maximumFractionDigits:s}).format(t),On=(t,e,s,r="short",n=0)=>new Intl.NumberFormat(e,{style:"unit",unit:s,unitDisplay:r,minimumFractionDigits:n,maximumFractionDigits:n}).format(t),is=(t,e,s)=>typeof t!="string"||t===""||!_n.test(t)?"":new Intl.DateTimeFormat(e,s).format(new Date(t)),xn=(t,e)=>s=>En(s,t,e);var Ce={updatable:!0,slotRelocation:!0,experimentalSlotFixes:!1},Tn=Object.create,st=Object.defineProperty,An=Object.getOwnPropertyDescriptor,as=Object.getOwnPropertyNames,Rn=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty,os=t=>{throw TypeError(t)},Mn=(t,e,s)=>e in t?st(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ls=(t,e)=>function(){return e||(0,t[as(t)[0]])((e={exports:{}}).exports,e),e.exports},Ln=(t,e)=>{for(var s in e)st(t,s,{get:e[s],enumerable:!0})},kn=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of as(e))!Nn.call(t,n)&&n!==s&&st(t,n,{get:()=>e[n],enumerable:!(r=An(e,n))||r.enumerable});return t},Cn=(t,e,s)=>(s=t!=null?Tn(Rn(t)):{},kn(st(s,"default",{value:t,enumerable:!0}),t)),jn=(t,e,s)=>Mn(t,e+"",s),yt=(t,e,s)=>e.has(t)||os("Cannot "+s),m=(t,e,s)=>(yt(t,e,"read from private field"),s?s.call(t):e.get(t)),J=(t,e,s)=>e.has(t)?os("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),M=(t,e,s,r)=>(yt(t,e,"write to private field"),e.set(t,s),s),ue=(t,e,s)=>(yt(t,e,"access private method"),s),Pn=ls({"node_modules/balanced-match/index.js"(t,e){e.exports=s;function s(i,a,o){i instanceof RegExp&&(i=r(i,o)),a instanceof RegExp&&(a=r(a,o));var l=n(i,a,o);return l&&{start:l[0],end:l[1],pre:o.slice(0,l[0]),body:o.slice(l[0]+i.length,l[1]),post:o.slice(l[1]+a.length)}}function r(i,a){var o=a.match(i);return o?o[0]:null}s.range=n;function n(i,a,o){var l,h,c,u,d,g=o.indexOf(i),f=o.indexOf(a,g+1),p=g;if(g>=0&&f>0){if(i===a)return[g,f];for(l=[],c=o.length;p>=0&&!d;)p==g?(l.push(p),g=o.indexOf(i,p+1)):l.length==1?d=[l.pop(),f]:(h=l.pop(),h<c&&(c=h,u=f),f=o.indexOf(a,p+1)),p=g<f&&g>=0?g:f;l.length&&(d=[c,u])}return d}}}),Dn=ls({"node_modules/brace-expansion/index.js"(t,e){var s=Pn();e.exports=d;var r="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",o="\0PERIOD"+Math.random()+"\0";function l($){return parseInt($,10)==$?parseInt($,10):$.charCodeAt(0)}function h($){return $.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(i).split("\\,").join(a).split("\\.").join(o)}function c($){return $.split(r).join("\\").split(n).join("{").split(i).join("}").split(a).join(",").split(o).join(".")}function u($){if(!$)return[""];var b=[],S=s("{","}",$);if(!S)return $.split(",");var _=S.pre,z=S.body,C=S.post,x=_.split(",");x[x.length-1]+="{"+z+"}";var j=u(C);return C.length&&(x[x.length-1]+=j.shift(),x.push.apply(x,j)),b.push.apply(b,x),b}function d($){return $?($.substr(0,2)==="{}"&&($="\\{\\}"+$.substr(2)),E(h($),!0).map(c)):[]}function g($){return"{"+$+"}"}function f($){return/^-?0\d/.test($)}function p($,b){return $<=b}function y($,b){return $>=b}function E($,b){var S=[],_=s("{","}",$);if(!_)return[$];var z=_.pre,C=_.post.length?E(_.post,!1):[""];if(/\$$/.test(_.pre))for(var x=0;x<C.length;x++){var j=z+"{"+_.body+"}"+C[x];S.push(j)}else{var Ae=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(_.body),$e=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(_.body),V=Ae||$e,Be=_.body.indexOf(",")>=0;if(!V&&!Be)return _.post.match(/,(?!,).*\}/)?($=_.pre+"{"+_.body+i+_.post,E($)):[$];var O;if(V)O=_.body.split(/\.\./);else if(O=u(_.body),O.length===1&&(O=E(O[0],!1).map(g),O.length===1))return C.map(function(Ct){return _.pre+O[0]+Ct});var G;if(V){var ve=l(O[0]),Ue=l(O[1]),Mt=Math.max(O[0].length,O[1].length),Ze=O.length==3?Math.abs(l(O[2])):1,qe=p,Lt=Ue<ve;Lt&&(Ze*=-1,qe=y);var kt=O.some(f);G=[];for(var ee=ve;qe(ee,Ue);ee+=Ze){var R;if($e)R=String.fromCharCode(ee),R==="\\"&&(R="");else if(R=String(ee),kt){var Je=Mt-R.length;if(Je>0){var Ke=new Array(Je+1).join("0");ee<0?R="-"+Ke+R.slice(1):R=Ke+R}}G.push(R)}}else{G=[];for(var B=0;B<O.length;B++)G.push.apply(G,E(O[B],!1))}for(var B=0;B<G.length;B++)for(var x=0;x<C.length;x++){var j=z+G[B]+C[x];(!b||V||j)&&S.push(j)}}return S}}}),In="http://www.w3.org/2000/svg",Wn="http://www.w3.org/1999/xhtml",cs=(t,e)=>e in t,hs="http://www.w3.org/1999/xlink",fe=typeof window<"u"?window:{},be={$flags$:0,$resourcesUrl$:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,s,r)=>t.addEventListener(e,s,r),rel:(t,e,s,r)=>t.removeEventListener(e,s,r),ce:(t,e)=>new CustomEvent(t,e)},zn=t=>t!=null&&t!==void 0,us=t=>(t=typeof t,t==="object"||t==="function"),Gn=Cn(Dn()),Hn=1024*64,rt=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Hn)throw new TypeError("pattern is too long")},Fn={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},je=t=>t.replace(/[[\]\\-]/g,"\\$&"),Bn=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fs=t=>t.join(""),Un=(t,e)=>{const s=e;if(t.charAt(s)!=="[")throw new Error("not in a brace expression");const r=[],n=[];let i=s+1,a=!1,o=!1,l=!1,h=!1,c=s,u="";e:for(;i<t.length;){const p=t.charAt(i);if((p==="!"||p==="^")&&i===s+1){h=!0,i++;continue}if(p==="]"&&a&&!l){c=i+1;break}if(a=!0,p==="\\"&&!l){l=!0,i++;continue}if(p==="["&&!l){for(const[y,[E,$,b]]of Object.entries(Fn))if(t.startsWith(y,i)){if(u)return["$.",!1,t.length-s,!0];i+=y.length,b?n.push(E):r.push(E),o=o||$;continue e}}if(l=!1,u){p>u?r.push(je(u)+"-"+je(p)):p===u&&r.push(je(p)),u="",i++;continue}if(t.startsWith("-]",i+1)){r.push(je(p+"-")),i+=2;continue}if(t.startsWith("-",i+1)){u=p,i+=2;continue}r.push(je(p)),i++}if(c<i)return["",!1,0,!1];if(!r.length&&!n.length)return["$.",!1,t.length-s,!0];if(n.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!h){const p=r[0].length===2?r[0].slice(-1):r[0];return[Bn(p),!1,c-s,!1]}const d="["+(h?"^":"")+fs(r)+"]",g="["+(h?"":"^")+fs(n)+"]";return[r.length&&n.length?"("+d+"|"+g+")":r.length?d:g,o,c-s,!0]},Pe=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Zn=new Set(["!","?","+","*","@"]),ps=t=>Zn.has(t),qn="(?!(?:^|/)\\.\\.?(?:$|/))",nt="(?!\\.)",Jn=new Set(["[","."]),Kn=new Set(["..","."]),Xn=new Set("().*{}+?[]^$\\!"),Yn=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Et="[^/]",gs=Et+"*?",ds=Et+"+?",D,W,ae,A,k,pe,Se,ge,se,Oe,it,De,$s,xe,at,wt,vs,oe=class _e{constructor(e,s,r={}){J(this,De),jn(this,"type"),J(this,D),J(this,W),J(this,ae,!1),J(this,A,[]),J(this,k),J(this,pe),J(this,Se),J(this,ge,!1),J(this,se),J(this,Oe),J(this,it,!1),this.type=e,e&&M(this,W,!0),M(this,k,s),M(this,D,m(this,k)?m(m(this,k),D):this),M(this,se,m(this,D)===this?r:m(m(this,D),se)),M(this,Se,m(this,D)===this?[]:m(m(this,D),Se)),e==="!"&&!m(m(this,D),ge)&&m(this,Se).push(this),M(this,pe,m(this,k)?m(m(this,k),A).length:0)}get hasMagic(){if(m(this,W)!==void 0)return m(this,W);for(const e of m(this,A))if(typeof e!="string"&&(e.type||e.hasMagic))return M(this,W,!0);return m(this,W)}toString(){return m(this,Oe)!==void 0?m(this,Oe):this.type?M(this,Oe,this.type+"("+m(this,A).map(e=>String(e)).join("|")+")"):M(this,Oe,m(this,A).map(e=>String(e)).join(""))}push(...e){for(const s of e)if(s!==""){if(typeof s!="string"&&!(s instanceof _e&&m(s,k)===this))throw new Error("invalid part: "+s);m(this,A).push(s)}}toJSON(){var e;const s=this.type===null?m(this,A).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...m(this,A).map(r=>r.toJSON())];return this.isStart()&&!this.type&&s.unshift([]),this.isEnd()&&(this===m(this,D)||m(m(this,D),ge)&&((e=m(this,k))==null?void 0:e.type)==="!")&&s.push({}),s}isStart(){var e;if(m(this,D)===this)return!0;if(!((e=m(this,k))!=null&&e.isStart()))return!1;if(m(this,pe)===0)return!0;const s=m(this,k);for(let r=0;r<m(this,pe);r++){const n=m(s,A)[r];if(!(n instanceof _e&&n.type==="!"))return!1}return!0}isEnd(){var e,s,r;if(m(this,D)===this||((e=m(this,k))==null?void 0:e.type)==="!")return!0;if(!((s=m(this,k))!=null&&s.isEnd()))return!1;if(!this.type)return(r=m(this,k))==null?void 0:r.isEnd();const n=m(this,k)?m(m(this,k),A).length:0;return m(this,pe)===n-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const s=new _e(this.type,e);for(const r of m(this,A))s.copyIn(r);return s}static fromGlob(e,s={}){var r;const n=new _e(null,void 0,s);return ue(r=_e,xe,at).call(r,e,n,0,s),n}toMMPattern(){if(this!==m(this,D))return m(this,D).toMMPattern();const e=this.toString(),[s,r,n,i]=this.toRegExpSource();if(!(n||m(this,W)||m(this,se).nocase&&!m(this,se).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(m(this,se).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${s}$`,o),{_src:s,_glob:e})}get options(){return m(this,se)}toRegExpSource(e){var s;const r=e??!!m(this,se).dot;if(m(this,D)===this&&ue(this,De,$s).call(this),!this.type){const h=this.isStart()&&this.isEnd(),c=m(this,A).map(f=>{var p;const[y,E,$,b]=typeof f=="string"?ue(p=_e,xe,vs).call(p,f,m(this,W),h):f.toRegExpSource(e);return M(this,W,m(this,W)||$),M(this,ae,m(this,ae)||b),y}).join("");let u="";if(this.isStart()&&typeof m(this,A)[0]=="string"&&!(m(this,A).length===1&&Kn.has(m(this,A)[0]))){const p=Jn,y=r&&p.has(c.charAt(0))||c.startsWith("\\.")&&p.has(c.charAt(2))||c.startsWith("\\.\\.")&&p.has(c.charAt(4)),E=!r&&!e&&p.has(c.charAt(0));u=y?qn:E?nt:""}let d="";return this.isEnd()&&m(m(this,D),ge)&&((s=m(this,k))==null?void 0:s.type)==="!"&&(d="(?:$|\\/)"),[u+c+d,Pe(c),M(this,W,!!m(this,W)),m(this,ae)]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let a=ue(this,De,wt).call(this,r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){const h=this.toString();return M(this,A,[h]),this.type=null,M(this,W,void 0),[h,Pe(this.toString()),!1,!1]}let o=!n||e||r||!nt?"":ue(this,De,wt).call(this,!0);o===a&&(o=""),o&&(a=`(?:${a})(?:${o})*?`);let l="";if(this.type==="!"&&m(this,it))l=(this.isStart()&&!r?nt:"")+ds;else{const h=this.type==="!"?"))"+(this.isStart()&&!r&&!e?nt:"")+gs+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;l=i+a+h}return[l,Pe(a),M(this,W,!!m(this,W)),m(this,ae)]}};D=new WeakMap,W=new WeakMap,ae=new WeakMap,A=new WeakMap,k=new WeakMap,pe=new WeakMap,Se=new WeakMap,ge=new WeakMap,se=new WeakMap,Oe=new WeakMap,it=new WeakMap,De=new WeakSet,$s=function(){if(this!==m(this,D))throw new Error("should only call on root");if(m(this,ge))return this;this.toString(),M(this,ge,!0);let t;for(;t=m(this,Se).pop();){if(t.type!=="!")continue;let e=t,s=m(e,k);for(;s;){for(let r=m(e,pe)+1;!s.type&&r<m(s,A).length;r++)for(const n of m(t,A)){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(m(s,A)[r])}e=s,s=m(e,k)}}return this},xe=new WeakSet,at=function(t,e,s,r){var n,i;let a=!1,o=!1,l=-1,h=!1;if(e.type===null){let f=s,p="";for(;f<t.length;){const y=t.charAt(f++);if(a||y==="\\"){a=!a,p+=y;continue}if(o){f===l+1?(y==="^"||y==="!")&&(h=!0):y==="]"&&!(f===l+2&&h)&&(o=!1),p+=y;continue}else if(y==="["){o=!0,l=f,h=!1,p+=y;continue}if(!r.noext&&ps(y)&&t.charAt(f)==="("){e.push(p),p="";const E=new oe(y,e);f=ue(n=oe,xe,at).call(n,t,E,f,r),e.push(E);continue}p+=y}return e.push(p),f}let c=s+1,u=new oe(null,e);const d=[];let g="";for(;c<t.length;){const f=t.charAt(c++);if(a||f==="\\"){a=!a,g+=f;continue}if(o){c===l+1?(f==="^"||f==="!")&&(h=!0):f==="]"&&!(c===l+2&&h)&&(o=!1),g+=f;continue}else if(f==="["){o=!0,l=c,h=!1,g+=f;continue}if(ps(f)&&t.charAt(c)==="("){u.push(g),g="";const p=new oe(f,u);u.push(p),c=ue(i=oe,xe,at).call(i,t,p,c,r);continue}if(f==="|"){u.push(g),g="",d.push(u),u=new oe(null,e);continue}if(f===")")return g===""&&m(e,A).length===0&&M(e,it,!0),u.push(g),g="",e.push(...d,u),c;g+=f}return e.type=null,M(e,W,void 0),M(e,A,[t.substring(s-1)]),c},wt=function(t){return m(this,A).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[s,r,n,i]=e.toRegExpSource(t);return M(this,ae,m(this,ae)||i),s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},vs=function(t,e,s=!1){let r=!1,n="",i=!1;for(let a=0;a<t.length;a++){const o=t.charAt(a);if(r){r=!1,n+=(Xn.has(o)?"\\":"")+o;continue}if(o==="\\"){a===t.length-1?n+="\\\\":r=!0;continue}if(o==="["){const[l,h,c,u]=Un(t,a);if(c){n+=l,i=i||h,a+=c-1,e=e||u;continue}}if(o==="*"){s&&t==="*"?n+=ds:n+=gs,e=!0;continue}if(o==="?"){n+=Et,e=!0;continue}n+=Yn(o)}return[n,Pe(t),!!e,i]},J(oe,xe);var ms=oe,Qn=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),F=(t,e,s={})=>(rt(e),!s.nocomment&&e.charAt(0)==="#"?!1:new ot(e,s).match(t)),Vn=/^\*+([^+@!?\*\[\(]*)$/,ei=t=>e=>!e.startsWith(".")&&e.endsWith(t),ti=t=>e=>e.endsWith(t),si=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),ri=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ni=/^\*+\.\*+$/,ii=t=>!t.startsWith(".")&&t.includes("."),ai=t=>t!=="."&&t!==".."&&t.includes("."),oi=/^\.\*+$/,li=t=>t!=="."&&t!==".."&&t.startsWith("."),ci=/^\*+$/,hi=t=>t.length!==0&&!t.startsWith("."),ui=t=>t.length!==0&&t!=="."&&t!=="..",fi=/^\?+([^+@!?\*\[\(]*)?$/,pi=([t,e=""])=>{const s=_s([t]);return e?(e=e.toLowerCase(),r=>s(r)&&r.toLowerCase().endsWith(e)):s},gi=([t,e=""])=>{const s=ys([t]);return e?(e=e.toLowerCase(),r=>s(r)&&r.toLowerCase().endsWith(e)):s},di=([t,e=""])=>{const s=ys([t]);return e?r=>s(r)&&r.endsWith(e):s},$i=([t,e=""])=>{const s=_s([t]);return e?r=>s(r)&&r.endsWith(e):s},_s=([t])=>{const e=t.length;return s=>s.length===e&&!s.startsWith(".")},ys=([t])=>{const e=t.length;return s=>s.length===e&&s!=="."&&s!==".."},Es=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",ws={win32:{sep:"\\"},posix:{sep:"/"}},vi=Es==="win32"?ws.win32.sep:ws.posix.sep;F.sep=vi;var Y=Symbol("globstar **");F.GLOBSTAR=Y;var mi="[^/]",_i=mi+"*?",yi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ei="(?:(?!(?:\\/|^)\\.).)*?",wi=(t,e={})=>s=>F(s,t,e);F.filter=wi;var Q=(t,e={})=>Object.assign({},t,e),bi=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return F;const e=F;return Object.assign((r,n,i={})=>e(r,n,Q(t,i)),{Minimatch:class extends e.Minimatch{constructor(n,i={}){super(n,Q(t,i))}static defaults(n){return e.defaults(Q(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,i,a={}){super(n,i,Q(t,a))}static fromGlob(n,i={}){return e.AST.fromGlob(n,Q(t,i))}},unescape:(r,n={})=>e.unescape(r,Q(t,n)),escape:(r,n={})=>e.escape(r,Q(t,n)),filter:(r,n={})=>e.filter(r,Q(t,n)),defaults:r=>e.defaults(Q(t,r)),makeRe:(r,n={})=>e.makeRe(r,Q(t,n)),braceExpand:(r,n={})=>e.braceExpand(r,Q(t,n)),match:(r,n,i={})=>e.match(r,n,Q(t,i)),sep:e.sep,GLOBSTAR:Y})};F.defaults=bi;var bs=(t,e={})=>(rt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Gn.default)(t));F.braceExpand=bs;var Si=(t,e={})=>new ot(t,e).makeRe();F.makeRe=Si;var Oi=(t,e,s={})=>{const r=new ot(e,s);return t=t.filter(n=>r.match(n)),r.options.nonull&&!t.length&&t.push(e),t};F.match=Oi;var Ss=/[?*]|[+@!]\(.*?\)|\[|\]/,xi=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ot=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){rt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Es,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);const s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,i,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const o=n[0]===""&&n[1]===""&&(n[2]==="?"||!Ss.test(n[2]))&&!Ss.test(n[3]),l=/^[a-z]:/i.test(n[0]);if(o)return[...n.slice(0,4),...n.slice(4).map(h=>this.parse(h))];if(l)return[n[0],...n.slice(1).map(h=>this.parse(h))]}return n.map(o=>this.parse(o))});if(this.debug(this.pattern,r),this.set=r.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){const i=this.set[n];i[0]===""&&i[1]===""&&this.globParts[n][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let s=0;s<t.length;s++)for(let r=0;r<t[s].length;r++)t[s][r]==="**"&&(t[s][r]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let r=s;for(;e[r+1]==="**";)r++;r!==s&&e.splice(s,r-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,r)=>{const n=s[s.length-1];return r==="**"&&n==="**"?s:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(s.pop(),s):(s.push(r),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let r=1;r<t.length-1;r++){const n=t[r];r===1&&n===""&&t[0]===""||(n==="."||n==="")&&(e=!0,t.splice(r,1),r--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){const r=t[s-1];r&&r!=="."&&r!==".."&&r!=="**"&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let r=-1;for(;(r=s.indexOf("**",r+1))!==-1;){let i=r;for(;s[i+1]==="**";)i++;i>r&&s.splice(r+1,i-r);let a=s[r+1];const o=s[r+2],l=s[r+3];if(a!==".."||!o||o==="."||o===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(r,1);const h=s.slice(0);h[r]="**",t.push(h),r--}if(!this.preserveMultipleSlashes){for(let i=1;i<s.length-1;i++){const a=s[i];i===1&&a===""&&s[0]===""||(a==="."||a==="")&&(e=!0,s.splice(i,1),i--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let n=0;for(;(n=s.indexOf("..",n+1))!==-1;){const i=s[n-1];if(i&&i!=="."&&i!==".."&&i!=="**"){e=!0;const o=n===1&&s[n+1]==="**"?["."]:[];s.splice(n-1,2,...o),s.length===0&&s.push(""),n-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){const r=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);r&&(t[e]=r,t[s]=[])}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let r=0,n=0,i=[],a="";for(;r<t.length&&n<e.length;)if(t[r]===e[n])i.push(a==="b"?e[n]:t[r]),r++,n++;else if(s&&t[r]==="**"&&e[n]===t[r+1])i.push(t[r]),r++;else if(s&&e[n]==="**"&&t[r]===e[n+1])i.push(e[n]),n++;else if(t[r]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(a==="b")return!1;a="a",i.push(t[r]),r++,n++}else if(e[n]==="*"&&t[r]&&(this.options.dot||!t[r].startsWith("."))&&t[r]!=="**"){if(a==="a")return!1;a="b",i.push(e[n]),r++,n++}else return!1;return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,s=0;for(let r=0;r<t.length&&t.charAt(r)==="!";r++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){const r=this.options;if(this.isWindows){const f=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),p=!f&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),y=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),E=!y&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),$=p?3:f?0:void 0,b=E?3:y?0:void 0;if(typeof $=="number"&&typeof b=="number"){const[S,_]=[t[$],e[b]];S.toLowerCase()===_.toLowerCase()&&(e[b]=S,b>$?e=e.slice(b):$>b&&(t=t.slice($)))}}const{optimizationLevel:n=1}=this.options;n>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,a=0,o=t.length,l=e.length;i<o&&a<l;i++,a++){this.debug("matchOne loop");var h=e[a],c=t[i];if(this.debug(e,h,c),h===!1)return!1;if(h===Y){this.debug("GLOBSTAR",[e,h,c]);var u=i,d=a+1;if(d===l){for(this.debug("** at the end");i<o;i++)if(t[i]==="."||t[i]===".."||!r.dot&&t[i].charAt(0)===".")return!1;return!0}for(;u<o;){var g=t[u];if(this.debug(`
|
|
26
|
-
globstar while`,t,u,e,d,g),this.matchOne(t.slice(u),e.slice(d),s))return this.debug("globstar found match!",u,o,g),!0;if(g==="."||g===".."||!r.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,u,e,d);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(s&&(this.debug(`
|
|
27
|
-
>>> no match, partial?`,t,u,e,d),u===o))}let f;if(typeof h=="string"?(f=c===h,this.debug("string match",h,c,f)):(f=h.test(c),this.debug("pattern match",h,c,f)),!f)return!1}if(i===o&&a===l)return!0;if(i===o)return s;if(a===l)return i===o-1&&t[i]==="";throw new Error("wtf?")}braceExpand(){return bs(this.pattern,this.options)}parse(t){rt(t);const e=this.options;if(t==="**")return Y;if(t==="")return"";let s,r=null;(s=t.match(ci))?r=e.dot?ui:hi:(s=t.match(Vn))?r=(e.nocase?e.dot?ri:si:e.dot?ti:ei)(s[1]):(s=t.match(fi))?r=(e.nocase?e.dot?gi:pi:e.dot?di:$i)(s):(s=t.match(ni))?r=e.dot?ai:ii:(s=t.match(oi))&&(r=li);const n=ms.fromGlob(t,this.options).toMMPattern();return r&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:r}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,s=e.noglobstar?_i:e.dot?yi:Ei,r=new Set(e.nocase?["i"]:[]);let n=t.map(o=>{const l=o.map(h=>{if(h instanceof RegExp)for(const c of h.flags.split(""))r.add(c);return typeof h=="string"?xi(h):h===Y?Y:h._src});return l.forEach((h,c)=>{const u=l[c+1],d=l[c-1];h!==Y||d===Y||(d===void 0?u!==void 0&&u!==Y?l[c+1]="(?:\\/|"+s+"\\/)?"+u:l[c]=s:u===void 0?l[c-1]=d+"(?:\\/|"+s+")?":u!==Y&&(l[c-1]=d+"(?:\\/|\\/"+s+"\\/)"+u,l[c+1]=Y))}),l.filter(h=>h!==Y).join("/")}).join("|");const[i,a]=t.length>1?["(?:",")"]:["",""];n="^"+i+n+a+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const s=this.options;this.isWindows&&(t=t.split("\\").join("/"));const r=this.slashSplit(t);this.debug(this.pattern,"split",r);const n=this.set;this.debug(this.pattern,"set",n);let i=r[r.length-1];if(!i)for(let a=r.length-2;!i&&a>=0;a--)i=r[a];for(let a=0;a<n.length;a++){const o=n[a];let l=r;if(s.matchBase&&o.length===1&&(l=[i]),this.matchOne(l,o,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return F.defaults(t).Minimatch}};F.AST=ms,F.Minimatch=ot,F.escape=Qn,F.unescape=Pe;var Ti=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ai={};Ln(Ai,{err:()=>Os,map:()=>Ri,ok:()=>bt,unwrap:()=>Ni,unwrapErr:()=>Mi});var bt=t=>({isOk:!0,isErr:!1,value:t}),Os=t=>({isOk:!1,isErr:!0,value:t});function Ri(t,e){if(t.isOk){const s=e(t.value);return s instanceof Promise?s.then(r=>bt(r)):bt(s)}if(t.isErr){const s=t.value;return Os(s)}throw"should never get here"}var Ni=t=>{if(t.isOk)return t.value;throw t.value},Mi=t=>{if(t.isErr)return t.value;throw t.value},xs=t=>{const e=Rs(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&t.tagName!=="SLOT-FB"&&Ts(e,t.tagName).forEach(r=>{r.nodeType===1&&r.tagName==="SLOT-FB"&&(ki(r,St(r),!1).length?r.hidden=!0:r.hidden=!1)});let s=0;for(s=0;s<e.length;s++){const r=e[s];r.nodeType===1&&Rs(r,"childNodes").length&&xs(r)}},Li=t=>{const e=[];for(let s=0;s<t.length;s++){const r=t[s]["s-nr"]||void 0;r&&r.isConnected&&e.push(r)}return e};function Ts(t,e,s){let r=0,n=[],i;for(;r<t.length;r++)i=t[r],i["s-sr"]&&(!e||i["s-hn"]===e)&&s===void 0&&n.push(i),n=[...n,...Ts(i.childNodes,e,s)];return n}var ki=(t,e,s=!0)=>{const r=[];(s&&t["s-sr"]||!t["s-sr"])&&r.push(t);let n=t;for(;n=n.nextSibling;)St(n)===e&&(s||!n["s-sr"])&&r.push(n);return r},As=(t,e)=>t.nodeType===1?t.getAttribute("slot")===null&&e===""||t.getAttribute("slot")===e:t["s-sn"]===e?!0:e==="",St=t=>typeof t["s-sn"]=="string"?t["s-sn"]:t.nodeType===1&&t.getAttribute("slot")||void 0;function Ci(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=s=>(function(r){const n=[],i=this["s-sn"];r?.flatten&&console.error(`
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.StencilHelpersModule={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=class{classes;constructor(e=[]){this.classes=e}add=e=>{this.has(e)||this.classes.push(e)};delete=e=>{let t=this.classes.indexOf(e);t>-1&&this.classes.splice(t,1)};has=e=>this.classes.includes(e);join=()=>this.classes.join(` `)},n=e=>typeof e==`object`&&!Array.isArray(e)&&e!==null,r=(e,t,i)=>{if(!n(e)||typeof t!=`string`)return i;let[a,...o]=t.split(`.`);return o.length?r(e[a],o.join(`.`),i):e[a]??i},i=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`),a=e=>typeof e==`string`&&e.trim()!==``,o=e=>typeof e==`object`?JSON.stringify(e):String(e),s=e=>typeof e==`string`?e.toLocaleLowerCase().normalize(`NFD`).replaceAll(/[\u0300-\u036f]/g,``):e,c=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t>0?`-`:``)+e.toLowerCase()).replace(/[^a-z0-9-]+/g,`-`).replace(/--+/g,`-`).replace(/(?:^-)|(?:-$)/g,``),l=(e=``,t=10)=>{let n=new Uint8Array(t);crypto.getRandomValues(n);let r=Array.from(n).map(e=>e.toString(16).padStart(2,`0`)).join(``).slice(0,t);return e===``?r:`${e}-${r}`},u=e=>a(e)&&/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e)!==null,d=e=>{let t;return typeof e==`string`?t=e:e&&typeof e==`object`&&(n(e)||Array.isArray(e))?t=JSON.stringify(e):e!=null&&typeof e!=`boolean`&&typeof e!=`object`&&(t=String(e)),t&&c(t)},f=async e=>{if(e)return e()},p={FIRST:`first`,NEXT:`next`,PREVIOUS:`previous`,LAST:`last`},m=10,h=class{items=[];total;top=m;next;baseIndex=1;constructor(e){if(n(e))Array.isArray(e.items)&&(this.items=e.items),typeof e.top==`number`&&(this.top=e.top),this.total=typeof e.total==`number`?e.total:this.items.length,this.next=e.next;else throw Error(`Page - init must match IPage type.`)}getIndexFromCursor=(e=`first`,t)=>{if(!Array.isArray(this.items)||!this.items.length)return null;let n=this.items.length-this.baseIndex,r,i=0;if([`previous`,`next`].includes(e)&&t){let e=this.items.findIndex(e=>JSON.stringify(e)===JSON.stringify(t));if(e===-1)return 0;i=e}return r=e===`first`?0:e===`last`?n:e===`previous`?JSON.stringify(this.items[i])===JSON.stringify(this.items[0])?n:i-this.baseIndex:e===`next`?JSON.stringify(this.items[i])===JSON.stringify(this.items[n])?0:i+this.baseIndex:0,r}},g=class{items=[];#e=m;#t;#n;constructor(e,t){Array.isArray(e)&&(this.items=e),t&&([`string`,`function`].includes(typeof t.next)||n(t.next)&&URL.canParse(t.next))&&(this.#t=t.next),typeof t?.top==`number`&&(this.#e=t.top),typeof t?.total==`number`&&(this.#n=t.total)}getPage=(e=0,t)=>{let n=typeof t==`function`?this.items.filter(t):this.items,r;return this.#t?r=this.#t:n.length>e+this.#e&&(r=()=>this.getPage(e+this.#e,t)),new h({items:n.slice(e,e+this.#e),total:this.#n,top:this.#e,next:r})}},_=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,ee=e=>e.toISOString().split(`T`)[0],te=(e,t)=>t.includes(e?.tagName.toLowerCase()),ne=`a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button`,re=e=>typeof e==`number`&&!Number.isNaN(e),ie=e=>{let t=v(e),n=y(e);return[e,...t,...n]},v=(e,t=[])=>{if(e.self!==e.top)try{let n=e.parent;return n?(t.push(n),v(n,t)):t}catch(e){return console.error(`Different hosts between iframes:`,e),t}return t},y=(e,t=[])=>{if(e.frames.length>0)for(let n of Array.from(e.frames))t.push(n),y(n,t);return t},ae=(e,t)=>{if(!t)return;let n=t.split(`/`);return`${e}${n.slice(2,n.length-1).join(`-`)}--docs`},oe=(e,t)=>{if(t)return`${e}${t}`},se=e=>{let t=e.overview?`${e.overview}\n\n`:``,n=e.props.filter(({attr:e})=>e!==void 0);n.length&&(t+=`Attributes:
|
|
2
|
+
`,t+=n.map(({attr:e,docs:t})=>`- \`${e}\`: ${t}\n`).join(``),t+=`
|
|
3
|
+
`);let r=e.props.filter(({attr:e})=>e===void 0);return r.length&&(t+=`Properties:
|
|
4
|
+
`,t+=r.map(({name:e,docs:t})=>`- \`${e}\`: ${t}\n`).join(``),t+=`
|
|
5
|
+
`),e.methods.length&&(t+=`Methods:
|
|
6
|
+
`,t+=e.methods.map(({name:e,docs:t})=>`- \`${e}\`: ${t}\n`).join(``),t+=`
|
|
7
|
+
`),e.events.length&&(t+=`Events:
|
|
8
|
+
`,t+=e.events.map(({event:e,docs:t})=>`- \`${e}\`: ${t}\n`).join(``),t+=`
|
|
9
|
+
`),e.listeners.length&&(t+=`Listeners:
|
|
10
|
+
`,t+=e.listeners.map(({event:e})=>`- \`${e}\`\n`).join(``),t+=`
|
|
11
|
+
`),e.slots.length&&(t+=`Slots:
|
|
12
|
+
`,t+=e.slots.map(({name:e,docs:t})=>`- ${e?`\`${e}\``:`default`}: ${t}\n`).join(``),t+=`
|
|
13
|
+
`),t},b=e=>`${e.docs}\n\nType: \`${e.type}\``,ce=(e,t,n,r)=>({$schema:`https://json.schemastore.org/web-types`,name:e,version:t,"description-markup":`markdown`,contributions:{html:{elements:n.components.map(e=>{let t=ae(r,e.filePath);return{name:e.tag,description:se(e),"doc-url":t,attributes:e.props.filter(e=>e.attr).map(e=>({name:e.attr,description:b(e),"doc-url":t,value:{type:e.type,default:e.default,required:e.required}})),js:{properties:e.props.filter(e=>e.attr===void 0).map(e=>({name:e.name,description:b(e),"doc-url":t,value:{type:e.type,default:e.default,required:e.required}})),events:e.events.map(e=>({name:e.event,description:e.docs}))},css:{properties:e.styles.map(e=>({name:e.name,description:e.docs}))}}})}}}),le=(e,t,n)=>[{name:`Storybook`,url:ae(e,n)},{name:`Sources`,url:oe(t,n)}],ue=e=>{if(!e.values.some(({value:e})=>e===void 0))return e.values.map(({value:e})=>({name:e}))},de=(e,t,n)=>({version:1.1,tags:e.components.map(e=>{let r=le(t,n,e.filePath);return{name:e.tag,description:se(e),attributes:e.props.filter(e=>e.attr!==void 0).map(e=>({name:e.attr,description:b(e),values:ue(e),references:r})),references:r}}),globalAttributes:[],valueSets:[]}),fe=e=>({version:1.1,properties:e.components.flatMap(e=>e.styles.map(e=>({name:e.name,description:e.docs})))}),pe=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,me=e=>{let t={value:`2023`,pattern:`yyyy`},n={value:`12`,pattern:`mm`},r={value:`24`,pattern:`dd`};return be([t.value,n.value,r.value].join(`-`),e,{timeZone:`UTC`}).replace(t.value,t.pattern).replace(n.value,n.pattern).replace(r.value,r.pattern)},he=(e,t,n)=>{let r=e.closest(`[lang]`),i=Intl.NumberFormat.supportedLocalesOf(r?.lang),a=i.length>0&&typeof i[0]==`string`?i[0]:navigator.language||n,o=a.split(`-`).shift();return Object.keys(t).length===0?{locale:a,messages:{lang:n}}:{locale:a,messages:t[o]??t[n]??{lang:n}}},ge=(e,t,n)=>new Intl.NumberFormat(t,{style:`currency`,currency:n}).format(e),_e=(e,t,n=0)=>new Intl.NumberFormat(t,{minimumFractionDigits:n}).format(Number(e)),ve=(e,t,n=0)=>new Intl.NumberFormat(t,{style:`percent`,minimumFractionDigits:n,maximumFractionDigits:n}).format(e),ye=(e,t,n,r=`short`,i=0)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:r,minimumFractionDigits:i,maximumFractionDigits:i}).format(e),be=(e,t,n)=>typeof e!=`string`||e===``||!pe.test(e)?``:new Intl.DateTimeFormat(t,n).format(new Date(e)),xe=(e,t)=>n=>he(n,e,t),x={updatable:!0,slotRelocation:!0},Se=`http://www.w3.org/2000/svg`,Ce=`http://www.w3.org/1999/xhtml`,we=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},S=(e,t)=>t in e,Te=`http://www.w3.org/1999/xlink`,C=typeof window<`u`?window:{},w={$flags$:0,$resourcesUrl$:``,jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)},Ee=e=>{let t=D(e,`childNodes`);e.tagName&&e.tagName.includes(`-`)&&e[`s-cr`]&&e.tagName!==`SLOT-FB`&&T(t,e.tagName).forEach(e=>{e.nodeType===1&&e.tagName===`SLOT-FB`&&(Oe(e,E(e),!1).length?e.hidden=!0:e.hidden=!1)});let n=0;for(n=0;n<t.length;n++){let e=t[n];e.nodeType===1&&D(e,`childNodes`).length&&Ee(e)}},De=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n][`s-nr`]||void 0;r&&r.isConnected&&t.push(r)}return t};function T(e,t,n){let r=0,i=[],a;for(;r<e.length;r++){if(a=e[r],a[`s-sr`]&&(!t||a[`s-hn`]===t)&&(n===void 0||E(a)===n)&&(i.push(a),n!==void 0))return i;i=[...i,...T(a.childNodes,t,n)]}return i}var Oe=(e,t,n=!0)=>{let r=[];(n&&e[`s-sr`]||!e[`s-sr`])&&r.push(e);let i=e;for(;i=i.nextSibling;)E(i)===t&&(n||!i[`s-sr`])&&r.push(i);return r},ke=(e,t)=>e.nodeType===1?e.getAttribute(`slot`)===null&&t===``||e.getAttribute(`slot`)===t:e[`s-sn`]===t?!0:t===``,E=e=>typeof e[`s-sn`]==`string`?e[`s-sn`]:e.nodeType===1&&e.getAttribute(`slot`)||void 0;function Ae(e){if(e.assignedElements||e.assignedNodes||!e[`s-sr`])return;let t=t=>(function(e){let n=[],r=this[`s-sn`];e?.flatten&&console.error(`
|
|
28
14
|
Flattening is not supported for Stencil non-shadow slots.
|
|
29
15
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
30
16
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
31
|
-
`);const a=this["s-cr"].parentElement;return(a.__childNodes?a.childNodes:Li(a.childNodes)).forEach(l=>{i===St(l)&&n.push(l)}),s?n.filter(l=>l.nodeType===1):n}).bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}function Rs(t,e){if("__"+e in t){const s=t["__"+e];return typeof s!="function"?s:s.bind(t)}else return typeof t[e]!="function"?t[e]:t[e].bind(t)}var ji=(t,e,...s)=>{let r=null,n=null,i=null,a=!1,o=!1;const l=[],h=u=>{for(let d=0;d<u.length;d++)r=u[d],Array.isArray(r)?h(r):r!=null&&typeof r!="boolean"&&((a=!us(r))&&(r=String(r)),a&&o?l[l.length-1].$text$+=r:l.push(a?Ot(null,r):r),o=a)};h(s);const c=Ot(t,null);return c.$attrs$=e,l.length>0&&(c.$children$=l),c.$key$=n,c.$name$=i,c},Ot=(t,e)=>{const s={$flags$:0,$tag$:t,$text$:e,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s.$name$=null,s},Pi={},Di=t=>t&&t.$tag$===Pi,xt=t=>{const e=Ti(t);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};xt("::slotted"),xt(":host"),xt(":host-context");var Ns=(t,e,s,r,n,i,a)=>{if(s===r)return;let o=cs(t,e),l=e.toLowerCase();if(e==="class"){const h=t.classList,c=Ms(s);let u=Ms(r);h.remove(...c.filter(d=>d&&!u.includes(d))),h.add(...u.filter(d=>d&&!c.includes(d)))}else if(e==="style"){for(const h in s)(!r||r[h]==null)&&(h.includes("-")?t.style.removeProperty(h):t.style[h]="");for(const h in r)(!s||r[h]!==s[h])&&(h.includes("-")?t.style.setProperty(h,r[h]):t.style[h]=r[h])}else if(e!=="key")if(e==="ref")r&&r(t);else if(!t.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):cs(fe,l)?e=l.slice(2):e=l[2]+e.slice(3),s||r){const h=e.endsWith(Ls);e=e.replace(Wi,""),s&&be.rel(t,e,s,h),r&&be.ael(t,e,r,h)}}else{const h=us(r);if((o||h&&r!==null)&&!n)try{if(t.tagName.includes("-"))t[e]!==r&&(t[e]=r);else{const u=r??"";e==="list"?o=!1:(s==null||t[e]!=u)&&(typeof t.__lookupSetter__(e)=="function"?t[e]=u:t.setAttribute(e,u))}}catch{}let c=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(e=l,c=!0),r==null||r===!1?(r!==!1||t.getAttribute(e)==="")&&(c?t.removeAttributeNS(hs,e):t.removeAttribute(e)):(!o||i&4||n)&&!h&&t.nodeType===1&&(r=r===!0?"":r,c?t.setAttributeNS(hs,e,r):t.setAttribute(e,r))}},Ii=/\s/,Ms=t=>(typeof t=="object"&&t&&"baseVal"in t&&(t=t.baseVal),!t||typeof t!="string"?[]:t.split(Ii)),Ls="Capture",Wi=new RegExp(Ls+"$"),Tt=(t,e,s,r)=>{const n=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,i=t&&t.$attrs$||{},a=e.$attrs$||{};for(const o of ks(Object.keys(i)))o in a||Ns(n,o,i[o],void 0,s,e.$flags$);for(const o of ks(Object.keys(a)))Ns(n,o,i[o],a[o],s,e.$flags$)};function ks(t){return t.includes("ref")?[...t.filter(e=>e!=="ref"),"ref"]:t}var lt,ct,Ie,At=!1,ht=!1,Rt=!1,U=!1,ut=(t,e,s)=>{var r;const n=e.$children$[s];let i=0,a,o,l;if(At||(Rt=!0,n.$tag$==="slot"&&(n.$flags$|=n.$children$?2:1)),n.$text$!==null)a=n.$elm$=fe.document.createTextNode(n.$text$);else if(n.$flags$&1)a=n.$elm$=fe.document.createTextNode(""),Tt(null,n,U);else{if(U||(U=n.$tag$==="svg"),!fe.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$=fe.document.createElementNS(U?In:Wn,!At&&Ce.slotRelocation&&n.$flags$&2?"slot-fb":n.$tag$),U&&n.$tag$==="foreignObject"&&(U=!1),Tt(null,n,U),zn(lt)&&a["s-si"]!==lt&&a.classList.add(a["s-si"]=lt),n.$children$){const h=n.$tag$==="template"?a.content:a;for(i=0;i<n.$children$.length;++i)o=ut(t,n,i),o&&h.appendChild(o)}n.$tag$==="svg"?U=!1:a.tagName==="foreignObject"&&(U=!0)}return a["s-hn"]=Ie,n.$flags$&3&&(a["s-sr"]=!0,a["s-cr"]=ct,a["s-sn"]=n.$name$||"",a["s-rf"]=(r=n.$attrs$)==null?void 0:r.ref,Ci(a),l=t&&t.$children$&&t.$children$[s],l&&l.$tag$===n.$tag$&&t.$elm$&&We(t.$elm$,!1),Is(ct,a,e.$elm$,t?.$elm$)),a},We=(t,e)=>{be.$flags$|=1;const s=Array.from(t.__childNodes||t.childNodes);t["s-sr"]&&Ce.experimentalSlotFixes;for(let r=s.length-1;r>=0;r--){const n=s[r];n["s-hn"]!==Ie&&n["s-ol"]&&(de(ze(n).parentNode,n,ze(n)),n["s-ol"].remove(),n["s-ol"]=void 0,n["s-sh"]=void 0,Rt=!0),e&&We(n,e)}be.$flags$&=-2},Cs=(t,e,s,r,n,i)=>{let a=t["s-cr"]&&t["s-cr"].parentNode||t,o;for(a.shadowRoot&&a.tagName===Ie&&(a=a.shadowRoot),s.$tag$==="template"&&(a=a.content);n<=i;++n)r[n]&&(o=ut(null,s,n),o&&(r[n].$elm$=o,de(a,o,ze(e))))},js=(t,e,s)=>{for(let r=e;r<=s;++r){const n=t[r];if(n){const i=n.$elm$;Ds(n),i&&(ht=!0,i["s-ol"]?i["s-ol"].remove():We(i,!0),i.remove())}}},zi=(t,e,s,r,n=!1)=>{let i=0,a=0,o=0,l=0,h=e.length-1,c=e[0],u=e[h],d=r.length-1,g=r[0],f=r[d],p,y;const E=s.$tag$==="template"?t.content:t;for(;i<=h&&a<=d;)if(c==null)c=e[++i];else if(u==null)u=e[--h];else if(g==null)g=r[++a];else if(f==null)f=r[--d];else if(ft(c,g,n))Te(c,g,n),c=e[++i],g=r[++a];else if(ft(u,f,n))Te(u,f,n),u=e[--h],f=r[--d];else if(ft(c,f,n))(c.$tag$==="slot"||f.$tag$==="slot")&&We(c.$elm$.parentNode,!1),Te(c,f,n),de(E,c.$elm$,u.$elm$.nextSibling),c=e[++i],f=r[--d];else if(ft(u,g,n))(c.$tag$==="slot"||f.$tag$==="slot")&&We(u.$elm$.parentNode,!1),Te(u,g,n),de(E,u.$elm$,c.$elm$),u=e[--h],g=r[++a];else{for(o=-1,l=i;l<=h;++l)if(e[l]&&e[l].$key$!==null&&e[l].$key$===g.$key$){o=l;break}o>=0?(y=e[o],y.$tag$!==g.$tag$?p=ut(e&&e[a],s,o):(Te(y,g,n),e[o]=void 0,p=y.$elm$),g=r[++a]):(p=ut(e&&e[a],s,a),g=r[++a]),p&&de(ze(c.$elm$).parentNode,p,ze(c.$elm$))}i>h?Cs(t,r[d+1]==null?null:r[d+1].$elm$,s,r,a,d):a>d&&js(e,i,h)},ft=(t,e,s=!1)=>t.$tag$===e.$tag$?t.$tag$==="slot"?t.$name$===e.$name$:s?(s&&!t.$key$&&e.$key$&&(t.$key$=e.$key$),!0):t.$key$===e.$key$:!1,ze=t=>t&&t["s-ol"]||t,Te=(t,e,s=!1)=>{const r=e.$elm$=t.$elm$,n=t.$children$,i=e.$children$,a=e.$tag$,o=e.$text$;let l;o===null?(U=a==="svg"?!0:a==="foreignObject"?!1:U,Tt(t,e,U),n!==null&&i!==null?zi(r,n,e,i,s):i!==null?(t.$text$!==null&&(r.textContent=""),Cs(r,null,e,i,0,i.length-1)):!s&&Ce.updatable&&n!==null&&js(n,0,n.length-1),U&&a==="svg"&&(U=!1)):(l=r["s-cr"])?l.parentNode.textContent=o:t.$text$!==o&&(r.data=o)},re=[],Ps=t=>{let e,s,r;const n=t.__childNodes||t.childNodes;for(const i of n){if(i["s-sr"]&&(e=i["s-cr"])&&e.parentNode){s=e.parentNode.__childNodes||e.parentNode.childNodes;const a=i["s-sn"];for(r=s.length-1;r>=0;r--)if(e=s[r],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==i["s-hn"])if(As(e,a)){let o=re.find(l=>l.$nodeToRelocate$===e);ht=!0,e["s-sn"]=e["s-sn"]||a,o?(o.$nodeToRelocate$["s-sh"]=i["s-hn"],o.$slotRefNode$=i):(e["s-sh"]=i["s-hn"],re.push({$slotRefNode$:i,$nodeToRelocate$:e})),e["s-sr"]&&re.map(l=>{As(l.$nodeToRelocate$,e["s-sn"])&&(o=re.find(h=>h.$nodeToRelocate$===e),o&&!l.$slotRefNode$&&(l.$slotRefNode$=o.$slotRefNode$))})}else re.some(o=>o.$nodeToRelocate$===e)||re.push({$nodeToRelocate$:e})}i.nodeType===1&&Ps(i)}},Ds=t=>{t.$attrs$&&t.$attrs$.ref&&t.$attrs$.ref(null),t.$children$&&t.$children$.map(Ds)},de=(t,e,s)=>(typeof e["s-sn"]=="string"&&e["s-sr"]&&e["s-cr"]&&Is(e["s-cr"],e,t,e.parentElement),t?.insertBefore(e,s));function Is(t,e,s,r){var n,i;let a;if(t&&typeof e["s-sn"]=="string"&&e["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(a=e["s-si"]||t.parentNode["s-sc"])){const o=e["s-sn"],l=e["s-hn"];if((n=s.classList)==null||n.add(a+"-s"),r&&((i=r.classList)!=null&&i.contains(a+"-s"))){let h=(r.__childNodes||r.childNodes)[0],c=!1;for(;h;){if(h["s-sn"]!==o&&h["s-hn"]===l&&h["s-sr"]){c=!0;break}h=h.nextSibling}c||r.classList.remove(a+"-s")}}}var Gi=(t,e,s=!1)=>{var r,n,i,a,o;const l=t.$hostElement$,h=t.$cmpMeta$,c=t.$vnode$||Ot(null,null),d=Di(e)?e:ji(null,null,e);if(Ie=l.tagName,h.$attrsToReflect$&&(d.$attrs$=d.$attrs$||{},h.$attrsToReflect$.forEach(([g,f])=>{Ce.serializer&&t.$serializerValues$.has(g)?d.$attrs$[f]=t.$serializerValues$.get(g):d.$attrs$[f]=l[g]})),s&&d.$attrs$)for(const g of Object.keys(d.$attrs$))l.hasAttribute(g)&&!["key","ref","style","class"].includes(g)&&(d.$attrs$[g]=l[g]);d.$tag$=null,d.$flags$|=4,t.$vnode$=d,d.$elm$=c.$elm$=l.shadowRoot||l,lt=l["s-sc"],At=!!(h.$flags$&1)&&!(h.$flags$&128),ct=l["s-cr"],ht=!1,Te(c,d,s);{if(be.$flags$|=1,Rt){Ps(d.$elm$);for(const g of re){const f=g.$nodeToRelocate$;if(!f["s-ol"]&&fe.document){const p=fe.document.createTextNode("");p["s-nr"]=f,de(f.parentNode,f["s-ol"]=p,f)}}for(const g of re){const f=g.$nodeToRelocate$,p=g.$slotRefNode$;if(f.nodeType===1&&s&&(f["s-ih"]=(r=f.hidden)!=null?r:!1),p){const y=p.parentNode;let E=p.nextSibling;{let S=(n=f["s-ol"])==null?void 0:n.previousSibling;for(;S;){let _=(i=S["s-nr"])!=null?i:null;if(_&&_["s-sn"]===f["s-sn"]&&y===(_.__parentNode||_.parentNode)){for(_=_.nextSibling;_===f||_?.["s-sr"];)_=_?.nextSibling;if(!_||!_["s-nr"]){E=_;break}}S=S.previousSibling}}const $=f.__parentNode||f.parentNode,b=f.__nextSibling||f.nextSibling;(!E&&y!==$||b!==E)&&f!==E&&(!f["s-hn"]&&f["s-ol"]&&(f["s-hn"]=f["s-ol"].parentNode.nodeName),de(y,f,E),f.nodeType===1&&f.tagName!=="SLOT-FB"&&(f.hidden=(a=f["s-ih"])!=null?a:!1)),f&&typeof p["s-rf"]=="function"&&p["s-rf"](p)}else f.nodeType===1&&(f.hidden=!0)}}ht&&xs(d.$elm$),be.$flags$&=-2,re.length=0}if(Ce.experimentalScopedSlotChanges&&h.$flags$&2){const g=d.$elm$.__childNodes||d.$elm$.childNodes;for(const f of g)f["s-hn"]!==Ie&&!f["s-sh"]&&f.nodeType===1&&(s&&f["s-ih"]==null&&(f["s-ih"]=(o=f.hidden)!=null?o:!1),f.hidden=!0)}ct=void 0};const Ge={content_wrap:0,ignore:[],ignore_with:"!i-£___£%_",strict:!1,tab_size:2,tag_wrap:0,trim:[]},Ws=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],zs={checked_html:!1,config:{...Ge},ignored:!1,constants:{CONTENT_IGNORE_PLACEHOLDER:`${Ge.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${Ge.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${Ge.ignore_with}=_`}},Z=()=>zs,He=t=>Object.assign(zs,t),Gs=t=>(He({checked_html:!0}),/<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(t)||/<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(t)||/<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(t)),Hs=(t,e)=>{if(!t||!e)throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");let s;if(Array.isArray(t))s=structuredClone(t).concat(e);else if(typeof t=="object"){s={...t};for(let r of Object.keys(e))typeof e[r]!="object"?s[r]=e[r]:s[r]=Hs(s[r]||{},e[r])}return s},Hi=(t,e)=>{const s=Hs(t,e);return He({config:s,constants:{CONTENT_IGNORE_PLACEHOLDER:`${s.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${s.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${s.ignore_with}=_`}}),s},Fi=t=>{const{constants:e}=Z();return t=t.replace(/<[\w:\-]+([^>]*[^\/])>/g,(s,r)=>s.replace(r,n=>n.replace(/\n/g,e.ATTRIBUTE_IGNORE_PLACEHOLDER+"nl!").replace(/\r/g,e.ATTRIBUTE_IGNORE_PLACEHOLDER+"cr!").replace(/\s/g,e.ATTRIBUTE_IGNORE_PLACEHOLDER+"ws!"))),t},Bi=t=>{const{constants:e}=Z();return t.replace(/\n/g,e.CONTENT_IGNORE_PLACEHOLDER+"nl!").replace(/\r/g,e.CONTENT_IGNORE_PLACEHOLDER+"cr!").replace(/\s/g,e.CONTENT_IGNORE_PLACEHOLDER+"ws!")},Ui=t=>{const e=/\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:s}=Z();return t.replace(e,(r,n,i,a,o)=>{const l=i||o;if(!l)return r;const h=l.replace(/\n/g,s.CONTENT_IGNORE_PLACEHOLDER+"nl!").replace(/\r/g,s.CONTENT_IGNORE_PLACEHOLDER+"cr!").replace(/\s/g,s.CONTENT_IGNORE_PLACEHOLDER+"ws!");return r.replace(l,h)})},Zi=t=>{const e=/<([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:s}=Z();return t=t.replace(e,(r,n,i)=>r.replace(i,a=>a.replace(/</g,s.ATTRIBUTE_IGNORE_PLACEHOLDER+"lt!").replace(/>/g,s.ATTRIBUTE_IGNORE_PLACEHOLDER+"gt!"))),t},qi=(t,e)=>{for(let s=0;s<e.length;s++){const r=new RegExp(`(<${e[s]}[^>]*>)\\s+`,"g"),n=new RegExp(`\\s+(</${e[s]}>)`,"g");t=t.replace(r,"$1").replace(n,"$1")}return t},Ji=t=>{const{constants:e}=Z();return t=t.replace(/<[\w:\-]+([^>]*[^\/])>/g,(s,r)=>s.replace(r,n=>n.replace(new RegExp(e.ATTRIBUTE_IGNORE_PLACEHOLDER+"nl!","g"),`
|
|
32
|
-
`).replace(
|
|
33
|
-
`).replace(
|
|
34
|
-
`)
|
|
35
|
-
`).replace(/ /g
|
|
36
|
-
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
`);return
|
|
41
|
-
|
|
42
|
-
`)&&(c=c.substring(0,c.length-1)),c},oa=(t,e)=>{let s=!1;const{checked_html:r,ignored:n}=Z();if(!r&&!Gs(t))return t;const i=Yi(e||{}),a=i.ignore.length>0;if(i.trim.length>0&&(t=qi(t,i.trim)),!n&&a){const{html_with_markers:o,extracted_map:l}=Fs(t);t=o,Zs=l,s=!0}return t=Zi(t),t=ea(t),t=na(t),ia(t),t=aa(),t=Xi(t),s&&(t=Bs(t,Zs)),t},la=(t,e,s)=>{[null,void 0,"",!1].includes(s)||["innerHTML","style",""].includes(e)||t.setAttribute(e,["object","function"].includes(typeof s)?"⚠️ Property must be set through a script or a framework-specific syntax.":s)},qs=(t,e,s,r,n)=>{if(e&&typeof e=="string"){const i=document.createElement(e);Object.keys(s||{}).forEach(a=>{la(i,a,s[a])}),r?.forEach(a=>{qs(i,a.$tag$,a.$attrs$,a.$children$,a.$text$)}),s?.innerHTML&&(i.innerHTML=s.innerHTML),t.appendChild(i)}n&&(t.innerHTML=n)},ca=(t,e,s=[])=>{const r={};if(typeof t!="object")throw new Error("filterArgs - args isn't an object.");for(const n in t)if(!s.includes(n)){const i=t[n],a=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();(!e||!Object.keys(e).includes(n)||e[n]!==i)&&(r[a]=i)}return r},ha=(t,e)=>{const s=document.getElementById("storybook-root");if(s!==null)return document.querySelector("[lang]")?.setAttribute("lang",e.globals?.locale||"en"),Gi({$cmpMeta$:{$flags$:0,$tagName$:s.tagName},$hostElement$:s},t(e)),s.children[s.children.length-1]},ua=({$tag$:t,$attrs$:e,$children$:s,$text$:r})=>{const n=document.createElement("div");return qs(n,t,e,s,r),oa(n.innerHTML,{tag_wrap:40,content_wrap:120}).replace(/="true"/g,"")},Nt=(t,e)=>{if(!e)return;const s=e.split("/");return`${t}${s.slice(2,s.length-1).join("-")}--docs`};class fa{jsonDoc;constructor(e){this.jsonDoc=e}#e=e=>this.jsonDoc.components.find(s=>s.tag===e);#t=e=>{const s=e.type.replace(/"([^"]+)"/g,"$1").replace(/\s/g,"").replace(/\(.*?\)/g,r=>r.replace(/\|/g," OR ")).split("|").map(r=>r.trim().replace(/ OR /g,"|"));return e.type==="string"?{control:{type:"text"}}:e.type==="number"?{control:{type:"number"}}:e.type==="boolean"?{control:{type:"boolean"}}:e.type.startsWith("{")&&e.type.endsWith("}")?{control:{type:"object"}}:s.length>1?s.includes("string")?{control:{type:"text"}}:s.every(r=>r?.includes("[]"))?{control:{type:"object"}}:(s.unshift(void 0),{control:{type:"select"},options:s}):{control:{type:"object"}}};extractArgTypes=e=>{const s=this.#e(e),r=s?.props.reduce((c,u)=>{const{control:d,options:g}=this.#t(u);return{...c,[u.name]:{name:u.attr||u.name,description:u.docs,type:{required:u.required},table:{category:"props",type:{summary:u.type},defaultValue:{summary:u.default}},control:d,options:g}}},{}),n=s?.events.reduce((c,u)=>({...c,[u.event]:{name:u.event,description:u.docs,table:{category:"events",type:{summary:u.detail}}}}),{}),i=s?.methods.reduce((c,u)=>({...c,[u.name]:{name:u.name,description:u.docs,table:{category:"methods",type:{summary:u.signature}}}}),{}),a=s?.slots.reduce((c,u)=>({...c,[u.name]:{name:u.name!==""?u.name:"default",description:u.docs,table:{category:"slots",type:{summary:void 0}}}}),{}),o=s?.styles.reduce((c,u)=>({...c,[u.name]:{name:u.name,description:u.docs,table:{category:"custom properties",type:{summary:void 0}}}}),{}),l=s?.dependencies.reduce((c,u)=>{const d=this.#e(u);return d?{...c,[u]:{name:u,description:`<a href="./?path=/docs/${Nt("",d?.filePath)}">View Component Documentation</a>`,table:{category:"depends on",type:{summary:void 0}}}}:c},{}),h=s?.dependents.reduce((c,u)=>{const d=this.#e(u);return d?{...c,[u]:{name:u,description:`<a href="./?path=/docs/${Nt("",d?.filePath)}">View Component Documentation</a>`,table:{category:"used by",type:{summary:void 0}}}}:c},{});return{...r,...n,...i,...a,...o,...l,...h}};extractComponentDescription=e=>{const s=this.#e(e);return s?.readme||s?.docs}}const pa=({disconnect:t,observe:e,takeRecords:s})=>{class r{disconnect=t;observe=e;takeRecords=s;cb;constructor(i){this.cb=i}}return[window,global].forEach(n=>{Object.defineProperty(n,"MutationObserver",{writable:!0,configurable:!0,value:r})}),r},ga=({disconnect:t,observe:e})=>{class s{disconnect=t;observe=e;unobserve;cb;constructor(n){this.cb=n}}return[window,global].forEach(r=>{Object.defineProperty(r,"ResizeObserver",{writable:!0,configurable:!0,value:s})}),s};class da extends Event{detail}const $a=()=>{class t extends da{}return[window,global].forEach(e=>{Object.defineProperty(e,"SubmitEvent",{writable:!0,configurable:!0,value:t})}),t},va=t=>{const e=s=>(setTimeout(s,1),t(),0);return[window,global].forEach(s=>{Object.defineProperty(s,"requestAnimationFrame",{writable:!0,configurable:!0,value:e})}),e};w.ClassList=Re,w.Cursor=sr,w.Page=It,w.Paginate=rr,w.StorybookPreview=fa,w.allItemsAreString=Js,w.cleanString=Xs,w.createID=Qs,w.dateRegExp=nr,w.dateToString=ir,w.defineLocales=xn,w.filterArgs=ca,w.focusableElements=or,w.formatID=er,w.getLocaleDatePattern=yn,w.getObjectValueFromKey=jt,w.getParentWindows=pt,w.getStoryHTML=ua,w.getStorybookUrl=Nt,w.getWindows=cr,w.isObject=Ne,w.isTagName=ar,w.isValidNumber=lr,w.isValidString=Pt,w.isValideID=Vs,w.localeCurrency=wn,w.localeDate=is,w.localeNumber=bn,w.localePercent=Sn,w.localeUnit=On,w.nextTick=tr,w.setUpRequestAnimationFrameMock=va,w.setupMutationObserverMock=pa,w.setupResizeObserverMock=ga,w.setupSubmitEventMock=$a,w.stencilWrapper=ha,w.toString=Ks,w.vsCodeCssGenerator=mn,w.vsCodeGenerator=vn,w.webTypesGenerator=gn,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}));
|
|
43
|
-
//# sourceMappingURL=index.umd.js.map
|
|
17
|
+
`);let i=this[`s-cr`].parentElement;return(i.__childNodes?i.childNodes:De(i.childNodes)).forEach(e=>{r===E(e)&&n.push(e)}),t?n.filter(e=>e.nodeType===1):n}).bind(e);e.assignedElements=t(!0),e.assignedNodes=t(!1)}function je(e){e.dispatchEvent(new CustomEvent(`slotchange`,{bubbles:!1,cancelable:!1,composed:!1}))}function Me(e,t){if(t||=e[`s-ol`]?.parentElement,!t)return{slotNode:null,slotName:``};let n=e[`s-sn`]=E(e)||``;return{slotNode:T(D(t,`childNodes`),t.tagName,n)[0],slotName:n}}function D(e,t){if(`__`+t in e){let n=e[`__`+t];return typeof n==`function`?n.bind(e):n}else return typeof e[t]==`function`?e[t].bind(e):e[t]}var Ne=e=>e!=null&&e!==void 0,Pe=e=>(e=typeof e,e===`object`||e===`function`),Fe=(e,t,...n)=>{let r=null,i=!1,a=!1,o=[],s=e=>{for(let t=0;t<e.length;t++)r=e[t],Array.isArray(r)?s(r):r!=null&&typeof r!=`boolean`&&((i=!Pe(r))&&(r=String(r)),i&&a?o[o.length-1].$text$+=r:o.push(i?O(null,r):r),a=i)};s(n);let c=O(e,null);return c.$attrs$=t,o.length>0&&(c.$children$=o),c.$key$=null,c.$name$=null,c},O=(e,t)=>{let n={$flags$:0,$tag$:e,$text$:t??null,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n.$name$=null,n},Ie={},Le=e=>e&&e.$tag$===Ie,k=(e,t,n,r,i,a,o)=>{if(n===r)return;let s=S(e,t),c=t.toLowerCase();if(t===`class`){let t=e.classList,i=A(n),a=A(r);t.remove(...i.filter(e=>e&&!a.includes(e))),t.add(...a.filter(e=>e&&!i.includes(e)))}else if(t===`style`){for(let t in n)(!r||r[t]==null)&&(t.includes(`-`)?e.style.removeProperty(t):e.style[t]=``);for(let t in r)(!n||r[t]!==n[t])&&(t.includes(`-`)?e.style.setProperty(t,r[t]):e.style[t]=r[t])}else if(t!==`key`)if(t===`ref`)r&&qe(r,e);else if(!e.__lookupSetter__(t)&&t[0]===`o`&&t[1]===`n`){if(t=t[2]===`-`?t.slice(3):S(C,c)?c.slice(2):c[2]+t.slice(3),n||r){let i=t.endsWith(j);t=t.replace(ze,``),n&&w.rel(e,t,n,i),r&&w.ael(e,t,r,i)}}else if(t[0]===`a`&&t.startsWith(`attr:`)){let n=t.slice(5),i;{let t=we(e);if(t&&t.$cmpMeta$&&t.$cmpMeta$.$members$){let e=t.$cmpMeta$.$members$[n];e&&e[1]&&(i=e[1])}}i||=n.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r==null||r===!1?(r!==!1||e.getAttribute(i)===``)&&e.removeAttribute(i):e.setAttribute(i,r===!0?``:r);return}else if(t[0]===`p`&&t.startsWith(`prop:`)){let n=t.slice(5);try{e[n]=r}catch{}return}else{let o=Pe(r);if((s||o&&r!==null)&&!i)try{if(e.tagName.includes(`-`))e[t]!==r&&(e[t]=r);else{let i=r??``;t===`list`?s=!1:(n==null||e[t]!==i)&&(typeof e.__lookupSetter__(t)==`function`?e[t]=i:e.setAttribute(t,i))}}catch{}let l=!1;c!==(c=c.replace(/^xlink\:?/,``))&&(t=c,l=!0),r==null||r===!1?(r!==!1||e.getAttribute(t)===``)&&(l?e.removeAttributeNS(Te,t):e.removeAttribute(t)):(!s||a&4||i)&&!o&&e.nodeType===1&&(r=r===!0?``:r,l?e.setAttributeNS(Te,t,r):e.setAttribute(t,r))}},Re=/\s/,A=e=>(typeof e==`object`&&e&&`baseVal`in e&&(e=e.baseVal),!e||typeof e!=`string`?[]:e.split(Re)),j=`Capture`,ze=RegExp(j+`$`),M=(e,t,n,r)=>{let i=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},o=t.$attrs$||{};for(let e of Be(Object.keys(a)))e in o||k(i,e,a[e],void 0,n,t.$flags$);for(let e of Be(Object.keys(o)))k(i,e,a[e],o[e],n,t.$flags$)};function Be(e){return e.includes(`ref`)?[...e.filter(e=>e!==`ref`),`ref`]:e}var N,P,F,I=!1,L=!1,R=!1,z=!1,B=[],V=[],H=(e,t,n)=>{let r=t.$children$[n],i=0,a,o,s;if(I||(R=!0,r.$tag$===`slot`&&(r.$flags$|=r.$children$?2:1)),r.$text$!=null)a=r.$elm$=C.document.createTextNode(r.$text$);else if(r.$flags$&1)a=r.$elm$=C.document.createTextNode(``),M(null,r,z);else{if(z||=r.$tag$===`svg`,!C.document)throw Error(`You are trying to render a Stencil component in an environment that doesn't support the DOM.`);if(a=r.$elm$=C.document.createElementNS(z?Se:Ce,!I&&x.slotRelocation&&r.$flags$&2?`slot-fb`:r.$tag$),z&&r.$tag$===`foreignObject`&&(z=!1),M(null,r,z),Ne(N)&&a[`s-si`]!==N&&a.classList.add(a[`s-si`]=N),r.$children$){let t=r.$tag$===`template`?a.content:a;for(i=0;i<r.$children$.length;++i)o=H(e,r,i),o&&t.appendChild(o)}r.$tag$===`svg`?z=!1:a.tagName===`foreignObject`&&(z=!0)}return a[`s-hn`]=F,r.$flags$&3&&(a[`s-sr`]=!0,a[`s-cr`]=P,a[`s-sn`]=r.$name$||``,a[`s-rf`]=r.$attrs$?.ref,Ae(a),s=e&&e.$children$&&e.$children$[n],s&&s.$tag$===r.$tag$&&e.$elm$&&Ve(e.$elm$),Ye(P,a,t.$elm$,e?.$elm$)),a},Ve=e=>{w.$flags$|=1;let t=e.closest(F.toLowerCase());if(t!=null){let n=Array.from(t.__childNodes||t.childNodes).find(e=>e[`s-cr`]),r=Array.from(e.__childNodes||e.childNodes);for(let e of n?r.reverse():r)e[`s-sh`]!=null&&(J(t,e,n??null),e[`s-sh`]=void 0,R=!0)}w.$flags$&=-2},U=(e,t)=>{w.$flags$|=1;let n=Array.from(e.__childNodes||e.childNodes);if(e[`s-sr`]){let t=e;for(;t=t.nextSibling;)t&&t[`s-sn`]===e[`s-sn`]&&t[`s-sh`]===F&&n.push(t)}for(let e=n.length-1;e>=0;e--){let r=n[e];r[`s-hn`]!==F&&r[`s-ol`]&&(J(G(r).parentNode,r,G(r)),r[`s-ol`].remove(),r[`s-ol`]=void 0,r[`s-sh`]=void 0,R=!0),t&&U(r,t)}w.$flags$&=-2},He=(e,t,n,r,i,a)=>{let o=e[`s-cr`]&&e[`s-cr`].parentNode||e,s;for(o.shadowRoot&&o.tagName===F&&(o=o.shadowRoot),n.$tag$===`template`&&(o=o.content);i<=a;++i)r[i]&&(s=H(null,n,i),s&&(r[i].$elm$=s,J(o,s,G(t))))},Ue=(e,t,n)=>{for(let r=t;r<=n;++r){let t=e[r];if(t){let e=t.$elm$;Ke(t),e&&(L=!0,e[`s-ol`]?e[`s-ol`].remove():U(e,!0),e.remove())}}},We=(e,t,n,r,i=!1)=>{let a=0,o=0,s=0,c=0,l=t.length-1,u=t[0],d=t[l],f=r.length-1,p=r[0],m=r[f],h,g,_=n.$tag$===`template`?e.content:e;for(;a<=l&&o<=f;)if(u==null)u=t[++a];else if(d==null)d=t[--l];else if(p==null)p=r[++o];else if(m==null)m=r[--f];else if(W(u,p,i))K(u,p,i),u=t[++a],p=r[++o];else if(W(d,m,i))K(d,m,i),d=t[--l],m=r[--f];else if(W(u,m,i))(u.$tag$===`slot`||m.$tag$===`slot`)&&U(u.$elm$.parentNode,!1),K(u,m,i),J(_,u.$elm$,d.$elm$.nextSibling),u=t[++a],m=r[--f];else if(W(d,p,i))(u.$tag$===`slot`||m.$tag$===`slot`)&&U(d.$elm$.parentNode,!1),K(d,p,i),J(_,d.$elm$,u.$elm$),d=t[--l],p=r[++o];else{for(s=-1,c=a;c<=l;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===p.$key$){s=c;break}s>=0?(g=t[s],g.$tag$===p.$tag$?(K(g,p,i),t[s]=void 0,h=g.$elm$):h=H(t&&t[o],n,s),p=r[++o]):(h=H(t&&t[o],n,o),p=r[++o]),h&&J(G(u.$elm$).parentNode,h,G(u.$elm$))}a>l?He(e,r[f+1]==null?null:r[f+1].$elm$,n,r,o,f):o>f&&Ue(t,a,l)},W=(e,t,n=!1)=>e.$tag$===t.$tag$?e.$tag$===`slot`?e.$name$===t.$name$:n?(n&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,G=e=>e&&e[`s-ol`]||e,K=(e,t,n=!1)=>{let r=t.$elm$=e.$elm$,i=e.$children$,a=t.$children$,o=t.$tag$,s=t.$text$,c;s==null?(z=o===`svg`?!0:o===`foreignObject`?!1:z,o===`slot`&&!I&&e.$name$!==t.$name$&&(t.$elm$[`s-sn`]=t.$name$||``,Ve(t.$elm$.parentElement)),M(e,t,z),i!==null&&a!==null?We(r,i,t,a,n):a===null?!n&&x.updatable&&i!==null&&Ue(i,0,i.length-1):(e.$text$!==null&&(r.textContent=``),He(r,null,t,a,0,a.length-1)),z&&o===`svg`&&(z=!1)):(c=r[`s-cr`])?c.parentNode.textContent=s:e.$text$!==s&&(r.data=s)},q=[],Ge=e=>{let t,n,r,i=e.__childNodes||e.childNodes;for(let e of i){if(e[`s-sr`]&&(t=e[`s-cr`])&&t.parentNode){n=t.parentNode.__childNodes||t.parentNode.childNodes;let i=e[`s-sn`];for(r=n.length-1;r>=0;r--)if(t=n[r],!t[`s-cn`]&&!t[`s-nr`]&&t[`s-hn`]!==e[`s-hn`]&&(!t[`s-sh`]||t[`s-sh`]!==e[`s-hn`]))if(ke(t,i)){let n=q.find(e=>e.$nodeToRelocate$===t);L=!0,t[`s-sn`]=t[`s-sn`]||i,n?(n.$nodeToRelocate$[`s-sh`]=e[`s-hn`],n.$slotRefNode$=e):(t[`s-sh`]=e[`s-hn`],q.push({$slotRefNode$:e,$nodeToRelocate$:t})),t[`s-sr`]&&q.map(e=>{ke(e.$nodeToRelocate$,t[`s-sn`])&&(n=q.find(e=>e.$nodeToRelocate$===t),n&&!e.$slotRefNode$&&(e.$slotRefNode$=n.$slotRefNode$))})}else q.some(e=>e.$nodeToRelocate$===t)||q.push({$nodeToRelocate$:t})}e.nodeType===1&&Ge(e)}},Ke=e=>{e.$attrs$&&e.$attrs$.ref&&B.push(()=>e.$attrs$.ref(null)),e.$children$&&e.$children$.map(Ke)},qe=(e,t)=>{V.push(()=>e(t))},Je=()=>{B.forEach(e=>e()),B.length=0,V.forEach(e=>e()),V.length=0},J=(e,t,n,r)=>{if(typeof t[`s-sn`]==`string`&&t[`s-sr`]&&t[`s-cr`])Ye(t[`s-cr`],t,e,t.parentElement);else if(typeof t[`s-sn`]==`string`){e.insertBefore(t,n);let{slotNode:i}=Me(t);return i&&!r&&je(i),t}return e.__insertBefore?e.__insertBefore(t,n):e?.insertBefore(t,n)};function Ye(e,t,n,r){var 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`])){let e=t[`s-sn`],o=t[`s-hn`];if((i=n.classList)==null||i.add(a+`-s`),r&&r.classList?.contains(a+`-s`)){let t=(r.__childNodes||r.childNodes)[0],n=!1;for(;t;){if(t[`s-sn`]!==e&&t[`s-hn`]===o&&t[`s-sr`]){n=!0;break}t=t.nextSibling}n||r.classList.remove(a+`-s`)}}}var Xe=(e,t,n=!1)=>{let r=e.$hostElement$,i=e.$cmpMeta$,a=e.$vnode$||O(null,null),o=Le(t)?t:Fe(null,null,t);if(F=r.tagName,i.$attrsToReflect$&&(o.$attrs$=o.$attrs$||{},i.$attrsToReflect$.forEach(([t,n])=>{x.serializer&&e.$serializerValues$.has(t)?o.$attrs$[n]=e.$serializerValues$.get(t):o.$attrs$[n]=r[t]})),n&&o.$attrs$)for(let e of Object.keys(o.$attrs$))r.hasAttribute(e)&&![`key`,`ref`,`style`,`class`].includes(e)&&(o.$attrs$[e]=r[e]);if(o.$tag$=null,o.$flags$|=4,e.$vnode$=o,o.$elm$=a.$elm$=r.shadowRoot||r,N=r[`s-sc`],I=!!(i.$flags$&1)&&!(i.$flags$&128),P=r[`s-cr`],L=!1,K(a,o,n),w.$flags$|=1,R){Ge(o.$elm$);for(let e of q){let t=e.$nodeToRelocate$;if(!t[`s-ol`]&&C.document){let e=C.document.createTextNode(``);e[`s-nr`]=t,J(t.parentNode,t[`s-ol`]=e,t,n)}}for(let e of q){let t=e.$nodeToRelocate$,r=e.$slotRefNode$;if(t.nodeType===1&&n&&(t[`s-ih`]=t.hidden??!1),r){let e=r.parentNode,i=r.nextSibling;if(i&&i.nodeType===1){let n=t[`s-ol`]?.previousSibling;for(;n;){let r=n[`s-nr`]??null;if(r&&r[`s-sn`]===t[`s-sn`]&&e===(r.__parentNode||r.parentNode)){for(r=r.nextSibling;r===t||r?.[`s-sr`];)r=r?.nextSibling;if(!r||!r[`s-nr`]){i=r;break}}n=n.previousSibling}}let a=t.__parentNode||t.parentNode,o=t.__nextSibling||t.nextSibling;if((!i&&e!==a||o!==i)&&t!==i){if(J(e,t,i,n),t.nodeType===8&&t.nodeValue.startsWith(`s-nt-`)){let e=C.document.createTextNode(t.nodeValue.replace(/^s-nt-/,``));e[`s-hn`]=t[`s-hn`],e[`s-sn`]=t[`s-sn`],e[`s-sh`]=t[`s-sh`],e[`s-sr`]=t[`s-sr`],e[`s-ol`]=t[`s-ol`],e[`s-ol`][`s-nr`]=e,J(t.parentNode,e,t,n),t.parentNode.removeChild(t)}t.nodeType===1&&t.tagName!==`SLOT-FB`&&(t.hidden=t[`s-ih`]??!1)}t&&typeof r[`s-rf`]==`function`&&r[`s-rf`](r)}else t.nodeType===1&&(t.hidden=!0)}}if(L&&Ee(o.$elm$),w.$flags$&=-2,q.length=0,!I&&!(i.$flags$&1)&&r[`s-cr`]){let e=o.$elm$.__childNodes||o.$elm$.childNodes;for(let t of e)if(t[`s-hn`]!==F&&!t[`s-sh`]){if(n&&t[`s-ih`]==null&&(t[`s-ih`]=t.hidden??!1),t.nodeType===1)t.hidden=!0;else if(t.nodeType===3&&t.nodeValue.trim()){let e=C.document.createComment(`s-nt-`+t.nodeValue);e[`s-sn`]=t[`s-sn`],J(t.parentNode,e,t,n),t.parentNode.removeChild(t)}}}P=void 0,Je()},Y={content_wrap:0,ignore:[],ignore_with:`!i-£___£%_`,strict:!1,tab_size:2,tag_wrap:0,trim:[]},Ze=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Qe={checked_html:!1,config:{...Y},ignored:!1,constants:{CONTENT_IGNORE_PLACEHOLDER:`${Y.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${Y.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${Y.ignore_with}=_`}},X=()=>Qe,Z=e=>Object.assign(Qe,e),$e=e=>(Z({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)),et=(e,t)=>{if(!e||!t)throw Error(`Both 'current' and 'updates' must be passed-in to mergeObjects()`);let n;if(Array.isArray(e))n=structuredClone(e).concat(t);else if(typeof e==`object`){n={...e};for(let e of Object.keys(t))typeof t[e]==`object`?n[e]=et(n[e]||{},t[e]):n[e]=t[e]}return n},tt=(e,t)=>{let n=et(e,t);return Z({config:n,constants:{CONTENT_IGNORE_PLACEHOLDER:`${n.ignore_with}_`,SELF_CLOSING_PLACEHOLDER:`${n.ignore_with}/_>`,ATTRIBUTE_IGNORE_PLACEHOLDER:`${n.ignore_with}=_`}}),n},nt=e=>{let{constants:t}=X();return e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(e,n)=>e.replace(n,e=>e.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},rt=e=>{let{constants:t}=X();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!`)},it=e=>{let 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:n}=X();return e.replace(t,(e,t,r,i,a)=>{let o=r||a;if(!o)return e;let s=o.replace(/\n/g,n.CONTENT_IGNORE_PLACEHOLDER+`nl!`).replace(/\r/g,n.CONTENT_IGNORE_PLACEHOLDER+`cr!`).replace(/\s/g,n.CONTENT_IGNORE_PLACEHOLDER+`ws!`);return e.replace(o,s)})},at=e=>{let 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:n}=X();return e=e.replace(t,(e,t,r)=>e.replace(r,e=>e.replace(/</g,n.ATTRIBUTE_IGNORE_PLACEHOLDER+`lt!`).replace(/>/g,n.ATTRIBUTE_IGNORE_PLACEHOLDER+`gt!`))),e},ot=(e,t)=>{for(let n=0;n<t.length;n++){let r=RegExp(`(<${t[n]}[^>]*>)\\s+`,`g`),i=RegExp(`\\s+(</${t[n]}>)`,`g`);e=e.replace(r,`$1`).replace(i,`$1`)}return e},st=e=>{let{constants:t}=X();return e=e.replace(/<[\w:\-]+([^>]*[^\/])>/g,(e,n)=>e.replace(n,e=>e.replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`nl!`,`g`),`
|
|
18
|
+
`).replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`cr!`,`g`),`\r`).replace(RegExp(t.ATTRIBUTE_IGNORE_PLACEHOLDER+`ws!`,`g`),` `))),e},ct=e=>{let{constants:t}=X();return e=e.replace(RegExp(`.*${t.CONTENT_IGNORE_PLACEHOLDER}[a-z]{2}!.*`,`g`),e=>e.replace(RegExp(`${t.CONTENT_IGNORE_PLACEHOLDER}[a-z]{2}!`,`g`),e=>e.replace(RegExp(t.CONTENT_IGNORE_PLACEHOLDER+`nl!`,`g`),`
|
|
19
|
+
`).replace(RegExp(t.CONTENT_IGNORE_PLACEHOLDER+`cr!`,`g`),`\r`).replace(RegExp(t.CONTENT_IGNORE_PLACEHOLDER+`ws!`,`g`),` `))),e},lt=e=>{let t=/<([\w:\-]+)([^>]*)>/g,{constants:n}=X(),r=n.ATTRIBUTE_IGNORE_PLACEHOLDER.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`),i=RegExp(r+`lt!`,`g`),a=RegExp(r+`gt!`,`g`);return e.replace(t,(e,t,n)=>`<${t}${n.replace(i,`<`).replace(a,`>`)}>`)},ut=e=>{if(typeof e!=`object`)throw Error(`Config must be an object.`);let t={...Y};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 Z({config:t}),t;let n=e.tab_size;if(n){if(typeof n!=`number`)throw Error(`tab_size must be a number, not ${typeof e.tab_size}.`);if(!Number.isSafeInteger(n))throw 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 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 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(e=>typeof e==`string`)))throw Error(`Ignore config must be an array of strings.`);if(Object.hasOwn(e,`ignore_with`)){if(typeof e.ignore_with!=`string`)throw Error(`ignore_with must be a string, not ${typeof e.ignore_with}.`);if(e.ignore_with.startsWith(`_`))throw Error(`ignore_with cannot start with an underscore.`)}if(Object.hasOwn(e,`strict`)&&typeof e.strict!=`boolean`)throw Error(`Strict config must be a boolean, not ${typeof e.strict}.`);if(Object.hasOwn(e,`tag_wrap`)&&typeof e.tag_wrap!=`number`)throw 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(e=>typeof e==`string`)))throw Error(`Trim config must be an array of strings.`);return tt(t,e)},dt=(e,t,n)=>{let r=e.trim().split(/\s+/);if(r.length===0||r.length===1&&r[0]===``)return``;let i=[],a=``,o=n;return r.forEach(e=>{if(e===``)return;if(e.length>=t){a!==``&&i.push(i.length===0?n+a:o+a),i.push(i.length===0?n+e:o+e),a=``;return}let r=a===``?e:a+` `+e;r.length<=t?a=r:(a!==``&&i.push(i.length===0?n+a:o+a),a=e)}),a!==``&&i.push(i.length===0?n+a:o+a),rt(i.join(`
|
|
20
|
+
`))};function ft(e){Z({ignored:!0});let t=X().config,n=e,r=new Map,i=0;for(let e of t.ignore){let t=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`),a=RegExp(`(<\\s*${t}[^>]*>)(.*?)(<\\s*\/\\s*${t}\\s*>)`,`gs`),o,s=[];for(;(o=a.exec(n))!==null;){let e=`___HTMLFY_SPECIAL_IGNORE_MARKER_${i++}___`;r.set(e,o[2]),s.push({start:o.index+o[1].length,end:o.index+o[1].length+o[2].length,marker:e})}for(let e=s.length-1;e>=0;e--){let t=s[e];n=n.substring(0,t.start)+t.marker+n.substring(t.end)}}return{html_with_markers:n,extracted_map:r}}function pt(e,t){Z({ignored:!1});let n=e;for(let[e,r]of t)n=n.split(e).join(r);return n}var mt=RegExp(`<(${Ze.join(`|`)})(?:\\s(?:[^/>]|/(?!>))*)*>`,`g`);function ht(e){let{constants:t}=X();return e.replace(mt,e=>e.replace(/>$/,t.SELF_CLOSING_PLACEHOLDER))}function gt(e){let{constants:t}=X();return e.replace(t.SELF_CLOSING_PLACEHOLDER,`>`)}var _t=(e,t=!1)=>(e=e.replace(/<\s*textarea[^>]*>((.|\n)*?)<s*\/\s*textarea\s*>/g,(e,t)=>e.replace(t,e=>e.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,e=>e.replace(/\s+/g,` `).replace(/\s>/g,`>`).replace(/>\s/g,`>`).replace(/\s</g,`<`).replace(/<\s/g,`<`).replace(/<\/\s/g,`</`).replace(/class=["']\s/g,e=>e.replace(/\s/g,``)).replace(/(class=.*)\s(["'])/g,`$1$2`))),e),vt=e=>e=e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g,(e,t)=>e.replace(t,e=>(e=e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/ /g,`
|
|
21
|
+
`).replace(/ /g,`\r`).replace(/ /g,` `).replace(/\s+/g,` `),e))),yt,bt=(e,t)=>{let n=!1,{checked_html:r,ignored:i,constants:a}=X();if(!r&&!$e(e))return e;let o=X().config.ignore.length>0;if(!i&&o){let{html_with_markers:t,extracted_map:r}=ft(e);e=t,yt=r,n=!0}return e=_t(e,!0),e=e.replace(/\n|\t/g,``),e=e.replace(/>\s+</g,`><`),e=e.replace(/ {2,}/g,` `),e=e.replace(/(\S) (<[a-zA-Z][a-zA-Z0-9_:-]*)/g,`$1___MINIFY-PROTECTED-SPACE___$2`),e=e.replace(/(<\/[a-zA-Z][a-zA-Z0-9_:-]*>) (\S)/g,`$1___MINIFY-PROTECTED-SPACE___$2`),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(RegExp(`___MINIFY-PROTECTED-SPACE___`,`g`),` `),e=e.replace(/ = /g,`=`),e=e.replace(/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,(e,t,n,r)=>`${t}=${n}${r.trim()}${n}`),e=e.trim(),e=vt(e),n&&(e=pt(e,yt)),e},Q={line:[]},xt,St=e=>{Q.line=[];let t=-1;e.replace(/(<[^>]+>)|([^<]+)/g,(e,n,r)=>(n?Q.line.push({type:`tag`,value:e}):r&&r.trim().length>0&&Q.line.push({type:`text`,value:e}),t++,`\n[#-# : ${t} : ${e} : #-#]\n`))},Ct=()=>{let{config:e,constants:t}=X(),n=` `.repeat(e.tab_size),r=e.tag_wrap,i=e.content_wrap,a=e.strict,o=``,s=[],c=/<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g,l=/\s{1}[A-Za-z-]+(?:=".*?")?/g;Q.line.forEach((e,u)=>{let d=e.value,f=d.startsWith(`___HTMLFY_SPECIAL_IGNORE_MARKER_`),p=0,m=Q.line[u-1],h=m?.value??``;o+=`0`,u===0&&p++,d.trim().startsWith(`</`)&&p++,h.trim().startsWith(`<!doctype`)&&p++,h.trim().startsWith(`<!--`)&&p++,(h.trim().endsWith(`/>`)||h.trim().endsWith(t.SELF_CLOSING_PLACEHOLDER))&&p++,h.trim().startsWith(`</`)&&p++,m?.type===`text`&&p++;let g=Math.max(0,o.length-p);if(o=o.substring(0,g),e.type===`text`&&/^[!,;\.]/.test(d)){if(d.length===1){s[s.length-1]=s.at(-1)+d;return}else if(s[s.length-1]=s.at(-1)+d.charAt(0),d=d.slice(1).trim(),d.length===0)return}let _=n.repeat(g);if(f)s.push(d);else{if(a&&d.trim().startsWith(`<!--`))return;let t=d;if(t=gt(t),e.type===`text`&&i>0&&t.length>=i)t=dt(t,i,_);else if(r>0&&t.length>r&&c.test(t)){c.lastIndex=0,l.lastIndex=0;let e=t.split(l).filter(Boolean);if(e.length>=2){let r=t.matchAll(l),i=_+n,o=_+e[0]+`
|
|
22
|
+
`;for(let e of r){let t=e[0].trim();o+=i+t+`
|
|
23
|
+
`}let s=e[0].match(/<([A-Za-z_:-]+)/),c=s?s[1]:``,u=e.at(-1)?.endsWith(`/>`)&&Ze.includes(c),d=e[1].trim(),f=_+(a&&u?` `:``);o+=f+d,t=o}else t=_+t}else t=_+t;s.push(t)}});let u=s.join(`
|
|
24
|
+
`);return r>0&&(u=nt(u)),i>0&&RegExp(`/\\n[ ]*[^\\n]*${t.CONTENT_IGNORE_PLACEHOLDER}[^\\n]*\\n/`).test(u)&&(u=it(u)),u=u.replace(/<(?<Element>[^>\s]+)[^>]*>[^<]*?[^><\/\s][^<]*?<\/\k<Element>>|<script[^>]*>[\s]*<\/script>|<([\w:\._-]+)([^>]*)><\/\2>|<([\w:\._-]+)([^>]*)>[\s]+<\/\4>/g,e=>e.includes(t.SELF_CLOSING_PLACEHOLDER)||e.includes(t.CONTENT_IGNORE_PLACEHOLDER)?e:e.replace(/\n|\t|\s{2,}/g,``)),i>0&&(u=ct(u)),r>0&&(u=st(u)),a&&(u=u.replace(/\s\/>|\/>/g,`>`)),u.startsWith(`
|
|
25
|
+
`)&&(u=u.substring(1)),u.endsWith(`
|
|
26
|
+
`)&&(u=u.substring(0,u.length-1)),u},wt=(e,t)=>{let n=!1,{checked_html:r,ignored:i}=X();if(!r&&!$e(e))return e;let a=ut(t||{}),o=a.ignore.length>0;if(a.trim.length>0&&(e=ot(e,a.trim)),!i&&o){let{html_with_markers:t,extracted_map:r}=ft(e);e=t,xt=r,n=!0}return e=at(e),e=ht(e),e=bt(e),St(e),e=Ct(),e=lt(e),n&&(e=pt(e,xt)),e},Tt=(e,t,n)=>{[null,void 0,``,!1].includes(n)||[`innerHTML`,`style`,``].includes(t)||e.setAttribute(t,[`object`,`function`].includes(typeof n)?`⚠️ Property must be set through a script or a framework-specific syntax.`:n)},Et=(e,t,n,r,i)=>{if(t&&typeof t==`string`){let i=document.createElement(t);Object.keys(n||{}).forEach(e=>{Tt(i,e,n[e])}),r?.forEach(e=>{Et(i,e.$tag$,e.$attrs$,e.$children$,e.$text$)}),n?.innerHTML&&(i.innerHTML=n.innerHTML),e.appendChild(i)}i&&(e.innerHTML=i)},Dt=(e,t,n=[])=>{let r={};if(typeof e!=`object`)throw Error(`filterArgs - args isn't an object.`);for(let i in e)if(!n.includes(i)){let n=e[i],a=i.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase();(!t||!Object.keys(t).includes(i)||t[i]!==n)&&(r[a]=n)}return r},Ot=(e,t)=>{let n=document.getElementById(`storybook-root`);if(n!==null)return document.querySelector(`[lang]`)?.setAttribute(`lang`,t.globals?.locale||`en`),Xe({$cmpMeta$:{$flags$:0,$tagName$:n.tagName},$hostElement$:n},e(t)),n.children[n.children.length-1]},kt=({$tag$:e,$attrs$:t,$children$:n,$text$:r})=>{let i=document.createElement(`div`);return Et(i,e,t,n,r),wt(i.innerHTML,{tag_wrap:40,content_wrap:120}).replace(/="true"/g,``)},$=(e,t)=>{if(!t)return;let n=t.split(`/`);return`${e}${n.slice(2,n.length-1).join(`-`)}--docs`},At=class{jsonDoc;constructor(e){this.jsonDoc=e}#e=e=>this.jsonDoc.components.find(t=>t.tag===e);#t=e=>{let t=e.type.replace(/"([^"]+)"/g,`$1`).replace(/\s/g,``).replace(/\(.*?\)/g,e=>e.replace(/\|/g,` OR `)).split(`|`).map(e=>e.trim().replace(/ OR /g,`|`));return e.type===`string`?{control:{type:`text`}}:e.type===`number`?{control:{type:`number`}}:e.type===`boolean`?{control:{type:`boolean`}}:e.type.startsWith(`{`)&&e.type.endsWith(`}`)?{control:{type:`object`}}:t.length>1?t.includes(`string`)?{control:{type:`text`}}:t.every(e=>e?.includes(`[]`))?{control:{type:`object`}}:(t.unshift(void 0),{control:{type:`select`},options:t}):{control:{type:`object`}}};extractArgTypes=e=>{let t=this.#e(e),n=t?.props.reduce((e,t)=>{let{control:n,options:r}=this.#t(t);return{...e,[t.name]:{name:t.attr||t.name,description:t.docs,type:{required:t.required},table:{category:`props`,type:{summary:t.type},defaultValue:{summary:t.default}},control:n,options:r}}},{}),r=t?.events.reduce((e,t)=>({...e,[t.event]:{name:t.event,description:t.docs,table:{category:`events`,type:{summary:t.detail}}}}),{}),i=t?.methods.reduce((e,t)=>({...e,[t.name]:{name:t.name,description:t.docs,table:{category:`methods`,type:{summary:t.signature}}}}),{}),a=t?.slots.reduce((e,t)=>({...e,[t.name]:{name:t.name===``?`default`:t.name,description:t.docs,table:{category:`slots`,type:{summary:void 0}}}}),{}),o=t?.styles.reduce((e,t)=>({...e,[t.name]:{name:t.name,description:t.docs,table:{category:`custom properties`,type:{summary:void 0}}}}),{}),s=t?.dependencies.reduce((e,t)=>{let n=this.#e(t);return n?{...e,[t]:{name:t,description:`<a href="./?path=/docs/${$(``,n?.filePath)}">View Component Documentation</a>`,table:{category:`depends on`,type:{summary:void 0}}}}:e},{}),c=t?.dependents.reduce((e,t)=>{let n=this.#e(t);return n?{...e,[t]:{name:t,description:`<a href="./?path=/docs/${$(``,n?.filePath)}">View Component Documentation</a>`,table:{category:`used by`,type:{summary:void 0}}}}:e},{});return{...n,...r,...i,...a,...o,...s,...c}};extractComponentDescription=e=>{let t=this.#e(e);return t?.readme||t?.docs}},jt=({disconnect:e,observe:t,takeRecords:n})=>{class r{disconnect=e;observe=t;takeRecords=n;cb;constructor(e){this.cb=e}}return[window,global].forEach(e=>{Object.defineProperty(e,"MutationObserver",{writable:!0,configurable:!0,value:r})}),r},Mt=({disconnect:e,observe:t})=>{class n{disconnect=e;observe=t;unobserve;cb;constructor(e){this.cb=e}}return[window,global].forEach(e=>{Object.defineProperty(e,"ResizeObserver",{writable:!0,configurable:!0,value:n})}),n},Nt=class extends Event{detail};e.ClassList=t,e.Cursor=p,e.Page=h,e.Paginate=g,e.StorybookPreview=At,e.allItemsAreString=i,e.cleanString=s,e.createID=l,e.dateRegExp=_,e.dateToString=ee,e.defineLocales=xe,e.filterArgs=Dt,e.focusableElements=ne,e.formatID=d,e.getLocaleDatePattern=me,e.getObjectValueFromKey=r,e.getParentWindows=v,e.getStoryHTML=kt,e.getStorybookUrl=$,e.getWindows=ie,e.isObject=n,e.isTagName=te,e.isValidNumber=re,e.isValidString=a,e.isValideID=u,e.localeCurrency=ge,e.localeDate=be,e.localeNumber=_e,e.localePercent=ve,e.localeUnit=ye,e.nextTick=f,e.setUpRequestAnimationFrameMock=e=>{let t=t=>(setTimeout(t,1),e(),0);return[window,global].forEach(e=>{Object.defineProperty(e,"requestAnimationFrame",{writable:!0,configurable:!0,value:t})}),t},e.setupMutationObserverMock=jt,e.setupResizeObserverMock=Mt,e.setupSubmitEventMock=()=>{class e extends Nt{}return[window,global].forEach(t=>{Object.defineProperty(t,"SubmitEvent",{writable:!0,configurable:!0,value:e})}),e},e.stencilWrapper=Ot,e.toString=o,e.vsCodeCssGenerator=fe,e.vsCodeGenerator=de,e.webTypesGenerator=ce});
|
|
27
|
+
//# sourceMappingURL=index.umd.js.map
|