| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469 |
- diff --git a/node_modules/weapp-svg-icon/miniprogram_dist/index.js b/node_modules/weapp-svg-icon/miniprogram_dist/index.js
- index 46b3237..205c85b 100644
- --- a/node_modules/weapp-svg-icon/miniprogram_dist/index.js
- +++ b/node_modules/weapp-svg-icon/miniprogram_dist/index.js
- @@ -1,338 +1,115 @@
- -module.exports =
- -/******/ (function(modules) { // webpackBootstrap
- -/******/ // The module cache
- -/******/ var installedModules = {};
- -/******/
- -/******/ // The require function
- -/******/ function __webpack_require__(moduleId) {
- -/******/
- -/******/ // Check if module is in cache
- -/******/ if(installedModules[moduleId]) {
- -/******/ return installedModules[moduleId].exports;
- -/******/ }
- -/******/ // Create a new module (and put it into the cache)
- -/******/ var module = installedModules[moduleId] = {
- -/******/ i: moduleId,
- -/******/ l: false,
- -/******/ exports: {}
- -/******/ };
- -/******/
- -/******/ // Execute the module function
- -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- -/******/
- -/******/ // Flag the module as loaded
- -/******/ module.l = true;
- -/******/
- -/******/ // Return the exports of the module
- -/******/ return module.exports;
- -/******/ }
- -/******/
- -/******/
- -/******/ // expose the modules object (__webpack_modules__)
- -/******/ __webpack_require__.m = modules;
- -/******/
- -/******/ // expose the module cache
- -/******/ __webpack_require__.c = installedModules;
- -/******/
- -/******/ // define getter function for harmony exports
- -/******/ __webpack_require__.d = function(exports, name, getter) {
- -/******/ if(!__webpack_require__.o(exports, name)) {
- -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- -/******/ }
- -/******/ };
- -/******/
- -/******/ // define __esModule on exports
- -/******/ __webpack_require__.r = function(exports) {
- -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- -/******/ }
- -/******/ Object.defineProperty(exports, '__esModule', { value: true });
- -/******/ };
- -/******/
- -/******/ // create a fake namespace object
- -/******/ // mode & 1: value is a module id, require it
- -/******/ // mode & 2: merge all properties of value into the ns
- -/******/ // mode & 4: return value when already ns object
- -/******/ // mode & 8|1: behave like require
- -/******/ __webpack_require__.t = function(value, mode) {
- -/******/ if(mode & 1) value = __webpack_require__(value);
- -/******/ if(mode & 8) return value;
- -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- -/******/ var ns = Object.create(null);
- -/******/ __webpack_require__.r(ns);
- -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- -/******/ return ns;
- -/******/ };
- -/******/
- -/******/ // getDefaultExport function for compatibility with non-harmony modules
- -/******/ __webpack_require__.n = function(module) {
- -/******/ var getter = module && module.__esModule ?
- -/******/ function getDefault() { return module['default']; } :
- -/******/ function getModuleExports() { return module; };
- -/******/ __webpack_require__.d(getter, 'a', getter);
- -/******/ return getter;
- -/******/ };
- -/******/
- -/******/ // Object.prototype.hasOwnProperty.call
- -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- -/******/
- -/******/ // __webpack_public_path__
- -/******/ __webpack_require__.p = "";
- -/******/
- -/******/
- -/******/ // Load entry module and return exports
- -/******/ return __webpack_require__(__webpack_require__.s = 0);
- -/******/ })
- -/************************************************************************/
- -/******/ ([
- -/* 0 */
- -/***/ (function(module, exports, __webpack_require__) {
- -
- -"use strict";
- -
- -
- -var _svgIcon = __webpack_require__(1);
- -
- -Component({
- - /**
- - * 组件的属性列表
- - */
- - properties: {
- - name: {
- - type: String,
- - value: ''
- - },
- - color: {
- - type: String,
- - value: ''
- - },
- - size: {
- - type: String
- - }
- - },
- - /**
- - * 组件的初始数据
- - */
- - data: {
- - width: '1em',
- - height: '1em',
- - iconUrl: '',
- - class: ''
- - },
- - lifetimes: {
- - attached: function attached() {
- - this.getDataUri(this.data.name, this.data.color);
- - if (this.data.size) {
- - this.setData({
- - width: this.data.size,
- - height: this.data.size
- - });
- - }
- - }
- - },
- - /**
- - * 组件的方法列表
- - */
- - methods: {
- - getDataUri: function getDataUri(name, color) {
- - var that = this;
- - var url = (0, _svgIcon.getLocalSVG)(name);
- - if (url) {
- - this.setData({
- - iconUrl: url,
- - class: color ? 'icon' : 'default-icon'
- - });
- - } else {
- - (0, _svgIcon.getIconifySVG)(name).then(function (res) {
- - that.setData({
- - iconUrl: res,
- - class: color ? 'icon' : 'default-icon'
- - });
- - }).catch(function (e) {
- - console.log(e);
- - });
- - }
- - }
- - }
- -}); // components/svg-icon/index.js
- -// svg-icon
- -
- -/***/ }),
- -/* 1 */
- -/***/ (function(module, exports, __webpack_require__) {
- -
- -"use strict";
- -
- -
- -exports.__esModule = true;
- -exports.getLocalSVG = getLocalSVG;
- -exports.getIconifySVG = getIconifySVG;
- -exports.iconifySetup = iconifySetup;
- -
- -var _mdiLight = __webpack_require__(2);
- -
- -var _mdiLight2 = _interopRequireDefault(_mdiLight);
- -
- -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- -
- -var ICONIFY_API = ''; // https://github.com/LarchLiu/weapp-svg-icon/blob/main/miniprogram/utils/svgIcon.ts
- -// svg-icon
- -
- -var iconifyPresets = {
- - MdiLight: _mdiLight2.default
- -};
- -var customerSvg = {
- - EmojioneMonotoneMotorcycle: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--emojione-monotone" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fill="currentColor" d="M13.895 39.35h-2.52c-1.754.23 1.685 1.96 1.685 1.96s1.685-1.239 1.685-1.614c-.001-.375-.85-.346-.85-.346m12.871 11.809c-.466.269-.93.875-1.03 1.346l-.19.894c-.1.472.009 1.028.241 1.236c.232.209.545 0 .694-.461l.86-2.661c.151-.464-.109-.624-.575-.354m12.117-1.016c-.465.271-.93.875-1.029 1.348l-.191.892c-.1.472.01 1.028.242 1.238c.232.208.545.001.695-.463l.859-2.659c.148-.466-.111-.625-.576-.356"></path><path fill="currentColor" d="M52.625 43.558a9.41 9.41 0 0 0-7.074 3.182l-.646-.286c.207-.189.43-.385.689-.59c.41-.322.566-.688.574-1.051l12.426-5.883a3.774 3.774 0 0 0-.602-2.211c1.729-2.172 1.758-4.762 1.758-4.904V30.34h-1.5c-2.23 0-3.977.048-6.145.673c-1.482.428-2.537.888-3.318 1.386c.221-1.014.082-2.19-.785-3.442c0 0-5.709-5.956-12.273-7.799c1.965-1.562 2.613-3.287 2.613-6.885C38.342 7.505 32.745 2 25.865 2c-6.879 0-12.476 5.505-12.476 12.272c0 .49.032.925.087 1.322l-.017.006c-1.198.428 1.03 6.574 2.308 6.636c1.832 4.296 4.56 5.27 6.648 5.27c1.069 0 2.205-.282 3.319-.792l.342 4.041l-2.033 1.078l-.094-.084l-1.413-1.268l-.43-.387h-.581c-4.539 0-8.794 2.188-11.383 5.851l-.205.288c-1.218 1.707-2 2.915-1.781 4.1c.097.521.391.97.83 1.263c.401.27.97.646 1.618 1.074a10.353 10.353 0 0 0-5.775 2.272l1.386.142C3.676 46.732 2 49.563 2 52.779C2 57.873 6.197 62 11.375 62c4.079 0 7.539-2.565 8.829-6.143l.002.089a2.721 2.721 0 0 0 2.74 2.747c.087 0 .176-.003.267-.012l.038-.002l.038-.006l18.366-2.505l1.428-.194l-.141-1.41c-.014-.135-.016-.27-.02-.406a8.956 8.956 0 0 0-.037-.672a15.023 15.023 0 0 1-.061-1.934l.486.201a9.372 9.372 0 0 0-.061 1.025c0 5.094 4.197 9.221 9.375 9.221S62 57.873 62 52.779s-4.197-9.221-9.375-9.221m-7.756-4.788c4.592-2.287 1.193-4.477 7.658-6.342c1.986-.572 3.58-.613 5.723-.613c0 0 0 3.746-3.215 5.475c-6.537 3.516-11.785 3.834-11.785 3.834s-.059-1.519 1.619-2.354m-6.668 5.592a3.665 3.665 0 0 1 1.186 1.915c-1.242.205-1.855 1.041-2.24 1.568c-.012.018-.02.025-.031.041l1.085-3.524M25.382 24.699c-1.012.548-2.037.839-2.968.839c-2.376 0-3.855-1.9-4.767-3.986c3.711-1.563 8.254-4.11 10.052-5.979a2 2 0 0 0 .55.085c1.102 0 1.994-.879 1.994-1.961c0-1.083-.893-1.961-1.994-1.961c-.928 0-1.7.625-1.923 1.47c-2.677-.134-7.309.712-10.907 1.764a7.877 7.877 0 0 1-.031-.697c0-5.682 4.7-10.305 10.476-10.305c5.777 0 10.477 4.623 10.477 10.305c0 4.682-.797 5.097-6.999 8.33a255.278 255.278 0 0 0-3.96 2.096m-1.009 12.437c.09-.222.136-.438.153-.657l6.07-2.73a1.667 1.667 0 0 0 .843-1.848h.01l-.145-1.701l4.137 3.615c-.129-.018-.256-.045-.387-.045c-.252 0-.498.033-.73.1c-1.014.289-2.478.854-3.895 1.4c-.784.303-1.525.588-2.074.781c-1.199.418-1.977 1.377-1.977 2.44v.188a70.492 70.492 0 0 0-2.756-.568c.343-.269.587-.575.751-.975m9.621-1.613l-1.04 4.082l-1.77.416a45.073 45.073 0 0 0-3.307-.979v-.552c0-.466.461-.87.981-1.052c1.309-.458 3.564-1.384 5.136-1.915M19.677 32.92l.743-.311c.142-.061.288-.088.433-.088c.413 0 .803.23.975.619l.641 1.473c.953 2.183.953 2.183-1.975 3.409c-.401.169-.75.237-1.053.237c-1.194 0-1.661-1.07-1.761-1.301c-.771-1.76.375-2.646 1.335-3.128c.024-.383.268-.746.662-.91m-3.614 19.859c0 .212-.035.414-.063.619l1.913-.126a6.314 6.314 0 0 1-.625 2.294l-1.578-1.039a4.58 4.58 0 0 1-.643 1.063l1.723.834a6.56 6.56 0 0 1-1.71 1.682l-.847-1.695a4.64 4.64 0 0 1-1.033.617l1.071 1.537a6.625 6.625 0 0 1-2.394.645l.128-1.882c-.208.028-.414.062-.629.062c-.199 0-.388-.033-.581-.057l.147 1.88a6.625 6.625 0 0 1-2.401-.618l1.057-1.553a4.645 4.645 0 0 1-1.081-.631l-.847 1.695a6.576 6.576 0 0 1-1.71-1.682l1.723-.833a4.6 4.6 0 0 1-.643-1.063l-1.578 1.039a6.314 6.314 0 0 1-.625-2.294l1.913.126c-.028-.205-.063-.407-.063-.619c0-.197.035-.383.059-.572l-1.912.145a6.313 6.313 0 0 1 .628-2.359l1.578 1.039c.155-.371.367-.71.61-1.025l-1.73-.818a6.54 6.54 0 0 1 1.749-1.737l.848 1.695a4.617 4.617 0 0 1 1.081-.633l-1.057-1.553a6.578 6.578 0 0 1 2.333-.614l-.128 1.882c.208-.027.414-.063.629-.063s.421.035.629.063l-.127-1.882a6.594 6.594 0 0 1 1.859.417l-1.659 3.344a2.85 2.85 0 0 0-.701-.098c-1.554 0-2.813 1.238-2.813 2.768s1.259 2.766 2.813 2.766c1.553 0 2.813-1.236 2.813-2.766c0-.8-.349-1.514-.899-2.019l2.145-3.017c.514.401.984.855 1.357 1.391l-1.723.834c.247.313.468.645.627 1.015l1.563-1.054c.361.721.59 1.514.655 2.355l-1.913-.125c.026.205.062.407.062.62m25.33.864c.039.357.021.715.057 1.064l-18.368 2.506a1.581 1.581 0 0 1-.136.006c-.8 0-1.24-.633-1.24-1.295c0 0-.098-6.318-.956-7.871c-.439-.795-2.773-2.322-2.809-2.346c0 0-6.095-3.979-8.11-5.331c-.745-.499.669-2.354 1.543-3.589a12.35 12.35 0 0 1 7.092-4.842c-.31.248-.563.553-.725.908c-1.137.729-1.61 1.592-1.756 2.402c-.291.262-.58.545-.86.867c-.392.448-1.699 2.363 0 2.363c.332 0 .986.044 1.861.133a3.202 3.202 0 0 0 2.455 1.117c.527 0 1.08-.121 1.643-.357l.363-.152c3.213.525 7.029 1.342 10.084 2.486c.297.111.564.219.806.324l-1.556 6.113l-.705-.174a3.614 3.614 0 0 0-1.471-.056c.09-.108.033-.271-.223-.461l-6.418-4.747c-.441-.326-.803-.229-.803.217s.359 1.078.797 1.408l4.144 3.115c.439.33 1.249.6 1.8.6h.156c-1.08.357-1.948 1.215-2.232 2.365l8.163 2.017c.947.233 1.898-.312 2.123-1.224l.307-1.228c2.166-.263 1.76-2.276 3.551-2.276c.691 0 1.299.103 1.83.244c-.427 1.42-.599 3.889-.407 5.694m-.651-9.03l-.652-.287l3.65-1.768a25.284 25.284 0 0 0 2.982-.524l-1.502.937c-.199-.209-.352-.336-.352-.336l-4.126 1.978m8.178 2.84l.496.994l-1.109-.49c.199-.174.392-.355.613-.504m8.393 5.326c0 .212-.035.414-.063.619l1.912-.126a6.314 6.314 0 0 1-.625 2.294l-1.578-1.039a4.546 4.546 0 0 1-.643 1.063l1.723.833a6.525 6.525 0 0 1-1.709 1.682l-.848-1.694c-.318.242-.656.46-1.031.616l1.07 1.537a6.624 6.624 0 0 1-2.395.645l.127-1.882c-.207.028-.414.062-.629.062c-.199 0-.389-.033-.58-.057l.146 1.88a6.62 6.62 0 0 1-2.4-.618l1.057-1.553a4.652 4.652 0 0 1-1.082-.631l-.846 1.695a6.525 6.525 0 0 1-1.709-1.682l1.723-.834a4.559 4.559 0 0 1-.643-1.063l-1.578 1.039a6.294 6.294 0 0 1-.625-2.294l1.057.069l3.623 1.5a2.815 2.815 0 0 0 1.857.703c1.553 0 2.813-1.236 2.813-2.766c0-1.385-1.035-2.521-2.385-2.725l-2.799-1.237c.189-.114.387-.218.594-.302L49.79 46.96a6.59 6.59 0 0 1 2.332-.614l-.127 1.882c.207-.027.414-.063.629-.063s.422.035.629.063l-.127-1.882a6.61 6.61 0 0 1 2.332.614l-1.057 1.553c.377.152.721.361 1.043.601l.828-1.702a6.537 6.537 0 0 1 1.768 1.721l-1.723.833c.246.313.467.646.627 1.016l1.563-1.054c.361.721.59 1.514.654 2.355l-1.911-.123c.027.204.063.406.063.619"></path></svg>',
- - EmojioneMonotoneSportsMedal: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--emojione-monotone" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fill="currentColor" d="m32.001 27.927l-3.246 9.989H18.251l8.498 6.174l-3.248 9.988l8.5-6.172l8.498 6.172l-3.248-9.988l8.498-6.174H35.245l-3.244-9.989m2.838 15.12l1.752 5.396l-4.59-3.336l-4.594 3.336l1.756-5.396l-4.592-3.336h5.676l1.754-5.396l1.754 5.396h5.674l-4.59 3.336"></path><path fill="currentColor" d="M44.657 26.519v-8.698c0-.364-.199-.67-.481-.86L54 2H35.165l-3.164 4.746L28.837 2H10l9.823 14.96a1.04 1.04 0 0 0-.48.861v8.698C14.862 30.187 12 35.758 12 42c0 11.045 8.955 20 20 20h.001c.681 0 1.354-.035 2.017-.102C44.115 60.887 52 52.365 52 42c0-6.242-2.862-11.813-7.343-15.481M40.826 3h6.328l-8.825 13.239l-3.164-4.746L40.826 3m.667 17.985l.973-1.458c.052.125.082.261.082.404v4.219a.994.994 0 0 1-.297.7C39.251 23.052 35.752 22 32 22a19.87 19.87 0 0 0-10.251 2.851a.996.996 0 0 1-.297-.701v-4.219c0-.143.03-.28.082-.404l.973 1.459h18.986zM16.846 3h6.328l11.324 16.985H28.17L16.846 3M32 59c-9.388 0-17-7.611-17-17s7.612-17 17-17s17 7.611 17 17s-7.612 17-17 17"></path></svg>'
- -};
- -var iconifyPreload = ['carbon:portfolio'];
- -function svgNameSwtich(id) {
- - return id.split(/:|-|_/).filter(Boolean).map(function (s) {
- - return s[0].toUpperCase() + s.slice(1).toLowerCase();
- - }).join('');
- +// Generated by scripts/generate-svg-icons.mjs — DO NOT EDIT.
- +// Minimal iconify data extracted from @iconify-json/ph + @iconify-json/solar.
- +var iconifyPresets = {"Ph":{"prefix":"ph","width":256,"height":256,"icons":{"books-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M48 72h64v112H48Zm142.64-33.61a8 8 0 0 0-9.5-6.21l-46.81 10a8.07 8.07 0 0 0-6.15 9.57L139.79 107l62.46-13.42Z\" opacity=\".2\"/><path d=\"m231.65 194.55l-33.19-157.8a16 16 0 0 0-19-12.39l-46.81 10.06a16.08 16.08 0 0 0-12.3 19l33.19 157.8A16 16 0 0 0 169.16 224a16.3 16.3 0 0 0 3.38-.36l46.81-10.06a16.09 16.09 0 0 0 12.3-19.03M136 50.15v-.09l46.8-10l3.33 15.87L139.33 66Zm6.62 31.47l46.82-10.05l3.34 15.9L146 97.53Zm6.64 31.57l46.82-10.06l13.3 63.24l-46.82 10.06ZM216 197.94l-46.8 10l-3.33-15.87l46.8-10.07l3.33 15.85zM104 32H56a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16M56 48h48v16H56Zm0 32h48v96H56Zm48 128H56v-16h48z\"/></g>"},"building-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M200 24v208h-48v-48h-48v48H56V24Z\" opacity=\".2\"/><path d=\"M232 224h-24V32h8a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16h8v192H24a8 8 0 0 0 0 16h208a8 8 0 0 0 0-16M64 32h128v192h-32v-40a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v40H64Zm80 192h-32v-32h32ZM88 64a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8m-48 40a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8m-48 40a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8\"/></g>"},"calendar-heart-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M176 120c0 32-48 56-48 56s-48-24-48-56a24 24 0 0 1 48 0a24 24 0 0 1 48 0\" opacity=\".2\"/><path d=\"M208 32h-24v-8a8 8 0 0 0-16 0v8H88v-8a8 8 0 0 0-16 0v8H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176H48V48h24v8a8 8 0 0 0 16 0v-8h80v8a8 8 0 0 0 16 0v-8h24zM152 88a31.9 31.9 0 0 0-24 10.86A32 32 0 0 0 72 120c0 36.52 50.28 62.08 52.42 63.16a8 8 0 0 0 7.16 0C133.72 182.08 184 156.52 184 120a32 32 0 0 0-32-32m-24 78.93c-13.79-7.79-40-26.75-40-46.93a16 16 0 0 1 32 0a8 8 0 0 0 16 0a16 16 0 0 1 32 0c0 20.19-26.21 39.15-40 46.93\"/></g>"},"camera-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M208 64h-32l-16-24H96L80 64H48a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16m-80 104a36 36 0 1 1 36-36a36 36 0 0 1-36 36\" opacity=\".2\"/><path d=\"M208 56h-27.72l-13.63-20.44A8 8 0 0 0 160 32H96a8 8 0 0 0-6.65 3.56L75.71 56H48a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h160a24 24 0 0 0 24-24V80a24 24 0 0 0-24-24m8 136a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8V80a8 8 0 0 1 8-8h32a8 8 0 0 0 6.66-3.56L100.28 48h55.43l13.63 20.44A8 8 0 0 0 176 72h32a8 8 0 0 1 8 8ZM128 88a44 44 0 1 0 44 44a44.05 44.05 0 0 0-44-44m0 72a28 28 0 1 1 28-28a28 28 0 0 1-28 28\"/></g>"},"compass-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M128 32a96 96 0 1 0 96 96a96 96 0 0 0-96-96m16 112l-64 32l32-64l64-32Z\" opacity=\".2\"/><path d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m44.42-143.16l-64 32a8.05 8.05 0 0 0-3.58 3.58l-32 64A8 8 0 0 0 80 184a8.1 8.1 0 0 0 3.58-.84l64-32a8.05 8.05 0 0 0 3.58-3.58l32-64a8 8 0 0 0-10.74-10.74M138 138l-40.11 20.11L118 118l40.15-20.07Z\"/></g>"},"compass-fill":{"body":"<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m51.58 57.79l-32 64a4.08 4.08 0 0 1-1.79 1.79l-64 32a4 4 0 0 1-5.37-5.37l32-64a4.08 4.08 0 0 1 1.79-1.79l64-32a4 4 0 0 1 5.37 5.37\"/>"},"hand-heart-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M16 152h32v56H16a8 8 0 0 1-8-8v-40a8 8 0 0 1 8-8M192.54 40A39.12 39.12 0 0 0 156 64a39.12 39.12 0 0 0-36.54-24C97.67 40 80 58.31 80 80c0 14.56 7 27.71 16.73 40H140a20 20 0 0 1 0 40h4l37.78-8.68C203.82 135.07 232 109.23 232 80c0-21.69-17.67-40-39.46-40\" opacity=\".2\"/><path d=\"M230.33 141.06a24.34 24.34 0 0 0-18.61-4.77C230.5 117.33 240 98.48 240 80c0-26.47-21.29-48-47.46-48A47.58 47.58 0 0 0 156 48.75A47.58 47.58 0 0 0 119.46 32C93.29 32 72 53.53 72 80c0 11 3.24 21.69 10.06 33a31.87 31.87 0 0 0-14.75 8.4L44.69 144H16a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h104a8 8 0 0 0 1.94-.24l64-16a7 7 0 0 0 1.19-.4L226 182.82l.44-.2a24.6 24.6 0 0 0 3.93-41.56ZM119.46 48a31.15 31.15 0 0 1 29.14 19a8 8 0 0 0 14.8 0a31.15 31.15 0 0 1 29.14-19C209.59 48 224 62.65 224 80c0 19.51-15.79 41.58-45.66 63.9l-11.09 2.55A28 28 0 0 0 140 112h-39.32C92.05 100.36 88 90.12 88 80c0-17.35 14.41-32 31.46-32M16 160h24v40H16Zm203.43 8.21l-38 16.18L119 200H56v-44.69l22.63-22.62A15.86 15.86 0 0 1 89.94 128H140a12 12 0 0 1 0 24h-28a8 8 0 0 0 0 16h32a8.3 8.3 0 0 0 1.79-.2l67-15.41l.31-.08a8.6 8.6 0 0 1 6.3 15.9Z\"/></g>"},"hand-heart-fill":{"body":"<path fill=\"currentColor\" d=\"M230.33 141.06a24.34 24.34 0 0 0-18.61-4.77C230.5 117.33 240 98.48 240 80c0-26.47-21.29-48-47.46-48A47.58 47.58 0 0 0 156 48.75A47.58 47.58 0 0 0 119.46 32C93.29 32 72 53.53 72 80c0 11 3.24 21.69 10.06 33a31.87 31.87 0 0 0-14.75 8.4L44.69 144H16a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h104a8 8 0 0 0 1.94-.24l64-16a7 7 0 0 0 1.19-.4L226 182.82l.44-.2a24.6 24.6 0 0 0 3.93-41.56Zm-10.9 27.15l-38 16.18L119 200H56v-44.69l22.63-22.62A15.86 15.86 0 0 1 89.94 128H140a12 12 0 0 1 0 24h-28a8 8 0 0 0 0 16h32a8.3 8.3 0 0 0 1.79-.2l67-15.41l.31-.08a8.6 8.6 0 0 1 6.3 15.9Z\"/>"},"house-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 120v96h-64v-64h-48v64H40v-96a8 8 0 0 1 2.34-5.66l80-80a8 8 0 0 1 11.32 0l80 80A8 8 0 0 1 216 120\" opacity=\".2\"/><path d=\"m219.31 108.68l-80-80a16 16 0 0 0-22.62 0l-80 80A15.87 15.87 0 0 0 32 120v96a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-56h32v56a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-96a15.87 15.87 0 0 0-4.69-11.32M208 208h-48v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56H48v-88l80-80l80 80Z\"/></g>"},"house-fill":{"body":"<path fill=\"currentColor\" d=\"M224 120v96a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8v-52a4 4 0 0 0-4-4h-40a4 4 0 0 0-4 4v52a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-96a16 16 0 0 1 4.69-11.31l80-80a16 16 0 0 1 22.62 0l80 80A16 16 0 0 1 224 120\"/>"},"map-pin-area-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M184 80c0 56-56 88-56 88s-56-32-56-88a56 56 0 0 1 112 0\" opacity=\".2\"/><path d=\"M112 80a16 16 0 1 1 16 16a16 16 0 0 1-16-16m-48 0a64 64 0 0 1 128 0c0 59.95-57.58 93.54-60 94.95a8 8 0 0 1-7.94 0C121.58 173.54 64 140 64 80m16 0c0 42.2 35.84 70.21 48 78.5c12.15-8.28 48-36.3 48-78.5a48 48 0 0 0-96 0m122.77 67.63a8 8 0 0 0-5.54 15C213.74 168.74 224 176.92 224 184c0 13.36-36.52 32-96 32s-96-18.64-96-32c0-7.08 10.26-15.26 26.77-21.36a8 8 0 0 0-5.54-15C29.22 156.49 16 169.41 16 184c0 31.18 57.71 48 112 48s112-16.82 112-48c0-14.59-13.22-27.51-37.23-36.37\"/></g>"},"map-trifold-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M160 72v144l-64-32V40Z\" opacity=\".2\"/><path d=\"M228.92 49.69a8 8 0 0 0-6.86-1.45l-61.13 15.28l-61.35-30.68a8 8 0 0 0-5.52-.6l-64 16A8 8 0 0 0 24 56v144a8 8 0 0 0 9.94 7.76l61.13-15.28l61.35 30.68a8.15 8.15 0 0 0 3.58.84a8 8 0 0 0 1.94-.24l64-16A8 8 0 0 0 232 200V56a8 8 0 0 0-3.08-6.31M104 52.94l48 24v126.12l-48-24Zm-64 9.31l48-12v127.5l-48 12Zm176 131.5l-48 12V78.25l48-12Z\"/></g>"},"map-trifold-fill":{"body":"<path fill=\"currentColor\" d=\"M228.92 49.69a8 8 0 0 0-6.86-1.45l-61.13 15.28l-61.35-30.68a8 8 0 0 0-5.52-.6l-64 16A8 8 0 0 0 24 56v144a8 8 0 0 0 9.94 7.76l61.13-15.28l61.35 30.68a8.15 8.15 0 0 0 3.58.84a8 8 0 0 0 1.94-.24l64-16A8 8 0 0 0 232 200V56a8 8 0 0 0-3.08-6.31M96 176a8 8 0 0 0-1.94.24L40 189.75V62.25l55.07-13.77l.93.46Zm120 17.75l-55.07 13.77l-.93-.46V80a8 8 0 0 0 1.94-.23L216 66.25Z\"/>"},"mask-happy-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 48v55.77C216 174.6 176.6 232 128 232s-88-57.4-88-128.21V48a8 8 0 0 1 10.89-7.47C66 46.41 95.11 55.71 128 55.71s62-9.3 77.11-15.16A8 8 0 0 1 216 48\" opacity=\".2\"/><path d=\"M217 34.8a15.94 15.94 0 0 0-14.82-1.71c-14.03 5.46-42.36 14.62-74.18 14.62s-60.16-9.16-74.21-14.62A16 16 0 0 0 32 48v55.77c0 35.84 9.65 69.65 27.18 95.18c18.16 26.46 42.6 41 68.82 41s50.66-14.57 68.82-41c17.53-25.51 27.18-59.32 27.18-95.16V48a16 16 0 0 0-7-13.2m-9 69c0 32.64-8.66 63.23-24.37 86.13C168.54 211.9 148.79 224 128 224s-40.54-12.1-55.63-34.08C56.66 167 48 136.43 48 103.79V48c15.11 5.87 45.58 15.71 80 15.71s64.9-9.84 80-15.71v55.81Zm-18 18.87a8 8 0 1 1-12 10.66c-2.68-3-8.85-5.33-14-5.33s-11.36 2.34-14 5.33a8 8 0 1 1-12-10.67c5.71-6.38 16.14-10.66 26-10.66s20.25 4.28 26 10.66ZM92 128c-5.19 0-11.36 2.34-14 5.33a8 8 0 1 1-12-10.67C71.75 116.28 82.18 112 92 112s20.25 4.28 26 10.66a8 8 0 1 1-12 10.67c-2.64-2.99-8.81-5.33-14-5.33m76.45 45.19a52.9 52.9 0 0 1-80.9 0a8 8 0 1 1 12.17-10.39a36.89 36.89 0 0 0 56.56 0a8 8 0 0 1 12.17 10.39\"/></g>"},"megaphone-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M240 120a40 40 0 0 1-40 40h-40V80h40a40 40 0 0 1 40 40\" opacity=\".2\"/><path d=\"M248 120a48.05 48.05 0 0 0-48-48h-39.8c-2.91-.17-53.62-3.74-101.91-44.24A16 16 0 0 0 32 40v160a16 16 0 0 0 26.29 12.25c37.77-31.68 77-40.76 93.71-43.3v31.72a16 16 0 0 0 7.12 13.33l11 7.33A16 16 0 0 0 194.5 212l11.77-44.36A48.07 48.07 0 0 0 248 120M48 199.93V40c42.81 35.91 86.63 45 104 47.24v65.48c-17.35 2.28-61.16 11.35-104 47.21m131 8v.11l-11-7.33V168h21.6ZM200 152h-32V88h32a32 32 0 1 1 0 64\"/></g>"},"microphone-stage-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M156.5 151L59 222.45a8 8 0 0 1-10.38-.79l-14.3-14.3a8 8 0 0 1-.77-10.36L105 99.5a64 64 0 0 0 51.48 51.5Z\" opacity=\".2\"/><path d=\"M168 16a72.07 72.07 0 0 0-72 72a73 73 0 0 0 .63 9.42l-69.51 94.8A15.93 15.93 0 0 0 28.71 213L43 227.29a15.93 15.93 0 0 0 20.78 1.59l94.81-69.53a73 73 0 0 0 9.41.65a72 72 0 1 0 0-144m56 72a55.72 55.72 0 0 1-11.16 33.52l-78.35-78.36A56 56 0 0 1 224 88M54.32 216L40 201.68L102.14 117A72.37 72.37 0 0 0 139 153.86ZM112 88a55.67 55.67 0 0 1 11.16-33.51l78.34 78.34A56 56 0 0 1 112 88m-2.35 58.34a8 8 0 0 1 0 11.31l-8 8a8 8 0 1 1-11.31-11.31l8-8a8 8 0 0 1 11.33-.01Z\"/></g>"},"person-simple-tai-chi-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M152 48a24 24 0 1 1-24-24a24 24 0 0 1 24 24\" opacity=\".2\"/><path d=\"M128 80a32 32 0 1 0-32-32a32 32 0 0 0 32 32m0-48a16 16 0 1 1-16 16a16 16 0 0 1 16-16m96 72a8 8 0 0 1-8 8h-80v26.72l51.15 21.93A8 8 0 0 1 192 168v48a8 8 0 0 1-16 0v-42.72l-46.45-19.91L53.35 222a8 8 0 1 1-10.7-11.9L120 140.44V112H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8\"/></g>"},"scroll-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M200 176h-96s8 6 8 16a24 24 0 0 1-48 0V64a24 24 0 0 0-24-24h136a24 24 0 0 1 24 24Z\" opacity=\".2\"/><path d=\"M96 104a8 8 0 0 1 8-8h64a8 8 0 0 1 0 16h-64a8 8 0 0 1-8-8m8 40h64a8 8 0 0 0 0-16h-64a8 8 0 0 0 0 16m128 48a32 32 0 0 1-32 32H88a32 32 0 0 1-32-32V64a16 16 0 0 0-32 0c0 5.74 4.83 9.62 4.88 9.66A8 8 0 0 1 24 88a7.9 7.9 0 0 1-4.79-1.61C18.05 85.54 8 77.61 8 64a32 32 0 0 1 32-32h136a32 32 0 0 1 32 32v104h8a8 8 0 0 1 4.8 1.6c1.2.86 11.2 8.79 11.2 22.4M96.26 173.48A8.07 8.07 0 0 1 104 168h88V64a16 16 0 0 0-16-16H67.69A31.7 31.7 0 0 1 72 64v128a16 16 0 0 0 32 0c0-5.74-4.83-9.62-4.88-9.66a7.82 7.82 0 0 1-2.86-8.86M216 192a12.58 12.58 0 0 0-3.23-8h-94a27 27 0 0 1 1.21 8a31.8 31.8 0 0 1-4.29 16H200a16 16 0 0 0 16-16\"/></g>"},"shield-check-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 56v56c0 96-88 120-88 120s-88-24-88-120V56a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8\" opacity=\".2\"/><path d=\"M208 40H48a16 16 0 0 0-16 16v56c0 52.72 25.52 84.67 46.93 102.19c23.06 18.86 46 25.26 47 25.53a8 8 0 0 0 4.2 0c1-.27 23.91-6.67 47-25.53C198.48 196.67 224 164.72 224 112V56a16 16 0 0 0-16-16m0 72c0 37.07-13.66 67.16-40.6 89.42a129.3 129.3 0 0 1-39.4 22.2a128.3 128.3 0 0 1-38.92-21.81C61.82 179.51 48 149.3 48 112V56h160ZM82.34 141.66a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32l-56 56a8 8 0 0 1-11.32 0Z\"/></g>"},"ticket-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M200 128a32 32 0 0 0 32 32v32a8 8 0 0 1-8 8H96V56h128a8 8 0 0 1 8 8v32a32 32 0 0 0-32 32\" opacity=\".2\"/><path d=\"M232 104a8 8 0 0 0 8-8V64a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a8 8 0 0 0 8 8a24 24 0 0 1 0 48a8 8 0 0 0-8 8v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a8 8 0 0 0-8-8a24 24 0 0 1 0-48M32 167.2a40 40 0 0 0 0-78.4V64h56v128H32Zm192 0V192H104V64h120v24.8a40 40 0 0 0 0 78.4\"/></g>"},"trophy-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M200 48v63.1c0 39.7-31.75 72.6-71.45 72.9A72 72 0 0 1 56 112V48Z\" opacity=\".2\"/><path d=\"M232 64h-24V48a8 8 0 0 0-8-8H56a8 8 0 0 0-8 8v16H24A16 16 0 0 0 8 80v16a40 40 0 0 0 40 40h3.65A80.13 80.13 0 0 0 120 191.61V216H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16h-24v-24.42c31.94-3.23 58.44-25.64 68.08-55.58H208a40 40 0 0 0 40-40V80a16 16 0 0 0-16-16M48 120a24 24 0 0 1-24-24V80h24v32q0 4 .39 8Zm144-8.9c0 35.52-29 64.64-64 64.9a64 64 0 0 1-64-64V56h128ZM232 96a24 24 0 0 1-24 24h-.5a82 82 0 0 0 .5-8.9V80h24Z\"/></g>"},"user-circle-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M224 128a95.76 95.76 0 0 1-31.8 71.37A72 72 0 0 0 128 160a40 40 0 1 0-40-40a40 40 0 0 0 40 40a72 72 0 0 0-64.2 39.37A96 96 0 1 1 224 128\" opacity=\".2\"/><path d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24M74.08 197.5a64 64 0 0 1 107.84 0a87.83 87.83 0 0 1-107.84 0M96 120a32 32 0 1 1 32 32a32 32 0 0 1-32-32m97.76 66.41a79.66 79.66 0 0 0-36.06-28.75a48 48 0 1 0-59.4 0a79.66 79.66 0 0 0-36.06 28.75a88 88 0 1 1 131.52 0\"/></g>"},"user-circle-fill":{"body":"<path fill=\"currentColor\" d=\"M172 120a44 44 0 1 1-44-44a44.05 44.05 0 0 1 44 44m60 8A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88.09 88.09 0 0 0-91.47-87.93C77.43 41.89 39.87 81.12 40 128.25a87.65 87.65 0 0 0 22.24 58.16A79.7 79.7 0 0 1 84 165.1a4 4 0 0 1 4.83.32a59.83 59.83 0 0 0 78.28 0a4 4 0 0 1 4.83-.32a79.7 79.7 0 0 1 21.79 21.31A87.62 87.62 0 0 0 216 128\"/>"}}},"Solar":{"prefix":"solar","width":24,"height":24,"icons":{"alt-arrow-left-linear":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M15 5L9 12L15 19\"/>"},"alt-arrow-right-linear":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M9 5L15 12L9 19\"/>"},"bookmark-bold":{"body":"<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M21 11.0975V16.0909C21 19.1875 21 20.7358 20.2659 21.4123C19.9158 21.735 19.4739 21.9377 19.0031 21.9915C18.016 22.1045 16.8633 21.0849 14.5578 19.0458C13.5388 18.1445 13.0292 17.6938 12.4397 17.5751C12.1494 17.5166 11.8506 17.5166 11.5603 17.5751C10.9708 17.6938 10.4612 18.1445 9.44216 19.0458C7.13673 21.0849 5.98402 22.1045 4.99692 21.9915C4.52615 21.9377 4.08421 21.735 3.73411 21.4123C3 20.7358 3 19.1875 3 16.0909V11.0975C3 6.80891 3 4.6646 4.31802 3.3323C5.63604 2 7.75736 2 12 2C16.2426 2 18.364 2 19.682 3.3323C21 4.6646 21 6.80891 21 11.0975ZM8.25 6C8.25 5.58579 8.58579 5.25 9 5.25H15C15.4142 5.25 15.75 5.58579 15.75 6C15.75 6.41421 15.4142 6.75 15 6.75H9C8.58579 6.75 8.25 6.41421 8.25 6Z\" clip-rule=\"evenodd\"/>"},"bookmark-linear":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M21 16.0909V11.0975C21 6.80891 21 4.6646 19.682 3.3323C18.364 2 16.2426 2 12 2C7.75736 2 5.63604 2 4.31802 3.3323C3 4.6646 3 6.80891 3 11.0975V16.0909C3 19.1875 3 20.7358 3.73411 21.4123C4.08421 21.735 4.52615 21.9377 4.99692 21.9915C5.98402 22.1045 7.13673 21.0849 9.44216 19.0458C10.4612 18.1445 10.9708 17.6938 11.5603 17.5751C11.8506 17.5166 12.1494 17.5166 12.4397 17.5751C13.0292 17.6938 13.5388 18.1445 14.5578 19.0458C16.8633 21.0849 18.016 22.1045 19.0031 21.9915C19.4739 21.9377 19.9158 21.735 20.2659 21.4123C21 20.7358 21 19.1875 21 16.0909Z\"/><path stroke-linecap=\"round\" d=\"M15 6H9\"/></g>"},"map-point-linear":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M4 10.1433C4 5.64588 7.58172 2 12 2C16.4183 2 20 5.64588 20 10.1433C20 14.6055 17.4467 19.8124 13.4629 21.6744C12.5343 22.1085 11.4657 22.1085 10.5371 21.6744C6.55332 19.8124 4 14.6055 4 10.1433Z\"/><circle cx=\"12\" cy=\"10\" r=\"3\"/></g>"},"share-linear":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M9 12C9 13.3807 7.88071 14.5 6.5 14.5C5.11929 14.5 4 13.3807 4 12C4 10.6193 5.11929 9.5 6.5 9.5C7.88071 9.5 9 10.6193 9 12Z\"/><path stroke-linecap=\"round\" d=\"M14 6.5L9 10\"/><path stroke-linecap=\"round\" d=\"M14 17.5L9 14\"/><path d=\"M19 18.5C19 19.8807 17.8807 21 16.5 21C15.1193 21 14 19.8807 14 18.5C14 17.1193 15.1193 16 16.5 16C17.8807 16 19 17.1193 19 18.5Z\"/><path d=\"M19 5.5C19 6.88071 17.8807 8 16.5 8C15.1193 8 14 6.88071 14 5.5C14 4.11929 15.1193 3 16.5 3C17.8807 3 19 4.11929 19 5.5Z\"/></g>"}}}}
- +
- +function svgNameSwitch(id) {
- + return id
- + .split(/:|-|_/)
- + .filter(Boolean)
- + .map(function (s) {
- + return s[0].toUpperCase() + s.slice(1).toLowerCase()
- + })
- + .join('')
- }
- +
- function encodeSvg(svg) {
- - return svg.replace('<svg', ~svg.indexOf('xmlns') ? '<svg' : '<svg xmlns="http://www.w3.org/2000/svg"').replace(/"/g, '\'').replace(/%/g, '%25').replace(/#/g, '%23').replace(/{/g, '%7B').replace(/}/g, '%7D').replace(/</g, '%3C').replace(/>/g, '%3E');
- + return svg
- + .replace('<svg', ~svg.indexOf('xmlns') ? '<svg' : '<svg xmlns="http://www.w3.org/2000/svg"')
- + .replace(/"/g, "'")
- + .replace(/%/g, '%25')
- + .replace(/#/g, '%23')
- + .replace(/{/g, '%7B')
- + .replace(/}/g, '%7D')
- + .replace(/</g, '%3C')
- + .replace(/>/g, '%3E')
- }
- +
- function getDataUri(data) {
- - return 'url("data:image/svg+xml;utf8,' + data + '")';
- + return 'url("data:image/svg+xml;utf8,' + data + '")'
- }
- +
- function presetsIconify(id) {
- - var parts = id.split(':');
- - var prefix = '';
- - var icon = '';
- - if (parts.length === 2) {
- - // prefix:icon.svg
- - prefix = svgNameSwtich(parts[0]);
- - icon = parts[1];
- - }
- - if (parts.length === 1) {
- - parts = parts[0].split('-');
- - if (parts.length > 1) {
- - // prefix-icon.svg
- - prefix = svgNameSwtich(parts.shift());
- - icon = parts.join('-');
- - }
- + var parts = id.split(':')
- + var prefix = ''
- + var icon = ''
- + if (parts.length === 2) {
- + prefix = svgNameSwitch(parts[0])
- + icon = parts[1]
- + } else if (parts.length === 1) {
- + parts = parts[0].split('-')
- + if (parts.length > 1) {
- + prefix = svgNameSwitch(parts.shift())
- + icon = parts.join('-')
- }
- - var setData = iconifyPresets[prefix] ? iconifyPresets[prefix].icons : null;
- - var width = setData && setData.width ? setData.width : 32;
- - var height = setData && setData.height ? setData.height : 32;
- - var iconData = setData && setData.icons && setData.icons[icon] ? setData.icons[icon] : null;
- - if (!iconData) {
- - return '';
- - }
- - var renderData = {
- - attributes: {
- - width: '1em',
- - height: '1em',
- - preserveAspectRatio: 'xMidYMid meet',
- - viewBox: '0 0 ' + width + ' ' + height
- - },
- - body: iconData.body
- - };
- - var svgAttributes = Object.assign({ xmlns: 'http://www.w3.org/2000/svg', 'xmlns:xlink': 'http://www.w3.org/1999/xlink' }, renderData.attributes);
- - var svgAttributesStr = Object.keys(svgAttributes).map(function (attr) {
- - return attr + '="' + svgAttributes[attr] + '"';
- - }).join(' ');
- - // Generate SVG
- - return '<svg ' + svgAttributesStr + '>' + renderData.body + '</svg>';
- + }
- + var setData = iconifyPresets[prefix] || null
- + var width = setData && setData.width ? setData.width : 32
- + var height = setData && setData.height ? setData.height : 32
- + var iconData = setData && setData.icons && setData.icons[icon] ? setData.icons[icon] : null
- + if (!iconData) {
- + return ''
- + }
- + var svgAttributes = {
- + xmlns: 'http://www.w3.org/2000/svg',
- + 'xmlns:xlink': 'http://www.w3.org/1999/xlink',
- + width: '1em',
- + height: '1em',
- + preserveAspectRatio: 'xMidYMid meet',
- + viewBox: '0 0 ' + width + ' ' + height
- + }
- + var svgAttributesStr = Object.keys(svgAttributes)
- + .map(function (attr) {
- + return attr + '="' + svgAttributes[attr] + '"'
- + })
- + .join(' ')
- + return '<svg ' + svgAttributesStr + '>' + iconData.body + '</svg>'
- }
- +
- function getLocalSVG(id) {
- - var name = svgNameSwtich(id);
- - var data = customerSvg[name];
- - if (data) {
- - return getDataUri(encodeSvg(data));
- - } else {
- - data = presetsIconify(id);
- - if (data) {
- - return getDataUri(encodeSvg(data));
- - } else {
- - data = wx.getStorageSync(name);
- - if (data) {
- - return getDataUri(data);
- - }
- - return '';
- - }
- - }
- -}
- -function iconifyApi(id) {
- - return new Promise(function (resolve, reject) {
- - if (ICONIFY_API) {
- - wx.request({
- - url: ICONIFY_API + '/' + id + '.svg',
- - success: function success(res) {
- - if (res.statusCode === 200) resolve(res.data);else reject(res.errMsg);
- - },
- - fail: function fail(err) {
- - reject(err);
- - }
- - });
- - } else {
- - reject('no ICONIFY_API');
- - }
- - });
- + var name = svgNameSwitch(id)
- + var data = presetsIconify(id)
- + if (data) {
- + return getDataUri(encodeSvg(data))
- + }
- + data = wx.getStorageSync(name)
- + if (data) {
- + return getDataUri(data)
- + }
- + return ''
- }
- -function getIconifySVG(id) {
- - return new Promise(function (resolve, reject) {
- - var name = svgNameSwtich(id);
- - iconifyApi(id).then(function (r) {
- - var data = encodeSvg(r);
- - wx.setStorage({
- - key: name,
- - data: data,
- - success: function success(_) {
- - resolve(getDataUri(data));
- - },
- - fail: function fail(err) {
- - reject(err);
- - }
- - });
- - }).catch(function (e) {
- - reject(e);
- - });
- - });
- -}
- -function iconifySetup(api) {
- - if (api) {
- - ICONIFY_API = api;
- - for (var _iterator = iconifyPreload, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- - var _ref;
- -
- - if (_isArray) {
- - if (_i >= _iterator.length) break;
- - _ref = _iterator[_i++];
- - } else {
- - _i = _iterator.next();
- - if (_i.done) break;
- - _ref = _i.value;
- - }
-
- - var id = _ref;
- -
- - var name = svgNameSwtich(id);
- - console.log(name);
- - var data = wx.getStorageSync(name);
- - if (!data) {
- - getIconifySVG(id).catch(function (e) {
- - console.error(e);
- - });
- - }
- - }
- +Component({
- + properties: {
- + name: {
- + type: String,
- + value: ''
- + },
- + color: {
- + type: String,
- + value: ''
- + },
- + size: {
- + type: String
- }
- -}
- -exports.default = {
- - getLocalSVG: getLocalSVG,
- - getIconifySVG: getIconifySVG,
- - iconifySetup: iconifySetup
- -};
- -
- -/***/ }),
- -/* 2 */
- -/***/ (function(module, exports) {
- -
- -module.exports = require("@iconify-json/mdi-light");
- -
- -/***/ })
- -/******/ ]);
- -//# sourceMappingURL=index.js.map
- \ No newline at end of file
- + },
- + data: {
- + width: '1em',
- + height: '1em',
- + iconUrl: '',
- + class: ''
- + },
- + lifetimes: {
- + attached: function attached() {
- + this.setData({
- + iconUrl: getLocalSVG(this.data.name),
- + class: this.data.color ? 'icon' : 'default-icon'
- + })
- + if (this.data.size) {
- + this.setData({
- + width: this.data.size,
- + height: this.data.size
- + })
- + }
- + }
- + }
- +})
- diff --git a/node_modules/weapp-svg-icon/miniprogram_dist/index.js.map b/node_modules/weapp-svg-icon/miniprogram_dist/index.js.map
- deleted file mode 100644
- index efc117b..0000000
- --- a/node_modules/weapp-svg-icon/miniprogram_dist/index.js.map
- +++ /dev/null
- @@ -1 +0,0 @@
- -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/index.ts","webpack:///./src/svgIcon.ts","webpack:///external \"@iconify-json/mdi-light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CAAP;AAgBD;AAEK,SAAU,aAAV,CAAwB,EAAxB,EAAkC;AACtC,WAAO,IAAI,OAAJ,CAAY,UAAC,OAAD,EAAU,MAAV,EAAoB;AACrC,YAAM,OAAO,cAAc,EAAd,CAAb;AACA,mBAAW,EAAX,EAAe,IAAf,CAAoB,aAAI;AACtB,gBAAM,OAAO,UAAU,CAAV,CAAb;AACA,eAAG,UAAH,CAAc;AACZ,qBAAK,IADO;AAEZ,0BAFY;AAGZ,uBAHY,mBAGJ,CAHI,EAGH;AACP,4BAAQ,WAAW,IAAX,CAAR;AACD,iBALW;AAMZ,oBANY,gBAMP,GANO,EAMJ;AACN,2BAAO,GAAP;AACD;AARW,aAAd;AAUD,SAZD,EAYG,KAZH,CAYS,aAAI;AACX,mBAAO,CAAP;AACD,SAdD;AAeD,KAjBM,CAAP;AAkBD;AAEK,SAAU,YAAV,CAAuB,GAAvB,EAAkC;AACtC,QAAI,GAAJ,EAAS;AACP,sBAAc,GAAd;AACA,6BAAiB,cAAjB,kHAAiC;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,gBAAtB,EAAsB;;AAC/B,gBAAM,OAAO,cAAc,EAAd,CAAb;AACA,oBAAQ,GAAR,CAAY,IAAZ;AACA,gBAAM,OAAO,GAAG,cAAH,CAAkB,IAAlB,CAAb;AACA,gBAAI,CAAC,IAAL,EAAW;AACT,8BAAc,EAAd,EAAkB,KAAlB,CAAwB,aAAI;AAC1B,4BAAQ,KAAR,CAAc,CAAd;AACD,iBAFD;AAGD;AACF;AACF;AACF;kBAEc;AACb,4BADa;AAEb,gCAFa;AAGb;AAHa,C;;;;;;AC3Kf,oD","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","// components/svg-icon/index.js\n// svg-icon\nimport {getIconifySVG, getLocalSVG} from './svgIcon.ts'\n\nComponent({\n /**\n * 组件的属性列表\n */\n properties: {\n name: {\n type: String,\n value: ''\n },\n color: {\n type: String,\n value: ''\n },\n size: {\n type: String,\n },\n },\n\n /**\n * 组件的初始数据\n */\n data: {\n width: '1em',\n height: '1em',\n iconUrl: '',\n class: '',\n },\n\n lifetimes: {\n attached() {\n this.getDataUri(this.data.name, this.data.color)\n if (this.data.size) {\n this.setData({\n width: this.data.size,\n height: this.data.size,\n })\n }\n },\n },\n /**\n * 组件的方法列表\n */\n methods: {\n getDataUri(name: string, color: string) {\n const that = this\n const url = getLocalSVG(name)\n if (url) {\n this.setData({\n iconUrl: url,\n class: color ? 'icon' : 'default-icon',\n })\n } else {\n getIconifySVG(name).then(res => {\n that.setData({\n iconUrl: res,\n class: color ? 'icon' : 'default-icon',\n })\n }).catch(e => {\n console.log(e)\n })\n }\n },\n }\n})\n","// https://github.com/LarchLiu/weapp-svg-icon/blob/main/miniprogram/utils/svgIcon.ts\r\n\r\n// svg-icon\r\nimport MdiLight from '@iconify-json/mdi-light'\r\n\r\nimport type {\n IconifyJSON, IconifyInfo, IconifyMetaData, IconifyChars\n} from '@iconify/types'\r\n\r\nlet ICONIFY_API = ''\r\n\r\ninterface IconifyData {\r\n icons: IconifyJSON;\r\n info: IconifyInfo;\r\n metadata: IconifyMetaData;\r\n chars: IconifyChars;\r\n}\r\n\r\nconst iconifyPresets: Record<string, IconifyData> = {\r\n MdiLight\r\n}\r\nconst customerSvg: Record<string, string> = {\r\n EmojioneMonotoneMotorcycle: '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" class=\"iconify iconify--emojione-monotone\" width=\"32\" height=\"32\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 64 64\"><path fill=\"currentColor\" d=\"M13.895 39.35h-2.52c-1.754.23 1.685 1.96 1.685 1.96s1.685-1.239 1.685-1.614c-.001-.375-.85-.346-.85-.346m12.871 11.809c-.466.269-.93.875-1.03 1.346l-.19.894c-.1.472.009 1.028.241 1.236c.232.209.545 0 .694-.461l.86-2.661c.151-.464-.109-.624-.575-.354m12.117-1.016c-.465.271-.93.875-1.029 1.348l-.191.892c-.1.472.01 1.028.242 1.238c.232.208.545.001.695-.463l.859-2.659c.148-.466-.111-.625-.576-.356\"></path><path fill=\"currentColor\" d=\"M52.625 43.558a9.41 9.41 0 0 0-7.074 3.182l-.646-.286c.207-.189.43-.385.689-.59c.41-.322.566-.688.574-1.051l12.426-5.883a3.774 3.774 0 0 0-.602-2.211c1.729-2.172 1.758-4.762 1.758-4.904V30.34h-1.5c-2.23 0-3.977.048-6.145.673c-1.482.428-2.537.888-3.318 1.386c.221-1.014.082-2.19-.785-3.442c0 0-5.709-5.956-12.273-7.799c1.965-1.562 2.613-3.287 2.613-6.885C38.342 7.505 32.745 2 25.865 2c-6.879 0-12.476 5.505-12.476 12.272c0 .49.032.925.087 1.322l-.017.006c-1.198.428 1.03 6.574 2.308 6.636c1.832 4.296 4.56 5.27 6.648 5.27c1.069 0 2.205-.282 3.319-.792l.342 4.041l-2.033 1.078l-.094-.084l-1.413-1.268l-.43-.387h-.581c-4.539 0-8.794 2.188-11.383 5.851l-.205.288c-1.218 1.707-2 2.915-1.781 4.1c.097.521.391.97.83 1.263c.401.27.97.646 1.618 1.074a10.353 10.353 0 0 0-5.775 2.272l1.386.142C3.676 46.732 2 49.563 2 52.779C2 57.873 6.197 62 11.375 62c4.079 0 7.539-2.565 8.829-6.143l.002.089a2.721 2.721 0 0 0 2.74 2.747c.087 0 .176-.003.267-.012l.038-.002l.038-.006l18.366-2.505l1.428-.194l-.141-1.41c-.014-.135-.016-.27-.02-.406a8.956 8.956 0 0 0-.037-.672a15.023 15.023 0 0 1-.061-1.934l.486.201a9.372 9.372 0 0 0-.061 1.025c0 5.094 4.197 9.221 9.375 9.221S62 57.873 62 52.779s-4.197-9.221-9.375-9.221m-7.756-4.788c4.592-2.287 1.193-4.477 7.658-6.342c1.986-.572 3.58-.613 5.723-.613c0 0 0 3.746-3.215 5.475c-6.537 3.516-11.785 3.834-11.785 3.834s-.059-1.519 1.619-2.354m-6.668 5.592a3.665 3.665 0 0 1 1.186 1.915c-1.242.205-1.855 1.041-2.24 1.568c-.012.018-.02.025-.031.041l1.085-3.524M25.382 24.699c-1.012.548-2.037.839-2.968.839c-2.376 0-3.855-1.9-4.767-3.986c3.711-1.563 8.254-4.11 10.052-5.979a2 2 0 0 0 .55.085c1.102 0 1.994-.879 1.994-1.961c0-1.083-.893-1.961-1.994-1.961c-.928 0-1.7.625-1.923 1.47c-2.677-.134-7.309.712-10.907 1.764a7.877 7.877 0 0 1-.031-.697c0-5.682 4.7-10.305 10.476-10.305c5.777 0 10.477 4.623 10.477 10.305c0 4.682-.797 5.097-6.999 8.33a255.278 255.278 0 0 0-3.96 2.096m-1.009 12.437c.09-.222.136-.438.153-.657l6.07-2.73a1.667 1.667 0 0 0 .843-1.848h.01l-.145-1.701l4.137 3.615c-.129-.018-.256-.045-.387-.045c-.252 0-.498.033-.73.1c-1.014.289-2.478.854-3.895 1.4c-.784.303-1.525.588-2.074.781c-1.199.418-1.977 1.377-1.977 2.44v.188a70.492 70.492 0 0 0-2.756-.568c.343-.269.587-.575.751-.975m9.621-1.613l-1.04 4.082l-1.77.416a45.073 45.073 0 0 0-3.307-.979v-.552c0-.466.461-.87.981-1.052c1.309-.458 3.564-1.384 5.136-1.915M19.677 32.92l.743-.311c.142-.061.288-.088.433-.088c.413 0 .803.23.975.619l.641 1.473c.953 2.183.953 2.183-1.975 3.409c-.401.169-.75.237-1.053.237c-1.194 0-1.661-1.07-1.761-1.301c-.771-1.76.375-2.646 1.335-3.128c.024-.383.268-.746.662-.91m-3.614 19.859c0 .212-.035.414-.063.619l1.913-.126a6.314 6.314 0 0 1-.625 2.294l-1.578-1.039a4.58 4.58 0 0 1-.643 1.063l1.723.834a6.56 6.56 0 0 1-1.71 1.682l-.847-1.695a4.64 4.64 0 0 1-1.033.617l1.071 1.537a6.625 6.625 0 0 1-2.394.645l.128-1.882c-.208.028-.414.062-.629.062c-.199 0-.388-.033-.581-.057l.147 1.88a6.625 6.625 0 0 1-2.401-.618l1.057-1.553a4.645 4.645 0 0 1-1.081-.631l-.847 1.695a6.576 6.576 0 0 1-1.71-1.682l1.723-.833a4.6 4.6 0 0 1-.643-1.063l-1.578 1.039a6.314 6.314 0 0 1-.625-2.294l1.913.126c-.028-.205-.063-.407-.063-.619c0-.197.035-.383.059-.572l-1.912.145a6.313 6.313 0 0 1 .628-2.359l1.578 1.039c.155-.371.367-.71.61-1.025l-1.73-.818a6.54 6.54 0 0 1 1.749-1.737l.848 1.695a4.617 4.617 0 0 1 1.081-.633l-1.057-1.553a6.578 6.578 0 0 1 2.333-.614l-.128 1.882c.208-.027.414-.063.629-.063s.421.035.629.063l-.127-1.882a6.594 6.594 0 0 1 1.859.417l-1.659 3.344a2.85 2.85 0 0 0-.701-.098c-1.554 0-2.813 1.238-2.813 2.768s1.259 2.766 2.813 2.766c1.553 0 2.813-1.236 2.813-2.766c0-.8-.349-1.514-.899-2.019l2.145-3.017c.514.401.984.855 1.357 1.391l-1.723.834c.247.313.468.645.627 1.015l1.563-1.054c.361.721.59 1.514.655 2.355l-1.913-.125c.026.205.062.407.062.62m25.33.864c.039.357.021.715.057 1.064l-18.368 2.506a1.581 1.581 0 0 1-.136.006c-.8 0-1.24-.633-1.24-1.295c0 0-.098-6.318-.956-7.871c-.439-.795-2.773-2.322-2.809-2.346c0 0-6.095-3.979-8.11-5.331c-.745-.499.669-2.354 1.543-3.589a12.35 12.35 0 0 1 7.092-4.842c-.31.248-.563.553-.725.908c-1.137.729-1.61 1.592-1.756 2.402c-.291.262-.58.545-.86.867c-.392.448-1.699 2.363 0 2.363c.332 0 .986.044 1.861.133a3.202 3.202 0 0 0 2.455 1.117c.527 0 1.08-.121 1.643-.357l.363-.152c3.213.525 7.029 1.342 10.084 2.486c.297.111.564.219.806.324l-1.556 6.113l-.705-.174a3.614 3.614 0 0 0-1.471-.056c.09-.108.033-.271-.223-.461l-6.418-4.747c-.441-.326-.803-.229-.803.217s.359 1.078.797 1.408l4.144 3.115c.439.33 1.249.6 1.8.6h.156c-1.08.357-1.948 1.215-2.232 2.365l8.163 2.017c.947.233 1.898-.312 2.123-1.224l.307-1.228c2.166-.263 1.76-2.276 3.551-2.276c.691 0 1.299.103 1.83.244c-.427 1.42-.599 3.889-.407 5.694m-.651-9.03l-.652-.287l3.65-1.768a25.284 25.284 0 0 0 2.982-.524l-1.502.937c-.199-.209-.352-.336-.352-.336l-4.126 1.978m8.178 2.84l.496.994l-1.109-.49c.199-.174.392-.355.613-.504m8.393 5.326c0 .212-.035.414-.063.619l1.912-.126a6.314 6.314 0 0 1-.625 2.294l-1.578-1.039a4.546 4.546 0 0 1-.643 1.063l1.723.833a6.525 6.525 0 0 1-1.709 1.682l-.848-1.694c-.318.242-.656.46-1.031.616l1.07 1.537a6.624 6.624 0 0 1-2.395.645l.127-1.882c-.207.028-.414.062-.629.062c-.199 0-.389-.033-.58-.057l.146 1.88a6.62 6.62 0 0 1-2.4-.618l1.057-1.553a4.652 4.652 0 0 1-1.082-.631l-.846 1.695a6.525 6.525 0 0 1-1.709-1.682l1.723-.834a4.559 4.559 0 0 1-.643-1.063l-1.578 1.039a6.294 6.294 0 0 1-.625-2.294l1.057.069l3.623 1.5a2.815 2.815 0 0 0 1.857.703c1.553 0 2.813-1.236 2.813-2.766c0-1.385-1.035-2.521-2.385-2.725l-2.799-1.237c.189-.114.387-.218.594-.302L49.79 46.96a6.59 6.59 0 0 1 2.332-.614l-.127 1.882c.207-.027.414-.063.629-.063s.422.035.629.063l-.127-1.882a6.61 6.61 0 0 1 2.332.614l-1.057 1.553c.377.152.721.361 1.043.601l.828-1.702a6.537 6.537 0 0 1 1.768 1.721l-1.723.833c.246.313.467.646.627 1.016l1.563-1.054c.361.721.59 1.514.654 2.355l-1.911-.123c.027.204.063.406.063.619\"></path></svg>',\r\n EmojioneMonotoneSportsMedal: '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" class=\"iconify iconify--emojione-monotone\" width=\"32\" height=\"32\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 64 64\"><path fill=\"currentColor\" d=\"m32.001 27.927l-3.246 9.989H18.251l8.498 6.174l-3.248 9.988l8.5-6.172l8.498 6.172l-3.248-9.988l8.498-6.174H35.245l-3.244-9.989m2.838 15.12l1.752 5.396l-4.59-3.336l-4.594 3.336l1.756-5.396l-4.592-3.336h5.676l1.754-5.396l1.754 5.396h5.674l-4.59 3.336\"></path><path fill=\"currentColor\" d=\"M44.657 26.519v-8.698c0-.364-.199-.67-.481-.86L54 2H35.165l-3.164 4.746L28.837 2H10l9.823 14.96a1.04 1.04 0 0 0-.48.861v8.698C14.862 30.187 12 35.758 12 42c0 11.045 8.955 20 20 20h.001c.681 0 1.354-.035 2.017-.102C44.115 60.887 52 52.365 52 42c0-6.242-2.862-11.813-7.343-15.481M40.826 3h6.328l-8.825 13.239l-3.164-4.746L40.826 3m.667 17.985l.973-1.458c.052.125.082.261.082.404v4.219a.994.994 0 0 1-.297.7C39.251 23.052 35.752 22 32 22a19.87 19.87 0 0 0-10.251 2.851a.996.996 0 0 1-.297-.701v-4.219c0-.143.03-.28.082-.404l.973 1.459h18.986zM16.846 3h6.328l11.324 16.985H28.17L16.846 3M32 59c-9.388 0-17-7.611-17-17s7.612-17 17-17s17 7.611 17 17s-7.612 17-17 17\"></path></svg>',\r\n}\r\nconst iconifyPreload: string[] = [\r\n 'carbon:portfolio',\r\n]\r\n\r\nfunction svgNameSwtich(id: string) {\r\n return id.split(/:|-|_/).filter(Boolean).map(s => s[0].toUpperCase() + s.slice(1).toLowerCase()).join('')\r\n}\r\n\r\nfunction encodeSvg(svg: string) {\r\n return svg.replace('<svg', (~svg.indexOf('xmlns') ? '<svg' : '<svg xmlns=\"http://www.w3.org/2000/svg\"'))\r\n .replace(/\"/g, '\\'')\r\n .replace(/%/g, '%25')\r\n .replace(/#/g, '%23')\r\n .replace(/{/g, '%7B')\r\n .replace(/}/g, '%7D')\r\n .replace(/</g, '%3C')\r\n .replace(/>/g, '%3E')\r\n}\r\n\r\nfunction getDataUri(data: string) {\r\n return `url(\"data:image/svg+xml;utf8,${data}\")`\r\n}\r\n\r\nfunction presetsIconify(id: string) {\r\n let parts = id.split(':')\r\n let prefix = ''\r\n let icon = ''\r\n if (parts.length === 2) {\r\n // prefix:icon.svg\r\n prefix = svgNameSwtich(parts[0])\r\n icon = parts[1]\r\n }\r\n if (parts.length === 1) {\r\n parts = parts[0].split('-')\r\n if (parts.length > 1) {\r\n // prefix-icon.svg\r\n prefix = svgNameSwtich(parts.shift() as string)\r\n icon = parts.join('-')\r\n }\r\n }\r\n const setData = iconifyPresets[prefix] ? iconifyPresets[prefix].icons : null\r\n const width = setData && setData.width ? setData.width : 32\r\n const height = setData && setData.height ? setData.height : 32\r\n const iconData = setData && setData.icons && setData.icons[icon] ? setData.icons[icon] : null\r\n if (!iconData) {\r\n return ''\r\n }\r\n const renderData = {\r\n attributes: {\r\n width: '1em',\r\n height: '1em',\r\n preserveAspectRatio: 'xMidYMid meet',\r\n viewBox: `0 0 ${width} ${height}`\r\n },\r\n body: iconData.body\r\n }\r\n const svgAttributes = {\r\n xmlns: 'http://www.w3.org/2000/svg',\r\n 'xmlns:xlink': 'http://www.w3.org/1999/xlink',\r\n ...renderData.attributes,\r\n }\r\n const svgAttributesStr = Object.keys(svgAttributes)\r\n .map(\r\n (attr) => `${attr}=\"${svgAttributes[attr as keyof typeof svgAttributes]}\"`\r\n )\r\n .join(' ')\r\n\r\n // Generate SVG\r\n return `<svg ${svgAttributesStr}>${renderData.body}</svg>`\r\n}\r\n\r\nexport function getLocalSVG(id: string) {\r\n const name = svgNameSwtich(id)\r\n let data = customerSvg[name]\r\n if (data) {\r\n return getDataUri(encodeSvg(data))\r\n } else {\r\n data = presetsIconify(id)\r\n if (data) {\r\n return getDataUri(encodeSvg(data))\r\n } else {\r\n data = wx.getStorageSync(name)\r\n if (data) {\r\n return getDataUri(data)\r\n }\r\n return ''\r\n }\r\n }\r\n}\r\n\r\nfunction iconifyApi(id: string): Promise<string> {\r\n return new Promise((resolve, reject) => {\r\n if (ICONIFY_API) {\r\n wx.request({\r\n url: `${ICONIFY_API}/${id}.svg`,\r\n success: (res) => {\r\n if (res.statusCode === 200) resolve(res.data as string)\r\n else reject(res.errMsg)\r\n },\r\n fail: (err) => {\r\n reject(err)\r\n }\r\n })\r\n } else {\r\n reject('no ICONIFY_API')\r\n }\r\n })\r\n}\r\n\r\nexport function getIconifySVG(id: string): Promise<string> {\r\n return new Promise((resolve, reject) => {\r\n const name = svgNameSwtich(id)\r\n iconifyApi(id).then(r => {\r\n const data = encodeSvg(r)\r\n wx.setStorage({\r\n key: name,\r\n data,\r\n success(_) {\r\n resolve(getDataUri(data))\r\n },\r\n fail(err) {\r\n reject(err)\r\n }\r\n })\r\n }).catch(e => {\r\n reject(e)\r\n })\r\n })\r\n}\r\n\r\nexport function iconifySetup(api: string) {\r\n if (api) {\r\n ICONIFY_API = api\r\n for (const id of iconifyPreload) {\r\n const name = svgNameSwtich(id)\r\n console.log(name)\r\n const data = wx.getStorageSync(name)\r\n if (!data) {\r\n getIconifySVG(id).catch(e => {\r\n console.error(e)\r\n })\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default {\r\n getLocalSVG,\r\n getIconifySVG,\r\n iconifySetup\r\n}\n","module.exports = require(\"@iconify-json/mdi-light\");"],"sourceRoot":""}
- \ No newline at end of file
- diff --git a/node_modules/weapp-svg-icon/package.json b/node_modules/weapp-svg-icon/package.json
- index 8faf376..44614ab 100644
- --- a/node_modules/weapp-svg-icon/package.json
- +++ b/node_modules/weapp-svg-icon/package.json
- @@ -66,7 +66,5 @@
- "webpack": "^4.29.5",
- "webpack-node-externals": "^1.7.2"
- },
- - "dependencies": {
- - "@iconify-json/mdi-light": "^1.1.6"
- - }
- + "dependencies": {}
- }
|