Socket
Socket
Sign inDemoInstall

iconify-icon

Package Overview
Dependencies
1
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.8 to 1.1.0-beta.1

28

dist/iconify-icon.d.ts

@@ -166,2 +166,4 @@ import { IconifyIcon } from '@iconify/types';

appendCustomStyle: (value: string) => void;
iconToHTML: typeof iconToHTML;
svgToURL: typeof svgToURL;
}

@@ -188,2 +190,3 @@

};
viewBox: SVGViewBox;
body: string;

@@ -290,4 +293,10 @@ }

/**
* Check if icon exists
* Check if icon data is available
*/
iconLoaded: (name: string) => boolean;
/**
* Older, badly named, version of iconLoaded()
*
* @deprecated
*/
iconExists: (name: string) => boolean;

@@ -312,2 +321,9 @@ /**

export declare const iconLoaded: (name: string) => boolean;
/**
* Generate <svg>
*/
declare function iconToHTML(body: string, attributes: Record<string, string>): string;
export declare const listIcons: (provider?: string, prefix?: string) => string[];

@@ -370,2 +386,12 @@

/**
* Generate url() from SVG
*/
declare function svgToURL(svg: string): string;
/**
* SVG viewBox: x, y, width, height
*/
declare type SVGViewBox = [x: number, y: number, width: number, height: number];
export { }

@@ -372,0 +398,0 @@

4

dist/iconify-icon.min.js

@@ -10,4 +10,4 @@ /**

* @license MIT
* @version 1.0.8
* @version 1.1.0-beta.1
*/
!function(){"use strict";const t=Object.freeze({left:0,top:0,width:16,height:16}),e=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),n=Object.freeze({...t,...e}),o=Object.freeze({...n,body:"",hidden:!1}),i=Object.freeze({width:null,height:null}),r=Object.freeze({...i,...e});const s=/[\s,]+/;const c={...r,preserveAspectRatio:""};function a(t){const e={...c},n=(e,n)=>t.getAttribute(e)||n;var o;return e.width=n("width",null),e.height=n("height",null),e.rotate=function(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function o(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:o(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let i=parseFloat(t.slice(0,t.length-n.length));return isNaN(i)?0:(i/=e,i%1==0?o(i):0)}}return e}(n("rotate","")),o=e,n("flip","").split(s).forEach((t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0}})),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}const u=/^[a-z0-9]+(-[a-z0-9]+)*$/,l=(t,e,n,o="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),r={provider:i.length>0?i[0]:o,prefix:n,name:t};return e&&!f(r)?null:r}const r=i[0],s=r.split("-");if(s.length>1){const t={provider:o,prefix:s.shift(),name:s.join("-")};return e&&!f(t)?null:t}if(n&&""===o){const t={provider:o,prefix:"",name:r};return e&&!f(t,n)?null:t}return null},f=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(u)||!(e&&""===t.prefix||t.prefix.match(u))||!t.name.match(u));function d(t,n){const i=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const o=((t.rotate||0)+(e.rotate||0))%4;return o&&(n.rotate=o),n}(t,n);for(const r in o)r in e?r in t&&!(r in i)&&(i[r]=e[r]):r in n?i[r]=n[r]:r in t&&(i[r]=t[r]);return i}function h(t,e,n){const o=t.icons,i=t.aliases||Object.create(null);let r={};function s(t){r=d(o[t]||i[t],r)}return s(e),n.forEach(s),d(t,r)}function p(t,e){const n=[];if("object"!=typeof t||"object"!=typeof t.icons)return n;t.not_found instanceof Array&&t.not_found.forEach((t=>{e(t,null),n.push(t)}));const o=function(t,e){const n=t.icons,o=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(n).concat(Object.keys(o))).forEach((function t(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;const n=o[e]&&o[e].parent,r=n&&t(n);r&&(i[e]=[n].concat(r))}return i[e]})),i}(t);for(const i in o){const r=o[i];r&&(e(i,h(t,i,r)),n.push(i))}return n}const g={provider:"",aliases:{},not_found:{},...t};function m(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function b(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!m(t,g))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(u)||"string"!=typeof e.body||!m(e,o))return null}const i=e.aliases||Object.create(null);for(const t in i){const e=i[t],r=e.parent;if(!t.match(u)||"string"!=typeof r||!n[r]&&!i[r]||!m(e,o))return null}return e}const y=Object.create(null);function v(t,e){const n=y[t]||(y[t]=Object.create(null));return n[e]||(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function x(t,e){return b(e)?p(e,((e,n)=>{n?t.icons[e]=n:t.missing.add(e)})):[]}function w(t,e){let n=[];return("string"==typeof t?[t]:Object.keys(y)).forEach((t=>{("string"==typeof t&&"string"==typeof e?[e]:Object.keys(y[t]||{})).forEach((e=>{const o=v(t,e);n=n.concat(Object.keys(o.icons).map((n=>(""!==t?"@"+t+":":"")+e+":"+n)))}))})),n}let k=!1;function j(t){return"boolean"==typeof t&&(k=t),k}function A(t){const e="string"==typeof t?l(t,!0,k):t;if(e){const t=v(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function _(t,e){const n=l(t,!0,k);if(!n)return!1;return function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]={...n},!0}catch(t){}return!1}(v(n.provider,n.prefix),n.name,e)}function C(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),k&&!e&&!t.prefix){let e=!1;return b(t)&&(t.prefix="",p(t,((t,n)=>{n&&_(t,n)&&(e=!0)}))),e}const n=t.prefix;if(!f({provider:e,prefix:n,name:"a"}))return!1;return!!x(v(e,n),t)}function O(t){return!!A(t)}function S(t){const e=A(t);return e?{...n,...e}:null}function I(t,e){t.forEach((t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter((t=>t.id!==e)))}))}let E=0;const M=Object.create(null);function T(t,e){M[t]=e}function F(t){return M[t]||M[""]}var P={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function N(t,e,n,o){const i=t.resources.length,r=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let e=t.resources.slice(0);for(s=[];e.length>1;){const t=Math.floor(Math.random()*e.length);s.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}s=s.concat(e)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const c=Date.now();let a,u="pending",l=0,f=null,d=[],h=[];function p(){f&&(clearTimeout(f),f=null)}function g(){"pending"===u&&(u="aborted"),p(),d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function m(t,e){e&&(h=[]),"function"==typeof t&&h.push(t)}function b(){u="failed",h.forEach((t=>{t(void 0,a)}))}function y(){d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function v(){if("pending"!==u)return;p();const o=s.shift();if(void 0===o)return d.length?void(f=setTimeout((()=>{p(),"pending"===u&&(y(),b())}),t.timeout)):void b();const i={status:"pending",resource:o,callback:(e,n)=>{!function(e,n,o){const i="success"!==n;switch(d=d.filter((t=>t!==e)),u){case"pending":break;case"failed":if(i||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return a=o,void b();if(i)return a=o,void(d.length||(s.length?v():b()));if(p(),y(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}u="completed",h.forEach((t=>{t(o)}))}(i,e,n)}};d.push(i),l++,f=setTimeout(v,t.rotate),n(o,e,i.callback)}return"function"==typeof o&&h.push(o),setTimeout(v),function(){return{startTime:c,payload:e,status:u,queriesSent:l,queriesPending:d.length,subscribe:m,abort:g}}}function L(t){const e={...P,...t};let n=[];function o(){n=n.filter((t=>"pending"===t().status))}return{query:function(t,i,r){const s=N(e,t,i,((t,e)=>{o(),r&&r(t,e)}));return n.push(s),s},find:function(t){return n.find((e=>t(e)))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:o}}function R(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const z=Object.create(null),Q=["https://api.simplesvg.com","https://api.unisvg.com"],q=[];for(;Q.length>0;)1===Q.length||Math.random()>.5?q.push(Q.shift()):q.push(Q.pop());function D(t,e){const n=R(e);return null!==n&&(z[t]=n,!0)}function U(t){return z[t]}function J(){return Object.keys(z)}function H(){}z[""]=R({resources:["https://api.iconify.design"].concat(q)});const $=Object.create(null);function B(t,e,n){let o,i;if("string"==typeof t){const e=F(t);if(!e)return n(void 0,424),H;i=e.send;const r=function(t){if(!$[t]){const e=U(t);if(!e)return;const n={config:e,redundancy:L(e)};$[t]=n}return $[t]}(t);r&&(o=r.redundancy)}else{const e=R(t);if(e){o=L(e);const n=F(t.resources?t.resources[0]:"");n&&(i=n.send)}}return o&&i?o.query(e,i,n)().abort:(n(void 0,424),H)}const G="iconify2",V="iconify",K=V+"-count",W=V+"-version",X=36e5,Y=168;function Z(t,e){try{return t.getItem(e)}catch(t){}}function tt(t,e,n){try{return t.setItem(e,n),!0}catch(t){}}function et(t,e){try{t.removeItem(e)}catch(t){}}function nt(t,e){return tt(t,K,e.toString())}function ot(t){return parseInt(Z(t,K))||0}const it={local:!0,session:!0},rt={local:new Set,session:new Set};let st=!1;let ct="undefined"==typeof window?{}:window;function at(t){const e=t+"Storage";try{if(ct&&ct[e]&&"number"==typeof ct[e].length)return ct[e]}catch(t){}it[t]=!1}function ut(t,e){const n=at(t);if(!n)return;const o=Z(n,W);if(o!==G){if(o){const t=ot(n);for(let e=0;e<t;e++)et(n,V+e.toString())}return tt(n,W,G),void nt(n,0)}const i=Math.floor(Date.now()/X)-Y,r=t=>{const o=V+t.toString(),r=Z(n,o);if("string"==typeof r){try{const n=JSON.parse(r);if("object"==typeof n&&"number"==typeof n.cached&&n.cached>i&&"string"==typeof n.provider&&"object"==typeof n.data&&"string"==typeof n.data.prefix&&e(n,t))return!0}catch(t){}et(n,o)}};let s=ot(n);for(let e=s-1;e>=0;e--)r(e)||(e===s-1?(s--,nt(n,s)):rt[t].add(e))}function lt(){if(!st){st=!0;for(const t in it)ut(t,(t=>{const e=t.data,n=v(t.provider,e.prefix);if(!x(n,e).length)return!1;const o=e.lastModified||-1;return n.lastModifiedCached=n.lastModifiedCached?Math.min(n.lastModifiedCached,o):o,!0}))}}function ft(t,e){function n(n){let o;if(!it[n]||!(o=at(n)))return;const i=rt[n];let r;if(i.size)i.delete(r=Array.from(i).shift());else if(r=ot(o),!nt(o,r+1))return;const s={cached:Math.floor(Date.now()/X),provider:t.provider,data:e};return tt(o,V+r.toString(),JSON.stringify(s))}st||lt(),e.lastModified&&!function(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const n in it)ut(n,(n=>{const o=n.data;return n.provider!==t.provider||o.prefix!==t.prefix||o.lastModified===e}));return!0}(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&delete(e=Object.assign({},e)).not_found,n("local")||n("session"))}function dt(){}function ht(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout((()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout((()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const o=t.provider,i=t.prefix;e.forEach((e=>{const r=e.icons,s=r.pending.length;r.pending=r.pending.filter((e=>{if(e.prefix!==i)return!0;const s=e.name;if(t.icons[s])r.loaded.push({provider:o,prefix:i,name:s});else{if(!t.missing.has(s))return n=!0,!0;r.missing.push({provider:o,prefix:i,name:s})}return!1})),r.pending.length!==s&&(n||I([t],e.id),e.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),e.abort))}))})))}(t)})))}const pt=(t,e)=>{const n=function(t,e=!0,n=!1){const o=[];return t.forEach((t=>{const i="string"==typeof t?l(t,e,n):t;i&&o.push(i)})),o}(t,!0,j()),o=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort(((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name)));let o={provider:"",prefix:"",name:""};return t.forEach((t=>{if(o.name===t.name&&o.prefix===t.prefix&&o.provider===t.provider)return;o=t;const i=t.provider,r=t.prefix,s=t.name,c=n[i]||(n[i]=Object.create(null)),a=c[r]||(c[r]=v(i,r));let u;u=s in a.icons?e.loaded:""===r||a.missing.has(s)?e.missing:e.pending;const l={provider:i,prefix:r,name:s};u.push(l)})),e}(n);if(!o.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(o.loaded,o.missing,o.pending,dt)})),()=>{t=!1}}const i=Object.create(null),r=[];let s,c;return o.pending.forEach((t=>{const{provider:e,prefix:n}=t;if(n===c&&e===s)return;s=e,c=n,r.push(v(e,n));const o=i[e]||(i[e]=Object.create(null));o[n]||(o[n]=[])})),o.pending.forEach((t=>{const{provider:e,prefix:n,name:o}=t,r=v(e,n),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(o)||(s.add(o),i[e][n].push(o))})),r.forEach((t=>{const{provider:e,prefix:n}=t;i[e][n].length&&function(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout((()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:n}=t,o=t.iconsToLoad;let i;delete t.iconsToLoad,o&&(i=F(e))&&i.prepare(e,n,o).forEach((n=>{B(e,n,(e=>{if("object"!=typeof e)n.icons.forEach((e=>{t.missing.add(e)}));else try{const n=x(t,e);if(!n.length)return;const o=t.pendingIcons;o&&n.forEach((t=>{o.delete(t)})),ft(t,e)}catch(t){console.error(t)}ht(t)}))}))})))}(t,i[e][n])})),e?function(t,e,n){const o=E++,i=I.bind(null,n,o);if(!e.pending.length)return i;const r={id:o,icons:e,callback:t,abort:i};return n.forEach((t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(r)})),i}(e,o,r):dt},gt=t=>new Promise(((e,o)=>{const i="string"==typeof t?l(t,!0):t;i?pt([i||t],(r=>{if(r.length&&i){const t=A(i);if(t)return void e({...n,...t})}o(t)})):o(t)}));function mt(t,e){const n="string"==typeof t?l(t,!0,!0):null;if(!n){const e=function(t){try{const e="string"==typeof t?JSON.parse(t):t;if("string"==typeof e.body)return{...e}}catch(t){}}(t);return{value:t,data:e}}const o=A(n);if(void 0!==o||!n.prefix)return{value:t,name:n,data:o};const i=pt([n],(()=>e(t,n,A(n))));return{value:t,name:n,loading:i}}function bt(t){return t.hasAttribute("inline")}let yt=!1;try{yt=0===navigator.vendor.indexOf("Apple")}catch(t){}const vt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function wt(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const o=t.split(vt);if(null===o||!o.length)return t;const i=[];let r=o.shift(),s=xt.test(r);for(;;){if(s){const t=parseFloat(r);isNaN(t)?i.push(r):i.push(Math.ceil(t*e*n)/n)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");s=!s}}const kt=t=>"unset"===t||"undefined"===t||"none"===t;function jt(t,e){const o={...n,...t},i={...r,...e},s={left:o.left,top:o.top,width:o.width,height:o.height};let c=o.body;[o,i].forEach((t=>{const e=[],n=t.hFlip,o=t.vFlip;let i,r=t.rotate;switch(n?o?r+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):o&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.push("scale(1 -1)"),s.top=s.left=0),r<0&&(r-=4*Math.floor(r/4)),r%=4,r){case 1:i=s.height/2+s.top,e.unshift("rotate(90 "+i.toString()+" "+i.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:i=s.width/2+s.left,e.unshift("rotate(-90 "+i.toString()+" "+i.toString()+")")}r%2==1&&(s.left!==s.top&&(i=s.left,s.left=s.top,s.top=i),s.width!==s.height&&(i=s.width,s.width=s.height,s.height=i)),e.length&&(c='<g transform="'+e.join(" ")+'">'+c+"</g>")}));const a=i.width,u=i.height,l=s.width,f=s.height;let d,h;null===a?(h=null===u?"1em":"auto"===u?f:u,d=wt(h,l/f)):(d="auto"===a?l:a,h=null===u?wt(d,f/l):"auto"===u?f:u);const p={},g=(t,e)=>{kt(e)||(p[t]=e.toString())};return g("width",d),g("height",h),p.viewBox=s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+f.toString(),{attributes:p,body:c}}let At=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}})();function _t(t){At=t}function Ct(){return At}const Ot={prepare:(t,e,n)=>{const o=[],i=function(t,e){const n=U(t);if(!n)return 0;let o;if(n.maxURL){let t=0;n.resources.forEach((e=>{const n=e;t=Math.max(t,n.length)}));const i=e+".json?icons=";o=n.maxURL-t-n.path.length-i.length}else o=0;return o}(t,e),r="icons";let s={type:r,provider:t,prefix:e,icons:[]},c=0;return n.forEach(((n,a)=>{c+=n.length+1,c>=i&&a>0&&(o.push(s),s={type:r,provider:t,prefix:e,icons:[]},c=n.length),s.icons.push(n)})),o.push(s),o},send:(t,e,n)=>{if(!At)return void n("abort",424);let o=function(t){if("string"==typeof t){const e=U(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");o+=t+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const t=e.uri;o+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let i=503;At(t+o).then((t=>{const e=t.status;if(200===e)return i=501,t.json();setTimeout((()=>{n(function(t){return 404===t}(e)?"abort":"next",e)}))})).then((t=>{"object"==typeof t&&null!==t?setTimeout((()=>{n("success",t)})):setTimeout((()=>{404===t?n("abort",t):n("next",i)}))})).catch((()=>{n("next",i)}))}};function St(t,e){switch(t){case"local":case"session":it[t]=e;break;case"all":for(const t in it)it[t]=e}}const It="data-style";let Et="";function Mt(t){Et=t}function Tt(t,e){let n=Array.from(t.childNodes).find((t=>t.hasAttribute&&t.hasAttribute(It)));n||(n=document.createElement("style"),n.setAttribute(It,It),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+Et}function Ft(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}const Pt={"background-color":"currentColor"},Nt={"background-color":"transparent"},Lt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Rt={"-webkit-mask":Pt,mask:Pt,background:Nt};for(const t in Rt){const e=Rt[t];for(const n in Lt)e[t+"-"+n]=Lt[n]}function zt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}let Qt;function qt(t){return void 0===Qt&&function(){try{Qt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){Qt=null}}(),Qt?Qt.createHTML(t):t}function Dt(t,e){const o=e.icon.data,i=e.customisations,r=jt(o,i);i.preserveAspectRatio&&(r.attributes.preserveAspectRatio=i.preserveAspectRatio);const s=e.renderedMode;let c;if("svg"===s)c=function(t){const e=document.createElement("span"),n=t.attributes;let o="";n.width||(o="width: inherit;"),n.height||(o+="height: inherit;"),o&&(n.style=o);const i=Ft(t.body,n);return e.innerHTML=qt(i),e.firstChild}(r);else c=function(t,e,n){const o=document.createElement("span");let i=t.body;-1!==i.indexOf("<a")&&(i+="\x3c!-- "+Date.now()+" --\x3e");const r=t.attributes,s='url("'+(u=Ft(i,{...r,width:e.width+"",height:e.height+""}),"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(u)+'")'),c=o.style,a={"--svg":s,width:zt(r.width),height:zt(r.height),...n?Pt:Nt};var u;for(const t in a)c.setProperty(t,a[t]);return o}(r,{...n,...o},"mask"===s);const a=Array.from(t.childNodes).find((t=>{const e=t.tagName&&t.tagName.toUpperCase();return"SPAN"===e||"SVG"===e}));a?"SPAN"===c.tagName&&a.tagName===c.tagName?a.setAttribute("style",c.getAttribute("style")):t.replaceChild(c,a):t.appendChild(c)}function Ut(t,e,n){return{rendered:!1,inline:e,icon:t,lastRender:n&&(n.rendered?n:n.lastRender)}}!function(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch(t){return}if(!e||!n)return;const o=e.get(t);if(o)return o;const i=["icon","mode","inline","width","height","rotate","flip"],r=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const t=this._shadowRoot=this.attachShadow({mode:"open"}),e=bt(this);Tt(t,e),this._state=Ut({value:""},e),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(t){if("inline"===t){const t=bt(this),e=this._state;t!==e.inline&&(e.inline=t,Tt(this._shadowRoot,t))}else this._queueCheck()}get icon(){const t=this.getAttribute("icon");if(t&&"{"===t.slice(0,1))try{return JSON.parse(t)}catch(t){}return t}set icon(t){"object"==typeof t&&(t=JSON.stringify(t)),this.setAttribute("icon",t)}get inline(){return bt(this)}set inline(t){t?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const t=this._state;if(t.rendered){const e=this._shadowRoot;if("svg"===t.renderedMode)try{return void e.lastChild.setCurrentTime(0)}catch(t){}Dt(e,t)}}get status(){const t=this._state;return t.rendered?"rendered":null===t.icon.data?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout((()=>{this._check()})))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const t=this._state,e=this.getAttribute("icon");if(e!==t.icon.value)return void this._iconChanged(e);if(!t.rendered)return;const n=this.getAttribute("mode"),o=a(this);(t.attrMode!==n||function(t,e){for(const n in c)if(t[n]!==e[n])return!0;return!1}(t.customisations,o))&&this._renderIcon(t.icon,o,n)}_iconChanged(t){const e=mt(t,((t,e,n)=>{const o=this._state;if(o.rendered||this.getAttribute("icon")!==t)return;const i={value:t,name:e,data:n};i.data?this._gotIconData(i):o.icon=i}));e.data?this._gotIconData(e):this._state=Ut(e,this._state.inline,this._state)}_gotIconData(t){this._checkQueued=!1,this._renderIcon(t,a(this),this.getAttribute("mode"))}_renderIcon(t,e,n){const o=function(t,e){switch(e){case"svg":case"bg":case"mask":return e}return"style"===e||!yt&&-1!==t.indexOf("<a")?-1===t.indexOf("currentColor")?"bg":"mask":"svg"}(t.data.body,n),i=this._state.inline;Dt(this._shadowRoot,this._state={rendered:!0,icon:t,inline:i,customisations:e,attrMode:n,renderedMode:o})}};i.forEach((t=>{t in r.prototype||Object.defineProperty(r.prototype,t,{get:function(){return this.getAttribute(t)},set:function(e){null!==e?this.setAttribute(t,e):this.removeAttribute(t)}})}));const s=function(){let t;T("",Ot),j(!0);try{t=window}catch(t){}if(t){if(lt(),void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach((t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!C(t))&&console.error(n)}catch(t){console.error(n)}}))}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(const t in e){const n="IconifyProviders["+t+"] is invalid.";try{const o=e[t];if("object"!=typeof o||!o||void 0===o.resources)continue;D(t,o)||console.error(n)}catch(t){console.error(n)}}}}return{enableCache:t=>St(t,!0),disableCache:t=>St(t,!1),iconExists:O,getIcon:S,listIcons:w,addIcon:_,addCollection:C,calculateSize:wt,buildIcon:jt,loadIcons:pt,loadIcon:gt,addAPIProvider:D,appendCustomStyle:Mt,_api:{getAPIConfig:U,setAPIModule:T,sendAPIQuery:B,setFetch:_t,getFetch:Ct,listAPIProviders:J}}}();for(const t in s)r[t]=r.prototype[t]=s[t];e.define(t,r)}()}();
!function(){"use strict";const t=Object.freeze({left:0,top:0,width:16,height:16}),e=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),n=Object.freeze({...t,...e}),i=Object.freeze({...n,body:"",hidden:!1}),o=Object.freeze({width:null,height:null}),r=Object.freeze({...o,...e});const s=/[\s,]+/;const c={...r,preserveAspectRatio:""};function a(t){const e={...c},n=(e,n)=>t.getAttribute(e)||n;var i;return e.width=n("width",null),e.height=n("height",null),e.rotate=function(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function i(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:i(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o/=e,o%1==0?i(o):0)}}return e}(n("rotate","")),i=e,n("flip","").split(s).forEach((t=>{switch(t.trim()){case"horizontal":i.hFlip=!0;break;case"vertical":i.vFlip=!0}})),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}const u=/^[a-z0-9]+(-[a-z0-9]+)*$/,l=(t,e,n,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),n=o.pop(),r={provider:o.length>0?o[0]:i,prefix:n,name:t};return e&&!f(r)?null:r}const r=o[0],s=r.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!f(t)?null:t}if(n&&""===i){const t={provider:i,prefix:"",name:r};return e&&!f(t,n)?null:t}return null},f=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(u)||!(e&&""===t.prefix||t.prefix.match(u))||!t.name.match(u));function d(t,n){const o=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}(t,n);for(const r in i)r in e?r in t&&!(r in o)&&(o[r]=e[r]):r in n?o[r]=n[r]:r in t&&(o[r]=t[r]);return o}function h(t,e,n){const i=t.icons,o=t.aliases||Object.create(null);let r={};function s(t){r=d(i[t]||o[t],r)}return s(e),n.forEach(s),d(t,r)}function p(t,e){const n=[];if("object"!=typeof t||"object"!=typeof t.icons)return n;t.not_found instanceof Array&&t.not_found.forEach((t=>{e(t,null),n.push(t)}));const i=function(t,e){const n=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(n).concat(Object.keys(i))).forEach((function t(e){if(n[e])return o[e]=[];if(!(e in o)){o[e]=null;const n=i[e]&&i[e].parent,r=n&&t(n);r&&(o[e]=[n].concat(r))}return o[e]})),o}(t);for(const o in i){const r=i[o];r&&(e(o,h(t,o,r)),n.push(o))}return n}const g={provider:"",aliases:{},not_found:{},...t};function m(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function b(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!m(t,g))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(u)||"string"!=typeof e.body||!m(e,i))return null}const o=e.aliases||Object.create(null);for(const t in o){const e=o[t],r=e.parent;if(!t.match(u)||"string"!=typeof r||!n[r]&&!o[r]||!m(e,i))return null}return e}const y=Object.create(null);function v(t,e){const n=y[t]||(y[t]=Object.create(null));return n[e]||(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function x(t,e){return b(e)?p(e,((e,n)=>{n?t.icons[e]=n:t.missing.add(e)})):[]}function w(t,e){let n=[];return("string"==typeof t?[t]:Object.keys(y)).forEach((t=>{("string"==typeof t&&"string"==typeof e?[e]:Object.keys(y[t]||{})).forEach((e=>{const i=v(t,e);n=n.concat(Object.keys(i.icons).map((n=>(""!==t?"@"+t+":":"")+e+":"+n)))}))})),n}let k=!1;function _(t){return"boolean"==typeof t&&(k=t),k}function j(t){const e="string"==typeof t?l(t,!0,k):t;if(e){const t=v(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function A(t,e){const n=l(t,!0,k);if(!n)return!1;return function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]={...n},!0}catch(t){}return!1}(v(n.provider,n.prefix),n.name,e)}function O(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),k&&!e&&!t.prefix){let e=!1;return b(t)&&(t.prefix="",p(t,((t,n)=>{n&&A(t,n)&&(e=!0)}))),e}const n=t.prefix;if(!f({provider:e,prefix:n,name:"a"}))return!1;return!!x(v(e,n),t)}function C(t){return!!j(t)}function S(t){const e=j(t);return e?{...n,...e}:null}function M(t,e){t.forEach((t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter((t=>t.id!==e)))}))}let T=0;const I=Object.create(null);function E(t,e){I[t]=e}function F(t){return I[t]||I[""]}var L={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function R(t,e,n,i){const o=t.resources.length,r=t.random?Math.floor(Math.random()*o):t.index;let s;if(t.random){let e=t.resources.slice(0);for(s=[];e.length>1;){const t=Math.floor(Math.random()*e.length);s.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}s=s.concat(e)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const c=Date.now();let a,u="pending",l=0,f=null,d=[],h=[];function p(){f&&(clearTimeout(f),f=null)}function g(){"pending"===u&&(u="aborted"),p(),d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function m(t,e){e&&(h=[]),"function"==typeof t&&h.push(t)}function b(){u="failed",h.forEach((t=>{t(void 0,a)}))}function y(){d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function v(){if("pending"!==u)return;p();const i=s.shift();if(void 0===i)return d.length?void(f=setTimeout((()=>{p(),"pending"===u&&(y(),b())}),t.timeout)):void b();const o={status:"pending",resource:i,callback:(e,n)=>{!function(e,n,i){const o="success"!==n;switch(d=d.filter((t=>t!==e)),u){case"pending":break;case"failed":if(o||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return a=i,void b();if(o)return a=i,void(d.length||(s.length?v():b()));if(p(),y(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}u="completed",h.forEach((t=>{t(i)}))}(o,e,n)}};d.push(o),l++,f=setTimeout(v,t.rotate),n(i,e,o.callback)}return"function"==typeof i&&h.push(i),setTimeout(v),function(){return{startTime:c,payload:e,status:u,queriesSent:l,queriesPending:d.length,subscribe:m,abort:g}}}function P(t){const e={...L,...t};let n=[];function i(){n=n.filter((t=>"pending"===t().status))}return{query:function(t,o,r){const s=R(e,t,o,((t,e)=>{i(),r&&r(t,e)}));return n.push(s),s},find:function(t){return n.find((e=>t(e)))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:i}}function N(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const z=Object.create(null),Q=["https://api.simplesvg.com","https://api.unisvg.com"],H=[];for(;Q.length>0;)1===Q.length||Math.random()>.5?H.push(Q.shift()):H.push(Q.pop());function q(t,e){const n=N(e);return null!==n&&(z[t]=n,!0)}function D(t){return z[t]}function U(){return Object.keys(z)}function J(){}z[""]=N({resources:["https://api.iconify.design"].concat(H)});const $=Object.create(null);function B(t,e,n){let i,o;if("string"==typeof t){const e=F(t);if(!e)return n(void 0,424),J;o=e.send;const r=function(t){if(!$[t]){const e=D(t);if(!e)return;const n={config:e,redundancy:P(e)};$[t]=n}return $[t]}(t);r&&(i=r.redundancy)}else{const e=N(t);if(e){i=P(e);const n=F(t.resources?t.resources[0]:"");n&&(o=n.send)}}return i&&o?i.query(e,o,n)().abort:(n(void 0,424),J)}const G="iconify2",V="iconify",K=V+"-count",W=V+"-version",X=36e5,Y=168,Z=50;function tt(t,e){try{return t.getItem(e)}catch(t){}}function et(t,e,n){try{return t.setItem(e,n),!0}catch(t){}}function nt(t,e){try{t.removeItem(e)}catch(t){}}function it(t,e){return et(t,K,e.toString())}function ot(t){return parseInt(tt(t,K))||0}const rt={local:!0,session:!0},st={local:new Set,session:new Set};let ct=!1;let at="undefined"==typeof window?{}:window;function ut(t){const e=t+"Storage";try{if(at&&at[e]&&"number"==typeof at[e].length)return at[e]}catch(t){}rt[t]=!1}function lt(t,e){const n=ut(t);if(!n)return;const i=tt(n,W);if(i!==G){if(i){const t=ot(n);for(let e=0;e<t;e++)nt(n,V+e.toString())}return et(n,W,G),void it(n,0)}const o=Math.floor(Date.now()/X)-Y,r=t=>{const i=V+t.toString(),r=tt(n,i);if("string"==typeof r){try{const n=JSON.parse(r);if("object"==typeof n&&"number"==typeof n.cached&&n.cached>o&&"string"==typeof n.provider&&"object"==typeof n.data&&"string"==typeof n.data.prefix&&e(n,t))return!0}catch(t){}nt(n,i)}};let s=ot(n);for(let e=s-1;e>=0;e--)r(e)||(e===s-1?(s--,it(n,s)):st[t].add(e))}function ft(){if(!ct){ct=!0;for(const t in rt)lt(t,(t=>{const e=t.data,n=v(t.provider,e.prefix);if(!x(n,e).length)return!1;const i=e.lastModified||-1;return n.lastModifiedCached=n.lastModifiedCached?Math.min(n.lastModifiedCached,i):i,!0}))}}function dt(t,e){function n(n){let i;if(!rt[n]||!(i=ut(n)))return;const o=st[n];let r;if(o.size)o.delete(r=Array.from(o).shift());else if(r=ot(i),r>=Z||!it(i,r+1))return;const s={cached:Math.floor(Date.now()/X),provider:t.provider,data:e};return et(i,V+r.toString(),JSON.stringify(s))}ct||ft(),e.lastModified&&!function(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const n in rt)lt(n,(n=>{const i=n.data;return n.provider!==t.provider||i.prefix!==t.prefix||i.lastModified===e}));return!0}(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&delete(e=Object.assign({},e)).not_found,n("local")||n("session"))}function ht(){}function pt(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout((()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout((()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const i=t.provider,o=t.prefix;e.forEach((e=>{const r=e.icons,s=r.pending.length;r.pending=r.pending.filter((e=>{if(e.prefix!==o)return!0;const s=e.name;if(t.icons[s])r.loaded.push({provider:i,prefix:o,name:s});else{if(!t.missing.has(s))return n=!0,!0;r.missing.push({provider:i,prefix:o,name:s})}return!1})),r.pending.length!==s&&(n||M([t],e.id),e.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),e.abort))}))})))}(t)})))}const gt=(t,e)=>{const n=function(t,e=!0,n=!1){const i=[];return t.forEach((t=>{const o="string"==typeof t?l(t,e,n):t;o&&i.push(o)})),i}(t,!0,_()),i=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort(((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name)));let i={provider:"",prefix:"",name:""};return t.forEach((t=>{if(i.name===t.name&&i.prefix===t.prefix&&i.provider===t.provider)return;i=t;const o=t.provider,r=t.prefix,s=t.name,c=n[o]||(n[o]=Object.create(null)),a=c[r]||(c[r]=v(o,r));let u;u=s in a.icons?e.loaded:""===r||a.missing.has(s)?e.missing:e.pending;const l={provider:o,prefix:r,name:s};u.push(l)})),e}(n);if(!i.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(i.loaded,i.missing,i.pending,ht)})),()=>{t=!1}}const o=Object.create(null),r=[];let s,c;return i.pending.forEach((t=>{const{provider:e,prefix:n}=t;if(n===c&&e===s)return;s=e,c=n,r.push(v(e,n));const i=o[e]||(o[e]=Object.create(null));i[n]||(i[n]=[])})),i.pending.forEach((t=>{const{provider:e,prefix:n,name:i}=t,r=v(e,n),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(i)||(s.add(i),o[e][n].push(i))})),r.forEach((t=>{const{provider:e,prefix:n}=t;o[e][n].length&&function(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout((()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:n}=t,i=t.iconsToLoad;let o;delete t.iconsToLoad,i&&(o=F(e))&&o.prepare(e,n,i).forEach((n=>{B(e,n,(e=>{if("object"!=typeof e)n.icons.forEach((e=>{t.missing.add(e)}));else try{const n=x(t,e);if(!n.length)return;const i=t.pendingIcons;i&&n.forEach((t=>{i.delete(t)})),dt(t,e)}catch(t){console.error(t)}pt(t)}))}))})))}(t,o[e][n])})),e?function(t,e,n){const i=T++,o=M.bind(null,n,i);if(!e.pending.length)return o;const r={id:i,icons:e,callback:t,abort:o};return n.forEach((t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(r)})),o}(e,i,r):ht},mt=t=>new Promise(((e,i)=>{const o="string"==typeof t?l(t,!0):t;o?gt([o||t],(r=>{if(r.length&&o){const t=j(o);if(t)return void e({...n,...t})}i(t)})):i(t)}));function bt(t,e){const n="string"==typeof t?l(t,!0,!0):null;if(!n){const e=function(t){try{const e="string"==typeof t?JSON.parse(t):t;if("string"==typeof e.body)return{...e}}catch(t){}}(t);return{value:t,data:e}}const i=j(n);if(void 0!==i||!n.prefix)return{value:t,name:n,data:i};const o=gt([n],(()=>e(t,n,j(n))));return{value:t,name:n,loading:o}}function yt(t){return t.hasAttribute("inline")}let vt=!1;try{vt=0===navigator.vendor.indexOf("Apple")}catch(t){}const xt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kt(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const i=t.split(xt);if(null===i||!i.length)return t;const o=[];let r=i.shift(),s=wt.test(r);for(;;){if(s){const t=parseFloat(r);isNaN(t)?o.push(r):o.push(Math.ceil(t*e*n)/n)}else o.push(r);if(r=i.shift(),void 0===r)return o.join("");s=!s}}const _t=t=>"unset"===t||"undefined"===t||"none"===t;function jt(t,e){const i={...n,...t},o={...r,...e},s={left:i.left,top:i.top,width:i.width,height:i.height};let c=i.body;[i,o].forEach((t=>{const e=[],n=t.hFlip,i=t.vFlip;let o,r=t.rotate;switch(n?i?r+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):i&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.push("scale(1 -1)"),s.top=s.left=0),r<0&&(r-=4*Math.floor(r/4)),r%=4,r){case 1:o=s.height/2+s.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:o=s.width/2+s.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}r%2==1&&(s.left!==s.top&&(o=s.left,s.left=s.top,s.top=o),s.width!==s.height&&(o=s.width,s.width=s.height,s.height=o)),e.length&&(c=function(t,e,n){const i=function(t,e="defs"){let n="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),r=t.indexOf("</"+e);if(-1===o||-1===r)break;const s=t.indexOf(">",r);if(-1===s)break;n+=t.slice(o+1,r).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:n,content:t}}(t);return o=i.defs,r=e+i.content+n,o?"<defs>"+o+"</defs>"+r:r;var o,r}(c,'<g transform="'+e.join(" ")+'">',"</g>"))}));const a=o.width,u=o.height,l=s.width,f=s.height;let d,h;null===a?(h=null===u?"1em":"auto"===u?f:u,d=kt(h,l/f)):(d="auto"===a?l:a,h=null===u?kt(d,f/l):"auto"===u?f:u);const p={},g=(t,e)=>{_t(e)||(p[t]=e.toString())};g("width",d),g("height",h);const m=[s.left,s.top,l,f];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:c}}function At(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Ot(t){return'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(t)+'")'}let Ct=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}})();function St(t){Ct=t}function Mt(){return Ct}const Tt={prepare:(t,e,n)=>{const i=[],o=function(t,e){const n=D(t);if(!n)return 0;let i;if(n.maxURL){let t=0;n.resources.forEach((e=>{const n=e;t=Math.max(t,n.length)}));const o=e+".json?icons=";i=n.maxURL-t-n.path.length-o.length}else i=0;return i}(t,e),r="icons";let s={type:r,provider:t,prefix:e,icons:[]},c=0;return n.forEach(((n,a)=>{c+=n.length+1,c>=o&&a>0&&(i.push(s),s={type:r,provider:t,prefix:e,icons:[]},c=n.length),s.icons.push(n)})),i.push(s),i},send:(t,e,n)=>{if(!Ct)return void n("abort",424);let i=function(t){if("string"==typeof t){const e=D(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");i+=t+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const t=e.uri;i+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let o=503;Ct(t+i).then((t=>{const e=t.status;if(200===e)return o=501,t.json();setTimeout((()=>{n(function(t){return 404===t}(e)?"abort":"next",e)}))})).then((t=>{"object"==typeof t&&null!==t?setTimeout((()=>{n("success",t)})):setTimeout((()=>{404===t?n("abort",t):n("next",o)}))})).catch((()=>{n("next",o)}))}};function It(t,e){switch(t){case"local":case"session":rt[t]=e;break;case"all":for(const t in rt)rt[t]=e}}const Et="data-style";let Ft="";function Lt(t){Ft=t}function Rt(t,e){let n=Array.from(t.childNodes).find((t=>t.hasAttribute&&t.hasAttribute(Et)));n||(n=document.createElement("style"),n.setAttribute(Et,Et),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+Ft}const Pt={"background-color":"currentColor"},Nt={"background-color":"transparent"},zt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Qt={"-webkit-mask":Pt,mask:Pt,background:Nt};for(const t in Qt){const e=Qt[t];for(const n in zt)e[t+"-"+n]=zt[n]}function Ht(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}let qt;function Dt(t){return void 0===qt&&function(){try{qt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){qt=null}}(),qt?qt.createHTML(t):t}function Ut(t,e){const i=e.icon.data,o=e.customisations,r=jt(i,o);o.preserveAspectRatio&&(r.attributes.preserveAspectRatio=o.preserveAspectRatio);const s=e.renderedMode;let c;if("svg"===s)c=function(t){const e=document.createElement("span"),n=t.attributes;let i="";n.width||(i="width: inherit;"),n.height||(i+="height: inherit;"),i&&(n.style=i);const o=At(t.body,n);return e.innerHTML=Dt(o),e.firstChild}(r);else c=function(t,e,n){const i=document.createElement("span");let o=t.body;-1!==o.indexOf("<a")&&(o+="\x3c!-- "+Date.now()+" --\x3e");const r=t.attributes,s=Ot(At(o,{...r,width:e.width+"",height:e.height+""})),c=i.style,a={"--svg":s,width:Ht(r.width),height:Ht(r.height),...n?Pt:Nt};for(const t in a)c.setProperty(t,a[t]);return i}(r,{...n,...i},"mask"===s);const a=Array.from(t.childNodes).find((t=>{const e=t.tagName&&t.tagName.toUpperCase();return"SPAN"===e||"SVG"===e}));a?"SPAN"===c.tagName&&a.tagName===c.tagName?a.setAttribute("style",c.getAttribute("style")):t.replaceChild(c,a):t.appendChild(c)}function Jt(t,e,n){return{rendered:!1,inline:e,icon:t,lastRender:n&&(n.rendered?n:n.lastRender)}}!function(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch(t){return}if(!e||!n)return;const i=e.get(t);if(i)return i;const o=["icon","mode","inline","width","height","rotate","flip"],r=class extends n{_shadowRoot;_initialised=!1;_state;_checkQueued=!1;constructor(){if(super(),this.getAttribute("icon"))this._init(),this._queueCheck();else try{if("complete"==document.readyState){const t=this.innerHTML;t&&(this._createShadowRoot().innerHTML=t)}else window.onload=()=>{if(!this.getAttribute("icon")){const t=this.innerHTML;t&&(this._createShadowRoot().innerHTML=t)}}}catch(t){}}_createShadowRoot(){return this._shadowRoot||(this._shadowRoot=this.attachShadow({mode:"open"})),this._shadowRoot}_init(){if(!this._initialised){this._initialised=!0;const t=this._createShadowRoot(),e=yt(this);Rt(t,e),this._state=Jt({value:""},e)}}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(t){if(this._init(),"inline"===t){const t=yt(this),e=this._state;t!==e.inline&&(e.inline=t,Rt(this._shadowRoot,t))}else this._queueCheck()}get icon(){const t=this.getAttribute("icon");if(t&&"{"===t.slice(0,1))try{return JSON.parse(t)}catch(t){}return t}set icon(t){"object"==typeof t&&(t=JSON.stringify(t)),this.setAttribute("icon",t)}get inline(){return yt(this)}set inline(t){t?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){this._init();const t=this._state;if(t.rendered){const e=this._shadowRoot;if("svg"===t.renderedMode)try{return void e.lastChild.setCurrentTime(0)}catch(t){}Ut(e,t)}}get status(){this._init();const t=this._state;return t.rendered?"rendered":null===t.icon.data?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout((()=>{this._check()})))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const t=this._state,e=this.getAttribute("icon");if(e!==t.icon.value)return void this._iconChanged(e);if(!t.rendered)return;const n=this.getAttribute("mode"),i=a(this);(t.attrMode!==n||function(t,e){for(const n in c)if(t[n]!==e[n])return!0;return!1}(t.customisations,i))&&this._renderIcon(t.icon,i,n)}_iconChanged(t){const e=bt(t,((t,e,n)=>{const i=this._state;if(i.rendered||this.getAttribute("icon")!==t)return;const o={value:t,name:e,data:n};o.data?this._gotIconData(o):i.icon=o}));e.data?this._gotIconData(e):this._state=Jt(e,this._state.inline,this._state)}_gotIconData(t){this._checkQueued=!1,this._renderIcon(t,a(this),this.getAttribute("mode"))}_renderIcon(t,e,n){const i=function(t,e){switch(e){case"svg":case"bg":case"mask":return e}return"style"===e||!vt&&-1!==t.indexOf("<a")?-1===t.indexOf("currentColor")?"bg":"mask":"svg"}(t.data.body,n),o=this._state.inline;Ut(this._shadowRoot,this._state={rendered:!0,icon:t,inline:o,customisations:e,attrMode:n,renderedMode:i})}};o.forEach((t=>{t in r.prototype||Object.defineProperty(r.prototype,t,{get:function(){return this.getAttribute(t)},set:function(e){null!==e?this.setAttribute(t,e):this.removeAttribute(t)}})}));const s=function(){let t;E("",Tt),_(!0);try{t=window}catch(t){}if(t){if(ft(),void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach((t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!O(t))&&console.error(n)}catch(t){console.error(n)}}))}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(const t in e){const n="IconifyProviders["+t+"] is invalid.";try{const i=e[t];if("object"!=typeof i||!i||void 0===i.resources)continue;q(t,i)||console.error(n)}catch(t){console.error(n)}}}}return{enableCache:t=>It(t,!0),disableCache:t=>It(t,!1),iconLoaded:C,iconExists:C,getIcon:S,listIcons:w,addIcon:A,addCollection:O,calculateSize:kt,buildIcon:jt,iconToHTML:At,svgToURL:Ot,loadIcons:gt,loadIcon:mt,addAPIProvider:q,appendCustomStyle:Lt,_api:{getAPIConfig:D,setAPIModule:E,sendAPIQuery:B,setFetch:St,getFetch:Mt,listAPIProviders:U}}}();for(const t in s)r[t]=r.prototype[t]=s[t];e.define(t,r)}()}();

@@ -5,3 +5,6 @@ {

"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
"version": "1.0.8",
"version": "1.1.0-beta.1",
"publishConfig": {
"tag": "next"
},
"license": "MIT",

@@ -46,20 +49,20 @@ "main": "./dist/iconify-icon.cjs",

"devDependencies": {
"@microsoft/api-extractor": "^7.35.1",
"@microsoft/api-extractor": "^7.36.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.3",
"@types/jest": "^29.5.2",
"@types/jest": "^29.5.3",
"@types/jsdom": "^21.1.1",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@types/node": "^18.17.1",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"cross-env": "^7.0.3",
"eslint": "^8.42.0",
"jest": "^29.5.0",
"jsdom": "^21.1.2",
"rimraf": "^4.4.1",
"rollup": "^3.23.1",
"ts-jest": "^29.1.0",
"typescript": "^5.1.3",
"@iconify/core": "^2.0.1",
"@iconify/utils": "^2.1.6"
"eslint": "^8.46.0",
"jest": "^29.6.2",
"jsdom": "^22.1.0",
"rimraf": "^5.0.1",
"rollup": "^3.27.0",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6",
"@iconify/core": "^2.0.2",
"@iconify/utils": "^2.1.15"
},

@@ -66,0 +69,0 @@ "scripts": {

@@ -10,3 +10,3 @@ # What is Iconify?

- Unified icon framework that can be used with any icon library.
- Out of the box includes 100+ icon sets with more than 150,000 icons.
- Out of the box includes 150+ icon sets with more than 200,000 icons.
- Embed icons in HTML with Iconify icon web component and components for various front-end frameworks.

@@ -24,3 +24,3 @@ - Embed icons in designs with plug-ins for Figma, Sketch and Adobe XD.

```html
<script src="https://code.iconify.design/iconify-icon/1.0.8/iconify-icon.min.js"></script>
<script src="https://code.iconify.design/iconify-icon/1.1.0-beta.1/iconify-icon.min.js"></script>
```

@@ -31,3 +31,3 @@

```html
<script src="https://cdn.jsdelivr.net/npm/iconify-icon@1.0.8/dist/iconify-icon.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/iconify-icon@1.1.0-beta.1/dist/iconify-icon.min.js"></script>
```

@@ -49,3 +49,3 @@

That is it. Change `icon` attribute to the name of the icon you want to use. There are over 150,000 premade icons to choose from, including Material Symbols, Photphor, Remix Icons, Carbon, Unicons, Bootstrap Icons and even several emoji sets.
That is it. Change `icon` attribute to the name of the icon you want to use. There are over 200,000 premade icons to choose from, including Material Symbols, Photphor, Remix Icons, Carbon, Unicons, Bootstrap Icons and even several emoji sets.

@@ -263,3 +263,3 @@ Do you want to make your own icon sets? Everything you need is [available on GitHub](https://github.com/iconify): tools for creating custom icon sets, Iconify API application and documentation to help you.

There are over 150,000 icons to choose from.
There are over 200,000 icons to choose from.

@@ -266,0 +266,0 @@ Few popular icon sets (monotone icons):

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc