import{d as y}from"./chunk-24IZEI4V.js";var M=y({"./ion-icon.entry.js":()=>import("./chunk-2KNVJOVO.js")});var A=Object.defineProperty,I=(t,e)=>{for(var n in e)A(t,n,{get:e[n],enumerable:!0})},P=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},G=(t,e)=>{t.__stencil__getHostRef=()=>e,e.$lazyInstance$=t};var b=typeof window<"u"?window:{},L={$flags$:0,$resourcesUrl$:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};var E=t=>{let e=new URL(t,L.$resourcesUrl$);return e.origin!==b.location.origin?e.href:e.pathname};var T=t=>(t=typeof t,t==="object"||t==="function");var z=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),j={};I(j,{err:()=>k,map:()=>O,ok:()=>f,unwrap:()=>U,unwrapErr:()=>H});var f=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function O(t,e){if(t.isOk){let n=e(t.value);return n instanceof Promise?n.then(s=>f(s)):f(n)}if(t.isErr){let n=t.value;return k(n)}throw"should never get here"}var U=t=>{if(t.isOk)return t.value;throw t.value},H=t=>{if(t.isErr)return t.value;throw t.value};var X=(t,e,...n)=>{let s=null,o=null,i=!1,g=!1,l=[],v=r=>{for(let a=0;a<r.length;a++)s=r[a],Array.isArray(s)?v(s):s!=null&&typeof s!="boolean"&&((i=typeof t!="function"&&!T(s))&&(s=String(s)),i&&g?l[l.length-1].$text$+=s:l.push(i?S(null,s):s),g=i)};if(v(n),e){e.key&&(o=e.key);{let r=e.className||e.class;r&&(e.class=typeof r!="object"?r:Object.keys(r).filter(a=>r[a]).join(" "))}}let c=S(t,null);return c.$attrs$=e,l.length>0&&(c.$children$=l),c.$key$=o,c},S=(t,e)=>{let n={$flags$:0,$tag$:t,$text$:e,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n},K={};var u=t=>{let e=z(t);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};u("::slotted");u(":host");u(":host-context");var Y=t=>P(t).$hostElement$;var R="Capture",Z=new RegExp(R+"$");var d,_=()=>{if(typeof window>"u")return new Map;if(!d){let t=window;t.Ionicons=t.Ionicons||{},d=t.Ionicons.map=t.Ionicons.map||new Map}return d},V=t=>{Object.keys(t).forEach(e=>{w(e,t[e]);let n=e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g,"$1-$2").toLowerCase();e!==n&&w(n,t[e])})},w=(t,e)=>{let n=_(),s=n.get(t);s===void 0?n.set(t,e):s!==e&&console.warn(`[Ionicons Warning]: Multiple icons were mapped to name "${t}". Ensure that multiple icons are not mapped to the same icon name.`)},N=t=>{let e=p(t.src);return e||(e=B(t.name,t.icon,t.mode,t.ios,t.md),e?C(e,t):t.icon&&(e=p(t.icon),e||(e=p(t.icon[t.mode]),e))?e:null)},C=(t,e)=>{let n=_().get(t);if(n)return n;try{return E(`svg/${t}.svg`)}catch(s){console.log("e",s),console.warn(`[Ionicons Warning]: Could not load icon with name "${t}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,e)}},B=(t,e,n,s,o)=>(n=(n&&$(n))==="ios"?"ios":"md",s&&n==="ios"?t=$(s):o&&n==="md"?t=$(o):(!t&&e&&!x(e)&&(t=e),h(t)&&(t=$(t))),!h(t)||t.trim()===""||t.replace(/[a-z]|-|\d/gi,"")!==""?null:t),p=t=>h(t)&&(t=t.trim(),x(t))?t:null,x=t=>t.length>0&&/(\/|\.)/.test(t),h=t=>typeof t=="string",$=t=>t.toLowerCase(),tt=(t,e=[])=>{let n={};return e.forEach(s=>{t.hasAttribute(s)&&(t.getAttribute(s)!==null&&(n[s]=t.getAttribute(s)),t.removeAttribute(s))}),n},et=t=>t&&t.dir!==""?t.dir.toLowerCase()==="rtl":document?.dir.toLowerCase()==="rtl";export{V as a,N as b,B as c,h as d,tt as e,et as f,G as g,X as h,K as i,Y as j};
