@iconify/iconify
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -10,4 +10,4 @@ /** | ||
* @license MIT | ||
* @version 3.1.0 | ||
* @version 3.1.1 | ||
*/ | ||
var Iconify=function(e){"use strict";var n=Object.freeze({left:0,top:0,width:16,height:16}),t=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),r=Object.freeze(Object.assign({},n,t)),i=Object.freeze(Object.assign({},r,{body:"",hidden:!1}));function o(e,n){var r=function(e,n){var t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);var r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}(e,n);for(var o in i)o in t?o in e&&!(o in r)&&(r[o]=t[o]):o in n?r[o]=n[o]:o in e&&(r[o]=e[o]);return r}function a(e,n,t){var r=e.icons,i=e.aliases||Object.create(null),a={};function c(e){a=o(r[e]||i[e],a)}return c(n),t.forEach(c),o(e,a)}function c(e,n){var t=[];if("object"!=typeof e||"object"!=typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((function(e){n(e,null),t.push(e)}));var r=function(e,n){var t=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(r))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;var o=r[n]&&r[n].parent,a=o&&e(o);a&&(i[n]=[o].concat(a))}return i[n]})),i}(e);for(var i in r){var o=r[i];o&&(n(i,a(e,i,o)),t.push(i))}return t}var u=/^[a-z0-9]+(-[a-z0-9]+)*$/,f=function(e,n,t,r){void 0===r&&(r="");var i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){var o=i.pop(),a=i.pop(),c={provider:i.length>0?i[0]:r,prefix:a,name:o};return n&&!s(c)?null:c}var u=i[0],f=u.split("-");if(f.length>1){var d={provider:r,prefix:f.shift(),name:f.join("-")};return n&&!s(d)?null:d}if(t&&""===r){var l={provider:r,prefix:"",name:u};return n&&!s(l,t)?null:l}return null},s=function(e,n){return!!e&&!(""!==e.provider&&!e.provider.match(u)||!(n&&""===e.prefix||e.prefix.match(u))||!e.name.match(u))},d=Object.assign({},{provider:"",aliases:{},not_found:{}},n);function l(e,n){for(var t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function v(e){if("object"!=typeof e||null===e)return null;var n=e;if("string"!=typeof n.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!l(e,d))return null;var t=n.icons;for(var r in t){var o=t[r];if(!r.match(u)||"string"!=typeof o.body||!l(o,i))return null}var a=n.aliases||Object.create(null);for(var c in a){var f=a[c],s=f.parent;if(!c.match(u)||"string"!=typeof s||!t[s]&&!a[s]||!l(f,i))return null}return n}var p=Object.create(null);function h(e,n){var t=p[e]||(p[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function g(e,n){return v(n)?c(n,(function(n,t){t?e.icons[n]=t:e.missing.add(n)})):[]}function b(e,n){var t=[];return("string"==typeof e?[e]:Object.keys(p)).forEach((function(e){("string"==typeof e&&"string"==typeof n?[n]:Object.keys(p[e]||{})).forEach((function(n){var r=h(e,n);t=t.concat(Object.keys(r.icons).map((function(t){return(""!==e?"@"+e+":":"")+n+":"+t})))}))})),t}var m=!1;function y(e){var n="string"==typeof e?f(e,!0,m):e;if(n){var t=h(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function x(e,n){var t=f(e,!0,m);return!!t&&function(e,n,t){try{if("string"==typeof t.body)return e.icons[n]=Object.assign({},t),!0}catch(e){}return!1}(h(t.provider,t.prefix),t.name,n)}function j(e,n){if("object"!=typeof e)return!1;if("string"!=typeof n&&(n=e.provider||""),m&&!n&&!e.prefix){var t=!1;return v(e)&&(e.prefix="",c(e,(function(e,n){n&&x(e,n)&&(t=!0)}))),t}var r=e.prefix;return!!s({provider:n,prefix:r,name:"a"})&&!!g(h(n,r),e)}function w(e){return!!y(e)}function O(e){var n=y(e);return n?Object.assign({},r,n):null}var S=Object.freeze({width:null,height:null}),E=Object.freeze(Object.assign({},S,t)),I=/(-?[0-9.]*[0-9]+[0-9.]*)/g,k=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(e,n,t){if(1===n)return e;if(t=t||100,"number"==typeof e)return Math.ceil(e*n*t)/t;if("string"!=typeof e)return e;var r=e.split(I);if(null===r||!r.length)return e;for(var i=[],o=r.shift(),a=k.test(o);;){if(a){var c=parseFloat(o);isNaN(c)?i.push(o):i.push(Math.ceil(c*n*t)/t)}else i.push(o);if(void 0===(o=r.shift()))return i.join("");a=!a}}function M(e,n){var t=Object.assign({},r,e),i=Object.assign({},E,n),o={left:t.left,top:t.top,width:t.width,height:t.height},a=t.body;[t,i].forEach((function(e){var n,t=[],r=e.hFlip,i=e.vFlip,c=e.rotate;switch(r?i?c+=2:(t.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),t.push("scale(-1 1)"),o.top=o.left=0):i&&(t.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),t.push("scale(1 -1)"),o.top=o.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:n=o.height/2+o.top,t.unshift("rotate(90 "+n.toString()+" "+n.toString()+")");break;case 2:t.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:n=o.width/2+o.left,t.unshift("rotate(-90 "+n.toString()+" "+n.toString()+")")}c%2==1&&(o.left!==o.top&&(n=o.left,o.left=o.top,o.top=n),o.width!==o.height&&(n=o.width,o.width=o.height,o.height=n)),t.length&&(a='<g transform="'+t.join(" ")+'">'+a+"</g>")}));var c,u,f=i.width,s=i.height,d=o.width,l=o.height;null===f?c=C(u=null===s?"1em":"auto"===s?l:s,d/l):(c="auto"===f?d:f,u=null===s?C(c,l/d):"auto"===s?l:s);var v={},p=function(e,n){(function(e){return"unset"===e||"undefined"===e||"none"===e})(n)||(v[e]=n.toString())};return p("width",c),p("height",u),v.viewBox=o.left.toString()+" "+o.top.toString()+" "+d.toString()+" "+l.toString(),{attributes:v,body:a}}var T=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),F=0;function L(e,n){void 0===n&&(n=A);for(var t,r=[];t=T.exec(e);)r.push(t[1]);if(!r.length)return e;var i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((function(t){var r="function"==typeof n?n(t):n+(F++).toString(),o=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")})),e=e.replace(new RegExp(i,"g"),"")}var P={local:!0,session:!0},N={local:new Set,session:new Set},z=!1;var _="iconify2",D="iconify",R="iconify-count",$="iconify-version",q=36e5;function U(e,n){try{return e.getItem(n)}catch(e){}}function V(e,n,t){try{return e.setItem(n,t),!0}catch(e){}}function H(e,n){try{e.removeItem(n)}catch(e){}}function Q(e,n){return V(e,R,n.toString())}function G(e){return parseInt(U(e,R))||0}var J="undefined"==typeof window?{}:window;function B(e){var n=e+"Storage";try{if(J&&J[n]&&"number"==typeof J[n].length)return J[n]}catch(e){}P[e]=!1}function K(e,n){var t=B(e);if(t){var r=U(t,$);if(r!==_){if(r)for(var i=G(t),o=0;o<i;o++)H(t,D+o.toString());return V(t,$,_),void Q(t,0)}for(var a=Math.floor(Date.now()/q)-168,c=function(e){var r=D+e.toString(),i=U(t,r);if("string"==typeof i){try{var o=JSON.parse(i);if("object"==typeof o&&"number"==typeof o.cached&&o.cached>a&&"string"==typeof o.provider&&"object"==typeof o.data&&"string"==typeof o.data.prefix&&n(o,e))return!0}catch(e){}H(t,r)}},u=G(t),f=u-1;f>=0;f--)c(f)||(f===u-1?(u--,Q(t,u)):N[e].add(f))}}function W(){if(!z)for(var e in z=!0,P)K(e,(function(e){var n=e.data,t=h(e.provider,n.prefix);if(!g(t,n).length)return!1;var r=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,r):r,!0}))}function X(e,n){switch(e){case"local":case"session":P[e]=n;break;case"all":for(var t in P)P[t]=n}}var Y=Object.create(null);function Z(e,n){Y[e]=n}function ee(e){return Y[e]||Y[""]}function ne(e){var n;if("string"==typeof e.resources)n=[e.resources];else if(!((n=e.resources)instanceof Array&&n.length))return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}for(var te=Object.create(null),re=["https://api.simplesvg.com","https://api.unisvg.com"],ie=[];re.length>0;)1===re.length||Math.random()>.5?ie.push(re.shift()):ie.push(re.pop());function oe(e,n){var t=ne(n);return null!==t&&(te[e]=t,!0)}function ae(e){return te[e]}te[""]=ne({resources:["https://api.iconify.design"].concat(ie)});var ce=function(){var e;try{if("function"==typeof(e=fetch))return e}catch(e){}}();var ue={prepare:function(e,n,t){var r=[],i=function(e,n){var t,r=ae(e);if(!r)return 0;if(r.maxURL){var i=0;r.resources.forEach((function(e){var n=e;i=Math.max(i,n.length)}));var o=n+".json?icons=";t=r.maxURL-i-r.path.length-o.length}else t=0;return t}(e,n),o="icons",a={type:o,provider:e,prefix:n,icons:[]},c=0;return t.forEach((function(t,u){(c+=t.length+1)>=i&&u>0&&(r.push(a),a={type:o,provider:e,prefix:n,icons:[]},c=t.length),a.icons.push(t)})),r.push(a),r},send:function(e,n,t){if(ce){var r=function(e){if("string"==typeof e){var n=ae(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":var i=n.prefix,o=n.icons.join(",");r+=i+".json?"+new URLSearchParams({icons:o}).toString();break;case"custom":var a=n.uri;r+="/"===a.slice(0,1)?a.slice(1):a;break;default:return void t("abort",400)}var c=503;ce(e+r).then((function(e){var n=e.status;if(200===n)return c=501,e.json();setTimeout((function(){t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((function(e){"object"==typeof e&&null!==e?setTimeout((function(){t("success",e)})):setTimeout((function(){404===e?t("abort",e):t("next",c)}))})).catch((function(){t("next",c)}))}else t("abort",424)}};function fe(e,n){e.forEach((function(e){var t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((function(e){return e.id!==n})))}))}var se=0;var de={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function le(e,n,t,r){var i,o=e.resources.length,a=e.random?Math.floor(Math.random()*o):e.index;if(e.random){var c=e.resources.slice(0);for(i=[];c.length>1;){var u=Math.floor(Math.random()*c.length);i.push(c[u]),c=c.slice(0,u).concat(c.slice(u+1))}i=i.concat(c)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));var f,s=Date.now(),d="pending",l=0,v=null,p=[],h=[];function g(){v&&(clearTimeout(v),v=null)}function b(){"pending"===d&&(d="aborted"),g(),p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function m(e,n){n&&(h=[]),"function"==typeof e&&h.push(e)}function y(){d="failed",h.forEach((function(e){e(void 0,f)}))}function x(){p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function j(){if("pending"===d){g();var r=i.shift();if(void 0===r)return p.length?void(v=setTimeout((function(){g(),"pending"===d&&(x(),y())}),e.timeout)):void y();var o={status:"pending",resource:r,callback:function(n,t){!function(n,t,r){var o="success"!==t;switch(p=p.filter((function(e){return e!==n})),d){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return f=r,void y();if(o)return f=r,void(p.length||(i.length?j():y()));if(g(),x(),!e.random){var a=e.resources.indexOf(n.resource);-1!==a&&a!==e.index&&(e.index=a)}d="completed",h.forEach((function(e){e(r)}))}(o,n,t)}};p.push(o),l++,v=setTimeout(j,e.rotate),t(r,n,o.callback)}}return"function"==typeof r&&h.push(r),setTimeout(j),function(){return{startTime:s,payload:n,status:d,queriesSent:l,queriesPending:p.length,subscribe:m,abort:b}}}function ve(e){var n=Object.assign({},de,e),t=[];function r(){t=t.filter((function(e){return"pending"===e().status}))}var i={query:function(e,i,o){var a=le(n,e,i,(function(e,n){r(),o&&o(e,n)}));return t.push(a),a},find:function(e){return t.find((function(n){return e(n)}))||null},setIndex:function(e){n.index=e},getIndex:function(){return n.index},cleanup:r};return i}function pe(){}var he=Object.create(null);function ge(e,n,t){var r,i;if("string"==typeof e){var o=ee(e);if(!o)return t(void 0,424),pe;i=o.send;var a=function(e){if(!he[e]){var n=ae(e);if(!n)return;var t={config:n,redundancy:ve(n)};he[e]=t}return he[e]}(e);a&&(r=a.redundancy)}else{var c=ne(e);if(c){r=ve(c);var u=ee(e.resources?e.resources[0]:"");u&&(i=u.send)}}return r&&i?r.query(n,i,t)().abort:(t(void 0,424),pe)}function be(e,n){function t(t){var r;if(P[t]&&(r=B(t))){var i,o=N[t];if(o.size)o.delete(i=Array.from(o).shift());else if(!Q(r,(i=G(r))+1))return;var a={cached:Math.floor(Date.now()/q),provider:e.provider,data:n};return V(r,D+i.toString(),JSON.stringify(a))}}z||W(),n.lastModified&&!function(e,n){var t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(var r in P)K(r,(function(t){var r=t.data;return t.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===n}));return!0}(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))}function me(){}function ye(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((function(){e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((function(){e.pendingCallbacksFlag=!1;var n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(n.length){var t=!1,r=e.provider,i=e.prefix;n.forEach((function(n){var o=n.icons,a=o.pending.length;o.pending=o.pending.filter((function(n){if(n.prefix!==i)return!0;var a=n.name;if(e.icons[a])o.loaded.push({provider:r,prefix:i,name:a});else{if(!e.missing.has(a))return t=!0,!0;o.missing.push({provider:r,prefix:i,name:a})}return!1})),o.pending.length!==a&&(t||fe([e],n.id),n.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),n.abort))}))}})))}(e)})))}var xe=function(e,n){var t,r=function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t=!1);var r=[];return e.forEach((function(e){var i="string"==typeof e?f(e,n,t):e;i&&r.push(i)})),r}(e,!0,("boolean"==typeof t&&(m=t),m)),i=function(e){var n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((function(e,n){return e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)}));var r={provider:"",prefix:"",name:""};return e.forEach((function(e){if(r.name!==e.name||r.prefix!==e.prefix||r.provider!==e.provider){r=e;var i=e.provider,o=e.prefix,a=e.name,c=t[i]||(t[i]=Object.create(null)),u=c[o]||(c[o]=h(i,o)),f={provider:i,prefix:o,name:a};(a in u.icons?n.loaded:""===o||u.missing.has(a)?n.missing:n.pending).push(f)}})),n}(r);if(!i.pending.length){var o=!0;return n&&setTimeout((function(){o&&n(i.loaded,i.missing,i.pending,me)})),function(){o=!1}}var a,c,u=Object.create(null),s=[];return i.pending.forEach((function(e){var n=e.provider,t=e.prefix;if(t!==c||n!==a){a=n,c=t,s.push(h(n,t));var r=u[n]||(u[n]=Object.create(null));r[t]||(r[t]=[])}})),i.pending.forEach((function(e){var n=e.provider,t=e.prefix,r=e.name,i=h(n,t),o=i.pendingIcons||(i.pendingIcons=new Set);o.has(r)||(o.add(r),u[n][t].push(r))})),s.forEach((function(e){var n=e.provider,t=e.prefix;u[n][t].length&&function(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((function(){e.iconsQueueFlag=!1;var n,t=e.provider,r=e.prefix,i=e.iconsToLoad;delete e.iconsToLoad,i&&(n=ee(t))&&n.prepare(t,r,i).forEach((function(n){ge(t,n,(function(t){if("object"!=typeof t)n.icons.forEach((function(n){e.missing.add(n)}));else try{var r=g(e,t);if(!r.length)return;var i=e.pendingIcons;i&&r.forEach((function(e){i.delete(e)})),be(e,t)}catch(e){console.error(e)}ye(e)}))}))})))}(e,u[n][t])})),n?function(e,n,t){var r=se++,i=fe.bind(null,t,r);if(!n.pending.length)return i;var o={id:r,icons:n,callback:e,abort:i};return t.forEach((function(e){(e.loaderCallbacks||(e.loaderCallbacks=[])).push(o)})),i}(n,i,s):me},je=function(e){return new Promise((function(n,t){var i="string"==typeof e?f(e,!0):e;i?xe([i||e],(function(o){if(o.length&&i){var a=y(i);if(a)return void n(Object.assign({},r,a))}t(e)})):t(e)}))};function we(e,n){var t=Object.assign({},e);for(var r in n){var i=n[r],o=typeof i;r in S?(null===i||i&&("string"===o||"number"===o))&&(t[r]=i):o===typeof t[r]&&(t[r]="rotate"===r?i%4:i)}return t}var Oe=Object.assign({},E,{inline:!1}),Se="iconify-inline",Ee="iconifyData"+Date.now(),Ie=[];function ke(e){for(var n=0;n<Ie.length;n++){var t=Ie[n];if(("function"==typeof t.node?t.node():t.node)===e)return t}}function Ce(e,n){void 0===n&&(n=!1);var t=ke(e);return t?(t.temporary&&(t.temporary=n),t):(t={node:e,temporary:n},Ie.push(t),t)}function Me(){return Ie}var Te=null,Ae={childList:!0,subtree:!0,attributes:!0};function Fe(e){if(e.observer){var n=e.observer;n.pendingScan||(n.pendingScan=setTimeout((function(){delete n.pendingScan,Te&&Te(e)})))}}function Le(e,n){if(e.observer){var t=e.observer;if(!t.pendingScan)for(var r=0;r<n.length;r++){var i=n[r];if(i.addedNodes&&i.addedNodes.length>0||"attributes"===i.type&&void 0!==i.target[Ee])return void(t.paused||Fe(e))}}}function Pe(e,n){e.observer.instance.observe(n,Ae)}function Ne(e){var n=e.observer;if(!n||!n.instance){var t="function"==typeof e.node?e.node():e.node;t&&window&&(n||(n={paused:0},e.observer=n),n.instance=new window.MutationObserver(Le.bind(null,e)),Pe(e,t),n.paused||Fe(e))}}function ze(){Me().forEach(Ne)}function _e(e){if(e.observer){var n=e.observer;n.pendingScan&&(clearTimeout(n.pendingScan),delete n.pendingScan),n.instance&&(n.instance.disconnect(),delete n.instance)}}function De(e){var n=null!==Te;Te!==e&&(Te=e,n&&Me().forEach(_e)),n?ze():function(e){var n=document;n.readyState&&"loading"!==n.readyState?e():n.addEventListener("DOMContentLoaded",e)}(ze)}function Re(e){(e?[e]:Me()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused++,!(n.paused>1)&&n.instance)n.instance.disconnect()}else e.observer={paused:1}}))}function $e(e){if(e){var n=ke(e);n&&Re(n)}else Re()}function qe(e){(e?[e]:Me()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused&&(n.paused--,!n.paused)){var t="function"==typeof e.node?e.node():e.node;if(!t)return;n.instance?Pe(e,t):Ne(e)}}else Ne(e)}))}function Ue(e){if(e){var n=ke(e);n&&qe(n)}else qe()}function Ve(e,n){void 0===n&&(n=!1);var t=Ce(e,n);return Ne(t),t}function He(e){var n=ke(e);n&&(_e(n),function(e){Ie=Ie.filter((function(n){return e!==n&&e!==("function"==typeof n.node?n.node():n.node)}))}(e))}var Qe=/[\s,]+/;var Ge=["width","height"],Je=["inline","hFlip","vFlip"];function Be(e){var n=e.getAttribute("data-icon"),t="string"==typeof n&&f(n,!0);if(!t)return null;var r=Object.assign({},Oe,{inline:e.classList&&e.classList.contains(Se)});Ge.forEach((function(n){var t=e.getAttribute("data-"+n);t&&(r[n]=t)}));var i=e.getAttribute("data-rotate");"string"==typeof i&&(r.rotate=function(e,n){void 0===n&&(n=0);var t=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===t){var i=parseInt(e);return isNaN(i)?0:r(i)}if(t!==e){var o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){var a=parseFloat(e.slice(0,e.length-t.length));return isNaN(a)?0:(a/=o)%1==0?r(a):0}}return n}(i));var o=e.getAttribute("data-flip");"string"==typeof o&&function(e,n){n.split(Qe).forEach((function(n){switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}}))}(r,o),Je.forEach((function(n){var t="data-"+n,i=function(e,n){return e===n||"true"===e||""!==e&&"false"!==e&&null}(e.getAttribute(t),t);"boolean"==typeof i&&(r[n]=i)}));var a=e.getAttribute("data-mode");return{name:n,icon:t,customisations:r,mode:a}}function Ke(e,n){var t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function We(e){var n=new Set(["iconify"]);return["provider","prefix"].forEach((function(t){e[t]&&n.add("iconify--"+e[t])})),n}function Xe(e,n,t,r){var i=e.classList;if(r){var o=r.classList;Array.from(o).forEach((function(e){i.add(e)}))}var a=[];return n.forEach((function(e){i.contains(e)?t.has(e)&&a.push(e):(i.add(e),a.push(e))})),t.forEach((function(e){n.has(e)||i.remove(e)})),a}function Ye(e,n,t){var r=e.style;(t||[]).forEach((function(e){r.removeProperty(e)}));var i=[];for(var o in n)r.getPropertyValue(o)||(i.push(o),r.setProperty(o,n[o]));return i}function Ze(e,n,t){var r;try{r=document.createElement("span")}catch(n){return e}var i=n.customisations,o=M(t,i),a=e[Ee],c=Ke(L(o.body),Object.assign({},{"aria-hidden":"true",role:"img"},o.attributes));r.innerHTML=c;for(var u=r.childNodes[0],f=e.attributes,s=0;s<f.length;s++){var d=f.item(s),l=d.name;"class"===l||u.hasAttribute(l)||u.setAttribute(l,d.value)}var v=Xe(u,We(n.icon),new Set(a&&a.addedClasses),e),p=Ye(u,i.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),h=Object.assign({},n,{status:"loaded",addedClasses:v,addedStyles:p});return u[Ee]=h,e.parentNode&&e.parentNode.replaceChild(u,e),u}var en={display:"inline-block"},nn={"background-color":"currentColor"},tn={"background-color":"transparent"},rn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},on={"-webkit-mask":nn,mask:nn,background:tn};for(var an in on){var cn=on[an];for(var un in rn)cn[an+"-"+un]=rn[un]}function fn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}var sn=!1;function dn(){sn||(sn=!0,setTimeout((function(){sn&&(sn=!1,ln())})))}function ln(e,n){void 0===n&&(n=!1);var t=Object.create(null);function i(e,n){var r=e.provider,i=e.prefix,o=e.name,a=h(r,i),c=a.icons[o];if(c)return{status:"loaded",icon:c};if(a.missing.has(o))return{status:"missing"};if(n&&!function(e){var n=h(e.provider,e.prefix).pendingIcons;return!(!n||!n.has(e.name))}(e)){var u=t[r]||(t[r]=Object.create(null));(u[i]||(u[i]=new Set)).add(o)}return{status:"loading"}}(e?[e]:Me()).forEach((function(e){var t="function"==typeof e.node?e.node():e.node;if(t&&t.querySelectorAll){var o=!1,a=!1;(function(e){var n=[];return e.querySelectorAll("svg.iconify, i.iconify, span.iconify, i.iconify-inline, span.iconify-inline").forEach((function(e){var t=e[Ee]||"svg"!==e.tagName.toLowerCase()?Be(e):null;t&&n.push({node:e,props:t})})),n})(t).forEach((function(e){var n,t=e.node,r=e.props,a=t[Ee];if(!a){var u=i(r.icon,!0),f=u.status,s=u.icon;return s?void c(t,r,s):(o=o||"loading"===f,void(t[Ee]=Object.assign({},r,{status:f})))}if(function(e,n){if(e.name!==n.name||e.mode!==n.mode)return!0;var t=e.customisations,r=n.customisations;for(var i in Oe)if(t[i]!==r[i])return!0;return!1}(a,r)){if(!(n=i(r.icon,a.name!==r.name)).icon)return o=o||"loading"===n.status,void Object.assign(a,Object.assign({},r,{status:n.status}))}else{if("loading"!==a.status)return;if(!(n=i(r.icon,!1)).icon)return void(a.status=n.status)}c(t,r,n.icon)})),e.temporary&&!o?He(t):n&&o?Ve(t,!0):a&&e.observer&&qe(e)}function c(n,t,i){if(a||(a=!0,Re(e)),"SVG"!==n.tagName.toUpperCase()){var o=t.mode,c="mask"===o||"bg"!==o&&("style"===o?-1!==i.body.indexOf("currentColor"):null);if("boolean"==typeof c)return void function(e,n,t,r){var i=n.customisations,o=M(t,i),a=o.attributes,c=e[Ee],u=Ke(o.body,Object.assign({},a,{width:t.width+"",height:t.height+""})),f=Xe(e,We(n.icon),new Set(c&&c.addedClasses)),s='url("data:image/svg+xml,'+(l=u,l.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")+'")'),d=Object.assign({},{"--svg":s,width:fn(a.width),height:fn(a.height)},en,r?nn:tn);var l;i.inline&&(d["vertical-align"]="-0.125em");var v=Ye(e,d,c&&c.addedStyles),p=Object.assign({},n,{status:"loaded",addedClasses:f,addedStyles:v});e[Ee]=p}(n,t,Object.assign({},r,i),c)}Ze(n,t,i)}}));var o=function(e){var n=t[e],r=function(t){var r=n[t];xe(Array.from(r).map((function(n){return{provider:e,prefix:t,name:n}})),dn)};for(var i in n)r(i)};for(var a in t)o(a)}function vn(e,n,t){void 0===t&&(t=!1);var r=y(e);if(!r)return null;var i=f(e),o=we(Oe,n||{}),a=Ze(document.createElement("span"),{name:e,icon:i,customisations:o},r);return t?a.outerHTML:a}function pn(){return"3.1.0"}function hn(e,n){return vn(e,n,!1)}function gn(e,n){return vn(e,n,!0)}function bn(e,n){var t=y(e);return t?M(t,we(Oe,n||{})):null}function mn(e){e?function(e){var n=ke(e);n?ln(n):ln({node:e,temporary:!0},!0)}(e):ln()}if("undefined"!=typeof document&&"undefined"!=typeof window){!function(){if(document.documentElement)return Ce(document.documentElement);Ie.push({node:function(){return document.documentElement}})}();var yn=window;if(void 0!==yn.IconifyPreload){var xn=yn.IconifyPreload,jn="Invalid IconifyPreload syntax.";"object"==typeof xn&&null!==xn&&(xn instanceof Array?xn:[xn]).forEach((function(e){try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!j(e))&&console.error(jn)}catch(e){console.error(jn)}}))}setTimeout((function(){De(ln),ln()}))}function wn(e,n){X(e,!1!==n)}function On(e){X(e,!0)}if(Z("",ue),"undefined"!=typeof document&&"undefined"!=typeof window){W();var Sn=window;if(void 0!==Sn.IconifyProviders){var En=Sn.IconifyProviders;if("object"==typeof En&&null!==En)for(var In in En){var kn="IconifyProviders["+In+"] is invalid.";try{var Cn=En[In];if("object"!=typeof Cn||!Cn||void 0===Cn.resources)continue;oe(In,Cn)||console.error(kn)}catch(e){console.error(kn)}}}}var Mn={getAPIConfig:ae,setAPIModule:Z,sendAPIQuery:ge,setFetch:function(e){ce=e},getFetch:function(){return ce},listAPIProviders:function(){return Object.keys(te)}},Tn={_api:Mn,addAPIProvider:oe,loadIcons:xe,loadIcon:je,iconExists:w,getIcon:O,listIcons:b,addIcon:x,addCollection:j,replaceIDs:L,calculateSize:C,buildIcon:M,getVersion:pn,renderSVG:hn,renderHTML:gn,renderIcon:bn,scan:mn,observe:Ve,stopObserving:He,pauseObserver:$e,resumeObserver:Ue,enableCache:wn,disableCache:On};return e._api=Mn,e.addAPIProvider=oe,e.addCollection=j,e.addIcon=x,e.buildIcon=M,e.calculateSize=C,e.default=Tn,e.disableCache=On,e.enableCache=wn,e.getIcon=O,e.getVersion=pn,e.iconExists=w,e.listIcons=b,e.loadIcon=je,e.loadIcons=xe,e.observe=Ve,e.pauseObserver=$e,e.renderHTML=gn,e.renderIcon=bn,e.renderSVG=hn,e.replaceIDs=L,e.resumeObserver=Ue,e.scan=mn,e.stopObserving=He,Object.defineProperty(e,"__esModule",{value:!0}),e}({});if("object"==typeof exports)try{for(var key in exports.__esModule=!0,exports.default=Iconify,Iconify)exports[key]=Iconify[key]}catch(e){}try{void 0===self.Iconify&&(self.Iconify=Iconify)}catch(e){} | ||
var Iconify=function(t){"use strict";const e=Object.freeze({left:0,top:0,width:16,height:16}),n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...e,...n}),r=Object.freeze({...o,body:"",hidden:!1});function i(t,e){const o=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,e);for(const i in r)i in n?i in t&&!(i in o)&&(o[i]=n[i]):i in e?o[i]=e[i]:i in t&&(o[i]=t[i]);return o}function c(t,e,n){const o=t.icons,r=t.aliases||Object.create(null);let c={};function s(t){c=i(o[t]||r[t],c)}return s(e),n.forEach(s),i(t,c)}function s(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),r=Object.create(null);return(e||Object.keys(n).concat(Object.keys(o))).forEach((function t(e){if(n[e])return r[e]=[];if(!(e in r)){r[e]=null;const n=o[e]&&o[e].parent,i=n&&t(n);i&&(r[e]=[n].concat(i))}return r[e]})),r}(t);for(const r in o){const i=o[r];i&&(e(r,c(t,r,i)),n.push(r))}return n}const a=/^[a-z0-9]+(-[a-z0-9]+)*$/,u=(t,e,n,o="")=>{const r=t.split(":");if("@"===t.slice(0,1)){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const t=r.pop(),n=r.pop(),i={provider:r.length>0?r[0]:o,prefix:n,name:t};return e&&!f(i)?null:i}const i=r[0],c=i.split("-");if(c.length>1){const t={provider:o,prefix:c.shift(),name:c.join("-")};return e&&!f(t)?null:t}if(n&&""===o){const t={provider:o,prefix:"",name:i};return e&&!f(t,n)?null:t}return null},f=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(a)||!(e&&""===t.prefix||t.prefix.match(a))||!t.name.match(a)),l={provider:"",aliases:{},not_found:{},...e};function d(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function p(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(!d(t,l))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(a)||"string"!=typeof e.body||!d(e,r))return null}const o=e.aliases||Object.create(null);for(const t in o){const e=o[t],i=e.parent;if(!t.match(a)||"string"!=typeof i||!n[i]&&!o[i]||!d(e,r))return null}return e}const h=Object.create(null);function g(t,e){const n=h[t]||(h[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 m(t,e){return p(e)?s(e,((e,n)=>{n?t.icons[e]=n:t.missing.add(e)})):[]}function y(t,e){let n=[];return("string"==typeof t?[t]:Object.keys(h)).forEach((t=>{("string"==typeof t&&"string"==typeof e?[e]:Object.keys(h[t]||{})).forEach((e=>{const o=g(t,e);n=n.concat(Object.keys(o.icons).map((n=>(""!==t?"@"+t+":":"")+e+":"+n)))}))})),n}let b=!1;function v(t){const e="string"==typeof t?u(t,!0,b):t;if(e){const t=g(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function x(t,e){const n=u(t,!0,b);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}(g(n.provider,n.prefix),n.name,e)}function w(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),b&&!e&&!t.prefix){let e=!1;return p(t)&&(t.prefix="",s(t,((t,n)=>{n&&x(t,n)&&(e=!0)}))),e}const n=t.prefix;if(!f({provider:e,prefix:n,name:"a"}))return!1;return!!m(g(e,n),t)}function S(t){return!!v(t)}function j(t){const e=v(t);return e?{...o,...e}:null}const E=Object.freeze({width:null,height:null}),I=Object.freeze({...E,...n}),O=/(-?[0-9.]*[0-9]+[0-9.]*)/g,k=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(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(O);if(null===o||!o.length)return t;const r=[];let i=o.shift(),c=k.test(i);for(;;){if(c){const t=parseFloat(i);isNaN(t)?r.push(i):r.push(Math.ceil(t*e*n)/n)}else r.push(i);if(i=o.shift(),void 0===i)return r.join("");c=!c}}const M=t=>"unset"===t||"undefined"===t||"none"===t;function T(t,e){const n={...o,...t},r={...I,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let c=n.body;[n,r].forEach((t=>{const e=[],n=t.hFlip,o=t.vFlip;let r,s=t.rotate;switch(n?o?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):o&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:r=i.height/2+i.top,e.unshift("rotate(90 "+r.toString()+" "+r.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:r=i.width/2+i.left,e.unshift("rotate(-90 "+r.toString()+" "+r.toString()+")")}s%2==1&&(i.left!==i.top&&(r=i.left,i.left=i.top,i.top=r),i.width!==i.height&&(r=i.width,i.width=i.height,i.height=r)),e.length&&(c='<g transform="'+e.join(" ")+'">'+c+"</g>")}));const s=r.width,a=r.height,u=i.width,f=i.height;let l,d;null===s?(d=null===a?"1em":"auto"===a?f:a,l=C(d,u/f)):(l="auto"===s?u:s,d=null===a?C(l,f/u):"auto"===a?f:a);const p={},h=(t,e)=>{M(e)||(p[t]=e.toString())};return h("width",l),h("height",d),p.viewBox=i.left.toString()+" "+i.top.toString()+" "+u.toString()+" "+f.toString(),{attributes:p,body:c}}const L=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let F=0;function P(t,e=A){const n=[];let o;for(;o=L.exec(t);)n.push(o[1]);if(!n.length)return t;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach((n=>{const o="function"==typeof e?e(n):e+(F++).toString(),i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")})),t=t.replace(new RegExp(r,"g"),"")}const N={local:!0,session:!0},z={local:new Set,session:new Set};let _=!1;const D="iconify2",R="iconify",$=R+"-count",q=R+"-version",H=36e5,U=168;function V(t,e){try{return t.getItem(e)}catch(t){}}function Q(t,e,n){try{return t.setItem(e,n),!0}catch(t){}}function G(t,e){try{t.removeItem(e)}catch(t){}}function J(t,e){return Q(t,$,e.toString())}function B(t){return parseInt(V(t,$))||0}let K="undefined"==typeof window?{}:window;function W(t){const e=t+"Storage";try{if(K&&K[e]&&"number"==typeof K[e].length)return K[e]}catch(t){}N[t]=!1}function X(t,e){const n=W(t);if(!n)return;const o=V(n,q);if(o!==D){if(o){const t=B(n);for(let e=0;e<t;e++)G(n,R+e.toString())}return Q(n,q,D),void J(n,0)}const r=Math.floor(Date.now()/H)-U,i=t=>{const o=R+t.toString(),i=V(n,o);if("string"==typeof i){try{const n=JSON.parse(i);if("object"==typeof n&&"number"==typeof n.cached&&n.cached>r&&"string"==typeof n.provider&&"object"==typeof n.data&&"string"==typeof n.data.prefix&&e(n,t))return!0}catch(t){}G(n,o)}};let c=B(n);for(let e=c-1;e>=0;e--)i(e)||(e===c-1?(c--,J(n,c)):z[t].add(e))}function Y(){if(!_){_=!0;for(const t in N)X(t,(t=>{const e=t.data,n=g(t.provider,e.prefix);if(!m(n,e).length)return!1;const o=e.lastModified||-1;return n.lastModifiedCached=n.lastModifiedCached?Math.min(n.lastModifiedCached,o):o,!0}))}}function Z(t,e){switch(t){case"local":case"session":N[t]=e;break;case"all":for(const t in N)N[t]=e}}const tt=Object.create(null);function et(t,e){tt[t]=e}function nt(t){return tt[t]||tt[""]}function ot(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 rt=Object.create(null),it=["https://api.simplesvg.com","https://api.unisvg.com"],ct=[];for(;it.length>0;)1===it.length||Math.random()>.5?ct.push(it.shift()):ct.push(it.pop());function st(t,e){const n=ot(e);return null!==n&&(rt[t]=n,!0)}function at(t){return rt[t]}rt[""]=ot({resources:["https://api.iconify.design"].concat(ct)});let ut=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}})();const ft={prepare:(t,e,n)=>{const o=[],r=function(t,e){const n=at(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 r=e+".json?icons=";o=n.maxURL-t-n.path.length-r.length}else o=0;return o}(t,e),i="icons";let c={type:i,provider:t,prefix:e,icons:[]},s=0;return n.forEach(((n,a)=>{s+=n.length+1,s>=r&&a>0&&(o.push(c),c={type:i,provider:t,prefix:e,icons:[]},s=n.length),c.icons.push(n)})),o.push(c),o},send:(t,e,n)=>{if(!ut)return void n("abort",424);let o=function(t){if("string"==typeof t){const e=at(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 r=503;ut(t+o).then((t=>{const e=t.status;if(200===e)return r=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",r)}))})).catch((()=>{n("next",r)}))}};function lt(t,e){t.forEach((t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter((t=>t.id!==e)))}))}let dt=0;var pt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ht(t,e,n,o){const r=t.resources.length,i=t.random?Math.floor(Math.random()*r):t.index;let c;if(t.random){let e=t.resources.slice(0);for(c=[];e.length>1;){const t=Math.floor(Math.random()*e.length);c.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}c=c.concat(e)}else c=t.resources.slice(i).concat(t.resources.slice(0,i));const s=Date.now();let a,u="pending",f=0,l=null,d=[],p=[];function h(){l&&(clearTimeout(l),l=null)}function g(){"pending"===u&&(u="aborted"),h(),d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function m(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function y(){u="failed",p.forEach((t=>{t(void 0,a)}))}function b(){d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function v(){if("pending"!==u)return;h();const o=c.shift();if(void 0===o)return d.length?void(l=setTimeout((()=>{h(),"pending"===u&&(b(),y())}),t.timeout)):void y();const r={status:"pending",resource:o,callback:(e,n)=>{!function(e,n,o){const r="success"!==n;switch(d=d.filter((t=>t!==e)),u){case"pending":break;case"failed":if(r||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return a=o,void y();if(r)return a=o,void(d.length||(c.length?v():y()));if(h(),b(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}u="completed",p.forEach((t=>{t(o)}))}(r,e,n)}};d.push(r),f++,l=setTimeout(v,t.rotate),n(o,e,r.callback)}return"function"==typeof o&&p.push(o),setTimeout(v),function(){return{startTime:s,payload:e,status:u,queriesSent:f,queriesPending:d.length,subscribe:m,abort:g}}}function gt(t){const e={...pt,...t};let n=[];function o(){n=n.filter((t=>"pending"===t().status))}const r={query:function(t,r,i){const c=ht(e,t,r,((t,e)=>{o(),i&&i(t,e)}));return n.push(c),c},find:function(t){return n.find((e=>t(e)))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:o};return r}function mt(){}const yt=Object.create(null);function bt(t,e,n){let o,r;if("string"==typeof t){const e=nt(t);if(!e)return n(void 0,424),mt;r=e.send;const i=function(t){if(!yt[t]){const e=at(t);if(!e)return;const n={config:e,redundancy:gt(e)};yt[t]=n}return yt[t]}(t);i&&(o=i.redundancy)}else{const e=ot(t);if(e){o=gt(e);const n=nt(t.resources?t.resources[0]:"");n&&(r=n.send)}}return o&&r?o.query(e,r,n)().abort:(n(void 0,424),mt)}function vt(t,e){function n(n){let o;if(!N[n]||!(o=W(n)))return;const r=z[n];let i;if(r.size)r.delete(i=Array.from(r).shift());else if(i=B(o),!J(o,i+1))return;const c={cached:Math.floor(Date.now()/H),provider:t.provider,data:e};return Q(o,R+i.toString(),JSON.stringify(c))}_||Y(),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 N)X(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 xt(){}function wt(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,r=t.prefix;e.forEach((e=>{const i=e.icons,c=i.pending.length;i.pending=i.pending.filter((e=>{if(e.prefix!==r)return!0;const c=e.name;if(t.icons[c])i.loaded.push({provider:o,prefix:r,name:c});else{if(!t.missing.has(c))return n=!0,!0;i.missing.push({provider:o,prefix:r,name:c})}return!1})),i.pending.length!==c&&(n||lt([t],e.id),e.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),e.abort))}))})))}(t)})))}const St=t=>{const e=g(t.provider,t.prefix).pendingIcons;return!(!e||!e.has(t.name))},jt=(t,e)=>{var n;const 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 r=t.provider,i=t.prefix,c=t.name,s=n[r]||(n[r]=Object.create(null)),a=s[i]||(s[i]=g(r,i));let u;u=c in a.icons?e.loaded:""===i||a.missing.has(c)?e.missing:e.pending;const f={provider:r,prefix:i,name:c};u.push(f)})),e}(function(t,e=!0,n=!1){const o=[];return t.forEach((t=>{const r="string"==typeof t?u(t,e,n):t;r&&o.push(r)})),o}(t,!0,("boolean"==typeof n&&(b=n),b)));if(!o.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(o.loaded,o.missing,o.pending,xt)})),()=>{t=!1}}const r=Object.create(null),i=[];let c,s;return o.pending.forEach((t=>{const{provider:e,prefix:n}=t;if(n===s&&e===c)return;c=e,s=n,i.push(g(e,n));const o=r[e]||(r[e]=Object.create(null));o[n]||(o[n]=[])})),o.pending.forEach((t=>{const{provider:e,prefix:n,name:o}=t,i=g(e,n),c=i.pendingIcons||(i.pendingIcons=new Set);c.has(o)||(c.add(o),r[e][n].push(o))})),i.forEach((t=>{const{provider:e,prefix:n}=t;r[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 r;delete t.iconsToLoad,o&&(r=nt(e))&&r.prepare(e,n,o).forEach((n=>{bt(e,n,(e=>{if("object"!=typeof e)n.icons.forEach((e=>{t.missing.add(e)}));else try{const n=m(t,e);if(!n.length)return;const o=t.pendingIcons;o&&n.forEach((t=>{o.delete(t)})),vt(t,e)}catch(t){console.error(t)}wt(t)}))}))})))}(t,r[e][n])})),e?function(t,e,n){const o=dt++,r=lt.bind(null,n,o);if(!e.pending.length)return r;const i={id:o,icons:e,callback:t,abort:r};return n.forEach((t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(i)})),r}(e,o,i):xt},Et=t=>new Promise(((e,n)=>{const r="string"==typeof t?u(t,!0):t;r?jt([r||t],(i=>{if(i.length&&r){const t=v(r);if(t)return void e({...o,...t})}n(t)})):n(t)}));function It(t,e){const n={...t};for(const t in e){const o=e[t],r=typeof o;t in E?(null===o||o&&("string"===r||"number"===r))&&(n[t]=o):r===typeof n[t]&&(n[t]="rotate"===t?o%4:o)}return n}const Ot={...I,inline:!1},kt="iconify",Ct="iconify-inline",Mt="iconifyData"+Date.now();let Tt=[];function Lt(t){for(let e=0;e<Tt.length;e++){const n=Tt[e];if(("function"==typeof n.node?n.node():n.node)===t)return n}}function At(t,e=!1){let n=Lt(t);return n?(n.temporary&&(n.temporary=e),n):(n={node:t,temporary:e},Tt.push(n),n)}function Ft(){return Tt}let Pt=null;const Nt={childList:!0,subtree:!0,attributes:!0};function zt(t){if(!t.observer)return;const e=t.observer;e.pendingScan||(e.pendingScan=setTimeout((()=>{delete e.pendingScan,Pt&&Pt(t)})))}function _t(t,e){if(!t.observer)return;const n=t.observer;if(!n.pendingScan)for(let o=0;o<e.length;o++){const r=e[o];if(r.addedNodes&&r.addedNodes.length>0||"attributes"===r.type&&void 0!==r.target[Mt])return void(n.paused||zt(t))}}function Dt(t,e){t.observer.instance.observe(e,Nt)}function Rt(t){let e=t.observer;if(e&&e.instance)return;const n="function"==typeof t.node?t.node():t.node;n&&window&&(e||(e={paused:0},t.observer=e),e.instance=new window.MutationObserver(_t.bind(null,t)),Dt(t,n),e.paused||zt(t))}function $t(){Ft().forEach(Rt)}function qt(t){if(!t.observer)return;const e=t.observer;e.pendingScan&&(clearTimeout(e.pendingScan),delete e.pendingScan),e.instance&&(e.instance.disconnect(),delete e.instance)}function Ht(t){const e=null!==Pt;Pt!==t&&(Pt=t,e&&Ft().forEach(qt)),e?$t():function(t){const e=document;e.readyState&&"loading"!==e.readyState?t():e.addEventListener("DOMContentLoaded",t)}($t)}function Ut(t){(t?[t]:Ft()).forEach((t=>{if(!t.observer)return void(t.observer={paused:1});const e=t.observer;if(e.paused++,e.paused>1||!e.instance)return;e.instance.disconnect()}))}function Vt(t){if(t){const e=Lt(t);e&&Ut(e)}else Ut()}function Qt(t){(t?[t]:Ft()).forEach((t=>{if(!t.observer)return void Rt(t);const e=t.observer;if(e.paused&&(e.paused--,!e.paused)){const n="function"==typeof t.node?t.node():t.node;if(!n)return;e.instance?Dt(t,n):Rt(t)}}))}function Gt(t){if(t){const e=Lt(t);e&&Qt(e)}else Qt()}function Jt(t,e=!1){const n=At(t,e);return Rt(n),n}function Bt(t){const e=Lt(t);e&&(qt(e),function(t){Tt=Tt.filter((e=>t!==e&&t!==("function"==typeof e.node?e.node():e.node)))}(t))}const Kt=/[\s,]+/;const Wt=["width","height"],Xt=["inline","hFlip","vFlip"];function Yt(t){const e=t.getAttribute("data-icon"),n="string"==typeof e&&u(e,!0);if(!n)return null;const o={...Ot,inline:t.classList&&t.classList.contains(Ct)};Wt.forEach((e=>{const n=t.getAttribute("data-"+e);n&&(o[e]=n)}));const r=t.getAttribute("data-rotate");"string"==typeof r&&(o.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 r=parseFloat(t.slice(0,t.length-n.length));return isNaN(r)?0:(r/=e,r%1==0?o(r):0)}}return e}(r));const i=t.getAttribute("data-flip");"string"==typeof i&&function(t,e){e.split(Kt).forEach((e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}}))}(o,i),Xt.forEach((e=>{const n="data-"+e,r=function(t,e){return t===e||"true"===t||""!==t&&"false"!==t&&null}(t.getAttribute(n),n);"boolean"==typeof r&&(o[e]=r)}));const c=t.getAttribute("data-mode");return{name:e,icon:n,customisations:o,mode:c}}const Zt="svg."+kt+", i."+kt+", span."+kt+", i."+Ct+", span."+Ct;function te(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>"}let ee;function ne(t){return void 0===ee&&function(){try{ee=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){ee=null}}(),ee?ee.createHTML(t):t}function oe(t){const e=new Set(["iconify"]);return["provider","prefix"].forEach((n=>{t[n]&&e.add("iconify--"+t[n])})),e}function re(t,e,n,o){const r=t.classList;if(o){const t=o.classList;Array.from(t).forEach((t=>{r.add(t)}))}const i=[];return e.forEach((t=>{r.contains(t)?n.has(t)&&i.push(t):(r.add(t),i.push(t))})),n.forEach((t=>{e.has(t)||r.remove(t)})),i}function ie(t,e,n){const o=t.style;(n||[]).forEach((t=>{o.removeProperty(t)}));const r=[];for(const t in e)o.getPropertyValue(t)||(r.push(t),o.setProperty(t,e[t]));return r}function ce(t,e,n){let o;try{o=document.createElement("span")}catch(e){return t}const r=e.customisations,i=T(n,r),c=t[Mt],s=te(P(i.body),{"aria-hidden":"true",role:"img",...i.attributes});o.innerHTML=ne(s);const a=o.childNodes[0],u=t.attributes;for(let t=0;t<u.length;t++){const e=u.item(t),n=e.name;"class"===n||a.hasAttribute(n)||a.setAttribute(n,e.value)}const f=re(a,oe(e.icon),new Set(c&&c.addedClasses),t),l=ie(a,r.inline?{"vertical-align":"-0.125em"}:{},c&&c.addedStyles),d={...e,status:"loaded",addedClasses:f,addedStyles:l};return a[Mt]=d,t.parentNode&&t.parentNode.replaceChild(a,t),a}const se={display:"inline-block"},ae={"background-color":"currentColor"},ue={"background-color":"transparent"},fe={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},le={"-webkit-mask":ae,mask:ae,background:ue};for(const t in le){const e=le[t];for(const n in fe)e[t+"-"+n]=fe[n]}function de(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}let pe=!1;function he(){pe||(pe=!0,setTimeout((()=>{pe&&(pe=!1,ge())})))}function ge(t,e=!1){const n=Object.create(null);function r(t,e){const{provider:o,prefix:r,name:i}=t,c=g(o,r),s=c.icons[i];if(s)return{status:"loaded",icon:s};if(c.missing.has(i))return{status:"missing"};if(e&&!St(t)){const t=n[o]||(n[o]=Object.create(null));(t[r]||(t[r]=new Set)).add(i)}return{status:"loading"}}(t?[t]:Ft()).forEach((t=>{const n="function"==typeof t.node?t.node():t.node;if(!n||!n.querySelectorAll)return;let i=!1,c=!1;function s(e,n,r){if(c||(c=!0,Ut(t)),"SVG"!==e.tagName.toUpperCase()){const t=n.mode,i="mask"===t||"bg"!==t&&("style"===t?-1!==r.body.indexOf("currentColor"):null);if("boolean"==typeof i)return void function(t,e,n,o){const r=e.customisations,i=T(n,r),c=i.attributes,s=t[Mt],a=te(i.body,{...c,width:n.width+"",height:n.height+""}),u=re(t,oe(e.icon),new Set(s&&s.addedClasses)),f={"--svg":'url("'+(l=a,"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," ")}(l)+'")'),width:de(c.width),height:de(c.height),...se,...o?ae:ue};var l;r.inline&&(f["vertical-align"]="-0.125em");const d=ie(t,f,s&&s.addedStyles),p={...e,status:"loaded",addedClasses:u,addedStyles:d};t[Mt]=p}(e,n,{...o,...r},i)}ce(e,n,r)}(function(t){const e=[];return t.querySelectorAll(Zt).forEach((t=>{const n=t[Mt]||"svg"!==t.tagName.toLowerCase()?Yt(t):null;n&&e.push({node:t,props:n})})),e})(n).forEach((({node:t,props:e})=>{const n=t[Mt];if(!n){const{status:n,icon:o}=r(e.icon,!0);return o?void s(t,e,o):(i=i||"loading"===n,void(t[Mt]={...e,status:n}))}let o;if(function(t,e){if(t.name!==e.name||t.mode!==e.mode)return!0;const n=t.customisations,o=e.customisations;for(const t in Ot)if(n[t]!==o[t])return!0;return!1}(n,e)){if(o=r(e.icon,n.name!==e.name),!o.icon)return i=i||"loading"===o.status,void Object.assign(n,{...e,status:o.status})}else{if("loading"!==n.status)return;if(o=r(e.icon,!1),!o.icon)return void(n.status=o.status)}s(t,e,o.icon)})),t.temporary&&!i?Bt(n):e&&i?Jt(n,!0):c&&t.observer&&Qt(t)}));for(const t in n){const e=n[t];for(const n in e){const o=e[n];jt(Array.from(o).map((e=>({provider:t,prefix:n,name:e}))),he)}}}function me(t,e,n=!1){const o=v(t);if(!o)return null;const r=u(t),i=It(Ot,e||{}),c=ce(document.createElement("span"),{name:t,icon:r,customisations:i},o);return n?c.outerHTML:c}function ye(){return"3.1.1"}function be(t,e){return me(t,e,!1)}function ve(t,e){return me(t,e,!0)}function xe(t,e){const n=v(t);if(!n)return null;return T(n,It(Ot,e||{}))}function we(t){t?function(t){const e=Lt(t);e?ge(e):ge({node:t,temporary:!0},!0)}(t):ge()}if("undefined"!=typeof document&&"undefined"!=typeof window){!function(){if(document.documentElement)return At(document.documentElement);Tt.push({node:()=>document.documentElement})}();const t=window;if(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||!w(t))&&console.error(n)}catch(t){console.error(n)}}))}setTimeout((()=>{Ht(ge),ge()}))}function Se(t,e){Z(t,!1!==e)}function je(t){Z(t,!0)}if(et("",ft),"undefined"!=typeof document&&"undefined"!=typeof window){Y();const t=window;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;st(t,o)||console.error(n)}catch(t){console.error(n)}}}}const Ee={getAPIConfig:at,setAPIModule:et,sendAPIQuery:bt,setFetch:function(t){ut=t},getFetch:function(){return ut},listAPIProviders:function(){return Object.keys(rt)}},Ie={_api:Ee,addAPIProvider:st,loadIcons:jt,loadIcon:Et,iconExists:S,getIcon:j,listIcons:y,addIcon:x,addCollection:w,replaceIDs:P,calculateSize:C,buildIcon:T,getVersion:ye,renderSVG:be,renderHTML:ve,renderIcon:xe,scan:we,observe:Jt,stopObserving:Bt,pauseObserver:Vt,resumeObserver:Gt,enableCache:Se,disableCache:je};return t._api=Ee,t.addAPIProvider=st,t.addCollection=w,t.addIcon=x,t.buildIcon=T,t.calculateSize=C,t.default=Ie,t.disableCache=je,t.enableCache=Se,t.getIcon=j,t.getVersion=ye,t.iconExists=S,t.listIcons=y,t.loadIcon=Et,t.loadIcons=jt,t.observe=Jt,t.pauseObserver=Vt,t.renderHTML=ve,t.renderIcon=xe,t.renderSVG=be,t.replaceIDs=P,t.resumeObserver=Gt,t.scan=we,t.stopObserving=Bt,Object.defineProperty(t,"__esModule",{value:!0}),t}({});if("object"==typeof exports)try{for(var key in exports.__esModule=!0,exports.default=Iconify,Iconify)exports[key]=Iconify[key]}catch(t){}try{void 0===self.Iconify&&(self.Iconify=Iconify)}catch(t){} |
@@ -10,4 +10,4 @@ /** | ||
* @license MIT | ||
* @version 3.1.0 | ||
* @version 3.1.1 | ||
*/ | ||
var Iconify=function(e){"use strict";var n=Object.freeze({left:0,top:0,width:16,height:16}),t=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),r=Object.freeze(Object.assign({},n,t)),i=Object.freeze(Object.assign({},r,{body:"",hidden:!1}));function o(e,n){var r=function(e,n){var t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);var r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}(e,n);for(var o in i)o in t?o in e&&!(o in r)&&(r[o]=t[o]):o in n?r[o]=n[o]:o in e&&(r[o]=e[o]);return r}function a(e,n,t){var r=e.icons,i=e.aliases||Object.create(null),a={};function c(e){a=o(r[e]||i[e],a)}return c(n),t.forEach(c),o(e,a)}function c(e,n){var t=[];if("object"!=typeof e||"object"!=typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((function(e){n(e,null),t.push(e)}));var r=function(e,n){var t=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(r))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;var o=r[n]&&r[n].parent,a=o&&e(o);a&&(i[n]=[o].concat(a))}return i[n]})),i}(e);for(var i in r){var o=r[i];o&&(n(i,a(e,i,o)),t.push(i))}return t}var u=/^[a-z0-9]+(-[a-z0-9]+)*$/,f=function(e,n,t,r){void 0===r&&(r="");var i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){var o=i.pop(),a=i.pop(),c={provider:i.length>0?i[0]:r,prefix:a,name:o};return n&&!s(c)?null:c}var u=i[0],f=u.split("-");if(f.length>1){var d={provider:r,prefix:f.shift(),name:f.join("-")};return n&&!s(d)?null:d}if(t&&""===r){var l={provider:r,prefix:"",name:u};return n&&!s(l,t)?null:l}return null},s=function(e,n){return!!e&&!(""!==e.provider&&!e.provider.match(u)||!(n&&""===e.prefix||e.prefix.match(u))||!e.name.match(u))},d=Object.assign({},{provider:"",aliases:{},not_found:{}},n);function l(e,n){for(var t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function v(e){if("object"!=typeof e||null===e)return null;var n=e;if("string"!=typeof n.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!l(e,d))return null;var t=n.icons;for(var r in t){var o=t[r];if(!r.match(u)||"string"!=typeof o.body||!l(o,i))return null}var a=n.aliases||Object.create(null);for(var c in a){var f=a[c],s=f.parent;if(!c.match(u)||"string"!=typeof s||!t[s]&&!a[s]||!l(f,i))return null}return n}var p=Object.create(null);function g(e,n){var t=p[e]||(p[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function h(e,n){return v(n)?c(n,(function(n,t){t?e.icons[n]=t:e.missing.add(n)})):[]}function b(e,n){var t=[];return("string"==typeof e?[e]:Object.keys(p)).forEach((function(e){("string"==typeof e&&"string"==typeof n?[n]:Object.keys(p[e]||{})).forEach((function(n){var r=g(e,n);t=t.concat(Object.keys(r.icons).map((function(t){return(""!==e?"@"+e+":":"")+n+":"+t})))}))})),t}var m=!1;function y(e){var n="string"==typeof e?f(e,!0,m):e;if(n){var t=g(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function x(e,n){var t=f(e,!0,m);return!!t&&function(e,n,t){try{if("string"==typeof t.body)return e.icons[n]=Object.assign({},t),!0}catch(e){}return!1}(g(t.provider,t.prefix),t.name,n)}function j(e,n){if("object"!=typeof e)return!1;if("string"!=typeof n&&(n=e.provider||""),m&&!n&&!e.prefix){var t=!1;return v(e)&&(e.prefix="",c(e,(function(e,n){n&&x(e,n)&&(t=!0)}))),t}var r=e.prefix;return!!s({provider:n,prefix:r,name:"a"})&&!!h(g(n,r),e)}function O(e){return!!y(e)}function w(e){var n=y(e);return n?Object.assign({},r,n):null}var S=Object.freeze({width:null,height:null}),E=Object.freeze(Object.assign({},S,t)),k=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(e,n,t){if(1===n)return e;if(t=t||100,"number"==typeof e)return Math.ceil(e*n*t)/t;if("string"!=typeof e)return e;var r=e.split(k);if(null===r||!r.length)return e;for(var i=[],o=r.shift(),a=I.test(o);;){if(a){var c=parseFloat(o);isNaN(c)?i.push(o):i.push(Math.ceil(c*n*t)/t)}else i.push(o);if(void 0===(o=r.shift()))return i.join("");a=!a}}function M(e,n){var t=Object.assign({},r,e),i=Object.assign({},E,n),o={left:t.left,top:t.top,width:t.width,height:t.height},a=t.body;[t,i].forEach((function(e){var n,t=[],r=e.hFlip,i=e.vFlip,c=e.rotate;switch(r?i?c+=2:(t.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),t.push("scale(-1 1)"),o.top=o.left=0):i&&(t.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),t.push("scale(1 -1)"),o.top=o.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4){case 1:n=o.height/2+o.top,t.unshift("rotate(90 "+n.toString()+" "+n.toString()+")");break;case 2:t.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:n=o.width/2+o.left,t.unshift("rotate(-90 "+n.toString()+" "+n.toString()+")")}c%2==1&&(o.left!==o.top&&(n=o.left,o.left=o.top,o.top=n),o.width!==o.height&&(n=o.width,o.width=o.height,o.height=n)),t.length&&(a='<g transform="'+t.join(" ")+'">'+a+"</g>")}));var c,u,f=i.width,s=i.height,d=o.width,l=o.height;null===f?c=C(u=null===s?"1em":"auto"===s?l:s,d/l):(c="auto"===f?d:f,u=null===s?C(c,l/d):"auto"===s?l:s);var v={},p=function(e,n){(function(e){return"unset"===e||"undefined"===e||"none"===e})(n)||(v[e]=n.toString())};return p("width",c),p("height",u),v.viewBox=o.left.toString()+" "+o.top.toString()+" "+d.toString()+" "+l.toString(),{attributes:v,body:a}}var T=/\sid="(\S+)"/g,F="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),L=0;function A(e,n){void 0===n&&(n=F);for(var t,r=[];t=T.exec(e);)r.push(t[1]);if(!r.length)return e;var i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((function(t){var r="function"==typeof n?n(t):n+(L++).toString(),o=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")})),e=e.replace(new RegExp(i,"g"),"")}function N(e,n){var t=Object.assign({},e);for(var r in n){var i=n[r],o=typeof i;r in S?(null===i||i&&("string"===o||"number"===o))&&(t[r]=i):o===typeof t[r]&&(t[r]="rotate"===r?i%4:i)}return t}var z=Object.assign({},E,{inline:!1}),D="iconify-inline",_="iconifyData"+Date.now(),P=[];function $(e){for(var n=0;n<P.length;n++){var t=P[n];if(("function"==typeof t.node?t.node():t.node)===e)return t}}function q(e,n){void 0===n&&(n=!1);var t=$(e);return t?(t.temporary&&(t.temporary=n),t):(t={node:e,temporary:n},P.push(t),t)}function V(){return P}var H=null,R={childList:!0,subtree:!0,attributes:!0};function G(e){if(e.observer){var n=e.observer;n.pendingScan||(n.pendingScan=setTimeout((function(){delete n.pendingScan,H&&H(e)})))}}function Q(e,n){if(e.observer){var t=e.observer;if(!t.pendingScan)for(var r=0;r<n.length;r++){var i=n[r];if(i.addedNodes&&i.addedNodes.length>0||"attributes"===i.type&&void 0!==i.target[_])return void(t.paused||G(e))}}}function U(e,n){e.observer.instance.observe(n,R)}function J(e){var n=e.observer;if(!n||!n.instance){var t="function"==typeof e.node?e.node():e.node;t&&window&&(n||(n={paused:0},e.observer=n),n.instance=new window.MutationObserver(Q.bind(null,e)),U(e,t),n.paused||G(e))}}function B(){V().forEach(J)}function K(e){if(e.observer){var n=e.observer;n.pendingScan&&(clearTimeout(n.pendingScan),delete n.pendingScan),n.instance&&(n.instance.disconnect(),delete n.instance)}}function W(e){var n=null!==H;H!==e&&(H=e,n&&V().forEach(K)),n?B():function(e){var n=document;n.readyState&&"loading"!==n.readyState?e():n.addEventListener("DOMContentLoaded",e)}(B)}function X(e){(e?[e]:V()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused++,!(n.paused>1)&&n.instance)n.instance.disconnect()}else e.observer={paused:1}}))}function Y(e){if(e){var n=$(e);n&&X(n)}else X()}function Z(e){(e?[e]:V()).forEach((function(e){if(e.observer){var n=e.observer;if(n.paused&&(n.paused--,!n.paused)){var t="function"==typeof e.node?e.node():e.node;if(!t)return;n.instance?U(e,t):J(e)}}else J(e)}))}function ee(e){if(e){var n=$(e);n&&Z(n)}else Z()}function ne(e,n){void 0===n&&(n=!1);var t=q(e,n);return J(t),t}function te(e){var n=$(e);n&&(K(n),function(e){P=P.filter((function(n){return e!==n&&e!==("function"==typeof n.node?n.node():n.node)}))}(e))}function re(e,n){e.forEach((function(e){var t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((function(e){return e.id!==n})))}))}var ie=0;var oe=Object.create(null);function ae(e){return oe[e]||oe[""]}var ce={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ue(e,n,t,r){var i,o=e.resources.length,a=e.random?Math.floor(Math.random()*o):e.index;if(e.random){var c=e.resources.slice(0);for(i=[];c.length>1;){var u=Math.floor(Math.random()*c.length);i.push(c[u]),c=c.slice(0,u).concat(c.slice(u+1))}i=i.concat(c)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));var f,s=Date.now(),d="pending",l=0,v=null,p=[],g=[];function h(){v&&(clearTimeout(v),v=null)}function b(){"pending"===d&&(d="aborted"),h(),p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function m(e,n){n&&(g=[]),"function"==typeof e&&g.push(e)}function y(){d="failed",g.forEach((function(e){e(void 0,f)}))}function x(){p.forEach((function(e){"pending"===e.status&&(e.status="aborted")})),p=[]}function j(){if("pending"===d){h();var r=i.shift();if(void 0===r)return p.length?void(v=setTimeout((function(){h(),"pending"===d&&(x(),y())}),e.timeout)):void y();var o={status:"pending",resource:r,callback:function(n,t){!function(n,t,r){var o="success"!==t;switch(p=p.filter((function(e){return e!==n})),d){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return f=r,void y();if(o)return f=r,void(p.length||(i.length?j():y()));if(h(),x(),!e.random){var a=e.resources.indexOf(n.resource);-1!==a&&a!==e.index&&(e.index=a)}d="completed",g.forEach((function(e){e(r)}))}(o,n,t)}};p.push(o),l++,v=setTimeout(j,e.rotate),t(r,n,o.callback)}}return"function"==typeof r&&g.push(r),setTimeout(j),function(){return{startTime:s,payload:n,status:d,queriesSent:l,queriesPending:p.length,subscribe:m,abort:b}}}function fe(e){var n=Object.assign({},ce,e),t=[];function r(){t=t.filter((function(e){return"pending"===e().status}))}var i={query:function(e,i,o){var a=ue(n,e,i,(function(e,n){r(),o&&o(e,n)}));return t.push(a),a},find:function(e){return t.find((function(n){return e(n)}))||null},setIndex:function(e){n.index=e},getIndex:function(){return n.index},cleanup:r};return i}function se(e){var n;if("string"==typeof e.resources)n=[e.resources];else if(!((n=e.resources)instanceof Array&&n.length))return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}for(var de=Object.create(null),le=["https://api.simplesvg.com","https://api.unisvg.com"],ve=[];le.length>0;)1===le.length||Math.random()>.5?ve.push(le.shift()):ve.push(le.pop());function pe(){}de[""]=se({resources:["https://api.iconify.design"].concat(ve)});var ge=Object.create(null);function he(e){if(!ge[e]){var n=function(e){return de[e]}(e);if(!n)return;var t={config:n,redundancy:fe(n)};ge[e]=t}return ge[e]}var be="iconify2",me="iconify",ye="iconify-count",xe="iconify-version",je=36e5;function Oe(e,n){try{return e.getItem(n)}catch(e){}}function we(e,n,t){try{return e.setItem(n,t),!0}catch(e){}}function Se(e,n){try{e.removeItem(n)}catch(e){}}function Ee(e,n){return we(e,ye,n.toString())}function ke(e){return parseInt(Oe(e,ye))||0}var Ie={local:!0,session:!0},Ce={local:new Set,session:new Set},Me=!1;var Te="undefined"==typeof window?{}:window;function Fe(e){var n=e+"Storage";try{if(Te&&Te[n]&&"number"==typeof Te[n].length)return Te[n]}catch(e){}Ie[e]=!1}function Le(e,n){var t=Fe(e);if(t){var r=Oe(t,xe);if(r!==be){if(r)for(var i=ke(t),o=0;o<i;o++)Se(t,me+o.toString());return we(t,xe,be),void Ee(t,0)}for(var a=Math.floor(Date.now()/je)-168,c=function(e){var r=me+e.toString(),i=Oe(t,r);if("string"==typeof i){try{var o=JSON.parse(i);if("object"==typeof o&&"number"==typeof o.cached&&o.cached>a&&"string"==typeof o.provider&&"object"==typeof o.data&&"string"==typeof o.data.prefix&&n(o,e))return!0}catch(e){}Se(t,r)}},u=ke(t),f=u-1;f>=0;f--)c(f)||(f===u-1?(u--,Ee(t,u)):Ce[e].add(f))}}function Ae(){if(!Me)for(var e in Me=!0,Ie)Le(e,(function(e){var n=e.data,t=g(e.provider,n.prefix);if(!h(t,n).length)return!1;var r=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,r):r,!0}))}function Ne(e,n){function t(t){var r;if(Ie[t]&&(r=Fe(t))){var i,o=Ce[t];if(o.size)o.delete(i=Array.from(o).shift());else if(!Ee(r,(i=ke(r))+1))return;var a={cached:Math.floor(Date.now()/je),provider:e.provider,data:n};return we(r,me+i.toString(),JSON.stringify(a))}}Me||Ae(),n.lastModified&&!function(e,n){var t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(var r in Ie)Le(r,(function(t){var r=t.data;return t.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===n}));return!0}(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))}function ze(){}function De(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((function(){e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((function(){e.pendingCallbacksFlag=!1;var n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(n.length){var t=!1,r=e.provider,i=e.prefix;n.forEach((function(n){var o=n.icons,a=o.pending.length;o.pending=o.pending.filter((function(n){if(n.prefix!==i)return!0;var a=n.name;if(e.icons[a])o.loaded.push({provider:r,prefix:i,name:a});else{if(!e.missing.has(a))return t=!0,!0;o.missing.push({provider:r,prefix:i,name:a})}return!1})),o.pending.length!==a&&(t||re([e],n.id),n.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),n.abort))}))}})))}(e)})))}function _e(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((function(){e.iconsQueueFlag=!1;var n,t=e.provider,r=e.prefix,i=e.iconsToLoad;(delete e.iconsToLoad,i&&(n=ae(t)))&&n.prepare(t,r,i).forEach((function(n){!function(e,n,t){var r,i;if("string"==typeof e){var o=ae(e);if(!o)return t(void 0,424),pe;i=o.send;var a=he(e);a&&(r=a.redundancy)}else{var c=se(e);if(c){r=fe(c);var u=ae(e.resources?e.resources[0]:"");u&&(i=u.send)}}r&&i?r.query(n,i,t)().abort:t(void 0,424)}(t,n,(function(t){if("object"!=typeof t)n.icons.forEach((function(n){e.missing.add(n)}));else try{var r=h(e,t);if(!r.length)return;var i=e.pendingIcons;i&&r.forEach((function(e){i.delete(e)})),Ne(e,t)}catch(e){console.error(e)}De(e)}))}))})))}var Pe=function(e,n){var t,r=function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t=!1);var r=[];return e.forEach((function(e){var i="string"==typeof e?f(e,n,t):e;i&&r.push(i)})),r}(e,!0,("boolean"==typeof t&&(m=t),m)),i=function(e){var n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((function(e,n){return e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)}));var r={provider:"",prefix:"",name:""};return e.forEach((function(e){if(r.name!==e.name||r.prefix!==e.prefix||r.provider!==e.provider){r=e;var i=e.provider,o=e.prefix,a=e.name,c=t[i]||(t[i]=Object.create(null)),u=c[o]||(c[o]=g(i,o)),f={provider:i,prefix:o,name:a};(a in u.icons?n.loaded:""===o||u.missing.has(a)?n.missing:n.pending).push(f)}})),n}(r);if(!i.pending.length){var o=!0;return n&&setTimeout((function(){o&&n(i.loaded,i.missing,i.pending,ze)})),function(){o=!1}}var a,c,u=Object.create(null),s=[];return i.pending.forEach((function(e){var n=e.provider,t=e.prefix;if(t!==c||n!==a){a=n,c=t,s.push(g(n,t));var r=u[n]||(u[n]=Object.create(null));r[t]||(r[t]=[])}})),i.pending.forEach((function(e){var n=e.provider,t=e.prefix,r=e.name,i=g(n,t),o=i.pendingIcons||(i.pendingIcons=new Set);o.has(r)||(o.add(r),u[n][t].push(r))})),s.forEach((function(e){var n=e.provider,t=e.prefix;u[n][t].length&&_e(e,u[n][t])})),n?function(e,n,t){var r=ie++,i=re.bind(null,t,r);if(!n.pending.length)return i;var o={id:r,icons:n,callback:e,abort:i};return t.forEach((function(e){(e.loaderCallbacks||(e.loaderCallbacks=[])).push(o)})),i}(n,i,s):ze};var $e=/[\s,]+/;var qe=["width","height"],Ve=["inline","hFlip","vFlip"];function He(e){var n=e.getAttribute("data-icon"),t="string"==typeof n&&f(n,!0);if(!t)return null;var r=Object.assign({},z,{inline:e.classList&&e.classList.contains(D)});qe.forEach((function(n){var t=e.getAttribute("data-"+n);t&&(r[n]=t)}));var i=e.getAttribute("data-rotate");"string"==typeof i&&(r.rotate=function(e,n){void 0===n&&(n=0);var t=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===t){var i=parseInt(e);return isNaN(i)?0:r(i)}if(t!==e){var o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){var a=parseFloat(e.slice(0,e.length-t.length));return isNaN(a)?0:(a/=o)%1==0?r(a):0}}return n}(i));var o=e.getAttribute("data-flip");"string"==typeof o&&function(e,n){n.split($e).forEach((function(n){switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}}))}(r,o),Ve.forEach((function(n){var t="data-"+n,i=function(e,n){return e===n||"true"===e||""!==e&&"false"!==e&&null}(e.getAttribute(t),t);"boolean"==typeof i&&(r[n]=i)}));var a=e.getAttribute("data-mode");return{name:n,icon:t,customisations:r,mode:a}}function Re(e,n){var t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function Ge(e){var n=new Set(["iconify"]);return["provider","prefix"].forEach((function(t){e[t]&&n.add("iconify--"+e[t])})),n}function Qe(e,n,t,r){var i=e.classList;if(r){var o=r.classList;Array.from(o).forEach((function(e){i.add(e)}))}var a=[];return n.forEach((function(e){i.contains(e)?t.has(e)&&a.push(e):(i.add(e),a.push(e))})),t.forEach((function(e){n.has(e)||i.remove(e)})),a}function Ue(e,n,t){var r=e.style;(t||[]).forEach((function(e){r.removeProperty(e)}));var i=[];for(var o in n)r.getPropertyValue(o)||(i.push(o),r.setProperty(o,n[o]));return i}function Je(e,n,t){var r;try{r=document.createElement("span")}catch(n){return e}var i=n.customisations,o=M(t,i),a=e[_],c=Re(A(o.body),Object.assign({},{"aria-hidden":"true",role:"img"},o.attributes));r.innerHTML=c;for(var u=r.childNodes[0],f=e.attributes,s=0;s<f.length;s++){var d=f.item(s),l=d.name;"class"===l||u.hasAttribute(l)||u.setAttribute(l,d.value)}var v=Qe(u,Ge(n.icon),new Set(a&&a.addedClasses),e),p=Ue(u,i.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),g=Object.assign({},n,{status:"loaded",addedClasses:v,addedStyles:p});return u[_]=g,e.parentNode&&e.parentNode.replaceChild(u,e),u}var Be={display:"inline-block"},Ke={"background-color":"currentColor"},We={"background-color":"transparent"},Xe={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ye={"-webkit-mask":Ke,mask:Ke,background:We};for(var Ze in Ye){var en=Ye[Ze];for(var nn in Xe)en[Ze+"-"+nn]=Xe[nn]}function tn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}var rn=!1;function on(){rn||(rn=!0,setTimeout((function(){rn&&(rn=!1,an())})))}function an(e,n){void 0===n&&(n=!1);var t=Object.create(null);function i(e,n){var r=e.provider,i=e.prefix,o=e.name,a=g(r,i),c=a.icons[o];if(c)return{status:"loaded",icon:c};if(a.missing.has(o))return{status:"missing"};if(n&&!function(e){var n=g(e.provider,e.prefix).pendingIcons;return!(!n||!n.has(e.name))}(e)){var u=t[r]||(t[r]=Object.create(null));(u[i]||(u[i]=new Set)).add(o)}return{status:"loading"}}(e?[e]:V()).forEach((function(e){var t="function"==typeof e.node?e.node():e.node;if(t&&t.querySelectorAll){var o=!1,a=!1;(function(e){var n=[];return e.querySelectorAll("svg.iconify, i.iconify, span.iconify, i.iconify-inline, span.iconify-inline").forEach((function(e){var t=e[_]||"svg"!==e.tagName.toLowerCase()?He(e):null;t&&n.push({node:e,props:t})})),n})(t).forEach((function(e){var n,t=e.node,r=e.props,a=t[_];if(!a){var u=i(r.icon,!0),f=u.status,s=u.icon;return s?void c(t,r,s):(o=o||"loading"===f,void(t[_]=Object.assign({},r,{status:f})))}if(function(e,n){if(e.name!==n.name||e.mode!==n.mode)return!0;var t=e.customisations,r=n.customisations;for(var i in z)if(t[i]!==r[i])return!0;return!1}(a,r)){if(!(n=i(r.icon,a.name!==r.name)).icon)return o=o||"loading"===n.status,void Object.assign(a,Object.assign({},r,{status:n.status}))}else{if("loading"!==a.status)return;if(!(n=i(r.icon,!1)).icon)return void(a.status=n.status)}c(t,r,n.icon)})),e.temporary&&!o?te(t):n&&o?ne(t,!0):a&&e.observer&&Z(e)}function c(n,t,i){if(a||(a=!0,X(e)),"SVG"!==n.tagName.toUpperCase()){var o=t.mode,c="mask"===o||"bg"!==o&&("style"===o?-1!==i.body.indexOf("currentColor"):null);if("boolean"==typeof c)return void function(e,n,t,r){var i=n.customisations,o=M(t,i),a=o.attributes,c=e[_],u=Re(o.body,Object.assign({},a,{width:t.width+"",height:t.height+""})),f=Qe(e,Ge(n.icon),new Set(c&&c.addedClasses)),s='url("data:image/svg+xml,'+(l=u,l.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")+'")'),d=Object.assign({},{"--svg":s,width:tn(a.width),height:tn(a.height)},Be,r?Ke:We);var l;i.inline&&(d["vertical-align"]="-0.125em");var v=Ue(e,d,c&&c.addedStyles),p=Object.assign({},n,{status:"loaded",addedClasses:f,addedStyles:v});e[_]=p}(n,t,Object.assign({},r,i),c)}Je(n,t,i)}}));var o=function(e){var n=t[e],r=function(t){var r=n[t];Pe(Array.from(r).map((function(n){return{provider:e,prefix:t,name:n}})),on)};for(var i in n)r(i)};for(var a in t)o(a)}function cn(e,n,t){void 0===t&&(t=!1);var r=y(e);if(!r)return null;var i=f(e),o=N(z,n||{}),a=Je(document.createElement("span"),{name:e,icon:i,customisations:o},r);return t?a.outerHTML:a}function un(){return"3.1.0"}function fn(e,n){return cn(e,n,!1)}function sn(e,n){return cn(e,n,!0)}function dn(e,n){var t=y(e);return t?M(t,N(z,n||{})):null}function ln(e){e?function(e){var n=$(e);n?an(n):an({node:e,temporary:!0},!0)}(e):an()}if("undefined"!=typeof document&&"undefined"!=typeof window){!function(){if(document.documentElement)return q(document.documentElement);P.push({node:function(){return document.documentElement}})}();var vn=window;if(void 0!==vn.IconifyPreload){var pn=vn.IconifyPreload,gn="Invalid IconifyPreload syntax.";"object"==typeof pn&&null!==pn&&(pn instanceof Array?pn:[pn]).forEach((function(e){try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!j(e))&&console.error(gn)}catch(e){console.error(gn)}}))}setTimeout((function(){W(an),an()}))}var hn={iconExists:O,getIcon:w,listIcons:b,addIcon:x,addCollection:j,replaceIDs:A,calculateSize:C,buildIcon:M,getVersion:un,renderSVG:fn,renderHTML:sn,renderIcon:dn,scan:ln,observe:ne,stopObserving:te,pauseObserver:Y,resumeObserver:ee};return e.addCollection=j,e.addIcon=x,e.buildIcon=M,e.calculateSize=C,e.default=hn,e.getIcon=w,e.getVersion=un,e.iconExists=O,e.listIcons=b,e.observe=ne,e.pauseObserver=Y,e.renderHTML=sn,e.renderIcon=dn,e.renderSVG=fn,e.replaceIDs=A,e.resumeObserver=ee,e.scan=ln,e.stopObserving=te,Object.defineProperty(e,"__esModule",{value:!0}),e}({});if("object"==typeof exports)try{for(var key in exports.__esModule=!0,exports.default=Iconify,Iconify)exports[key]=Iconify[key]}catch(e){}try{void 0===self.Iconify&&(self.Iconify=Iconify)}catch(e){} | ||
var Iconify=function(t){"use strict";const e=Object.freeze({left:0,top:0,width:16,height:16}),n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...e,...n}),r=Object.freeze({...o,body:"",hidden:!1});function i(t,e){const o=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,e);for(const i in r)i in n?i in t&&!(i in o)&&(o[i]=n[i]):i in e?o[i]=e[i]:i in t&&(o[i]=t[i]);return o}function c(t,e,n){const o=t.icons,r=t.aliases||Object.create(null);let c={};function s(t){c=i(o[t]||r[t],c)}return s(e),n.forEach(s),i(t,c)}function s(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),r=Object.create(null);return(e||Object.keys(n).concat(Object.keys(o))).forEach((function t(e){if(n[e])return r[e]=[];if(!(e in r)){r[e]=null;const n=o[e]&&o[e].parent,i=n&&t(n);i&&(r[e]=[n].concat(i))}return r[e]})),r}(t);for(const r in o){const i=o[r];i&&(e(r,c(t,r,i)),n.push(r))}return n}const a=/^[a-z0-9]+(-[a-z0-9]+)*$/,u=(t,e,n,o="")=>{const r=t.split(":");if("@"===t.slice(0,1)){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const t=r.pop(),n=r.pop(),i={provider:r.length>0?r[0]:o,prefix:n,name:t};return e&&!f(i)?null:i}const i=r[0],c=i.split("-");if(c.length>1){const t={provider:o,prefix:c.shift(),name:c.join("-")};return e&&!f(t)?null:t}if(n&&""===o){const t={provider:o,prefix:"",name:i};return e&&!f(t,n)?null:t}return null},f=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(a)||!(e&&""===t.prefix||t.prefix.match(a))||!t.name.match(a)),l={provider:"",aliases:{},not_found:{},...e};function d(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function p(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(!d(t,l))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(a)||"string"!=typeof e.body||!d(e,r))return null}const o=e.aliases||Object.create(null);for(const t in o){const e=o[t],i=e.parent;if(!t.match(a)||"string"!=typeof i||!n[i]&&!o[i]||!d(e,r))return null}return e}const h=Object.create(null);function g(t,e){const n=h[t]||(h[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 m(t,e){return p(e)?s(e,((e,n)=>{n?t.icons[e]=n:t.missing.add(e)})):[]}function y(t,e){let n=[];return("string"==typeof t?[t]:Object.keys(h)).forEach((t=>{("string"==typeof t&&"string"==typeof e?[e]:Object.keys(h[t]||{})).forEach((e=>{const o=g(t,e);n=n.concat(Object.keys(o.icons).map((n=>(""!==t?"@"+t+":":"")+e+":"+n)))}))})),n}let b=!1;function v(t){const e="string"==typeof t?u(t,!0,b):t;if(e){const t=g(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function x(t,e){const n=u(t,!0,b);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}(g(n.provider,n.prefix),n.name,e)}function w(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),b&&!e&&!t.prefix){let e=!1;return p(t)&&(t.prefix="",s(t,((t,n)=>{n&&x(t,n)&&(e=!0)}))),e}const n=t.prefix;if(!f({provider:e,prefix:n,name:"a"}))return!1;return!!m(g(e,n),t)}function S(t){return!!v(t)}function E(t){const e=v(t);return e?{...o,...e}:null}const j=Object.freeze({width:null,height:null}),O=Object.freeze({...j,...n}),k=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function M(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(k);if(null===o||!o.length)return t;const r=[];let i=o.shift(),c=I.test(i);for(;;){if(c){const t=parseFloat(i);isNaN(t)?r.push(i):r.push(Math.ceil(t*e*n)/n)}else r.push(i);if(i=o.shift(),void 0===i)return r.join("");c=!c}}const C=t=>"unset"===t||"undefined"===t||"none"===t;function T(t,e){const n={...o,...t},r={...O,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let c=n.body;[n,r].forEach((t=>{const e=[],n=t.hFlip,o=t.vFlip;let r,s=t.rotate;switch(n?o?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):o&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:r=i.height/2+i.top,e.unshift("rotate(90 "+r.toString()+" "+r.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:r=i.width/2+i.left,e.unshift("rotate(-90 "+r.toString()+" "+r.toString()+")")}s%2==1&&(i.left!==i.top&&(r=i.left,i.left=i.top,i.top=r),i.width!==i.height&&(r=i.width,i.width=i.height,i.height=r)),e.length&&(c='<g transform="'+e.join(" ")+'">'+c+"</g>")}));const s=r.width,a=r.height,u=i.width,f=i.height;let l,d;null===s?(d=null===a?"1em":"auto"===a?f:a,l=M(d,u/f)):(l="auto"===s?u:s,d=null===a?M(l,f/u):"auto"===a?f:a);const p={},h=(t,e)=>{C(e)||(p[t]=e.toString())};return h("width",l),h("height",d),p.viewBox=i.left.toString()+" "+i.top.toString()+" "+u.toString()+" "+f.toString(),{attributes:p,body:c}}const F=/\sid="(\S+)"/g,L="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let A=0;function N(t,e=L){const n=[];let o;for(;o=F.exec(t);)n.push(o[1]);if(!n.length)return t;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach((n=>{const o="function"==typeof e?e(n):e+(A++).toString(),i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")})),t=t.replace(new RegExp(r,"g"),"")}function z(t,e){const n={...t};for(const t in e){const o=e[t],r=typeof o;t in j?(null===o||o&&("string"===r||"number"===r))&&(n[t]=o):r===typeof n[t]&&(n[t]="rotate"===t?o%4:o)}return n}const D={...O,inline:!1},P="iconify",_="iconify-inline",$="iconifyData"+Date.now();let q=[];function H(t){for(let e=0;e<q.length;e++){const n=q[e];if(("function"==typeof n.node?n.node():n.node)===t)return n}}function V(t,e=!1){let n=H(t);return n?(n.temporary&&(n.temporary=e),n):(n={node:t,temporary:e},q.push(n),n)}function R(){return q}let G=null;const Q={childList:!0,subtree:!0,attributes:!0};function U(t){if(!t.observer)return;const e=t.observer;e.pendingScan||(e.pendingScan=setTimeout((()=>{delete e.pendingScan,G&&G(t)})))}function J(t,e){if(!t.observer)return;const n=t.observer;if(!n.pendingScan)for(let o=0;o<e.length;o++){const r=e[o];if(r.addedNodes&&r.addedNodes.length>0||"attributes"===r.type&&void 0!==r.target[$])return void(n.paused||U(t))}}function B(t,e){t.observer.instance.observe(e,Q)}function K(t){let e=t.observer;if(e&&e.instance)return;const n="function"==typeof t.node?t.node():t.node;n&&window&&(e||(e={paused:0},t.observer=e),e.instance=new window.MutationObserver(J.bind(null,t)),B(t,n),e.paused||U(t))}function W(){R().forEach(K)}function X(t){if(!t.observer)return;const e=t.observer;e.pendingScan&&(clearTimeout(e.pendingScan),delete e.pendingScan),e.instance&&(e.instance.disconnect(),delete e.instance)}function Y(t){const e=null!==G;G!==t&&(G=t,e&&R().forEach(X)),e?W():function(t){const e=document;e.readyState&&"loading"!==e.readyState?t():e.addEventListener("DOMContentLoaded",t)}(W)}function Z(t){(t?[t]:R()).forEach((t=>{if(!t.observer)return void(t.observer={paused:1});const e=t.observer;if(e.paused++,e.paused>1||!e.instance)return;e.instance.disconnect()}))}function tt(t){if(t){const e=H(t);e&&Z(e)}else Z()}function et(t){(t?[t]:R()).forEach((t=>{if(!t.observer)return void K(t);const e=t.observer;if(e.paused&&(e.paused--,!e.paused)){const n="function"==typeof t.node?t.node():t.node;if(!n)return;e.instance?B(t,n):K(t)}}))}function nt(t){if(t){const e=H(t);e&&et(e)}else et()}function ot(t,e=!1){const n=V(t,e);return K(n),n}function rt(t){const e=H(t);e&&(X(e),function(t){q=q.filter((e=>t!==e&&t!==("function"==typeof e.node?e.node():e.node)))}(t))}function it(t,e){t.forEach((t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter((t=>t.id!==e)))}))}let ct=0;const st=Object.create(null);function at(t){return st[t]||st[""]}var ut={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ft(t,e,n,o){const r=t.resources.length,i=t.random?Math.floor(Math.random()*r):t.index;let c;if(t.random){let e=t.resources.slice(0);for(c=[];e.length>1;){const t=Math.floor(Math.random()*e.length);c.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}c=c.concat(e)}else c=t.resources.slice(i).concat(t.resources.slice(0,i));const s=Date.now();let a,u="pending",f=0,l=null,d=[],p=[];function h(){l&&(clearTimeout(l),l=null)}function g(){"pending"===u&&(u="aborted"),h(),d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function m(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function y(){u="failed",p.forEach((t=>{t(void 0,a)}))}function b(){d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function v(){if("pending"!==u)return;h();const o=c.shift();if(void 0===o)return d.length?void(l=setTimeout((()=>{h(),"pending"===u&&(b(),y())}),t.timeout)):void y();const r={status:"pending",resource:o,callback:(e,n)=>{!function(e,n,o){const r="success"!==n;switch(d=d.filter((t=>t!==e)),u){case"pending":break;case"failed":if(r||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return a=o,void y();if(r)return a=o,void(d.length||(c.length?v():y()));if(h(),b(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}u="completed",p.forEach((t=>{t(o)}))}(r,e,n)}};d.push(r),f++,l=setTimeout(v,t.rotate),n(o,e,r.callback)}return"function"==typeof o&&p.push(o),setTimeout(v),function(){return{startTime:s,payload:e,status:u,queriesSent:f,queriesPending:d.length,subscribe:m,abort:g}}}function lt(t){const e={...ut,...t};let n=[];function o(){n=n.filter((t=>"pending"===t().status))}const r={query:function(t,r,i){const c=ft(e,t,r,((t,e)=>{o(),i&&i(t,e)}));return n.push(c),c},find:function(t){return n.find((e=>t(e)))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:o};return r}function dt(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 pt=Object.create(null),ht=["https://api.simplesvg.com","https://api.unisvg.com"],gt=[];for(;ht.length>0;)1===ht.length||Math.random()>.5?gt.push(ht.shift()):gt.push(ht.pop());function mt(){}pt[""]=dt({resources:["https://api.iconify.design"].concat(gt)});const yt=Object.create(null);function bt(t){if(!yt[t]){const e=function(t){return pt[t]}(t);if(!e)return;const n={config:e,redundancy:lt(e)};yt[t]=n}return yt[t]}const vt="iconify2",xt="iconify",wt=xt+"-count",St=xt+"-version",Et=36e5,jt=168;function Ot(t,e){try{return t.getItem(e)}catch(t){}}function kt(t,e,n){try{return t.setItem(e,n),!0}catch(t){}}function It(t,e){try{t.removeItem(e)}catch(t){}}function Mt(t,e){return kt(t,wt,e.toString())}function Ct(t){return parseInt(Ot(t,wt))||0}const Tt={local:!0,session:!0},Ft={local:new Set,session:new Set};let Lt=!1;let At="undefined"==typeof window?{}:window;function Nt(t){const e=t+"Storage";try{if(At&&At[e]&&"number"==typeof At[e].length)return At[e]}catch(t){}Tt[t]=!1}function zt(t,e){const n=Nt(t);if(!n)return;const o=Ot(n,St);if(o!==vt){if(o){const t=Ct(n);for(let e=0;e<t;e++)It(n,xt+e.toString())}return kt(n,St,vt),void Mt(n,0)}const r=Math.floor(Date.now()/Et)-jt,i=t=>{const o=xt+t.toString(),i=Ot(n,o);if("string"==typeof i){try{const n=JSON.parse(i);if("object"==typeof n&&"number"==typeof n.cached&&n.cached>r&&"string"==typeof n.provider&&"object"==typeof n.data&&"string"==typeof n.data.prefix&&e(n,t))return!0}catch(t){}It(n,o)}};let c=Ct(n);for(let e=c-1;e>=0;e--)i(e)||(e===c-1?(c--,Mt(n,c)):Ft[t].add(e))}function Dt(){if(!Lt){Lt=!0;for(const t in Tt)zt(t,(t=>{const e=t.data,n=g(t.provider,e.prefix);if(!m(n,e).length)return!1;const o=e.lastModified||-1;return n.lastModifiedCached=n.lastModifiedCached?Math.min(n.lastModifiedCached,o):o,!0}))}}function Pt(t,e){function n(n){let o;if(!Tt[n]||!(o=Nt(n)))return;const r=Ft[n];let i;if(r.size)r.delete(i=Array.from(r).shift());else if(i=Ct(o),!Mt(o,i+1))return;const c={cached:Math.floor(Date.now()/Et),provider:t.provider,data:e};return kt(o,xt+i.toString(),JSON.stringify(c))}Lt||Dt(),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 Tt)zt(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 _t(){}function $t(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,r=t.prefix;e.forEach((e=>{const i=e.icons,c=i.pending.length;i.pending=i.pending.filter((e=>{if(e.prefix!==r)return!0;const c=e.name;if(t.icons[c])i.loaded.push({provider:o,prefix:r,name:c});else{if(!t.missing.has(c))return n=!0,!0;i.missing.push({provider:o,prefix:r,name:c})}return!1})),i.pending.length!==c&&(n||it([t],e.id),e.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),e.abort))}))})))}(t)})))}function qt(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 r;if(delete t.iconsToLoad,!o||!(r=at(e)))return;r.prepare(e,n,o).forEach((n=>{!function(t,e,n){let o,r;if("string"==typeof t){const e=at(t);if(!e)return n(void 0,424),mt;r=e.send;const i=bt(t);i&&(o=i.redundancy)}else{const e=dt(t);if(e){o=lt(e);const n=at(t.resources?t.resources[0]:"");n&&(r=n.send)}}o&&r?o.query(e,r,n)().abort:n(void 0,424)}(e,n,(e=>{if("object"!=typeof e)n.icons.forEach((e=>{t.missing.add(e)}));else try{const n=m(t,e);if(!n.length)return;const o=t.pendingIcons;o&&n.forEach((t=>{o.delete(t)})),Pt(t,e)}catch(t){console.error(t)}$t(t)}))}))})))}const Ht=t=>{const e=g(t.provider,t.prefix).pendingIcons;return!(!e||!e.has(t.name))},Vt=(t,e)=>{var n;const 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 r=t.provider,i=t.prefix,c=t.name,s=n[r]||(n[r]=Object.create(null)),a=s[i]||(s[i]=g(r,i));let u;u=c in a.icons?e.loaded:""===i||a.missing.has(c)?e.missing:e.pending;const f={provider:r,prefix:i,name:c};u.push(f)})),e}(function(t,e=!0,n=!1){const o=[];return t.forEach((t=>{const r="string"==typeof t?u(t,e,n):t;r&&o.push(r)})),o}(t,!0,("boolean"==typeof n&&(b=n),b)));if(!o.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(o.loaded,o.missing,o.pending,_t)})),()=>{t=!1}}const r=Object.create(null),i=[];let c,s;return o.pending.forEach((t=>{const{provider:e,prefix:n}=t;if(n===s&&e===c)return;c=e,s=n,i.push(g(e,n));const o=r[e]||(r[e]=Object.create(null));o[n]||(o[n]=[])})),o.pending.forEach((t=>{const{provider:e,prefix:n,name:o}=t,i=g(e,n),c=i.pendingIcons||(i.pendingIcons=new Set);c.has(o)||(c.add(o),r[e][n].push(o))})),i.forEach((t=>{const{provider:e,prefix:n}=t;r[e][n].length&&qt(t,r[e][n])})),e?function(t,e,n){const o=ct++,r=it.bind(null,n,o);if(!e.pending.length)return r;const i={id:o,icons:e,callback:t,abort:r};return n.forEach((t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(i)})),r}(e,o,i):_t};const Rt=/[\s,]+/;const Gt=["width","height"],Qt=["inline","hFlip","vFlip"];function Ut(t){const e=t.getAttribute("data-icon"),n="string"==typeof e&&u(e,!0);if(!n)return null;const o={...D,inline:t.classList&&t.classList.contains(_)};Gt.forEach((e=>{const n=t.getAttribute("data-"+e);n&&(o[e]=n)}));const r=t.getAttribute("data-rotate");"string"==typeof r&&(o.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 r=parseFloat(t.slice(0,t.length-n.length));return isNaN(r)?0:(r/=e,r%1==0?o(r):0)}}return e}(r));const i=t.getAttribute("data-flip");"string"==typeof i&&function(t,e){e.split(Rt).forEach((e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}}))}(o,i),Qt.forEach((e=>{const n="data-"+e,r=function(t,e){return t===e||"true"===t||""!==t&&"false"!==t&&null}(t.getAttribute(n),n);"boolean"==typeof r&&(o[e]=r)}));const c=t.getAttribute("data-mode");return{name:e,icon:n,customisations:o,mode:c}}const Jt="svg."+P+", i."+P+", span."+P+", i."+_+", span."+_;function Bt(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>"}let Kt;function Wt(t){return void 0===Kt&&function(){try{Kt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){Kt=null}}(),Kt?Kt.createHTML(t):t}function Xt(t){const e=new Set(["iconify"]);return["provider","prefix"].forEach((n=>{t[n]&&e.add("iconify--"+t[n])})),e}function Yt(t,e,n,o){const r=t.classList;if(o){const t=o.classList;Array.from(t).forEach((t=>{r.add(t)}))}const i=[];return e.forEach((t=>{r.contains(t)?n.has(t)&&i.push(t):(r.add(t),i.push(t))})),n.forEach((t=>{e.has(t)||r.remove(t)})),i}function Zt(t,e,n){const o=t.style;(n||[]).forEach((t=>{o.removeProperty(t)}));const r=[];for(const t in e)o.getPropertyValue(t)||(r.push(t),o.setProperty(t,e[t]));return r}function te(t,e,n){let o;try{o=document.createElement("span")}catch(e){return t}const r=e.customisations,i=T(n,r),c=t[$],s=Bt(N(i.body),{"aria-hidden":"true",role:"img",...i.attributes});o.innerHTML=Wt(s);const a=o.childNodes[0],u=t.attributes;for(let t=0;t<u.length;t++){const e=u.item(t),n=e.name;"class"===n||a.hasAttribute(n)||a.setAttribute(n,e.value)}const f=Yt(a,Xt(e.icon),new Set(c&&c.addedClasses),t),l=Zt(a,r.inline?{"vertical-align":"-0.125em"}:{},c&&c.addedStyles),d={...e,status:"loaded",addedClasses:f,addedStyles:l};return a[$]=d,t.parentNode&&t.parentNode.replaceChild(a,t),a}const ee={display:"inline-block"},ne={"background-color":"currentColor"},oe={"background-color":"transparent"},re={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ie={"-webkit-mask":ne,mask:ne,background:oe};for(const t in ie){const e=ie[t];for(const n in re)e[t+"-"+n]=re[n]}function ce(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}let se=!1;function ae(){se||(se=!0,setTimeout((()=>{se&&(se=!1,ue())})))}function ue(t,e=!1){const n=Object.create(null);function r(t,e){const{provider:o,prefix:r,name:i}=t,c=g(o,r),s=c.icons[i];if(s)return{status:"loaded",icon:s};if(c.missing.has(i))return{status:"missing"};if(e&&!Ht(t)){const t=n[o]||(n[o]=Object.create(null));(t[r]||(t[r]=new Set)).add(i)}return{status:"loading"}}(t?[t]:R()).forEach((t=>{const n="function"==typeof t.node?t.node():t.node;if(!n||!n.querySelectorAll)return;let i=!1,c=!1;function s(e,n,r){if(c||(c=!0,Z(t)),"SVG"!==e.tagName.toUpperCase()){const t=n.mode,i="mask"===t||"bg"!==t&&("style"===t?-1!==r.body.indexOf("currentColor"):null);if("boolean"==typeof i)return void function(t,e,n,o){const r=e.customisations,i=T(n,r),c=i.attributes,s=t[$],a=Bt(i.body,{...c,width:n.width+"",height:n.height+""}),u=Yt(t,Xt(e.icon),new Set(s&&s.addedClasses)),f={"--svg":'url("'+(l=a,"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," ")}(l)+'")'),width:ce(c.width),height:ce(c.height),...ee,...o?ne:oe};var l;r.inline&&(f["vertical-align"]="-0.125em");const d=Zt(t,f,s&&s.addedStyles),p={...e,status:"loaded",addedClasses:u,addedStyles:d};t[$]=p}(e,n,{...o,...r},i)}te(e,n,r)}(function(t){const e=[];return t.querySelectorAll(Jt).forEach((t=>{const n=t[$]||"svg"!==t.tagName.toLowerCase()?Ut(t):null;n&&e.push({node:t,props:n})})),e})(n).forEach((({node:t,props:e})=>{const n=t[$];if(!n){const{status:n,icon:o}=r(e.icon,!0);return o?void s(t,e,o):(i=i||"loading"===n,void(t[$]={...e,status:n}))}let o;if(function(t,e){if(t.name!==e.name||t.mode!==e.mode)return!0;const n=t.customisations,o=e.customisations;for(const t in D)if(n[t]!==o[t])return!0;return!1}(n,e)){if(o=r(e.icon,n.name!==e.name),!o.icon)return i=i||"loading"===o.status,void Object.assign(n,{...e,status:o.status})}else{if("loading"!==n.status)return;if(o=r(e.icon,!1),!o.icon)return void(n.status=o.status)}s(t,e,o.icon)})),t.temporary&&!i?rt(n):e&&i?ot(n,!0):c&&t.observer&&et(t)}));for(const t in n){const e=n[t];for(const n in e){const o=e[n];Vt(Array.from(o).map((e=>({provider:t,prefix:n,name:e}))),ae)}}}function fe(t,e,n=!1){const o=v(t);if(!o)return null;const r=u(t),i=z(D,e||{}),c=te(document.createElement("span"),{name:t,icon:r,customisations:i},o);return n?c.outerHTML:c}function le(){return"3.1.1"}function de(t,e){return fe(t,e,!1)}function pe(t,e){return fe(t,e,!0)}function he(t,e){const n=v(t);if(!n)return null;return T(n,z(D,e||{}))}function ge(t){t?function(t){const e=H(t);e?ue(e):ue({node:t,temporary:!0},!0)}(t):ue()}if("undefined"!=typeof document&&"undefined"!=typeof window){!function(){if(document.documentElement)return V(document.documentElement);q.push({node:()=>document.documentElement})}();const t=window;if(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||!w(t))&&console.error(n)}catch(t){console.error(n)}}))}setTimeout((()=>{Y(ue),ue()}))}const me={iconExists:S,getIcon:E,listIcons:y,addIcon:x,addCollection:w,replaceIDs:N,calculateSize:M,buildIcon:T,getVersion:le,renderSVG:de,renderHTML:pe,renderIcon:he,scan:ge,observe:ot,stopObserving:rt,pauseObserver:tt,resumeObserver:nt};return t.addCollection=w,t.addIcon=x,t.buildIcon=T,t.calculateSize=M,t.default=me,t.getIcon=E,t.getVersion=le,t.iconExists=S,t.listIcons=y,t.observe=ot,t.pauseObserver=tt,t.renderHTML=pe,t.renderIcon=he,t.renderSVG=de,t.replaceIDs=N,t.resumeObserver=nt,t.scan=ge,t.stopObserving=rt,Object.defineProperty(t,"__esModule",{value:!0}),t}({});if("object"==typeof exports)try{for(var key in exports.__esModule=!0,exports.default=Iconify,Iconify)exports[key]=Iconify[key]}catch(t){}try{void 0===self.Iconify&&(self.Iconify=Iconify)}catch(t){} |
MIT License | ||
Copyright (c) 2019 - 2022 Vjacheslav Trushkin / Iconify OÜ | ||
Copyright (c) 2019-PRESENT Vjacheslav Trushkin | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
@@ -5,3 +5,3 @@ { | ||
"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"license": "MIT", | ||
@@ -63,21 +63,20 @@ "main": "./dist/iconify.min.js", | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.33.7", | ||
"@rollup/plugin-buble": "^1.0.1", | ||
"@rollup/plugin-node-resolve": "^15.0.1", | ||
"@microsoft/api-extractor": "^7.35.1", | ||
"@rollup/plugin-node-resolve": "^15.1.0", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"@types/jest": "^29.2.4", | ||
"@types/jsdom": "^20.0.1", | ||
"@types/node": "^18.11.17", | ||
"@typescript-eslint/eslint-plugin": "^5.47.0", | ||
"@rollup/plugin-terser": "^0.4.3", | ||
"@types/jest": "^29.5.2", | ||
"@types/jsdom": "^21.1.1", | ||
"@types/node": "^18.16.16", | ||
"@typescript-eslint/eslint-plugin": "^5.59.9", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.30.0", | ||
"jest": "^29.3.1", | ||
"jsdom": "^20.0.3", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^3.8.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"ts-jest": "^29.0.3", | ||
"typescript": "^4.9.4", | ||
"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.0" | ||
"@iconify/utils": "^2.1.6" | ||
}, | ||
@@ -84,0 +83,0 @@ "scripts": { |
@@ -6,3 +6,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 100,000 icons. | ||
- Out of the box includes 100+ icon sets with more than 150,000 icons. | ||
- Embed icons in HTML with SVG framework or components for front-end frameworks. | ||
@@ -25,3 +25,3 @@ - Embed icons in designs with plug-ins for Figma, Sketch and Adobe XD. | ||
```html | ||
<script src="https://code.iconify.design/3/3.1.0/iconify.min.js"></script> | ||
<script src="https://code.iconify.design/3/3.1.1/iconify.min.js"></script> | ||
``` | ||
@@ -32,3 +32,3 @@ | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@iconify/iconify@3.1.0/dist/iconify.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@iconify/iconify@3.1.1/dist/iconify.min.js"></script> | ||
``` | ||
@@ -59,6 +59,14 @@ | ||
That is it. Change `data-icon` value to the name of the icon you want to use. There are over 100,000 premade icons to choose from, including FontAwesome, Material Design Icons, Tabler Icons, Box Icons, Unicons, Bootstrap Icons and even several emoji sets. | ||
That is it. Change `data-icon` value to the name of the icon you want to use. There are over 150,000 premade icons to choose from, including FontAwesome, Material Design Icons, Tabler Icons, Box Icons, Unicons, Bootstrap Icons and even several emoji sets. | ||
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. | ||
## Web component | ||
SVG framework was designed a while ago, when browsers had poor support for web components. | ||
However, this is no longer an issue. All modern browsers support web components. | ||
A newer replacement for SVG framework is available: [Iconify Icon web component](https://iconify.design/docs/iconify-icon/). Consider switching to it. | ||
## Full documentation | ||
@@ -68,8 +76,7 @@ | ||
Full documentation is available on Iconify website: | ||
Full documentation is available on [Iconify website](https://iconify.design/docs/): | ||
- [SVG framework documentation](https://docs.iconify.design/icon-components/svg-framework/). | ||
- [Iconify API documentation](https://docs.iconify.design/api/). | ||
- [Creating icon bundles](https://docs.iconify.design/icon-components/bundles/). | ||
- [Iconify Tools documentation](https://docs.iconify.design/tools/tools2/). | ||
- [SVG framework documentation](https://iconify.design/docs/icon-components/svg-framework/). | ||
- [Iconify API documentation](https://iconify.design/docs/api/). | ||
- [Iconify Tools documentation](https://iconify.design/docs/libraries/tools/). | ||
@@ -88,4 +95,14 @@ ## How does it work? | ||
### Inline mode | ||
## Offline usage | ||
SVG framework is designed to be used with Iconify API, loading icon data on demand instead of bundling it. | ||
If you want to use icons without Iconify API, [there are many other options available](https://iconify.design/docs/usage/). | ||
## Attributes | ||
There are optional attributes to customise icon appearance. | ||
### Vertical alignment | ||
Code examples above use different class names: the first example uses "iconify", the second example uses "iconify-inline". | ||
@@ -148,35 +165,6 @@ | ||
For more details see [Iconify API documentation](https://docs.iconify.design/api/). | ||
For more details see [Iconify API documentation](https://iconify.design/docs/api/). | ||
You can also create custom Iconify API to serve your own icons. For more details see [hosting custom icons in Iconify documentation](https://docs.iconify.design/api/hosting.html). | ||
You can also create custom Iconify API to serve your own icons. For more details see [hosting custom icons in Iconify documentation](https://iconify.design/docs/api/hosting.html). | ||
### Using Iconify offline | ||
While the default method of retrieving icons is to retrieve them from API, there are other options. Iconify SVG framework is designed to be as flexible as possible. | ||
Easiest option to serve icons without API is by creating icon bundles. | ||
Icon bundles are small scripts that you can load after Iconify SVG framework or bundle it together in one file. | ||
For more details see [icon bundles in Iconify documentation](https://docs.iconify.design/icon-components/bundles/). | ||
Another option is to import icons and bundle them with Iconify, similar to React and Vue components. Example: | ||
```js | ||
// Installation: npm install --save-dev @iconify/iconify | ||
import Iconify from '@iconify/iconify/offline'; | ||
// Installation: npm install --save-dev @iconify/icons-dashicons | ||
import adminUsers from '@iconify/icons-dashicons/admin-users'; | ||
// Unlike React and Vue components, in SVG framework each icon added with addIcon() name must have a | ||
// prefix and a name. In this example prefix is "dashicons" and name is "admin-users". | ||
Iconify.addIcon('dashicons:admin-users', adminUsers); | ||
``` | ||
```html | ||
<span class="iconify" data-icon="dashicons:admin-users"></span> | ||
``` | ||
See [Iconify for React](https://docs.iconify.design/icon-components/react/) documentation for more details. | ||
## Color | ||
@@ -290,3 +278,3 @@ | ||
There are over 100,000 icons to choose from. | ||
There are over 150,000 icons to choose from. | ||
@@ -336,2 +324,2 @@ General collections (monotone icons): | ||
© 2019 - 2022 Vjacheslav Trushkin / Iconify OÜ | ||
© 2019-PRESENT Vjacheslav Trushkin |
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
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
Sorry, the diff of this file is not supported yet
498043
18
15758
317