1import{S as I,L as k,a as D,A as f,w as m,b as L,i as N,g as O,c as P}from"./BuC1ekP5.js";import{g as S,n as A}from"./l-iHkLpy.js";import{c as U}from"./XM1R_45Z.js";const v=new Set,y={trace:0,debug:1,info:2,warn:4,error:8,off:10};function j(e){return y[e]>=y[I]}function l(e,...t){if(!j(e))return;console[e].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...t)}let b;const F={debug:e=>l("debug",e),info:e=>l("info",e),warn:e=>l("warn",e),error:e=>l("error",e),trace:e=>l("trace",e),deprecated:B};function B(e,{component:t,name:s,suggested:i,removalVersion:n}){const a=`${e}:${e==="component"?"":t}${s}`;if(v.has(a))return;v.add(a);const r=Array.isArray(i);r&&!b&&(b=new Intl.ListFormat("en",{style:"long",type:"disjunction"}));const h=`[${s}] ${e} is deprecated and will be removed in ${n==="future"?"a future version":`v${n}`}.${i?` Use ${r?b.format(i.map(o=>`"${o}"`)):`"${i}"`} instead.`:""}`;l("warn",h)}const $={flipRtl:"flip-rtl",svg:"svg"},x={},g={},w={s:16,m:24,l:32};function C({icon:e,scale:t}){const s=w[t],i=E(e),n=i.charAt(i.length-1)==="F";return`${n?i.substring(0,i.length-1):i}${s}${n?"F":""}`}async function R(e){const t=C(e),s=z(t);if(s)return s;g[t]||(g[t]=fetch(O(`./assets/icon/${t}.json`)).then(n=>n.json()).catch(()=>(F.error(`${e.icon} (${e.scale}) icon failed to load`),"")));const i=await g[t];return x[t]=i,i}function T(e){return z(C(e))}function z(e){return x[e]}function E(e){const t=!isNaN(Number(e.charAt(0))),s=e.split("-");if(s.length>0){const n=/[a-z]/i;e=s.map((a,r)=>a.replace(n,function(o,p){return r===0&&p===0?o:o.toUpperCase()})).join("")}return t?`i${e}`:e}const M=N`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`,u=class u extends k{constructor(){super(...arguments),this.visible=!1,this.flipRtl=!1,this.icon=null,this.preload=!1,this.scale="m"}connectedCallback(){if(super.connectedCallback(),this.preload){this.visible=!0,this.loadIconPathData();return}this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||this.icon!==null)||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async loadIconPathData(){const{icon:t,scale:s,visible:i}=this;if(!t||!i)return;const n={icon:t,scale:s},a=T(n)||await R(n);t===this.icon&&(this.pathData=a)}waitUntilVisible(t){if(this.intersectionObserver=U("intersection",s=>{s.forEach(i=>{i.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}render(){const{el:t,flipRtl:s,pathData:i,scale:n,textLabel:a}=this,r=S(t),h=w[n],o=!!a,p=[].concat(i||"");return this.el.ariaHidden=A(!o),this.el.ariaLabel=o?a:null,this.el.role=o?"img":null,L`<svg aria-hidden=true class=${D({[$.flipRtl]:r==="rtl"&&s,[$.svg]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${h} ${h}`} width=100% xmlns=http://www.w3.org/2000/svg>${p.map(c=>typeof c=="string"?m`<path d=${c??f} />`:m`<path d=${c.d??f} opacity=${("opacity"in c?c.opacity:1)??f} />`)}</svg>`}};u.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1},u.styles=M;let d=u;P("calcite-icon",d);const H=Object.freeze(Object.defineProperty({__proto__:null,Icon:d},Symbol.toStringTag,{value:"Module"}));
1export{H as i,F as l};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.