1import{aT as w,D as S,aU as k,aV as A,d as x,an as C,h as B,au as N,aW as P,aX as R,aY as V}from"./BNlnY7xE.js";const W=Object.freeze({left:0,top:0,width:16,height:16}),j=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),z=Object.freeze({...W,...j});Object.freeze({...z,body:"",hidden:!1});function E(e){const[n,s,r,t]=e;if(r!==t){const o=Math.max(r,t);return[n-(o-r)/2,s-(o-t)/2,o,o]}return e}const L=/(-?[0-9.]*[0-9]+[0-9.]*)/g,M=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const r=e.split(L);if(r===null||!r.length)return e;const t=[];let o=r.shift(),c=M.test(o);for(;;){if(c){const i=parseFloat(o);isNaN(i)?t.push(o):t.push(Math.ceil(i*n*s)/s)}else t.push(o);if(o=r.shift(),o===void 0)return t.join("");c=!c}}const D=Object.freeze({width:null,height:null}),_=Object.freeze({...D,...j});function G(e,n="defs"){let s="";const r=e.indexOf("<"+n);for(;r>=0;){const t=e.indexOf(">",r),o=e.indexOf("</"+n);if(t===-1||o===-1)break;const c=e.indexOf(">",o);if(c===-1)break;s+=e.slice(t+1,o).trim(),e=e.slice(0,r).trim()+e.slice(c+1)}return{defs:s,content:e}}function H(e,n){return e?"<defs>"+e+"</defs>"+n:n}function U(e,n,s){const r=G(e);return H(r.defs,n+r.content+s)}const K=e=>e==="unset"||e==="undefined"||e==="none";function X(e,n){const s={...z,...e},r={..._,...n},t={left:s.left,top:s.top,width:s.width,height:s.height};let o=s.body;[s,r].forEach(g=>{const f=[],T=g.hFlip,O=g.vFlip;let m=g.rotate;T?O?m+=2:(f.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),f.push("scale(-1 1)"),t.top=t.left=0):O&&(f.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),f.push("scale(1 -1)"),t.top=t.left=0);let d;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:d=t.height/2+t.top,f.unshift("rotate(90 "+d.toString()+" "+d.toString()+")");break;case 2:f.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:d=t.width/2+t.left,f.unshift("rotate(-90 "+d.toString()+" "+d.toString()+")");break}m%2===1&&(t.left!==t.top&&(d=t.left,t.left=t.top,t.top=d),t.width!==t.height&&(d=t.width,t.width=t.height,t.height=d)),f.length&&(o=U(o,'<g transform="'+f.join(" ")+'">',"</g>"))});const c=r.width,i=r.height,l=t.width,a=t.height;let u,h;c===null?(h=i===null?"1em":i==="auto"?a:i,u=v(h,l/a)):(u=c==="auto"?l:c,h=i===null?v(u,a/l):i==="auto"?a:i);const y={},I=(g,f)=>{K(f)||(y[g]=f.toString())};I("width",u),I("height",h);const $=[t.left,t.top,l,a];return y.viewBox=$.join(" "),{attributes:y,viewBox:$,body:o}}function Y(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function J(e){return"data:image/svg+xml,"+Y(e)}function Q(e){return'url("'+J(e)+'")'}function Z(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)s+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+e+"</svg>"}function ee(e){const n={display:"inline-block",width:"1em",height:"1em"},s=e.varName;switch(e.pseudoSelector&&(n.content="''"),e.mode){case"background":s&&(n["background-image"]="var(--"+s+")"),n["background-repeat"]="no-repeat",n["background-size"]="100% 100%";break;case"mask":n["background-color"]="currentColor",s&&(n["mask-image"]=n["-webkit-mask-image"]="var(--"+s+")"),n["mask-repeat"]=n["-webkit-mask-repeat"]="no-repeat",n["mask-size"]=n["-webkit-mask-size"]="100% 100%";break}return n}function te(e,n){const s={},r=n.varName,t=X(e);let o=t.viewBox;o[2]!==o[3]&&(n.forceSquare?o=E(o):s.width=v("1em",o[2]/o[3]));const c=Q(Z(t.body.replace(/currentColor/g,n.color||"black"),{viewBox:`${o[0]} ${o[1]} ${o[2]} ${o[3]}`,width:`${o[2]}`,height:`${o[3]}`}));if(r)s["--"+r]=c;else switch(n.mode){case"background":s["background-image"]=c;break;case"mask":s["mask-image"]=s["-webkit-mask-image"]=c;break}return s}const b={selectorStart:{compressed:"{",compact:" {",expanded:" {"},selectorEnd:{compressed:"}",compact:`; } 2`,expanded:`; 3} 4`},rule:{compressed:"{key}:",compact:" {key}: ",expanded:` 5 {key}: `}};function ne(e,n="expanded"){const s=[];for(let r=0;r<e.length;r++){const{selector:t,rules:o}=e[r];let c=(t instanceof Array?t.join(n==="compressed"?",":", "):t)+b.selectorStart[n],i=!0;for(const l in o)i||(c+=";"),c+=b.rule[n].replace("{key}",l)+o[l],i=!1;c+=b.selectorEnd[n],s.push(c)}return s.join(n==="compressed"?"":` 6`)}function se(e,n={}){const s=n.customise?n.customise(e.body):e.body,r=n.mode||(n.color||!s.includes("currentColor")?"background":"mask");let t=n.varName;t===void 0&&r==="mask"&&(t="svg");const o={...n,mode:r,varName:t};r==="background"&&delete o.varName;const c={...n.rules,...ee(o),...te({...z,...e,body:s},o)};return ne([{selector:n.iconSelector||".icon",rules:c}],o.format)}async function oe(e,n){if(!e)return null;const s=k(e);return s||(await A(e).catch(()=>(console.warn(`[Icon] failed to load icon \`${e}\``),null)),k(e))}function q(e){const n=w().icon,s=(n.collections||[]).sort((r,t)=>t.length-r.length);return S(()=>{const r=e(),t=r.startsWith(n.cssSelectorPrefix)?r.slice(n.cssSelectorPrefix.length):r,o=n.aliases?.[t]||t;if(!o.includes(":")){const c=s.find(i=>o.startsWith(i+"-"));
6return c?c+":"+o.slice(c.length+1):o}return o})}function F(e,n){if(e!==!1)return e===!0||e===null?n:e}let p;function re(e){return e.replace(/([^\w-])/g,"\\$1")}function ie(){if(p)return p;p=new Set;const e=s=>{if(s=s.replace(/^:where\((.*)\)$/,"$1").trim(),s.startsWith("."))return s},n=s=>{if(s?.length)for(const r of s){r?.cssRules&&n(r.cssRules);const t=r?.selectorText;if(typeof t=="string"){const o=e(t);o&&p.add(o)}}};if(typeof document<"u")for(const s of document.styleSheets)try{const r=s.cssRules||s.rules;n(r)}catch{}return p}const ce=x({name:"NuxtIconCss",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e){const n=C(),s=w().icon,r=S(()=>{if(!e.name)return"";const i=s.cssSelectorPrefix+e.name;return typeof e.customize=="function"?i+"--customized-"+P(e.customize.toString()):i});function t(i){if(!i)return;const l=k(i);if(l)return l;const a=n.payload?.data?.[i];if(a)return R(i,a),a}const o=S(()=>"."+re(r.value));function c(i,l=!0){let a=o.value;s.cssWherePseudo&&(a=`:where(${a})`);const u=se(i,{iconSelector:a,format:"compressed",customise:F(e.customize,s.customize)});return s.cssLayer&&l?`@layer ${s.cssLayer} { ${u} }`:u}{const i=ie();async function l(a){if(i.has(o.value)||typeof document>"u")return;const u=document.createElement("style");u.textContent=c(a);const h=document.head.querySelector('style, link[rel="stylesheet"]');h?document.head.insertBefore(u,h):document.head.appendChild(u),i.add(o.value)}B(()=>e.name,()=>{if(i.has(o.value))return;const a=t(e.name);a?l(a):oe(e.name).then(u=>{u&&l(u)}).catch(()=>null)},{immediate:!0})}return()=>N("span",{class:["iconify",r.value]})}}),ae=x({name:"NuxtIconSvg",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o="i-"+t.value;if(t.value){const c=s.payload.data[o];c&&R(t.value,c)}return()=>N(V,{icon:t.value,ssr:!0,customise:F(e.customize,r.customize)},n)}}),ue=x({name:"NuxtIcon",props:{name:{type:String,required:!0},mode:{type:String,required:!1,default:null},size:{type:[Number,String],required:!1,default:null},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o=S(()=>s.vueApp?.component(t.value)||((e.mode||r.mode)==="svg"?ae:ce)),c=S(()=>{const i=e.size||r.size;return i?{fontSize:Number.isNaN(+i)?i:i+"px"}:null});return()=>N(o.value,{...r.attrs,name:t.value,class:r.class,style:c.value,customize:e.customize},n)}});export{ue as default};
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.