@gospore/checkbox 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkbox.cjs.js +2 -0
- package/dist/checkbox.cjs.js.map +1 -0
- package/dist/checkbox.es.js +63 -3455
- package/dist/checkbox.es.js.map +1 -0
- package/dist/checkbox.umd.js +2 -764
- package/dist/checkbox.umd.js.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +17 -16
package/dist/checkbox.es.js
CHANGED
|
@@ -1,3383 +1,20 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
12
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13
|
-
})), keys.push.apply(keys, symbols);
|
|
14
|
-
}
|
|
15
|
-
return keys;
|
|
16
|
-
}
|
|
17
|
-
function _objectSpread2(target) {
|
|
18
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
19
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
20
|
-
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
21
|
-
_defineProperty$1(target, key, source[key]);
|
|
22
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
23
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return target;
|
|
27
|
-
}
|
|
28
|
-
function _typeof$1(obj) {
|
|
29
|
-
"@babel/helpers - typeof";
|
|
30
|
-
return _typeof$1 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
|
|
31
|
-
return typeof obj2;
|
|
32
|
-
} : function(obj2) {
|
|
33
|
-
return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
34
|
-
}, _typeof$1(obj);
|
|
35
|
-
}
|
|
36
|
-
function _classCallCheck(instance, Constructor) {
|
|
37
|
-
if (!(instance instanceof Constructor)) {
|
|
38
|
-
throw new TypeError("Cannot call a class as a function");
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function _defineProperties(target, props) {
|
|
42
|
-
for (var i = 0; i < props.length; i++) {
|
|
43
|
-
var descriptor = props[i];
|
|
44
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
45
|
-
descriptor.configurable = true;
|
|
46
|
-
if ("value" in descriptor)
|
|
47
|
-
descriptor.writable = true;
|
|
48
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
52
|
-
if (protoProps)
|
|
53
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
54
|
-
if (staticProps)
|
|
55
|
-
_defineProperties(Constructor, staticProps);
|
|
56
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
57
|
-
writable: false
|
|
58
|
-
});
|
|
59
|
-
return Constructor;
|
|
60
|
-
}
|
|
61
|
-
function _defineProperty$1(obj, key, value) {
|
|
62
|
-
if (key in obj) {
|
|
63
|
-
Object.defineProperty(obj, key, {
|
|
64
|
-
value,
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
72
|
-
return obj;
|
|
73
|
-
}
|
|
74
|
-
function _slicedToArray(arr, i) {
|
|
75
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
76
|
-
}
|
|
77
|
-
function _toConsumableArray(arr) {
|
|
78
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
79
|
-
}
|
|
80
|
-
function _arrayWithoutHoles(arr) {
|
|
81
|
-
if (Array.isArray(arr))
|
|
82
|
-
return _arrayLikeToArray(arr);
|
|
83
|
-
}
|
|
84
|
-
function _arrayWithHoles(arr) {
|
|
85
|
-
if (Array.isArray(arr))
|
|
86
|
-
return arr;
|
|
87
|
-
}
|
|
88
|
-
function _iterableToArray(iter) {
|
|
89
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
90
|
-
return Array.from(iter);
|
|
91
|
-
}
|
|
92
|
-
function _iterableToArrayLimit(arr, i) {
|
|
93
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
94
|
-
if (_i == null)
|
|
95
|
-
return;
|
|
96
|
-
var _arr = [];
|
|
97
|
-
var _n = true;
|
|
98
|
-
var _d = false;
|
|
99
|
-
var _s, _e;
|
|
100
|
-
try {
|
|
101
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
102
|
-
_arr.push(_s.value);
|
|
103
|
-
if (i && _arr.length === i)
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
} catch (err) {
|
|
107
|
-
_d = true;
|
|
108
|
-
_e = err;
|
|
109
|
-
} finally {
|
|
110
|
-
try {
|
|
111
|
-
if (!_n && _i["return"] != null)
|
|
112
|
-
_i["return"]();
|
|
113
|
-
} finally {
|
|
114
|
-
if (_d)
|
|
115
|
-
throw _e;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return _arr;
|
|
119
|
-
}
|
|
120
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
121
|
-
if (!o)
|
|
122
|
-
return;
|
|
123
|
-
if (typeof o === "string")
|
|
124
|
-
return _arrayLikeToArray(o, minLen);
|
|
125
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
126
|
-
if (n === "Object" && o.constructor)
|
|
127
|
-
n = o.constructor.name;
|
|
128
|
-
if (n === "Map" || n === "Set")
|
|
129
|
-
return Array.from(o);
|
|
130
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
131
|
-
return _arrayLikeToArray(o, minLen);
|
|
132
|
-
}
|
|
133
|
-
function _arrayLikeToArray(arr, len) {
|
|
134
|
-
if (len == null || len > arr.length)
|
|
135
|
-
len = arr.length;
|
|
136
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
137
|
-
arr2[i] = arr[i];
|
|
138
|
-
return arr2;
|
|
139
|
-
}
|
|
140
|
-
function _nonIterableSpread() {
|
|
141
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
142
|
-
}
|
|
143
|
-
function _nonIterableRest() {
|
|
144
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
145
|
-
}
|
|
146
|
-
var noop = function noop2() {
|
|
147
|
-
};
|
|
148
|
-
var _WINDOW = {};
|
|
149
|
-
var _DOCUMENT = {};
|
|
150
|
-
var _MUTATION_OBSERVER = null;
|
|
151
|
-
var _PERFORMANCE = {
|
|
152
|
-
mark: noop,
|
|
153
|
-
measure: noop
|
|
154
|
-
};
|
|
155
|
-
try {
|
|
156
|
-
if (typeof window !== "undefined")
|
|
157
|
-
_WINDOW = window;
|
|
158
|
-
if (typeof document !== "undefined")
|
|
159
|
-
_DOCUMENT = document;
|
|
160
|
-
if (typeof MutationObserver !== "undefined")
|
|
161
|
-
_MUTATION_OBSERVER = MutationObserver;
|
|
162
|
-
if (typeof performance !== "undefined")
|
|
163
|
-
_PERFORMANCE = performance;
|
|
164
|
-
} catch (e) {
|
|
165
|
-
}
|
|
166
|
-
var _ref = _WINDOW.navigator || {}, _ref$userAgent = _ref.userAgent, userAgent = _ref$userAgent === void 0 ? "" : _ref$userAgent;
|
|
167
|
-
var WINDOW = _WINDOW;
|
|
168
|
-
var DOCUMENT = _DOCUMENT;
|
|
169
|
-
var MUTATION_OBSERVER = _MUTATION_OBSERVER;
|
|
170
|
-
var PERFORMANCE = _PERFORMANCE;
|
|
171
|
-
!!WINDOW.document;
|
|
172
|
-
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === "function" && typeof DOCUMENT.createElement === "function";
|
|
173
|
-
var IS_IE = ~userAgent.indexOf("MSIE") || ~userAgent.indexOf("Trident/");
|
|
174
|
-
var NAMESPACE_IDENTIFIER = "___FONT_AWESOME___";
|
|
175
|
-
var UNITS_IN_GRID = 16;
|
|
176
|
-
var DEFAULT_FAMILY_PREFIX = "fa";
|
|
177
|
-
var DEFAULT_REPLACEMENT_CLASS = "svg-inline--fa";
|
|
178
|
-
var DATA_FA_I2SVG = "data-fa-i2svg";
|
|
179
|
-
var DATA_FA_PSEUDO_ELEMENT = "data-fa-pseudo-element";
|
|
180
|
-
var DATA_FA_PSEUDO_ELEMENT_PENDING = "data-fa-pseudo-element-pending";
|
|
181
|
-
var DATA_PREFIX = "data-prefix";
|
|
182
|
-
var DATA_ICON = "data-icon";
|
|
183
|
-
var HTML_CLASS_I2SVG_BASE_CLASS = "fontawesome-i2svg";
|
|
184
|
-
var MUTATION_APPROACH_ASYNC = "async";
|
|
185
|
-
var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ["HTML", "HEAD", "STYLE", "SCRIPT"];
|
|
186
|
-
var PRODUCTION$1 = function() {
|
|
187
|
-
try {
|
|
188
|
-
return true;
|
|
189
|
-
} catch (e) {
|
|
190
|
-
return false;
|
|
191
|
-
}
|
|
192
|
-
}();
|
|
193
|
-
var PREFIX_TO_STYLE = {
|
|
194
|
-
"fas": "solid",
|
|
195
|
-
"fa-solid": "solid",
|
|
196
|
-
"far": "regular",
|
|
197
|
-
"fa-regular": "regular",
|
|
198
|
-
"fal": "light",
|
|
199
|
-
"fa-light": "light",
|
|
200
|
-
"fat": "thin",
|
|
201
|
-
"fa-thin": "thin",
|
|
202
|
-
"fad": "duotone",
|
|
203
|
-
"fa-duotone": "duotone",
|
|
204
|
-
"fab": "brands",
|
|
205
|
-
"fa-brands": "brands",
|
|
206
|
-
"fak": "kit",
|
|
207
|
-
"fa-kit": "kit",
|
|
208
|
-
"fa": "solid"
|
|
209
|
-
};
|
|
210
|
-
var STYLE_TO_PREFIX = {
|
|
211
|
-
"solid": "fas",
|
|
212
|
-
"regular": "far",
|
|
213
|
-
"light": "fal",
|
|
214
|
-
"thin": "fat",
|
|
215
|
-
"duotone": "fad",
|
|
216
|
-
"brands": "fab",
|
|
217
|
-
"kit": "fak"
|
|
218
|
-
};
|
|
219
|
-
var PREFIX_TO_LONG_STYLE = {
|
|
220
|
-
"fab": "fa-brands",
|
|
221
|
-
"fad": "fa-duotone",
|
|
222
|
-
"fak": "fa-kit",
|
|
223
|
-
"fal": "fa-light",
|
|
224
|
-
"far": "fa-regular",
|
|
225
|
-
"fas": "fa-solid",
|
|
226
|
-
"fat": "fa-thin"
|
|
227
|
-
};
|
|
228
|
-
var LONG_STYLE_TO_PREFIX = {
|
|
229
|
-
"fa-brands": "fab",
|
|
230
|
-
"fa-duotone": "fad",
|
|
231
|
-
"fa-kit": "fak",
|
|
232
|
-
"fa-light": "fal",
|
|
233
|
-
"fa-regular": "far",
|
|
234
|
-
"fa-solid": "fas",
|
|
235
|
-
"fa-thin": "fat"
|
|
236
|
-
};
|
|
237
|
-
var ICON_SELECTION_SYNTAX_PATTERN = /fa[srltdbk\-\ ]/;
|
|
238
|
-
var LAYERS_TEXT_CLASSNAME = "fa-layers-text";
|
|
239
|
-
var FONT_FAMILY_PATTERN = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i;
|
|
240
|
-
var FONT_WEIGHT_TO_PREFIX = {
|
|
241
|
-
"900": "fas",
|
|
242
|
-
"400": "far",
|
|
243
|
-
"normal": "far",
|
|
244
|
-
"300": "fal",
|
|
245
|
-
"100": "fat"
|
|
246
|
-
};
|
|
247
|
-
var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
248
|
-
var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
|
|
249
|
-
var ATTRIBUTES_WATCHED_FOR_MUTATION = ["class", "data-prefix", "data-icon", "data-fa-transform", "data-fa-mask"];
|
|
250
|
-
var DUOTONE_CLASSES = {
|
|
251
|
-
GROUP: "duotone-group",
|
|
252
|
-
SWAP_OPACITY: "swap-opacity",
|
|
253
|
-
PRIMARY: "primary",
|
|
254
|
-
SECONDARY: "secondary"
|
|
255
|
-
};
|
|
256
|
-
var RESERVED_CLASSES = [].concat(_toConsumableArray(Object.keys(STYLE_TO_PREFIX)), ["2xs", "xs", "sm", "lg", "xl", "2xl", "beat", "border", "fade", "beat-fade", "bounce", "flip-both", "flip-horizontal", "flip-vertical", "flip", "fw", "inverse", "layers-counter", "layers-text", "layers", "li", "pull-left", "pull-right", "pulse", "rotate-180", "rotate-270", "rotate-90", "rotate-by", "shake", "spin-pulse", "spin-reverse", "spin", "stack-1x", "stack-2x", "stack", "ul", DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY]).concat(oneToTen.map(function(n) {
|
|
257
|
-
return "".concat(n, "x");
|
|
258
|
-
})).concat(oneToTwenty.map(function(n) {
|
|
259
|
-
return "w-".concat(n);
|
|
260
|
-
}));
|
|
261
|
-
var initial = WINDOW.FontAwesomeConfig || {};
|
|
262
|
-
function getAttrConfig(attr) {
|
|
263
|
-
var element = DOCUMENT.querySelector("script[" + attr + "]");
|
|
264
|
-
if (element) {
|
|
265
|
-
return element.getAttribute(attr);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
function coerce(val) {
|
|
269
|
-
if (val === "")
|
|
270
|
-
return true;
|
|
271
|
-
if (val === "false")
|
|
272
|
-
return false;
|
|
273
|
-
if (val === "true")
|
|
274
|
-
return true;
|
|
275
|
-
return val;
|
|
276
|
-
}
|
|
277
|
-
if (DOCUMENT && typeof DOCUMENT.querySelector === "function") {
|
|
278
|
-
var attrs = [["data-family-prefix", "familyPrefix"], ["data-style-default", "styleDefault"], ["data-replacement-class", "replacementClass"], ["data-auto-replace-svg", "autoReplaceSvg"], ["data-auto-add-css", "autoAddCss"], ["data-auto-a11y", "autoA11y"], ["data-search-pseudo-elements", "searchPseudoElements"], ["data-observe-mutations", "observeMutations"], ["data-mutate-approach", "mutateApproach"], ["data-keep-original-source", "keepOriginalSource"], ["data-measure-performance", "measurePerformance"], ["data-show-missing-icons", "showMissingIcons"]];
|
|
279
|
-
attrs.forEach(function(_ref2) {
|
|
280
|
-
var _ref22 = _slicedToArray(_ref2, 2), attr = _ref22[0], key = _ref22[1];
|
|
281
|
-
var val = coerce(getAttrConfig(attr));
|
|
282
|
-
if (val !== void 0 && val !== null) {
|
|
283
|
-
initial[key] = val;
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
var _default = {
|
|
288
|
-
familyPrefix: DEFAULT_FAMILY_PREFIX,
|
|
289
|
-
styleDefault: "solid",
|
|
290
|
-
replacementClass: DEFAULT_REPLACEMENT_CLASS,
|
|
291
|
-
autoReplaceSvg: true,
|
|
292
|
-
autoAddCss: true,
|
|
293
|
-
autoA11y: true,
|
|
294
|
-
searchPseudoElements: false,
|
|
295
|
-
observeMutations: true,
|
|
296
|
-
mutateApproach: "async",
|
|
297
|
-
keepOriginalSource: true,
|
|
298
|
-
measurePerformance: false,
|
|
299
|
-
showMissingIcons: true
|
|
300
|
-
};
|
|
301
|
-
var _config = _objectSpread2(_objectSpread2({}, _default), initial);
|
|
302
|
-
if (!_config.autoReplaceSvg)
|
|
303
|
-
_config.observeMutations = false;
|
|
304
|
-
var config = {};
|
|
305
|
-
Object.keys(_config).forEach(function(key) {
|
|
306
|
-
Object.defineProperty(config, key, {
|
|
307
|
-
enumerable: true,
|
|
308
|
-
set: function set(val) {
|
|
309
|
-
_config[key] = val;
|
|
310
|
-
_onChangeCb.forEach(function(cb) {
|
|
311
|
-
return cb(config);
|
|
312
|
-
});
|
|
313
|
-
},
|
|
314
|
-
get: function get() {
|
|
315
|
-
return _config[key];
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
});
|
|
319
|
-
WINDOW.FontAwesomeConfig = config;
|
|
320
|
-
var _onChangeCb = [];
|
|
321
|
-
function onChange(cb) {
|
|
322
|
-
_onChangeCb.push(cb);
|
|
323
|
-
return function() {
|
|
324
|
-
_onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
var d = UNITS_IN_GRID;
|
|
328
|
-
var meaninglessTransform = {
|
|
329
|
-
size: 16,
|
|
330
|
-
x: 0,
|
|
331
|
-
y: 0,
|
|
332
|
-
rotate: 0,
|
|
333
|
-
flipX: false,
|
|
334
|
-
flipY: false
|
|
335
|
-
};
|
|
336
|
-
function insertCss(css2) {
|
|
337
|
-
if (!css2 || !IS_DOM) {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
var style = DOCUMENT.createElement("style");
|
|
341
|
-
style.setAttribute("type", "text/css");
|
|
342
|
-
style.innerHTML = css2;
|
|
343
|
-
var headChildren = DOCUMENT.head.childNodes;
|
|
344
|
-
var beforeChild = null;
|
|
345
|
-
for (var i = headChildren.length - 1; i > -1; i--) {
|
|
346
|
-
var child = headChildren[i];
|
|
347
|
-
var tagName = (child.tagName || "").toUpperCase();
|
|
348
|
-
if (["STYLE", "LINK"].indexOf(tagName) > -1) {
|
|
349
|
-
beforeChild = child;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
DOCUMENT.head.insertBefore(style, beforeChild);
|
|
353
|
-
return css2;
|
|
354
|
-
}
|
|
355
|
-
var idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
356
|
-
function nextUniqueId() {
|
|
357
|
-
var size = 12;
|
|
358
|
-
var id = "";
|
|
359
|
-
while (size-- > 0) {
|
|
360
|
-
id += idPool[Math.random() * 62 | 0];
|
|
361
|
-
}
|
|
362
|
-
return id;
|
|
363
|
-
}
|
|
364
|
-
function toArray(obj) {
|
|
365
|
-
var array = [];
|
|
366
|
-
for (var i = (obj || []).length >>> 0; i--; ) {
|
|
367
|
-
array[i] = obj[i];
|
|
368
|
-
}
|
|
369
|
-
return array;
|
|
370
|
-
}
|
|
371
|
-
function classArray(node) {
|
|
372
|
-
if (node.classList) {
|
|
373
|
-
return toArray(node.classList);
|
|
374
|
-
} else {
|
|
375
|
-
return (node.getAttribute("class") || "").split(" ").filter(function(i) {
|
|
376
|
-
return i;
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
function htmlEscape(str) {
|
|
381
|
-
return "".concat(str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
382
|
-
}
|
|
383
|
-
function joinAttributes(attributes) {
|
|
384
|
-
return Object.keys(attributes || {}).reduce(function(acc, attributeName) {
|
|
385
|
-
return acc + "".concat(attributeName, '="').concat(htmlEscape(attributes[attributeName]), '" ');
|
|
386
|
-
}, "").trim();
|
|
387
|
-
}
|
|
388
|
-
function joinStyles(styles2) {
|
|
389
|
-
return Object.keys(styles2 || {}).reduce(function(acc, styleName) {
|
|
390
|
-
return acc + "".concat(styleName, ": ").concat(styles2[styleName].trim(), ";");
|
|
391
|
-
}, "");
|
|
392
|
-
}
|
|
393
|
-
function transformIsMeaningful(transform) {
|
|
394
|
-
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
|
|
395
|
-
}
|
|
396
|
-
function transformForSvg(_ref2) {
|
|
397
|
-
var transform = _ref2.transform, containerWidth = _ref2.containerWidth, iconWidth = _ref2.iconWidth;
|
|
398
|
-
var outer = {
|
|
399
|
-
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
400
|
-
};
|
|
401
|
-
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
402
|
-
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
403
|
-
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
404
|
-
var inner = {
|
|
405
|
-
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
406
|
-
};
|
|
407
|
-
var path = {
|
|
408
|
-
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
409
|
-
};
|
|
410
|
-
return {
|
|
411
|
-
outer,
|
|
412
|
-
inner,
|
|
413
|
-
path
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
function transformForCss(_ref2) {
|
|
417
|
-
var transform = _ref2.transform, _ref2$width = _ref2.width, width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width, _ref2$height = _ref2.height, height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height, _ref2$startCentered = _ref2.startCentered, startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;
|
|
418
|
-
var val = "";
|
|
419
|
-
if (startCentered && IS_IE) {
|
|
420
|
-
val += "translate(".concat(transform.x / d - width / 2, "em, ").concat(transform.y / d - height / 2, "em) ");
|
|
421
|
-
} else if (startCentered) {
|
|
422
|
-
val += "translate(calc(-50% + ".concat(transform.x / d, "em), calc(-50% + ").concat(transform.y / d, "em)) ");
|
|
423
|
-
} else {
|
|
424
|
-
val += "translate(".concat(transform.x / d, "em, ").concat(transform.y / d, "em) ");
|
|
425
|
-
}
|
|
426
|
-
val += "scale(".concat(transform.size / d * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d * (transform.flipY ? -1 : 1), ") ");
|
|
427
|
-
val += "rotate(".concat(transform.rotate, "deg) ");
|
|
428
|
-
return val;
|
|
429
|
-
}
|
|
430
|
-
var baseStyles = ':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';
|
|
431
|
-
function css() {
|
|
432
|
-
var dfp = DEFAULT_FAMILY_PREFIX;
|
|
433
|
-
var drc = DEFAULT_REPLACEMENT_CLASS;
|
|
434
|
-
var fp = config.familyPrefix;
|
|
435
|
-
var rc = config.replacementClass;
|
|
436
|
-
var s = baseStyles;
|
|
437
|
-
if (fp !== dfp || rc !== drc) {
|
|
438
|
-
var dPatt = new RegExp("\\.".concat(dfp, "\\-"), "g");
|
|
439
|
-
var customPropPatt = new RegExp("\\--".concat(dfp, "\\-"), "g");
|
|
440
|
-
var rPatt = new RegExp("\\.".concat(drc), "g");
|
|
441
|
-
s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
|
|
442
|
-
}
|
|
443
|
-
return s;
|
|
444
|
-
}
|
|
445
|
-
var _cssInserted = false;
|
|
446
|
-
function ensureCss() {
|
|
447
|
-
if (config.autoAddCss && !_cssInserted) {
|
|
448
|
-
insertCss(css());
|
|
449
|
-
_cssInserted = true;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
var InjectCSS = {
|
|
453
|
-
mixout: function mixout() {
|
|
454
|
-
return {
|
|
455
|
-
dom: {
|
|
456
|
-
css,
|
|
457
|
-
insertCss: ensureCss
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
},
|
|
461
|
-
hooks: function hooks() {
|
|
462
|
-
return {
|
|
463
|
-
beforeDOMElementCreation: function beforeDOMElementCreation() {
|
|
464
|
-
ensureCss();
|
|
465
|
-
},
|
|
466
|
-
beforeI2svg: function beforeI2svg() {
|
|
467
|
-
ensureCss();
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
var w = WINDOW || {};
|
|
473
|
-
if (!w[NAMESPACE_IDENTIFIER])
|
|
474
|
-
w[NAMESPACE_IDENTIFIER] = {};
|
|
475
|
-
if (!w[NAMESPACE_IDENTIFIER].styles)
|
|
476
|
-
w[NAMESPACE_IDENTIFIER].styles = {};
|
|
477
|
-
if (!w[NAMESPACE_IDENTIFIER].hooks)
|
|
478
|
-
w[NAMESPACE_IDENTIFIER].hooks = {};
|
|
479
|
-
if (!w[NAMESPACE_IDENTIFIER].shims)
|
|
480
|
-
w[NAMESPACE_IDENTIFIER].shims = [];
|
|
481
|
-
var namespace = w[NAMESPACE_IDENTIFIER];
|
|
482
|
-
var functions = [];
|
|
483
|
-
var listener = function listener2() {
|
|
484
|
-
DOCUMENT.removeEventListener("DOMContentLoaded", listener2);
|
|
485
|
-
loaded = 1;
|
|
486
|
-
functions.map(function(fn) {
|
|
487
|
-
return fn();
|
|
488
|
-
});
|
|
489
|
-
};
|
|
490
|
-
var loaded = false;
|
|
491
|
-
if (IS_DOM) {
|
|
492
|
-
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
|
|
493
|
-
if (!loaded)
|
|
494
|
-
DOCUMENT.addEventListener("DOMContentLoaded", listener);
|
|
495
|
-
}
|
|
496
|
-
function domready(fn) {
|
|
497
|
-
if (!IS_DOM)
|
|
498
|
-
return;
|
|
499
|
-
loaded ? setTimeout(fn, 0) : functions.push(fn);
|
|
500
|
-
}
|
|
501
|
-
function toHtml(abstractNodes) {
|
|
502
|
-
var tag = abstractNodes.tag, _abstractNodes$attrib = abstractNodes.attributes, attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib, _abstractNodes$childr = abstractNodes.children, children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
|
|
503
|
-
if (typeof abstractNodes === "string") {
|
|
504
|
-
return htmlEscape(abstractNodes);
|
|
505
|
-
} else {
|
|
506
|
-
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(""), "</").concat(tag, ">");
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
function iconFromMapping(mapping, prefix, iconName) {
|
|
510
|
-
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
511
|
-
return {
|
|
512
|
-
prefix,
|
|
513
|
-
iconName,
|
|
514
|
-
icon: mapping[prefix][iconName]
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
var bindInternal4 = function bindInternal42(func, thisContext) {
|
|
519
|
-
return function(a, b, c, d2) {
|
|
520
|
-
return func.call(thisContext, a, b, c, d2);
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
524
|
-
var keys = Object.keys(subject), length = keys.length, iterator = thisContext !== void 0 ? bindInternal4(fn, thisContext) : fn, i, key, result;
|
|
525
|
-
if (initialValue === void 0) {
|
|
526
|
-
i = 1;
|
|
527
|
-
result = subject[keys[0]];
|
|
528
|
-
} else {
|
|
529
|
-
i = 0;
|
|
530
|
-
result = initialValue;
|
|
531
|
-
}
|
|
532
|
-
for (; i < length; i++) {
|
|
533
|
-
key = keys[i];
|
|
534
|
-
result = iterator(result, subject[key], key, subject);
|
|
535
|
-
}
|
|
536
|
-
return result;
|
|
537
|
-
};
|
|
538
|
-
function ucs2decode(string) {
|
|
539
|
-
var output = [];
|
|
540
|
-
var counter = 0;
|
|
541
|
-
var length = string.length;
|
|
542
|
-
while (counter < length) {
|
|
543
|
-
var value = string.charCodeAt(counter++);
|
|
544
|
-
if (value >= 55296 && value <= 56319 && counter < length) {
|
|
545
|
-
var extra = string.charCodeAt(counter++);
|
|
546
|
-
if ((extra & 64512) == 56320) {
|
|
547
|
-
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
548
|
-
} else {
|
|
549
|
-
output.push(value);
|
|
550
|
-
counter--;
|
|
551
|
-
}
|
|
552
|
-
} else {
|
|
553
|
-
output.push(value);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
return output;
|
|
557
|
-
}
|
|
558
|
-
function toHex(unicode) {
|
|
559
|
-
var decoded = ucs2decode(unicode);
|
|
560
|
-
return decoded.length === 1 ? decoded[0].toString(16) : null;
|
|
561
|
-
}
|
|
562
|
-
function codePointAt(string, index) {
|
|
563
|
-
var size = string.length;
|
|
564
|
-
var first = string.charCodeAt(index);
|
|
565
|
-
var second;
|
|
566
|
-
if (first >= 55296 && first <= 56319 && size > index + 1) {
|
|
567
|
-
second = string.charCodeAt(index + 1);
|
|
568
|
-
if (second >= 56320 && second <= 57343) {
|
|
569
|
-
return (first - 55296) * 1024 + second - 56320 + 65536;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
return first;
|
|
573
|
-
}
|
|
574
|
-
function normalizeIcons(icons) {
|
|
575
|
-
return Object.keys(icons).reduce(function(acc, iconName) {
|
|
576
|
-
var icon3 = icons[iconName];
|
|
577
|
-
var expanded = !!icon3.icon;
|
|
578
|
-
if (expanded) {
|
|
579
|
-
acc[icon3.iconName] = icon3.icon;
|
|
580
|
-
} else {
|
|
581
|
-
acc[iconName] = icon3;
|
|
582
|
-
}
|
|
583
|
-
return acc;
|
|
584
|
-
}, {});
|
|
585
|
-
}
|
|
586
|
-
function defineIcons(prefix, icons) {
|
|
587
|
-
var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
588
|
-
var _params$skipHooks = params.skipHooks, skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
|
|
589
|
-
var normalized = normalizeIcons(icons);
|
|
590
|
-
if (typeof namespace.hooks.addPack === "function" && !skipHooks) {
|
|
591
|
-
namespace.hooks.addPack(prefix, normalizeIcons(icons));
|
|
592
|
-
} else {
|
|
593
|
-
namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);
|
|
594
|
-
}
|
|
595
|
-
if (prefix === "fas") {
|
|
596
|
-
defineIcons("fa", icons);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
var styles = namespace.styles, shims = namespace.shims;
|
|
600
|
-
var LONG_STYLE = Object.values(PREFIX_TO_LONG_STYLE);
|
|
601
|
-
var _defaultUsablePrefix = null;
|
|
602
|
-
var _byUnicode = {};
|
|
603
|
-
var _byLigature = {};
|
|
604
|
-
var _byOldName = {};
|
|
605
|
-
var _byOldUnicode = {};
|
|
606
|
-
var _byAlias = {};
|
|
607
|
-
var PREFIXES = Object.keys(PREFIX_TO_STYLE);
|
|
608
|
-
function isReserved(name) {
|
|
609
|
-
return ~RESERVED_CLASSES.indexOf(name);
|
|
610
|
-
}
|
|
611
|
-
function getIconName(familyPrefix, cls) {
|
|
612
|
-
var parts = cls.split("-");
|
|
613
|
-
var prefix = parts[0];
|
|
614
|
-
var iconName = parts.slice(1).join("-");
|
|
615
|
-
if (prefix === familyPrefix && iconName !== "" && !isReserved(iconName)) {
|
|
616
|
-
return iconName;
|
|
617
|
-
} else {
|
|
618
|
-
return null;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
var build = function build2() {
|
|
622
|
-
var lookup = function lookup2(reducer) {
|
|
623
|
-
return reduce(styles, function(o, style, prefix) {
|
|
624
|
-
o[prefix] = reduce(style, reducer, {});
|
|
625
|
-
return o;
|
|
626
|
-
}, {});
|
|
627
|
-
};
|
|
628
|
-
_byUnicode = lookup(function(acc, icon3, iconName) {
|
|
629
|
-
if (icon3[3]) {
|
|
630
|
-
acc[icon3[3]] = iconName;
|
|
631
|
-
}
|
|
632
|
-
if (icon3[2]) {
|
|
633
|
-
var aliases = icon3[2].filter(function(a) {
|
|
634
|
-
return typeof a === "number";
|
|
635
|
-
});
|
|
636
|
-
aliases.forEach(function(alias) {
|
|
637
|
-
acc[alias.toString(16)] = iconName;
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
return acc;
|
|
641
|
-
});
|
|
642
|
-
_byLigature = lookup(function(acc, icon3, iconName) {
|
|
643
|
-
acc[iconName] = iconName;
|
|
644
|
-
if (icon3[2]) {
|
|
645
|
-
var aliases = icon3[2].filter(function(a) {
|
|
646
|
-
return typeof a === "string";
|
|
647
|
-
});
|
|
648
|
-
aliases.forEach(function(alias) {
|
|
649
|
-
acc[alias] = iconName;
|
|
650
|
-
});
|
|
651
|
-
}
|
|
652
|
-
return acc;
|
|
653
|
-
});
|
|
654
|
-
_byAlias = lookup(function(acc, icon3, iconName) {
|
|
655
|
-
var aliases = icon3[2];
|
|
656
|
-
acc[iconName] = iconName;
|
|
657
|
-
aliases.forEach(function(alias) {
|
|
658
|
-
acc[alias] = iconName;
|
|
659
|
-
});
|
|
660
|
-
return acc;
|
|
661
|
-
});
|
|
662
|
-
var hasRegular = "far" in styles || config.autoFetchSvg;
|
|
663
|
-
var shimLookups = reduce(shims, function(acc, shim) {
|
|
664
|
-
var maybeNameMaybeUnicode = shim[0];
|
|
665
|
-
var prefix = shim[1];
|
|
666
|
-
var iconName = shim[2];
|
|
667
|
-
if (prefix === "far" && !hasRegular) {
|
|
668
|
-
prefix = "fas";
|
|
669
|
-
}
|
|
670
|
-
if (typeof maybeNameMaybeUnicode === "string") {
|
|
671
|
-
acc.names[maybeNameMaybeUnicode] = {
|
|
672
|
-
prefix,
|
|
673
|
-
iconName
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
if (typeof maybeNameMaybeUnicode === "number") {
|
|
677
|
-
acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
|
|
678
|
-
prefix,
|
|
679
|
-
iconName
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
return acc;
|
|
683
|
-
}, {
|
|
684
|
-
names: {},
|
|
685
|
-
unicodes: {}
|
|
686
|
-
});
|
|
687
|
-
_byOldName = shimLookups.names;
|
|
688
|
-
_byOldUnicode = shimLookups.unicodes;
|
|
689
|
-
_defaultUsablePrefix = getCanonicalPrefix(config.styleDefault);
|
|
690
|
-
};
|
|
691
|
-
onChange(function(c) {
|
|
692
|
-
_defaultUsablePrefix = getCanonicalPrefix(c.styleDefault);
|
|
693
|
-
});
|
|
694
|
-
build();
|
|
695
|
-
function byUnicode(prefix, unicode) {
|
|
696
|
-
return (_byUnicode[prefix] || {})[unicode];
|
|
697
|
-
}
|
|
698
|
-
function byLigature(prefix, ligature) {
|
|
699
|
-
return (_byLigature[prefix] || {})[ligature];
|
|
700
|
-
}
|
|
701
|
-
function byAlias(prefix, alias) {
|
|
702
|
-
return (_byAlias[prefix] || {})[alias];
|
|
703
|
-
}
|
|
704
|
-
function byOldName(name) {
|
|
705
|
-
return _byOldName[name] || {
|
|
706
|
-
prefix: null,
|
|
707
|
-
iconName: null
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
|
-
function byOldUnicode(unicode) {
|
|
711
|
-
var oldUnicode = _byOldUnicode[unicode];
|
|
712
|
-
var newUnicode = byUnicode("fas", unicode);
|
|
713
|
-
return oldUnicode || (newUnicode ? {
|
|
714
|
-
prefix: "fas",
|
|
715
|
-
iconName: newUnicode
|
|
716
|
-
} : null) || {
|
|
717
|
-
prefix: null,
|
|
718
|
-
iconName: null
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
|
-
function getDefaultUsablePrefix() {
|
|
722
|
-
return _defaultUsablePrefix;
|
|
723
|
-
}
|
|
724
|
-
var emptyCanonicalIcon = function emptyCanonicalIcon2() {
|
|
725
|
-
return {
|
|
726
|
-
prefix: null,
|
|
727
|
-
iconName: null,
|
|
728
|
-
rest: []
|
|
729
|
-
};
|
|
730
|
-
};
|
|
731
|
-
function getCanonicalPrefix(styleOrPrefix) {
|
|
732
|
-
var style = PREFIX_TO_STYLE[styleOrPrefix];
|
|
733
|
-
var prefix = STYLE_TO_PREFIX[styleOrPrefix] || STYLE_TO_PREFIX[style];
|
|
734
|
-
var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
|
|
735
|
-
return prefix || defined || null;
|
|
736
|
-
}
|
|
737
|
-
function getCanonicalIcon(values) {
|
|
738
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
739
|
-
var _params$skipLookups = params.skipLookups, skipLookups = _params$skipLookups === void 0 ? false : _params$skipLookups;
|
|
740
|
-
var givenPrefix = null;
|
|
741
|
-
var canonical = values.reduce(function(acc, cls) {
|
|
742
|
-
var iconName = getIconName(config.familyPrefix, cls);
|
|
743
|
-
if (styles[cls]) {
|
|
744
|
-
cls = LONG_STYLE.includes(cls) ? LONG_STYLE_TO_PREFIX[cls] : cls;
|
|
745
|
-
givenPrefix = cls;
|
|
746
|
-
acc.prefix = cls;
|
|
747
|
-
} else if (PREFIXES.indexOf(cls) > -1) {
|
|
748
|
-
givenPrefix = cls;
|
|
749
|
-
acc.prefix = getCanonicalPrefix(cls);
|
|
750
|
-
} else if (iconName) {
|
|
751
|
-
acc.iconName = iconName;
|
|
752
|
-
} else if (cls !== config.replacementClass) {
|
|
753
|
-
acc.rest.push(cls);
|
|
754
|
-
}
|
|
755
|
-
if (!skipLookups && acc.prefix && acc.iconName) {
|
|
756
|
-
var shim = givenPrefix === "fa" ? byOldName(acc.iconName) : {};
|
|
757
|
-
var aliasIconName = byAlias(acc.prefix, acc.iconName);
|
|
758
|
-
if (shim.prefix) {
|
|
759
|
-
givenPrefix = null;
|
|
760
|
-
}
|
|
761
|
-
acc.iconName = shim.iconName || aliasIconName || acc.iconName;
|
|
762
|
-
acc.prefix = shim.prefix || acc.prefix;
|
|
763
|
-
if (acc.prefix === "far" && !styles["far"] && styles["fas"] && !config.autoFetchSvg) {
|
|
764
|
-
acc.prefix = "fas";
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
return acc;
|
|
768
|
-
}, emptyCanonicalIcon());
|
|
769
|
-
if (canonical.prefix === "fa" || givenPrefix === "fa") {
|
|
770
|
-
canonical.prefix = getDefaultUsablePrefix() || "fas";
|
|
771
|
-
}
|
|
772
|
-
return canonical;
|
|
773
|
-
}
|
|
774
|
-
var Library = /* @__PURE__ */ function() {
|
|
775
|
-
function Library2() {
|
|
776
|
-
_classCallCheck(this, Library2);
|
|
777
|
-
this.definitions = {};
|
|
778
|
-
}
|
|
779
|
-
_createClass(Library2, [{
|
|
780
|
-
key: "add",
|
|
781
|
-
value: function add() {
|
|
782
|
-
var _this = this;
|
|
783
|
-
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
784
|
-
definitions[_key] = arguments[_key];
|
|
785
|
-
}
|
|
786
|
-
var additions = definitions.reduce(this._pullDefinitions, {});
|
|
787
|
-
Object.keys(additions).forEach(function(key) {
|
|
788
|
-
_this.definitions[key] = _objectSpread2(_objectSpread2({}, _this.definitions[key] || {}), additions[key]);
|
|
789
|
-
defineIcons(key, additions[key]);
|
|
790
|
-
var longPrefix = PREFIX_TO_LONG_STYLE[key];
|
|
791
|
-
if (longPrefix)
|
|
792
|
-
defineIcons(longPrefix, additions[key]);
|
|
793
|
-
build();
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
}, {
|
|
797
|
-
key: "reset",
|
|
798
|
-
value: function reset() {
|
|
799
|
-
this.definitions = {};
|
|
800
|
-
}
|
|
801
|
-
}, {
|
|
802
|
-
key: "_pullDefinitions",
|
|
803
|
-
value: function _pullDefinitions(additions, definition) {
|
|
804
|
-
var normalized = definition.prefix && definition.iconName && definition.icon ? {
|
|
805
|
-
0: definition
|
|
806
|
-
} : definition;
|
|
807
|
-
Object.keys(normalized).map(function(key) {
|
|
808
|
-
var _normalized$key = normalized[key], prefix = _normalized$key.prefix, iconName = _normalized$key.iconName, icon3 = _normalized$key.icon;
|
|
809
|
-
var aliases = icon3[2];
|
|
810
|
-
if (!additions[prefix])
|
|
811
|
-
additions[prefix] = {};
|
|
812
|
-
if (aliases.length > 0) {
|
|
813
|
-
aliases.forEach(function(alias) {
|
|
814
|
-
if (typeof alias === "string") {
|
|
815
|
-
additions[prefix][alias] = icon3;
|
|
816
|
-
}
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
additions[prefix][iconName] = icon3;
|
|
820
|
-
});
|
|
821
|
-
return additions;
|
|
822
|
-
}
|
|
823
|
-
}]);
|
|
824
|
-
return Library2;
|
|
825
|
-
}();
|
|
826
|
-
var _plugins = [];
|
|
827
|
-
var _hooks = {};
|
|
828
|
-
var providers = {};
|
|
829
|
-
var defaultProviderKeys = Object.keys(providers);
|
|
830
|
-
function registerPlugins(nextPlugins, _ref2) {
|
|
831
|
-
var obj = _ref2.mixoutsTo;
|
|
832
|
-
_plugins = nextPlugins;
|
|
833
|
-
_hooks = {};
|
|
834
|
-
Object.keys(providers).forEach(function(k) {
|
|
835
|
-
if (defaultProviderKeys.indexOf(k) === -1) {
|
|
836
|
-
delete providers[k];
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
_plugins.forEach(function(plugin) {
|
|
840
|
-
var mixout8 = plugin.mixout ? plugin.mixout() : {};
|
|
841
|
-
Object.keys(mixout8).forEach(function(tk) {
|
|
842
|
-
if (typeof mixout8[tk] === "function") {
|
|
843
|
-
obj[tk] = mixout8[tk];
|
|
844
|
-
}
|
|
845
|
-
if (_typeof$1(mixout8[tk]) === "object") {
|
|
846
|
-
Object.keys(mixout8[tk]).forEach(function(sk) {
|
|
847
|
-
if (!obj[tk]) {
|
|
848
|
-
obj[tk] = {};
|
|
849
|
-
}
|
|
850
|
-
obj[tk][sk] = mixout8[tk][sk];
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
});
|
|
854
|
-
if (plugin.hooks) {
|
|
855
|
-
var hooks8 = plugin.hooks();
|
|
856
|
-
Object.keys(hooks8).forEach(function(hook) {
|
|
857
|
-
if (!_hooks[hook]) {
|
|
858
|
-
_hooks[hook] = [];
|
|
859
|
-
}
|
|
860
|
-
_hooks[hook].push(hooks8[hook]);
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
if (plugin.provides) {
|
|
864
|
-
plugin.provides(providers);
|
|
865
|
-
}
|
|
866
|
-
});
|
|
867
|
-
return obj;
|
|
868
|
-
}
|
|
869
|
-
function chainHooks(hook, accumulator) {
|
|
870
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
871
|
-
args[_key - 2] = arguments[_key];
|
|
872
|
-
}
|
|
873
|
-
var hookFns = _hooks[hook] || [];
|
|
874
|
-
hookFns.forEach(function(hookFn) {
|
|
875
|
-
accumulator = hookFn.apply(null, [accumulator].concat(args));
|
|
876
|
-
});
|
|
877
|
-
return accumulator;
|
|
878
|
-
}
|
|
879
|
-
function callHooks(hook) {
|
|
880
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
881
|
-
args[_key2 - 1] = arguments[_key2];
|
|
882
|
-
}
|
|
883
|
-
var hookFns = _hooks[hook] || [];
|
|
884
|
-
hookFns.forEach(function(hookFn) {
|
|
885
|
-
hookFn.apply(null, args);
|
|
886
|
-
});
|
|
887
|
-
return void 0;
|
|
888
|
-
}
|
|
889
|
-
function callProvided() {
|
|
890
|
-
var hook = arguments[0];
|
|
891
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
892
|
-
return providers[hook] ? providers[hook].apply(null, args) : void 0;
|
|
893
|
-
}
|
|
894
|
-
function findIconDefinition(iconLookup) {
|
|
895
|
-
if (iconLookup.prefix === "fa") {
|
|
896
|
-
iconLookup.prefix = "fas";
|
|
897
|
-
}
|
|
898
|
-
var iconName = iconLookup.iconName;
|
|
899
|
-
var prefix = iconLookup.prefix || getDefaultUsablePrefix();
|
|
900
|
-
if (!iconName)
|
|
901
|
-
return;
|
|
902
|
-
iconName = byAlias(prefix, iconName) || iconName;
|
|
903
|
-
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
904
|
-
}
|
|
905
|
-
var library = new Library();
|
|
906
|
-
var noAuto = function noAuto2() {
|
|
907
|
-
config.autoReplaceSvg = false;
|
|
908
|
-
config.observeMutations = false;
|
|
909
|
-
callHooks("noAuto");
|
|
910
|
-
};
|
|
911
|
-
var dom = {
|
|
912
|
-
i2svg: function i2svg() {
|
|
913
|
-
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
914
|
-
if (IS_DOM) {
|
|
915
|
-
callHooks("beforeI2svg", params);
|
|
916
|
-
callProvided("pseudoElements2svg", params);
|
|
917
|
-
return callProvided("i2svg", params);
|
|
918
|
-
} else {
|
|
919
|
-
return Promise.reject("Operation requires a DOM of some kind.");
|
|
920
|
-
}
|
|
921
|
-
},
|
|
922
|
-
watch: function watch2() {
|
|
923
|
-
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
924
|
-
var autoReplaceSvgRoot = params.autoReplaceSvgRoot;
|
|
925
|
-
if (config.autoReplaceSvg === false) {
|
|
926
|
-
config.autoReplaceSvg = true;
|
|
927
|
-
}
|
|
928
|
-
config.observeMutations = true;
|
|
929
|
-
domready(function() {
|
|
930
|
-
autoReplace({
|
|
931
|
-
autoReplaceSvgRoot
|
|
932
|
-
});
|
|
933
|
-
callHooks("watch", params);
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
|
-
var parse = {
|
|
938
|
-
icon: function icon(_icon) {
|
|
939
|
-
if (_icon === null) {
|
|
940
|
-
return null;
|
|
941
|
-
}
|
|
942
|
-
if (_typeof$1(_icon) === "object" && _icon.prefix && _icon.iconName) {
|
|
943
|
-
return {
|
|
944
|
-
prefix: _icon.prefix,
|
|
945
|
-
iconName: byAlias(_icon.prefix, _icon.iconName) || _icon.iconName
|
|
946
|
-
};
|
|
947
|
-
}
|
|
948
|
-
if (Array.isArray(_icon) && _icon.length === 2) {
|
|
949
|
-
var iconName = _icon[1].indexOf("fa-") === 0 ? _icon[1].slice(3) : _icon[1];
|
|
950
|
-
var prefix = getCanonicalPrefix(_icon[0]);
|
|
951
|
-
return {
|
|
952
|
-
prefix,
|
|
953
|
-
iconName: byAlias(prefix, iconName) || iconName
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
if (typeof _icon === "string" && (_icon.indexOf("".concat(config.familyPrefix, "-")) > -1 || _icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
|
|
957
|
-
var canonicalIcon = getCanonicalIcon(_icon.split(" "), {
|
|
958
|
-
skipLookups: true
|
|
959
|
-
});
|
|
960
|
-
return {
|
|
961
|
-
prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
|
|
962
|
-
iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
|
|
963
|
-
};
|
|
964
|
-
}
|
|
965
|
-
if (typeof _icon === "string") {
|
|
966
|
-
var _prefix = getDefaultUsablePrefix();
|
|
967
|
-
return {
|
|
968
|
-
prefix: _prefix,
|
|
969
|
-
iconName: byAlias(_prefix, _icon) || _icon
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
};
|
|
974
|
-
var api = {
|
|
975
|
-
noAuto,
|
|
976
|
-
config,
|
|
977
|
-
dom,
|
|
978
|
-
parse,
|
|
979
|
-
library,
|
|
980
|
-
findIconDefinition,
|
|
981
|
-
toHtml
|
|
982
|
-
};
|
|
983
|
-
var autoReplace = function autoReplace2() {
|
|
984
|
-
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
985
|
-
var _params$autoReplaceSv = params.autoReplaceSvgRoot, autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;
|
|
986
|
-
if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg)
|
|
987
|
-
api.dom.i2svg({
|
|
988
|
-
node: autoReplaceSvgRoot
|
|
989
|
-
});
|
|
990
|
-
};
|
|
991
|
-
function domVariants(val, abstractCreator) {
|
|
992
|
-
Object.defineProperty(val, "abstract", {
|
|
993
|
-
get: abstractCreator
|
|
994
|
-
});
|
|
995
|
-
Object.defineProperty(val, "html", {
|
|
996
|
-
get: function get() {
|
|
997
|
-
return val.abstract.map(function(a) {
|
|
998
|
-
return toHtml(a);
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
});
|
|
1002
|
-
Object.defineProperty(val, "node", {
|
|
1003
|
-
get: function get() {
|
|
1004
|
-
if (!IS_DOM)
|
|
1005
|
-
return;
|
|
1006
|
-
var container = DOCUMENT.createElement("div");
|
|
1007
|
-
container.innerHTML = val.html;
|
|
1008
|
-
return container.children;
|
|
1009
|
-
}
|
|
1010
|
-
});
|
|
1011
|
-
return val;
|
|
1012
|
-
}
|
|
1013
|
-
function asIcon(_ref2) {
|
|
1014
|
-
var children = _ref2.children, main = _ref2.main, mask = _ref2.mask, attributes = _ref2.attributes, styles2 = _ref2.styles, transform = _ref2.transform;
|
|
1015
|
-
if (transformIsMeaningful(transform) && main.found && !mask.found) {
|
|
1016
|
-
var width = main.width, height = main.height;
|
|
1017
|
-
var offset = {
|
|
1018
|
-
x: width / height / 2,
|
|
1019
|
-
y: 0.5
|
|
1020
|
-
};
|
|
1021
|
-
attributes["style"] = joinStyles(_objectSpread2(_objectSpread2({}, styles2), {}, {
|
|
1022
|
-
"transform-origin": "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
|
|
1023
|
-
}));
|
|
1024
|
-
}
|
|
1025
|
-
return [{
|
|
1026
|
-
tag: "svg",
|
|
1027
|
-
attributes,
|
|
1028
|
-
children
|
|
1029
|
-
}];
|
|
1030
|
-
}
|
|
1031
|
-
function asSymbol(_ref2) {
|
|
1032
|
-
var prefix = _ref2.prefix, iconName = _ref2.iconName, children = _ref2.children, attributes = _ref2.attributes, symbol = _ref2.symbol;
|
|
1033
|
-
var id = symbol === true ? "".concat(prefix, "-").concat(config.familyPrefix, "-").concat(iconName) : symbol;
|
|
1034
|
-
return [{
|
|
1035
|
-
tag: "svg",
|
|
1036
|
-
attributes: {
|
|
1037
|
-
style: "display: none;"
|
|
1038
|
-
},
|
|
1039
|
-
children: [{
|
|
1040
|
-
tag: "symbol",
|
|
1041
|
-
attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {
|
|
1042
|
-
id
|
|
1043
|
-
}),
|
|
1044
|
-
children
|
|
1045
|
-
}]
|
|
1046
|
-
}];
|
|
1047
|
-
}
|
|
1048
|
-
function makeInlineSvgAbstract(params) {
|
|
1049
|
-
var _params$icons = params.icons, main = _params$icons.main, mask = _params$icons.mask, prefix = params.prefix, iconName = params.iconName, transform = params.transform, symbol = params.symbol, title = params.title, maskId = params.maskId, titleId = params.titleId, extra = params.extra, _params$watchable = params.watchable, watchable = _params$watchable === void 0 ? false : _params$watchable;
|
|
1050
|
-
var _ref2 = mask.found ? mask : main, width = _ref2.width, height = _ref2.height;
|
|
1051
|
-
var isUploadedIcon = prefix === "fak";
|
|
1052
|
-
var attrClass = [config.replacementClass, iconName ? "".concat(config.familyPrefix, "-").concat(iconName) : ""].filter(function(c) {
|
|
1053
|
-
return extra.classes.indexOf(c) === -1;
|
|
1054
|
-
}).filter(function(c) {
|
|
1055
|
-
return c !== "" || !!c;
|
|
1056
|
-
}).concat(extra.classes).join(" ");
|
|
1057
|
-
var content = {
|
|
1058
|
-
children: [],
|
|
1059
|
-
attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
|
|
1060
|
-
"data-prefix": prefix,
|
|
1061
|
-
"data-icon": iconName,
|
|
1062
|
-
"class": attrClass,
|
|
1063
|
-
"role": extra.attributes.role || "img",
|
|
1064
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
1065
|
-
"viewBox": "0 0 ".concat(width, " ").concat(height)
|
|
1066
|
-
})
|
|
1067
|
-
};
|
|
1068
|
-
var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf("fa-fw") ? {
|
|
1069
|
-
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
1070
|
-
} : {};
|
|
1071
|
-
if (watchable) {
|
|
1072
|
-
content.attributes[DATA_FA_I2SVG] = "";
|
|
1073
|
-
}
|
|
1074
|
-
if (title) {
|
|
1075
|
-
content.children.push({
|
|
1076
|
-
tag: "title",
|
|
1077
|
-
attributes: {
|
|
1078
|
-
id: content.attributes["aria-labelledby"] || "title-".concat(titleId || nextUniqueId())
|
|
1079
|
-
},
|
|
1080
|
-
children: [title]
|
|
1081
|
-
});
|
|
1082
|
-
delete content.attributes.title;
|
|
1083
|
-
}
|
|
1084
|
-
var args = _objectSpread2(_objectSpread2({}, content), {}, {
|
|
1085
|
-
prefix,
|
|
1086
|
-
iconName,
|
|
1087
|
-
main,
|
|
1088
|
-
mask,
|
|
1089
|
-
maskId,
|
|
1090
|
-
transform,
|
|
1091
|
-
symbol,
|
|
1092
|
-
styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)
|
|
1093
|
-
});
|
|
1094
|
-
var _ref22 = mask.found && main.found ? callProvided("generateAbstractMask", args) || {
|
|
1095
|
-
children: [],
|
|
1096
|
-
attributes: {}
|
|
1097
|
-
} : callProvided("generateAbstractIcon", args) || {
|
|
1098
|
-
children: [],
|
|
1099
|
-
attributes: {}
|
|
1100
|
-
}, children = _ref22.children, attributes = _ref22.attributes;
|
|
1101
|
-
args.children = children;
|
|
1102
|
-
args.attributes = attributes;
|
|
1103
|
-
if (symbol) {
|
|
1104
|
-
return asSymbol(args);
|
|
1105
|
-
} else {
|
|
1106
|
-
return asIcon(args);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
function makeLayersTextAbstract(params) {
|
|
1110
|
-
var content = params.content, width = params.width, height = params.height, transform = params.transform, title = params.title, extra = params.extra, _params$watchable2 = params.watchable, watchable = _params$watchable2 === void 0 ? false : _params$watchable2;
|
|
1111
|
-
var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
1112
|
-
"title": title
|
|
1113
|
-
} : {}), {}, {
|
|
1114
|
-
"class": extra.classes.join(" ")
|
|
1115
|
-
});
|
|
1116
|
-
if (watchable) {
|
|
1117
|
-
attributes[DATA_FA_I2SVG] = "";
|
|
1118
|
-
}
|
|
1119
|
-
var styles2 = _objectSpread2({}, extra.styles);
|
|
1120
|
-
if (transformIsMeaningful(transform)) {
|
|
1121
|
-
styles2["transform"] = transformForCss({
|
|
1122
|
-
transform,
|
|
1123
|
-
startCentered: true,
|
|
1124
|
-
width,
|
|
1125
|
-
height
|
|
1126
|
-
});
|
|
1127
|
-
styles2["-webkit-transform"] = styles2["transform"];
|
|
1128
|
-
}
|
|
1129
|
-
var styleString = joinStyles(styles2);
|
|
1130
|
-
if (styleString.length > 0) {
|
|
1131
|
-
attributes["style"] = styleString;
|
|
1132
|
-
}
|
|
1133
|
-
var val = [];
|
|
1134
|
-
val.push({
|
|
1135
|
-
tag: "span",
|
|
1136
|
-
attributes,
|
|
1137
|
-
children: [content]
|
|
1138
|
-
});
|
|
1139
|
-
if (title) {
|
|
1140
|
-
val.push({
|
|
1141
|
-
tag: "span",
|
|
1142
|
-
attributes: {
|
|
1143
|
-
class: "sr-only"
|
|
1144
|
-
},
|
|
1145
|
-
children: [title]
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1148
|
-
return val;
|
|
1149
|
-
}
|
|
1150
|
-
function makeLayersCounterAbstract(params) {
|
|
1151
|
-
var content = params.content, title = params.title, extra = params.extra;
|
|
1152
|
-
var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
1153
|
-
"title": title
|
|
1154
|
-
} : {}), {}, {
|
|
1155
|
-
"class": extra.classes.join(" ")
|
|
1156
|
-
});
|
|
1157
|
-
var styleString = joinStyles(extra.styles);
|
|
1158
|
-
if (styleString.length > 0) {
|
|
1159
|
-
attributes["style"] = styleString;
|
|
1160
|
-
}
|
|
1161
|
-
var val = [];
|
|
1162
|
-
val.push({
|
|
1163
|
-
tag: "span",
|
|
1164
|
-
attributes,
|
|
1165
|
-
children: [content]
|
|
1166
|
-
});
|
|
1167
|
-
if (title) {
|
|
1168
|
-
val.push({
|
|
1169
|
-
tag: "span",
|
|
1170
|
-
attributes: {
|
|
1171
|
-
class: "sr-only"
|
|
1172
|
-
},
|
|
1173
|
-
children: [title]
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
return val;
|
|
1177
|
-
}
|
|
1178
|
-
var styles$1 = namespace.styles;
|
|
1179
|
-
function asFoundIcon(icon3) {
|
|
1180
|
-
var width = icon3[0];
|
|
1181
|
-
var height = icon3[1];
|
|
1182
|
-
var _icon$slice = icon3.slice(4), _icon$slice2 = _slicedToArray(_icon$slice, 1), vectorData = _icon$slice2[0];
|
|
1183
|
-
var element = null;
|
|
1184
|
-
if (Array.isArray(vectorData)) {
|
|
1185
|
-
element = {
|
|
1186
|
-
tag: "g",
|
|
1187
|
-
attributes: {
|
|
1188
|
-
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
1189
|
-
},
|
|
1190
|
-
children: [{
|
|
1191
|
-
tag: "path",
|
|
1192
|
-
attributes: {
|
|
1193
|
-
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
1194
|
-
fill: "currentColor",
|
|
1195
|
-
d: vectorData[0]
|
|
1196
|
-
}
|
|
1197
|
-
}, {
|
|
1198
|
-
tag: "path",
|
|
1199
|
-
attributes: {
|
|
1200
|
-
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
1201
|
-
fill: "currentColor",
|
|
1202
|
-
d: vectorData[1]
|
|
1203
|
-
}
|
|
1204
|
-
}]
|
|
1205
|
-
};
|
|
1206
|
-
} else {
|
|
1207
|
-
element = {
|
|
1208
|
-
tag: "path",
|
|
1209
|
-
attributes: {
|
|
1210
|
-
fill: "currentColor",
|
|
1211
|
-
d: vectorData
|
|
1212
|
-
}
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
return {
|
|
1216
|
-
found: true,
|
|
1217
|
-
width,
|
|
1218
|
-
height,
|
|
1219
|
-
icon: element
|
|
1220
|
-
};
|
|
1221
|
-
}
|
|
1222
|
-
var missingIconResolutionMixin = {
|
|
1223
|
-
found: false,
|
|
1224
|
-
width: 512,
|
|
1225
|
-
height: 512
|
|
1226
|
-
};
|
|
1227
|
-
function maybeNotifyMissing(iconName, prefix) {
|
|
1228
|
-
if (!PRODUCTION$1 && !config.showMissingIcons && iconName) {
|
|
1229
|
-
console.error('Icon with name "'.concat(iconName, '" and prefix "').concat(prefix, '" is missing.'));
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
function findIcon(iconName, prefix) {
|
|
1233
|
-
var givenPrefix = prefix;
|
|
1234
|
-
if (prefix === "fa" && config.styleDefault !== null) {
|
|
1235
|
-
prefix = getDefaultUsablePrefix();
|
|
1236
|
-
}
|
|
1237
|
-
return new Promise(function(resolve, reject) {
|
|
1238
|
-
({
|
|
1239
|
-
found: false,
|
|
1240
|
-
width: 512,
|
|
1241
|
-
height: 512,
|
|
1242
|
-
icon: callProvided("missingIconAbstract") || {}
|
|
1243
|
-
});
|
|
1244
|
-
if (givenPrefix === "fa") {
|
|
1245
|
-
var shim = byOldName(iconName) || {};
|
|
1246
|
-
iconName = shim.iconName || iconName;
|
|
1247
|
-
prefix = shim.prefix || prefix;
|
|
1248
|
-
}
|
|
1249
|
-
if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
|
|
1250
|
-
var icon3 = styles$1[prefix][iconName];
|
|
1251
|
-
return resolve(asFoundIcon(icon3));
|
|
1252
|
-
}
|
|
1253
|
-
maybeNotifyMissing(iconName, prefix);
|
|
1254
|
-
resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {
|
|
1255
|
-
icon: config.showMissingIcons && iconName ? callProvided("missingIconAbstract") || {} : {}
|
|
1256
|
-
}));
|
|
1257
|
-
});
|
|
1258
|
-
}
|
|
1259
|
-
var noop$1 = function noop3() {
|
|
1260
|
-
};
|
|
1261
|
-
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
|
|
1262
|
-
mark: noop$1,
|
|
1263
|
-
measure: noop$1
|
|
1264
|
-
};
|
|
1265
|
-
var preamble = 'FA "6.0.0"';
|
|
1266
|
-
var begin = function begin2(name) {
|
|
1267
|
-
p.mark("".concat(preamble, " ").concat(name, " begins"));
|
|
1268
|
-
return function() {
|
|
1269
|
-
return end(name);
|
|
1270
|
-
};
|
|
1271
|
-
};
|
|
1272
|
-
var end = function end2(name) {
|
|
1273
|
-
p.mark("".concat(preamble, " ").concat(name, " ends"));
|
|
1274
|
-
p.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
|
|
1275
|
-
};
|
|
1276
|
-
var perf = {
|
|
1277
|
-
begin,
|
|
1278
|
-
end
|
|
1279
|
-
};
|
|
1280
|
-
var noop$2 = function noop4() {
|
|
1281
|
-
};
|
|
1282
|
-
function isWatched(node) {
|
|
1283
|
-
var i2svg2 = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
|
|
1284
|
-
return typeof i2svg2 === "string";
|
|
1285
|
-
}
|
|
1286
|
-
function hasPrefixAndIcon(node) {
|
|
1287
|
-
var prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
|
|
1288
|
-
var icon3 = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
|
|
1289
|
-
return prefix && icon3;
|
|
1290
|
-
}
|
|
1291
|
-
function hasBeenReplaced(node) {
|
|
1292
|
-
return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
|
|
1293
|
-
}
|
|
1294
|
-
function getMutator() {
|
|
1295
|
-
if (config.autoReplaceSvg === true) {
|
|
1296
|
-
return mutators.replace;
|
|
1297
|
-
}
|
|
1298
|
-
var mutator = mutators[config.autoReplaceSvg];
|
|
1299
|
-
return mutator || mutators.replace;
|
|
1300
|
-
}
|
|
1301
|
-
function createElementNS(tag) {
|
|
1302
|
-
return DOCUMENT.createElementNS("http://www.w3.org/2000/svg", tag);
|
|
1303
|
-
}
|
|
1304
|
-
function createElement(tag) {
|
|
1305
|
-
return DOCUMENT.createElement(tag);
|
|
1306
|
-
}
|
|
1307
|
-
function convertSVG(abstractObj) {
|
|
1308
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1309
|
-
var _params$ceFn = params.ceFn, ceFn = _params$ceFn === void 0 ? abstractObj.tag === "svg" ? createElementNS : createElement : _params$ceFn;
|
|
1310
|
-
if (typeof abstractObj === "string") {
|
|
1311
|
-
return DOCUMENT.createTextNode(abstractObj);
|
|
1312
|
-
}
|
|
1313
|
-
var tag = ceFn(abstractObj.tag);
|
|
1314
|
-
Object.keys(abstractObj.attributes || []).forEach(function(key) {
|
|
1315
|
-
tag.setAttribute(key, abstractObj.attributes[key]);
|
|
1316
|
-
});
|
|
1317
|
-
var children = abstractObj.children || [];
|
|
1318
|
-
children.forEach(function(child) {
|
|
1319
|
-
tag.appendChild(convertSVG(child, {
|
|
1320
|
-
ceFn
|
|
1321
|
-
}));
|
|
1322
|
-
});
|
|
1323
|
-
return tag;
|
|
1324
|
-
}
|
|
1325
|
-
function nodeAsComment(node) {
|
|
1326
|
-
var comment = " ".concat(node.outerHTML, " ");
|
|
1327
|
-
comment = "".concat(comment, "Font Awesome fontawesome.com ");
|
|
1328
|
-
return comment;
|
|
1329
|
-
}
|
|
1330
|
-
var mutators = {
|
|
1331
|
-
replace: function replace(mutation) {
|
|
1332
|
-
var node = mutation[0];
|
|
1333
|
-
if (node.parentNode) {
|
|
1334
|
-
mutation[1].forEach(function(abstract) {
|
|
1335
|
-
node.parentNode.insertBefore(convertSVG(abstract), node);
|
|
1336
|
-
});
|
|
1337
|
-
if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
|
|
1338
|
-
var comment = DOCUMENT.createComment(nodeAsComment(node));
|
|
1339
|
-
node.parentNode.replaceChild(comment, node);
|
|
1340
|
-
} else {
|
|
1341
|
-
node.remove();
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
},
|
|
1345
|
-
nest: function nest(mutation) {
|
|
1346
|
-
var node = mutation[0];
|
|
1347
|
-
var abstract = mutation[1];
|
|
1348
|
-
if (~classArray(node).indexOf(config.replacementClass)) {
|
|
1349
|
-
return mutators.replace(mutation);
|
|
1350
|
-
}
|
|
1351
|
-
var forSvg = new RegExp("".concat(config.familyPrefix, "-.*"));
|
|
1352
|
-
delete abstract[0].attributes.id;
|
|
1353
|
-
if (abstract[0].attributes.class) {
|
|
1354
|
-
var splitClasses = abstract[0].attributes.class.split(" ").reduce(function(acc, cls) {
|
|
1355
|
-
if (cls === config.replacementClass || cls.match(forSvg)) {
|
|
1356
|
-
acc.toSvg.push(cls);
|
|
1357
|
-
} else {
|
|
1358
|
-
acc.toNode.push(cls);
|
|
1359
|
-
}
|
|
1360
|
-
return acc;
|
|
1361
|
-
}, {
|
|
1362
|
-
toNode: [],
|
|
1363
|
-
toSvg: []
|
|
1364
|
-
});
|
|
1365
|
-
abstract[0].attributes.class = splitClasses.toSvg.join(" ");
|
|
1366
|
-
if (splitClasses.toNode.length === 0) {
|
|
1367
|
-
node.removeAttribute("class");
|
|
1368
|
-
} else {
|
|
1369
|
-
node.setAttribute("class", splitClasses.toNode.join(" "));
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
var newInnerHTML = abstract.map(function(a) {
|
|
1373
|
-
return toHtml(a);
|
|
1374
|
-
}).join("\n");
|
|
1375
|
-
node.setAttribute(DATA_FA_I2SVG, "");
|
|
1376
|
-
node.innerHTML = newInnerHTML;
|
|
1377
|
-
}
|
|
1378
|
-
};
|
|
1379
|
-
function performOperationSync(op) {
|
|
1380
|
-
op();
|
|
1381
|
-
}
|
|
1382
|
-
function perform(mutations, callback) {
|
|
1383
|
-
var callbackFunction = typeof callback === "function" ? callback : noop$2;
|
|
1384
|
-
if (mutations.length === 0) {
|
|
1385
|
-
callbackFunction();
|
|
1386
|
-
} else {
|
|
1387
|
-
var frame = performOperationSync;
|
|
1388
|
-
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
|
|
1389
|
-
frame = WINDOW.requestAnimationFrame || performOperationSync;
|
|
1390
|
-
}
|
|
1391
|
-
frame(function() {
|
|
1392
|
-
var mutator = getMutator();
|
|
1393
|
-
var mark = perf.begin("mutate");
|
|
1394
|
-
mutations.map(mutator);
|
|
1395
|
-
mark();
|
|
1396
|
-
callbackFunction();
|
|
1397
|
-
});
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
var disabled = false;
|
|
1401
|
-
function disableObservation() {
|
|
1402
|
-
disabled = true;
|
|
1403
|
-
}
|
|
1404
|
-
function enableObservation() {
|
|
1405
|
-
disabled = false;
|
|
1406
|
-
}
|
|
1407
|
-
var mo = null;
|
|
1408
|
-
function observe(options) {
|
|
1409
|
-
if (!MUTATION_OBSERVER) {
|
|
1410
|
-
return;
|
|
1411
|
-
}
|
|
1412
|
-
if (!config.observeMutations) {
|
|
1413
|
-
return;
|
|
1414
|
-
}
|
|
1415
|
-
var _options$treeCallback = options.treeCallback, treeCallback = _options$treeCallback === void 0 ? noop$2 : _options$treeCallback, _options$nodeCallback = options.nodeCallback, nodeCallback = _options$nodeCallback === void 0 ? noop$2 : _options$nodeCallback, _options$pseudoElemen = options.pseudoElementsCallback, pseudoElementsCallback = _options$pseudoElemen === void 0 ? noop$2 : _options$pseudoElemen, _options$observeMutat = options.observeMutationsRoot, observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
|
|
1416
|
-
mo = new MUTATION_OBSERVER(function(objects) {
|
|
1417
|
-
if (disabled)
|
|
1418
|
-
return;
|
|
1419
|
-
var defaultPrefix = getDefaultUsablePrefix();
|
|
1420
|
-
toArray(objects).forEach(function(mutationRecord) {
|
|
1421
|
-
if (mutationRecord.type === "childList" && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
|
1422
|
-
if (config.searchPseudoElements) {
|
|
1423
|
-
pseudoElementsCallback(mutationRecord.target);
|
|
1424
|
-
}
|
|
1425
|
-
treeCallback(mutationRecord.target);
|
|
1426
|
-
}
|
|
1427
|
-
if (mutationRecord.type === "attributes" && mutationRecord.target.parentNode && config.searchPseudoElements) {
|
|
1428
|
-
pseudoElementsCallback(mutationRecord.target.parentNode);
|
|
1429
|
-
}
|
|
1430
|
-
if (mutationRecord.type === "attributes" && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
|
|
1431
|
-
if (mutationRecord.attributeName === "class" && hasPrefixAndIcon(mutationRecord.target)) {
|
|
1432
|
-
var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)), prefix = _getCanonicalIcon.prefix, iconName = _getCanonicalIcon.iconName;
|
|
1433
|
-
mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
|
|
1434
|
-
if (iconName)
|
|
1435
|
-
mutationRecord.target.setAttribute(DATA_ICON, iconName);
|
|
1436
|
-
} else if (hasBeenReplaced(mutationRecord.target)) {
|
|
1437
|
-
nodeCallback(mutationRecord.target);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
});
|
|
1441
|
-
});
|
|
1442
|
-
if (!IS_DOM)
|
|
1443
|
-
return;
|
|
1444
|
-
mo.observe(observeMutationsRoot, {
|
|
1445
|
-
childList: true,
|
|
1446
|
-
attributes: true,
|
|
1447
|
-
characterData: true,
|
|
1448
|
-
subtree: true
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
function disconnect() {
|
|
1452
|
-
if (!mo)
|
|
1453
|
-
return;
|
|
1454
|
-
mo.disconnect();
|
|
1455
|
-
}
|
|
1456
|
-
function styleParser(node) {
|
|
1457
|
-
var style = node.getAttribute("style");
|
|
1458
|
-
var val = [];
|
|
1459
|
-
if (style) {
|
|
1460
|
-
val = style.split(";").reduce(function(acc, style2) {
|
|
1461
|
-
var styles2 = style2.split(":");
|
|
1462
|
-
var prop = styles2[0];
|
|
1463
|
-
var value = styles2.slice(1);
|
|
1464
|
-
if (prop && value.length > 0) {
|
|
1465
|
-
acc[prop] = value.join(":").trim();
|
|
1466
|
-
}
|
|
1467
|
-
return acc;
|
|
1468
|
-
}, {});
|
|
1469
|
-
}
|
|
1470
|
-
return val;
|
|
1471
|
-
}
|
|
1472
|
-
function classParser(node) {
|
|
1473
|
-
var existingPrefix = node.getAttribute("data-prefix");
|
|
1474
|
-
var existingIconName = node.getAttribute("data-icon");
|
|
1475
|
-
var innerText = node.innerText !== void 0 ? node.innerText.trim() : "";
|
|
1476
|
-
var val = getCanonicalIcon(classArray(node));
|
|
1477
|
-
if (!val.prefix) {
|
|
1478
|
-
val.prefix = getDefaultUsablePrefix();
|
|
1479
|
-
}
|
|
1480
|
-
if (existingPrefix && existingIconName) {
|
|
1481
|
-
val.prefix = existingPrefix;
|
|
1482
|
-
val.iconName = existingIconName;
|
|
1483
|
-
}
|
|
1484
|
-
if (val.iconName && val.prefix) {
|
|
1485
|
-
return val;
|
|
1486
|
-
}
|
|
1487
|
-
if (val.prefix && innerText.length > 0) {
|
|
1488
|
-
val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
|
|
1489
|
-
}
|
|
1490
|
-
return val;
|
|
1491
|
-
}
|
|
1492
|
-
function attributesParser(node) {
|
|
1493
|
-
var extraAttributes = toArray(node.attributes).reduce(function(acc, attr) {
|
|
1494
|
-
if (acc.name !== "class" && acc.name !== "style") {
|
|
1495
|
-
acc[attr.name] = attr.value;
|
|
1496
|
-
}
|
|
1497
|
-
return acc;
|
|
1498
|
-
}, {});
|
|
1499
|
-
var title = node.getAttribute("title");
|
|
1500
|
-
var titleId = node.getAttribute("data-fa-title-id");
|
|
1501
|
-
if (config.autoA11y) {
|
|
1502
|
-
if (title) {
|
|
1503
|
-
extraAttributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
1504
|
-
} else {
|
|
1505
|
-
extraAttributes["aria-hidden"] = "true";
|
|
1506
|
-
extraAttributes["focusable"] = "false";
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
return extraAttributes;
|
|
1510
|
-
}
|
|
1511
|
-
function blankMeta() {
|
|
1512
|
-
return {
|
|
1513
|
-
iconName: null,
|
|
1514
|
-
title: null,
|
|
1515
|
-
titleId: null,
|
|
1516
|
-
prefix: null,
|
|
1517
|
-
transform: meaninglessTransform,
|
|
1518
|
-
symbol: false,
|
|
1519
|
-
mask: {
|
|
1520
|
-
iconName: null,
|
|
1521
|
-
prefix: null,
|
|
1522
|
-
rest: []
|
|
1523
|
-
},
|
|
1524
|
-
maskId: null,
|
|
1525
|
-
extra: {
|
|
1526
|
-
classes: [],
|
|
1527
|
-
styles: {},
|
|
1528
|
-
attributes: {}
|
|
1529
|
-
}
|
|
1530
|
-
};
|
|
1531
|
-
}
|
|
1532
|
-
function parseMeta(node) {
|
|
1533
|
-
var parser = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
1534
|
-
styleParser: true
|
|
1535
|
-
};
|
|
1536
|
-
var _classParser = classParser(node), iconName = _classParser.iconName, prefix = _classParser.prefix, extraClasses = _classParser.rest;
|
|
1537
|
-
var extraAttributes = attributesParser(node);
|
|
1538
|
-
var pluginMeta = chainHooks("parseNodeAttributes", {}, node);
|
|
1539
|
-
var extraStyles = parser.styleParser ? styleParser(node) : [];
|
|
1540
|
-
return _objectSpread2({
|
|
1541
|
-
iconName,
|
|
1542
|
-
title: node.getAttribute("title"),
|
|
1543
|
-
titleId: node.getAttribute("data-fa-title-id"),
|
|
1544
|
-
prefix,
|
|
1545
|
-
transform: meaninglessTransform,
|
|
1546
|
-
mask: {
|
|
1547
|
-
iconName: null,
|
|
1548
|
-
prefix: null,
|
|
1549
|
-
rest: []
|
|
1550
|
-
},
|
|
1551
|
-
maskId: null,
|
|
1552
|
-
symbol: false,
|
|
1553
|
-
extra: {
|
|
1554
|
-
classes: extraClasses,
|
|
1555
|
-
styles: extraStyles,
|
|
1556
|
-
attributes: extraAttributes
|
|
1557
|
-
}
|
|
1558
|
-
}, pluginMeta);
|
|
1559
|
-
}
|
|
1560
|
-
var styles$2 = namespace.styles;
|
|
1561
|
-
function generateMutation(node) {
|
|
1562
|
-
var nodeMeta = config.autoReplaceSvg === "nest" ? parseMeta(node, {
|
|
1563
|
-
styleParser: false
|
|
1564
|
-
}) : parseMeta(node);
|
|
1565
|
-
if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
|
|
1566
|
-
return callProvided("generateLayersText", node, nodeMeta);
|
|
1567
|
-
} else {
|
|
1568
|
-
return callProvided("generateSvgReplacementMutation", node, nodeMeta);
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
function onTree(root2) {
|
|
1572
|
-
var callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1573
|
-
if (!IS_DOM)
|
|
1574
|
-
return Promise.resolve();
|
|
1575
|
-
var htmlClassList = DOCUMENT.documentElement.classList;
|
|
1576
|
-
var hclAdd = function hclAdd2(suffix) {
|
|
1577
|
-
return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
1578
|
-
};
|
|
1579
|
-
var hclRemove = function hclRemove2(suffix) {
|
|
1580
|
-
return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
1581
|
-
};
|
|
1582
|
-
var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$2);
|
|
1583
|
-
var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function(p2) {
|
|
1584
|
-
return ".".concat(p2, ":not([").concat(DATA_FA_I2SVG, "])");
|
|
1585
|
-
})).join(", ");
|
|
1586
|
-
if (prefixesDomQuery.length === 0) {
|
|
1587
|
-
return Promise.resolve();
|
|
1588
|
-
}
|
|
1589
|
-
var candidates = [];
|
|
1590
|
-
try {
|
|
1591
|
-
candidates = toArray(root2.querySelectorAll(prefixesDomQuery));
|
|
1592
|
-
} catch (e) {
|
|
1593
|
-
}
|
|
1594
|
-
if (candidates.length > 0) {
|
|
1595
|
-
hclAdd("pending");
|
|
1596
|
-
hclRemove("complete");
|
|
1597
|
-
} else {
|
|
1598
|
-
return Promise.resolve();
|
|
1599
|
-
}
|
|
1600
|
-
var mark = perf.begin("onTree");
|
|
1601
|
-
var mutations = candidates.reduce(function(acc, node) {
|
|
1602
|
-
try {
|
|
1603
|
-
var mutation = generateMutation(node);
|
|
1604
|
-
if (mutation) {
|
|
1605
|
-
acc.push(mutation);
|
|
1606
|
-
}
|
|
1607
|
-
} catch (e) {
|
|
1608
|
-
if (!PRODUCTION$1) {
|
|
1609
|
-
if (e.name === "MissingIcon") {
|
|
1610
|
-
console.error(e);
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
return acc;
|
|
1615
|
-
}, []);
|
|
1616
|
-
return new Promise(function(resolve, reject) {
|
|
1617
|
-
Promise.all(mutations).then(function(resolvedMutations) {
|
|
1618
|
-
perform(resolvedMutations, function() {
|
|
1619
|
-
hclAdd("active");
|
|
1620
|
-
hclAdd("complete");
|
|
1621
|
-
hclRemove("pending");
|
|
1622
|
-
if (typeof callback === "function")
|
|
1623
|
-
callback();
|
|
1624
|
-
mark();
|
|
1625
|
-
resolve();
|
|
1626
|
-
});
|
|
1627
|
-
}).catch(function(e) {
|
|
1628
|
-
mark();
|
|
1629
|
-
reject(e);
|
|
1630
|
-
});
|
|
1631
|
-
});
|
|
1632
|
-
}
|
|
1633
|
-
function onNode(node) {
|
|
1634
|
-
var callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1635
|
-
generateMutation(node).then(function(mutation) {
|
|
1636
|
-
if (mutation) {
|
|
1637
|
-
perform([mutation], callback);
|
|
1638
|
-
}
|
|
1639
|
-
});
|
|
1640
|
-
}
|
|
1641
|
-
function resolveIcons(next) {
|
|
1642
|
-
return function(maybeIconDefinition) {
|
|
1643
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1644
|
-
var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
1645
|
-
var mask = params.mask;
|
|
1646
|
-
if (mask) {
|
|
1647
|
-
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
1648
|
-
}
|
|
1649
|
-
return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
1650
|
-
mask
|
|
1651
|
-
}));
|
|
1652
|
-
};
|
|
1653
|
-
}
|
|
1654
|
-
var render = function render2(iconDefinition) {
|
|
1655
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1656
|
-
var _params$transform = params.transform, transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$symbol = params.symbol, symbol = _params$symbol === void 0 ? false : _params$symbol, _params$mask = params.mask, mask = _params$mask === void 0 ? null : _params$mask, _params$maskId = params.maskId, maskId = _params$maskId === void 0 ? null : _params$maskId, _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$titleId = params.titleId, titleId = _params$titleId === void 0 ? null : _params$titleId, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
1657
|
-
if (!iconDefinition)
|
|
1658
|
-
return;
|
|
1659
|
-
var prefix = iconDefinition.prefix, iconName = iconDefinition.iconName, icon3 = iconDefinition.icon;
|
|
1660
|
-
return domVariants(_objectSpread2({
|
|
1661
|
-
type: "icon"
|
|
1662
|
-
}, iconDefinition), function() {
|
|
1663
|
-
callHooks("beforeDOMElementCreation", {
|
|
1664
|
-
iconDefinition,
|
|
1665
|
-
params
|
|
1666
|
-
});
|
|
1667
|
-
if (config.autoA11y) {
|
|
1668
|
-
if (title) {
|
|
1669
|
-
attributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
1670
|
-
} else {
|
|
1671
|
-
attributes["aria-hidden"] = "true";
|
|
1672
|
-
attributes["focusable"] = "false";
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
return makeInlineSvgAbstract({
|
|
1676
|
-
icons: {
|
|
1677
|
-
main: asFoundIcon(icon3),
|
|
1678
|
-
mask: mask ? asFoundIcon(mask.icon) : {
|
|
1679
|
-
found: false,
|
|
1680
|
-
width: null,
|
|
1681
|
-
height: null,
|
|
1682
|
-
icon: {}
|
|
1683
|
-
}
|
|
1684
|
-
},
|
|
1685
|
-
prefix,
|
|
1686
|
-
iconName,
|
|
1687
|
-
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
1688
|
-
symbol,
|
|
1689
|
-
title,
|
|
1690
|
-
maskId,
|
|
1691
|
-
titleId,
|
|
1692
|
-
extra: {
|
|
1693
|
-
attributes,
|
|
1694
|
-
styles: styles2,
|
|
1695
|
-
classes
|
|
1696
|
-
}
|
|
1697
|
-
});
|
|
1698
|
-
});
|
|
1699
|
-
};
|
|
1700
|
-
var ReplaceElements = {
|
|
1701
|
-
mixout: function mixout2() {
|
|
1702
|
-
return {
|
|
1703
|
-
icon: resolveIcons(render)
|
|
1704
|
-
};
|
|
1705
|
-
},
|
|
1706
|
-
hooks: function hooks2() {
|
|
1707
|
-
return {
|
|
1708
|
-
mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
|
|
1709
|
-
accumulator.treeCallback = onTree;
|
|
1710
|
-
accumulator.nodeCallback = onNode;
|
|
1711
|
-
return accumulator;
|
|
1712
|
-
}
|
|
1713
|
-
};
|
|
1714
|
-
},
|
|
1715
|
-
provides: function provides(providers$$1) {
|
|
1716
|
-
providers$$1.i2svg = function(params) {
|
|
1717
|
-
var _params$node = params.node, node = _params$node === void 0 ? DOCUMENT : _params$node, _params$callback = params.callback, callback = _params$callback === void 0 ? function() {
|
|
1718
|
-
} : _params$callback;
|
|
1719
|
-
return onTree(node, callback);
|
|
1720
|
-
};
|
|
1721
|
-
providers$$1.generateSvgReplacementMutation = function(node, nodeMeta) {
|
|
1722
|
-
var iconName = nodeMeta.iconName, title = nodeMeta.title, titleId = nodeMeta.titleId, prefix = nodeMeta.prefix, transform = nodeMeta.transform, symbol = nodeMeta.symbol, mask = nodeMeta.mask, maskId = nodeMeta.maskId, extra = nodeMeta.extra;
|
|
1723
|
-
return new Promise(function(resolve, reject) {
|
|
1724
|
-
Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
|
|
1725
|
-
found: false,
|
|
1726
|
-
width: 512,
|
|
1727
|
-
height: 512,
|
|
1728
|
-
icon: {}
|
|
1729
|
-
})]).then(function(_ref2) {
|
|
1730
|
-
var _ref22 = _slicedToArray(_ref2, 2), main = _ref22[0], mask2 = _ref22[1];
|
|
1731
|
-
resolve([node, makeInlineSvgAbstract({
|
|
1732
|
-
icons: {
|
|
1733
|
-
main,
|
|
1734
|
-
mask: mask2
|
|
1735
|
-
},
|
|
1736
|
-
prefix,
|
|
1737
|
-
iconName,
|
|
1738
|
-
transform,
|
|
1739
|
-
symbol,
|
|
1740
|
-
maskId,
|
|
1741
|
-
title,
|
|
1742
|
-
titleId,
|
|
1743
|
-
extra,
|
|
1744
|
-
watchable: true
|
|
1745
|
-
})]);
|
|
1746
|
-
}).catch(reject);
|
|
1747
|
-
});
|
|
1748
|
-
};
|
|
1749
|
-
providers$$1.generateAbstractIcon = function(_ref3) {
|
|
1750
|
-
var children = _ref3.children, attributes = _ref3.attributes, main = _ref3.main, transform = _ref3.transform, styles2 = _ref3.styles;
|
|
1751
|
-
var styleString = joinStyles(styles2);
|
|
1752
|
-
if (styleString.length > 0) {
|
|
1753
|
-
attributes["style"] = styleString;
|
|
1754
|
-
}
|
|
1755
|
-
var nextChild;
|
|
1756
|
-
if (transformIsMeaningful(transform)) {
|
|
1757
|
-
nextChild = callProvided("generateAbstractTransformGrouping", {
|
|
1758
|
-
main,
|
|
1759
|
-
transform,
|
|
1760
|
-
containerWidth: main.width,
|
|
1761
|
-
iconWidth: main.width
|
|
1762
|
-
});
|
|
1763
|
-
}
|
|
1764
|
-
children.push(nextChild || main.icon);
|
|
1765
|
-
return {
|
|
1766
|
-
children,
|
|
1767
|
-
attributes
|
|
1768
|
-
};
|
|
1769
|
-
};
|
|
1770
|
-
}
|
|
1771
|
-
};
|
|
1772
|
-
var Layers = {
|
|
1773
|
-
mixout: function mixout3() {
|
|
1774
|
-
return {
|
|
1775
|
-
layer: function layer(assembler) {
|
|
1776
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1777
|
-
var _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes;
|
|
1778
|
-
return domVariants({
|
|
1779
|
-
type: "layer"
|
|
1780
|
-
}, function() {
|
|
1781
|
-
callHooks("beforeDOMElementCreation", {
|
|
1782
|
-
assembler,
|
|
1783
|
-
params
|
|
1784
|
-
});
|
|
1785
|
-
var children = [];
|
|
1786
|
-
assembler(function(args) {
|
|
1787
|
-
Array.isArray(args) ? args.map(function(a) {
|
|
1788
|
-
children = children.concat(a.abstract);
|
|
1789
|
-
}) : children = children.concat(args.abstract);
|
|
1790
|
-
});
|
|
1791
|
-
return [{
|
|
1792
|
-
tag: "span",
|
|
1793
|
-
attributes: {
|
|
1794
|
-
class: ["".concat(config.familyPrefix, "-layers")].concat(_toConsumableArray(classes)).join(" ")
|
|
1795
|
-
},
|
|
1796
|
-
children
|
|
1797
|
-
}];
|
|
1798
|
-
});
|
|
1799
|
-
}
|
|
1800
|
-
};
|
|
1801
|
-
}
|
|
1802
|
-
};
|
|
1803
|
-
var LayersCounter = {
|
|
1804
|
-
mixout: function mixout4() {
|
|
1805
|
-
return {
|
|
1806
|
-
counter: function counter(content) {
|
|
1807
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1808
|
-
var _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
1809
|
-
return domVariants({
|
|
1810
|
-
type: "counter",
|
|
1811
|
-
content
|
|
1812
|
-
}, function() {
|
|
1813
|
-
callHooks("beforeDOMElementCreation", {
|
|
1814
|
-
content,
|
|
1815
|
-
params
|
|
1816
|
-
});
|
|
1817
|
-
return makeLayersCounterAbstract({
|
|
1818
|
-
content: content.toString(),
|
|
1819
|
-
title,
|
|
1820
|
-
extra: {
|
|
1821
|
-
attributes,
|
|
1822
|
-
styles: styles2,
|
|
1823
|
-
classes: ["".concat(config.familyPrefix, "-layers-counter")].concat(_toConsumableArray(classes))
|
|
1824
|
-
}
|
|
1825
|
-
});
|
|
1826
|
-
});
|
|
1827
|
-
}
|
|
1828
|
-
};
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
var LayersText = {
|
|
1832
|
-
mixout: function mixout5() {
|
|
1833
|
-
return {
|
|
1834
|
-
text: function text2(content) {
|
|
1835
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1836
|
-
var _params$transform = params.transform, transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
1837
|
-
return domVariants({
|
|
1838
|
-
type: "text",
|
|
1839
|
-
content
|
|
1840
|
-
}, function() {
|
|
1841
|
-
callHooks("beforeDOMElementCreation", {
|
|
1842
|
-
content,
|
|
1843
|
-
params
|
|
1844
|
-
});
|
|
1845
|
-
return makeLayersTextAbstract({
|
|
1846
|
-
content,
|
|
1847
|
-
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
1848
|
-
title,
|
|
1849
|
-
extra: {
|
|
1850
|
-
attributes,
|
|
1851
|
-
styles: styles2,
|
|
1852
|
-
classes: ["".concat(config.familyPrefix, "-layers-text")].concat(_toConsumableArray(classes))
|
|
1853
|
-
}
|
|
1854
|
-
});
|
|
1855
|
-
});
|
|
1856
|
-
}
|
|
1857
|
-
};
|
|
1858
|
-
},
|
|
1859
|
-
provides: function provides2(providers$$1) {
|
|
1860
|
-
providers$$1.generateLayersText = function(node, nodeMeta) {
|
|
1861
|
-
var title = nodeMeta.title, transform = nodeMeta.transform, extra = nodeMeta.extra;
|
|
1862
|
-
var width = null;
|
|
1863
|
-
var height = null;
|
|
1864
|
-
if (IS_IE) {
|
|
1865
|
-
var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
|
|
1866
|
-
var boundingClientRect = node.getBoundingClientRect();
|
|
1867
|
-
width = boundingClientRect.width / computedFontSize;
|
|
1868
|
-
height = boundingClientRect.height / computedFontSize;
|
|
1869
|
-
}
|
|
1870
|
-
if (config.autoA11y && !title) {
|
|
1871
|
-
extra.attributes["aria-hidden"] = "true";
|
|
1872
|
-
}
|
|
1873
|
-
return Promise.resolve([node, makeLayersTextAbstract({
|
|
1874
|
-
content: node.innerHTML,
|
|
1875
|
-
width,
|
|
1876
|
-
height,
|
|
1877
|
-
transform,
|
|
1878
|
-
title,
|
|
1879
|
-
extra,
|
|
1880
|
-
watchable: true
|
|
1881
|
-
})]);
|
|
1882
|
-
};
|
|
1883
|
-
}
|
|
1884
|
-
};
|
|
1885
|
-
var CLEAN_CONTENT_PATTERN = new RegExp('"', "ug");
|
|
1886
|
-
var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
|
|
1887
|
-
function hexValueFromContent(content) {
|
|
1888
|
-
var cleaned = content.replace(CLEAN_CONTENT_PATTERN, "");
|
|
1889
|
-
var codePoint = codePointAt(cleaned, 0);
|
|
1890
|
-
var isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
|
|
1891
|
-
var isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
|
|
1892
|
-
return {
|
|
1893
|
-
value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
|
|
1894
|
-
isSecondary: isPrependTen || isDoubled
|
|
1895
|
-
};
|
|
1896
|
-
}
|
|
1897
|
-
function replaceForPosition(node, position) {
|
|
1898
|
-
var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(":", "-"));
|
|
1899
|
-
return new Promise(function(resolve, reject) {
|
|
1900
|
-
if (node.getAttribute(pendingAttribute) !== null) {
|
|
1901
|
-
return resolve();
|
|
1902
|
-
}
|
|
1903
|
-
var children = toArray(node.children);
|
|
1904
|
-
var alreadyProcessedPseudoElement = children.filter(function(c) {
|
|
1905
|
-
return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;
|
|
1906
|
-
})[0];
|
|
1907
|
-
var styles2 = WINDOW.getComputedStyle(node, position);
|
|
1908
|
-
var fontFamily = styles2.getPropertyValue("font-family").match(FONT_FAMILY_PATTERN);
|
|
1909
|
-
var fontWeight = styles2.getPropertyValue("font-weight");
|
|
1910
|
-
var content = styles2.getPropertyValue("content");
|
|
1911
|
-
if (alreadyProcessedPseudoElement && !fontFamily) {
|
|
1912
|
-
node.removeChild(alreadyProcessedPseudoElement);
|
|
1913
|
-
return resolve();
|
|
1914
|
-
} else if (fontFamily && content !== "none" && content !== "") {
|
|
1915
|
-
var _content = styles2.getPropertyValue("content");
|
|
1916
|
-
var prefix = ~["Solid", "Regular", "Light", "Thin", "Duotone", "Brands", "Kit"].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];
|
|
1917
|
-
var _hexValueFromContent = hexValueFromContent(_content), hexValue = _hexValueFromContent.value, isSecondary = _hexValueFromContent.isSecondary;
|
|
1918
|
-
var isV4 = fontFamily[0].startsWith("FontAwesome");
|
|
1919
|
-
var iconName = byUnicode(prefix, hexValue);
|
|
1920
|
-
var iconIdentifier = iconName;
|
|
1921
|
-
if (isV4) {
|
|
1922
|
-
var iconName4 = byOldUnicode(hexValue);
|
|
1923
|
-
if (iconName4.iconName && iconName4.prefix) {
|
|
1924
|
-
iconName = iconName4.iconName;
|
|
1925
|
-
prefix = iconName4.prefix;
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
|
|
1929
|
-
node.setAttribute(pendingAttribute, iconIdentifier);
|
|
1930
|
-
if (alreadyProcessedPseudoElement) {
|
|
1931
|
-
node.removeChild(alreadyProcessedPseudoElement);
|
|
1932
|
-
}
|
|
1933
|
-
var meta = blankMeta();
|
|
1934
|
-
var extra = meta.extra;
|
|
1935
|
-
extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
|
|
1936
|
-
findIcon(iconName, prefix).then(function(main) {
|
|
1937
|
-
var abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
|
|
1938
|
-
icons: {
|
|
1939
|
-
main,
|
|
1940
|
-
mask: emptyCanonicalIcon()
|
|
1941
|
-
},
|
|
1942
|
-
prefix,
|
|
1943
|
-
iconName: iconIdentifier,
|
|
1944
|
-
extra,
|
|
1945
|
-
watchable: true
|
|
1946
|
-
}));
|
|
1947
|
-
var element = DOCUMENT.createElement("svg");
|
|
1948
|
-
if (position === "::before") {
|
|
1949
|
-
node.insertBefore(element, node.firstChild);
|
|
1950
|
-
} else {
|
|
1951
|
-
node.appendChild(element);
|
|
1952
|
-
}
|
|
1953
|
-
element.outerHTML = abstract.map(function(a) {
|
|
1954
|
-
return toHtml(a);
|
|
1955
|
-
}).join("\n");
|
|
1956
|
-
node.removeAttribute(pendingAttribute);
|
|
1957
|
-
resolve();
|
|
1958
|
-
}).catch(reject);
|
|
1959
|
-
} else {
|
|
1960
|
-
resolve();
|
|
1961
|
-
}
|
|
1962
|
-
} else {
|
|
1963
|
-
resolve();
|
|
1964
|
-
}
|
|
1965
|
-
});
|
|
1966
|
-
}
|
|
1967
|
-
function replace2(node) {
|
|
1968
|
-
return Promise.all([replaceForPosition(node, "::before"), replaceForPosition(node, "::after")]);
|
|
1969
|
-
}
|
|
1970
|
-
function processable(node) {
|
|
1971
|
-
return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== "svg");
|
|
1972
|
-
}
|
|
1973
|
-
function searchPseudoElements(root2) {
|
|
1974
|
-
if (!IS_DOM)
|
|
1975
|
-
return;
|
|
1976
|
-
return new Promise(function(resolve, reject) {
|
|
1977
|
-
var operations = toArray(root2.querySelectorAll("*")).filter(processable).map(replace2);
|
|
1978
|
-
var end3 = perf.begin("searchPseudoElements");
|
|
1979
|
-
disableObservation();
|
|
1980
|
-
Promise.all(operations).then(function() {
|
|
1981
|
-
end3();
|
|
1982
|
-
enableObservation();
|
|
1983
|
-
resolve();
|
|
1984
|
-
}).catch(function() {
|
|
1985
|
-
end3();
|
|
1986
|
-
enableObservation();
|
|
1987
|
-
reject();
|
|
1988
|
-
});
|
|
1989
|
-
});
|
|
1990
|
-
}
|
|
1991
|
-
var PseudoElements = {
|
|
1992
|
-
hooks: function hooks3() {
|
|
1993
|
-
return {
|
|
1994
|
-
mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
|
|
1995
|
-
accumulator.pseudoElementsCallback = searchPseudoElements;
|
|
1996
|
-
return accumulator;
|
|
1997
|
-
}
|
|
1998
|
-
};
|
|
1999
|
-
},
|
|
2000
|
-
provides: function provides3(providers$$1) {
|
|
2001
|
-
providers$$1.pseudoElements2svg = function(params) {
|
|
2002
|
-
var _params$node = params.node, node = _params$node === void 0 ? DOCUMENT : _params$node;
|
|
2003
|
-
if (config.searchPseudoElements) {
|
|
2004
|
-
searchPseudoElements(node);
|
|
2005
|
-
}
|
|
2006
|
-
};
|
|
2007
|
-
}
|
|
2008
|
-
};
|
|
2009
|
-
var _unwatched = false;
|
|
2010
|
-
var MutationObserver$1 = {
|
|
2011
|
-
mixout: function mixout6() {
|
|
2012
|
-
return {
|
|
2013
|
-
dom: {
|
|
2014
|
-
unwatch: function unwatch() {
|
|
2015
|
-
disableObservation();
|
|
2016
|
-
_unwatched = true;
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
};
|
|
2020
|
-
},
|
|
2021
|
-
hooks: function hooks4() {
|
|
2022
|
-
return {
|
|
2023
|
-
bootstrap: function bootstrap() {
|
|
2024
|
-
observe(chainHooks("mutationObserverCallbacks", {}));
|
|
2025
|
-
},
|
|
2026
|
-
noAuto: function noAuto3() {
|
|
2027
|
-
disconnect();
|
|
2028
|
-
},
|
|
2029
|
-
watch: function watch3(params) {
|
|
2030
|
-
var observeMutationsRoot = params.observeMutationsRoot;
|
|
2031
|
-
if (_unwatched) {
|
|
2032
|
-
enableObservation();
|
|
2033
|
-
} else {
|
|
2034
|
-
observe(chainHooks("mutationObserverCallbacks", {
|
|
2035
|
-
observeMutationsRoot
|
|
2036
|
-
}));
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
};
|
|
2040
|
-
}
|
|
2041
|
-
};
|
|
2042
|
-
var parseTransformString = function parseTransformString2(transformString) {
|
|
2043
|
-
var transform = {
|
|
2044
|
-
size: 16,
|
|
2045
|
-
x: 0,
|
|
2046
|
-
y: 0,
|
|
2047
|
-
flipX: false,
|
|
2048
|
-
flipY: false,
|
|
2049
|
-
rotate: 0
|
|
2050
|
-
};
|
|
2051
|
-
return transformString.toLowerCase().split(" ").reduce(function(acc, n) {
|
|
2052
|
-
var parts = n.toLowerCase().split("-");
|
|
2053
|
-
var first = parts[0];
|
|
2054
|
-
var rest = parts.slice(1).join("-");
|
|
2055
|
-
if (first && rest === "h") {
|
|
2056
|
-
acc.flipX = true;
|
|
2057
|
-
return acc;
|
|
2058
|
-
}
|
|
2059
|
-
if (first && rest === "v") {
|
|
2060
|
-
acc.flipY = true;
|
|
2061
|
-
return acc;
|
|
2062
|
-
}
|
|
2063
|
-
rest = parseFloat(rest);
|
|
2064
|
-
if (isNaN(rest)) {
|
|
2065
|
-
return acc;
|
|
2066
|
-
}
|
|
2067
|
-
switch (first) {
|
|
2068
|
-
case "grow":
|
|
2069
|
-
acc.size = acc.size + rest;
|
|
2070
|
-
break;
|
|
2071
|
-
case "shrink":
|
|
2072
|
-
acc.size = acc.size - rest;
|
|
2073
|
-
break;
|
|
2074
|
-
case "left":
|
|
2075
|
-
acc.x = acc.x - rest;
|
|
2076
|
-
break;
|
|
2077
|
-
case "right":
|
|
2078
|
-
acc.x = acc.x + rest;
|
|
2079
|
-
break;
|
|
2080
|
-
case "up":
|
|
2081
|
-
acc.y = acc.y - rest;
|
|
2082
|
-
break;
|
|
2083
|
-
case "down":
|
|
2084
|
-
acc.y = acc.y + rest;
|
|
2085
|
-
break;
|
|
2086
|
-
case "rotate":
|
|
2087
|
-
acc.rotate = acc.rotate + rest;
|
|
2088
|
-
break;
|
|
2089
|
-
}
|
|
2090
|
-
return acc;
|
|
2091
|
-
}, transform);
|
|
2092
|
-
};
|
|
2093
|
-
var PowerTransforms = {
|
|
2094
|
-
mixout: function mixout7() {
|
|
2095
|
-
return {
|
|
2096
|
-
parse: {
|
|
2097
|
-
transform: function transform(transformString) {
|
|
2098
|
-
return parseTransformString(transformString);
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
};
|
|
2102
|
-
},
|
|
2103
|
-
hooks: function hooks5() {
|
|
2104
|
-
return {
|
|
2105
|
-
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
2106
|
-
var transformString = node.getAttribute("data-fa-transform");
|
|
2107
|
-
if (transformString) {
|
|
2108
|
-
accumulator.transform = parseTransformString(transformString);
|
|
2109
|
-
}
|
|
2110
|
-
return accumulator;
|
|
2111
|
-
}
|
|
2112
|
-
};
|
|
2113
|
-
},
|
|
2114
|
-
provides: function provides4(providers2) {
|
|
2115
|
-
providers2.generateAbstractTransformGrouping = function(_ref2) {
|
|
2116
|
-
var main = _ref2.main, transform = _ref2.transform, containerWidth = _ref2.containerWidth, iconWidth = _ref2.iconWidth;
|
|
2117
|
-
var outer = {
|
|
2118
|
-
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
2119
|
-
};
|
|
2120
|
-
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
2121
|
-
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
2122
|
-
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
2123
|
-
var inner = {
|
|
2124
|
-
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
2125
|
-
};
|
|
2126
|
-
var path = {
|
|
2127
|
-
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
2128
|
-
};
|
|
2129
|
-
var operations = {
|
|
2130
|
-
outer,
|
|
2131
|
-
inner,
|
|
2132
|
-
path
|
|
2133
|
-
};
|
|
2134
|
-
return {
|
|
2135
|
-
tag: "g",
|
|
2136
|
-
attributes: _objectSpread2({}, operations.outer),
|
|
2137
|
-
children: [{
|
|
2138
|
-
tag: "g",
|
|
2139
|
-
attributes: _objectSpread2({}, operations.inner),
|
|
2140
|
-
children: [{
|
|
2141
|
-
tag: main.icon.tag,
|
|
2142
|
-
children: main.icon.children,
|
|
2143
|
-
attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
|
|
2144
|
-
}]
|
|
2145
|
-
}]
|
|
2146
|
-
};
|
|
2147
|
-
};
|
|
2148
|
-
}
|
|
2149
|
-
};
|
|
2150
|
-
var ALL_SPACE = {
|
|
2151
|
-
x: 0,
|
|
2152
|
-
y: 0,
|
|
2153
|
-
width: "100%",
|
|
2154
|
-
height: "100%"
|
|
2155
|
-
};
|
|
2156
|
-
function fillBlack(abstract) {
|
|
2157
|
-
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
2158
|
-
if (abstract.attributes && (abstract.attributes.fill || force)) {
|
|
2159
|
-
abstract.attributes.fill = "black";
|
|
2160
|
-
}
|
|
2161
|
-
return abstract;
|
|
2162
|
-
}
|
|
2163
|
-
function deGroup(abstract) {
|
|
2164
|
-
if (abstract.tag === "g") {
|
|
2165
|
-
return abstract.children;
|
|
2166
|
-
} else {
|
|
2167
|
-
return [abstract];
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
var Masks = {
|
|
2171
|
-
hooks: function hooks6() {
|
|
2172
|
-
return {
|
|
2173
|
-
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
2174
|
-
var maskData = node.getAttribute("data-fa-mask");
|
|
2175
|
-
var mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(" ").map(function(i) {
|
|
2176
|
-
return i.trim();
|
|
2177
|
-
}));
|
|
2178
|
-
if (!mask.prefix) {
|
|
2179
|
-
mask.prefix = getDefaultUsablePrefix();
|
|
2180
|
-
}
|
|
2181
|
-
accumulator.mask = mask;
|
|
2182
|
-
accumulator.maskId = node.getAttribute("data-fa-mask-id");
|
|
2183
|
-
return accumulator;
|
|
2184
|
-
}
|
|
2185
|
-
};
|
|
2186
|
-
},
|
|
2187
|
-
provides: function provides5(providers2) {
|
|
2188
|
-
providers2.generateAbstractMask = function(_ref2) {
|
|
2189
|
-
var children = _ref2.children, attributes = _ref2.attributes, main = _ref2.main, mask = _ref2.mask, explicitMaskId = _ref2.maskId, transform = _ref2.transform;
|
|
2190
|
-
var mainWidth = main.width, mainPath = main.icon;
|
|
2191
|
-
var maskWidth = mask.width, maskPath = mask.icon;
|
|
2192
|
-
var trans = transformForSvg({
|
|
2193
|
-
transform,
|
|
2194
|
-
containerWidth: maskWidth,
|
|
2195
|
-
iconWidth: mainWidth
|
|
2196
|
-
});
|
|
2197
|
-
var maskRect = {
|
|
2198
|
-
tag: "rect",
|
|
2199
|
-
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
2200
|
-
fill: "white"
|
|
2201
|
-
})
|
|
2202
|
-
};
|
|
2203
|
-
var maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
2204
|
-
children: mainPath.children.map(fillBlack)
|
|
2205
|
-
} : {};
|
|
2206
|
-
var maskInnerGroup = {
|
|
2207
|
-
tag: "g",
|
|
2208
|
-
attributes: _objectSpread2({}, trans.inner),
|
|
2209
|
-
children: [fillBlack(_objectSpread2({
|
|
2210
|
-
tag: mainPath.tag,
|
|
2211
|
-
attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
|
|
2212
|
-
}, maskInnerGroupChildrenMixin))]
|
|
2213
|
-
};
|
|
2214
|
-
var maskOuterGroup = {
|
|
2215
|
-
tag: "g",
|
|
2216
|
-
attributes: _objectSpread2({}, trans.outer),
|
|
2217
|
-
children: [maskInnerGroup]
|
|
2218
|
-
};
|
|
2219
|
-
var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
2220
|
-
var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
2221
|
-
var maskTag = {
|
|
2222
|
-
tag: "mask",
|
|
2223
|
-
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
2224
|
-
id: maskId,
|
|
2225
|
-
maskUnits: "userSpaceOnUse",
|
|
2226
|
-
maskContentUnits: "userSpaceOnUse"
|
|
2227
|
-
}),
|
|
2228
|
-
children: [maskRect, maskOuterGroup]
|
|
2229
|
-
};
|
|
2230
|
-
var defs = {
|
|
2231
|
-
tag: "defs",
|
|
2232
|
-
children: [{
|
|
2233
|
-
tag: "clipPath",
|
|
2234
|
-
attributes: {
|
|
2235
|
-
id: clipId
|
|
2236
|
-
},
|
|
2237
|
-
children: deGroup(maskPath)
|
|
2238
|
-
}, maskTag]
|
|
2239
|
-
};
|
|
2240
|
-
children.push(defs, {
|
|
2241
|
-
tag: "rect",
|
|
2242
|
-
attributes: _objectSpread2({
|
|
2243
|
-
fill: "currentColor",
|
|
2244
|
-
"clip-path": "url(#".concat(clipId, ")"),
|
|
2245
|
-
mask: "url(#".concat(maskId, ")")
|
|
2246
|
-
}, ALL_SPACE)
|
|
2247
|
-
});
|
|
2248
|
-
return {
|
|
2249
|
-
children,
|
|
2250
|
-
attributes
|
|
2251
|
-
};
|
|
2252
|
-
};
|
|
2253
|
-
}
|
|
2254
|
-
};
|
|
2255
|
-
var MissingIconIndicator = {
|
|
2256
|
-
provides: function provides6(providers2) {
|
|
2257
|
-
var reduceMotion = false;
|
|
2258
|
-
if (WINDOW.matchMedia) {
|
|
2259
|
-
reduceMotion = WINDOW.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2260
|
-
}
|
|
2261
|
-
providers2.missingIconAbstract = function() {
|
|
2262
|
-
var gChildren = [];
|
|
2263
|
-
var FILL = {
|
|
2264
|
-
fill: "currentColor"
|
|
2265
|
-
};
|
|
2266
|
-
var ANIMATION_BASE = {
|
|
2267
|
-
attributeType: "XML",
|
|
2268
|
-
repeatCount: "indefinite",
|
|
2269
|
-
dur: "2s"
|
|
2270
|
-
};
|
|
2271
|
-
gChildren.push({
|
|
2272
|
-
tag: "path",
|
|
2273
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2274
|
-
d: "M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"
|
|
2275
|
-
})
|
|
2276
|
-
});
|
|
2277
|
-
var OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
2278
|
-
attributeName: "opacity"
|
|
2279
|
-
});
|
|
2280
|
-
var dot = {
|
|
2281
|
-
tag: "circle",
|
|
2282
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2283
|
-
cx: "256",
|
|
2284
|
-
cy: "364",
|
|
2285
|
-
r: "28"
|
|
2286
|
-
}),
|
|
2287
|
-
children: []
|
|
2288
|
-
};
|
|
2289
|
-
if (!reduceMotion) {
|
|
2290
|
-
dot.children.push({
|
|
2291
|
-
tag: "animate",
|
|
2292
|
-
attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
2293
|
-
attributeName: "r",
|
|
2294
|
-
values: "28;14;28;28;14;28;"
|
|
2295
|
-
})
|
|
2296
|
-
}, {
|
|
2297
|
-
tag: "animate",
|
|
2298
|
-
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2299
|
-
values: "1;0;1;1;0;1;"
|
|
2300
|
-
})
|
|
2301
|
-
});
|
|
2302
|
-
}
|
|
2303
|
-
gChildren.push(dot);
|
|
2304
|
-
gChildren.push({
|
|
2305
|
-
tag: "path",
|
|
2306
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2307
|
-
opacity: "1",
|
|
2308
|
-
d: "M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"
|
|
2309
|
-
}),
|
|
2310
|
-
children: reduceMotion ? [] : [{
|
|
2311
|
-
tag: "animate",
|
|
2312
|
-
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2313
|
-
values: "1;0;0;0;0;1;"
|
|
2314
|
-
})
|
|
2315
|
-
}]
|
|
2316
|
-
});
|
|
2317
|
-
if (!reduceMotion) {
|
|
2318
|
-
gChildren.push({
|
|
2319
|
-
tag: "path",
|
|
2320
|
-
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2321
|
-
opacity: "0",
|
|
2322
|
-
d: "M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"
|
|
2323
|
-
}),
|
|
2324
|
-
children: [{
|
|
2325
|
-
tag: "animate",
|
|
2326
|
-
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2327
|
-
values: "0;0;1;1;0;0;"
|
|
2328
|
-
})
|
|
2329
|
-
}]
|
|
2330
|
-
});
|
|
2331
|
-
}
|
|
2332
|
-
return {
|
|
2333
|
-
tag: "g",
|
|
2334
|
-
attributes: {
|
|
2335
|
-
"class": "missing"
|
|
2336
|
-
},
|
|
2337
|
-
children: gChildren
|
|
2338
|
-
};
|
|
2339
|
-
};
|
|
2340
|
-
}
|
|
2341
|
-
};
|
|
2342
|
-
var SvgSymbols = {
|
|
2343
|
-
hooks: function hooks7() {
|
|
2344
|
-
return {
|
|
2345
|
-
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
2346
|
-
var symbolData = node.getAttribute("data-fa-symbol");
|
|
2347
|
-
var symbol = symbolData === null ? false : symbolData === "" ? true : symbolData;
|
|
2348
|
-
accumulator["symbol"] = symbol;
|
|
2349
|
-
return accumulator;
|
|
2350
|
-
}
|
|
2351
|
-
};
|
|
2352
|
-
}
|
|
2353
|
-
};
|
|
2354
|
-
var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
|
|
2355
|
-
registerPlugins(plugins, {
|
|
2356
|
-
mixoutsTo: api
|
|
2357
|
-
});
|
|
2358
|
-
api.noAuto;
|
|
2359
|
-
var config$1 = api.config;
|
|
2360
|
-
api.library;
|
|
2361
|
-
api.dom;
|
|
2362
|
-
var parse$1 = api.parse;
|
|
2363
|
-
api.findIconDefinition;
|
|
2364
|
-
api.toHtml;
|
|
2365
|
-
var icon2 = api.icon;
|
|
2366
|
-
api.layer;
|
|
2367
|
-
var text = api.text;
|
|
2368
|
-
api.counter;
|
|
2369
|
-
var commonjsGlobal$1 = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2370
|
-
function createCommonjsModule(fn, module) {
|
|
2371
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
2372
|
-
}
|
|
2373
|
-
var humps = createCommonjsModule(function(module) {
|
|
2374
|
-
(function(global2) {
|
|
2375
|
-
var _processKeys = function(convert2, obj, options) {
|
|
2376
|
-
if (!_isObject(obj) || _isDate(obj) || _isRegExp(obj) || _isBoolean(obj) || _isFunction(obj)) {
|
|
2377
|
-
return obj;
|
|
2378
|
-
}
|
|
2379
|
-
var output, i = 0, l = 0;
|
|
2380
|
-
if (_isArray(obj)) {
|
|
2381
|
-
output = [];
|
|
2382
|
-
for (l = obj.length; i < l; i++) {
|
|
2383
|
-
output.push(_processKeys(convert2, obj[i], options));
|
|
2384
|
-
}
|
|
2385
|
-
} else {
|
|
2386
|
-
output = {};
|
|
2387
|
-
for (var key in obj) {
|
|
2388
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2389
|
-
output[convert2(key, options)] = _processKeys(convert2, obj[key], options);
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
return output;
|
|
2394
|
-
};
|
|
2395
|
-
var separateWords = function(string, options) {
|
|
2396
|
-
options = options || {};
|
|
2397
|
-
var separator = options.separator || "_";
|
|
2398
|
-
var split = options.split || /(?=[A-Z])/;
|
|
2399
|
-
return string.split(split).join(separator);
|
|
2400
|
-
};
|
|
2401
|
-
var camelize = function(string) {
|
|
2402
|
-
if (_isNumerical(string)) {
|
|
2403
|
-
return string;
|
|
2404
|
-
}
|
|
2405
|
-
string = string.replace(/[\-_\s]+(.)?/g, function(match, chr) {
|
|
2406
|
-
return chr ? chr.toUpperCase() : "";
|
|
2407
|
-
});
|
|
2408
|
-
return string.substr(0, 1).toLowerCase() + string.substr(1);
|
|
2409
|
-
};
|
|
2410
|
-
var pascalize = function(string) {
|
|
2411
|
-
var camelized = camelize(string);
|
|
2412
|
-
return camelized.substr(0, 1).toUpperCase() + camelized.substr(1);
|
|
2413
|
-
};
|
|
2414
|
-
var decamelize = function(string, options) {
|
|
2415
|
-
return separateWords(string, options).toLowerCase();
|
|
2416
|
-
};
|
|
2417
|
-
var toString = Object.prototype.toString;
|
|
2418
|
-
var _isFunction = function(obj) {
|
|
2419
|
-
return typeof obj === "function";
|
|
2420
|
-
};
|
|
2421
|
-
var _isObject = function(obj) {
|
|
2422
|
-
return obj === Object(obj);
|
|
2423
|
-
};
|
|
2424
|
-
var _isArray = function(obj) {
|
|
2425
|
-
return toString.call(obj) == "[object Array]";
|
|
2426
|
-
};
|
|
2427
|
-
var _isDate = function(obj) {
|
|
2428
|
-
return toString.call(obj) == "[object Date]";
|
|
2429
|
-
};
|
|
2430
|
-
var _isRegExp = function(obj) {
|
|
2431
|
-
return toString.call(obj) == "[object RegExp]";
|
|
2432
|
-
};
|
|
2433
|
-
var _isBoolean = function(obj) {
|
|
2434
|
-
return toString.call(obj) == "[object Boolean]";
|
|
2435
|
-
};
|
|
2436
|
-
var _isNumerical = function(obj) {
|
|
2437
|
-
obj = obj - 0;
|
|
2438
|
-
return obj === obj;
|
|
2439
|
-
};
|
|
2440
|
-
var _processor = function(convert2, options) {
|
|
2441
|
-
var callback = options && "process" in options ? options.process : options;
|
|
2442
|
-
if (typeof callback !== "function") {
|
|
2443
|
-
return convert2;
|
|
2444
|
-
}
|
|
2445
|
-
return function(string, options2) {
|
|
2446
|
-
return callback(string, convert2, options2);
|
|
2447
|
-
};
|
|
2448
|
-
};
|
|
2449
|
-
var humps2 = {
|
|
2450
|
-
camelize,
|
|
2451
|
-
decamelize,
|
|
2452
|
-
pascalize,
|
|
2453
|
-
depascalize: decamelize,
|
|
2454
|
-
camelizeKeys: function(object, options) {
|
|
2455
|
-
return _processKeys(_processor(camelize, options), object);
|
|
2456
|
-
},
|
|
2457
|
-
decamelizeKeys: function(object, options) {
|
|
2458
|
-
return _processKeys(_processor(decamelize, options), object, options);
|
|
2459
|
-
},
|
|
2460
|
-
pascalizeKeys: function(object, options) {
|
|
2461
|
-
return _processKeys(_processor(pascalize, options), object);
|
|
2462
|
-
},
|
|
2463
|
-
depascalizeKeys: function() {
|
|
2464
|
-
return this.decamelizeKeys.apply(this, arguments);
|
|
2465
|
-
}
|
|
2466
|
-
};
|
|
2467
|
-
if (module.exports) {
|
|
2468
|
-
module.exports = humps2;
|
|
2469
|
-
} else {
|
|
2470
|
-
global2.humps = humps2;
|
|
2471
|
-
}
|
|
2472
|
-
})(commonjsGlobal$1);
|
|
2473
|
-
});
|
|
2474
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
2475
|
-
return typeof obj;
|
|
2476
|
-
} : function(obj) {
|
|
2477
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2478
|
-
};
|
|
2479
|
-
var defineProperty$2 = function(obj, key, value) {
|
|
2480
|
-
if (key in obj) {
|
|
2481
|
-
Object.defineProperty(obj, key, {
|
|
2482
|
-
value,
|
|
2483
|
-
enumerable: true,
|
|
2484
|
-
configurable: true,
|
|
2485
|
-
writable: true
|
|
2486
|
-
});
|
|
2487
|
-
} else {
|
|
2488
|
-
obj[key] = value;
|
|
2489
|
-
}
|
|
2490
|
-
return obj;
|
|
2491
|
-
};
|
|
2492
|
-
var _extends = Object.assign || function(target) {
|
|
2493
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2494
|
-
var source = arguments[i];
|
|
2495
|
-
for (var key in source) {
|
|
2496
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2497
|
-
target[key] = source[key];
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2501
|
-
return target;
|
|
2502
|
-
};
|
|
2503
|
-
var objectWithoutProperties = function(obj, keys) {
|
|
2504
|
-
var target = {};
|
|
2505
|
-
for (var i in obj) {
|
|
2506
|
-
if (keys.indexOf(i) >= 0)
|
|
2507
|
-
continue;
|
|
2508
|
-
if (!Object.prototype.hasOwnProperty.call(obj, i))
|
|
2509
|
-
continue;
|
|
2510
|
-
target[i] = obj[i];
|
|
2511
|
-
}
|
|
2512
|
-
return target;
|
|
2513
|
-
};
|
|
2514
|
-
var toConsumableArray = function(arr) {
|
|
2515
|
-
if (Array.isArray(arr)) {
|
|
2516
|
-
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++)
|
|
2517
|
-
arr2[i] = arr[i];
|
|
2518
|
-
return arr2;
|
|
2519
|
-
} else {
|
|
2520
|
-
return Array.from(arr);
|
|
2521
|
-
}
|
|
2522
|
-
};
|
|
2523
|
-
function styleToObject(style) {
|
|
2524
|
-
return style.split(";").map(function(s) {
|
|
2525
|
-
return s.trim();
|
|
2526
|
-
}).filter(function(s) {
|
|
2527
|
-
return s;
|
|
2528
|
-
}).reduce(function(output, pair) {
|
|
2529
|
-
var idx = pair.indexOf(":");
|
|
2530
|
-
var prop = humps.camelize(pair.slice(0, idx));
|
|
2531
|
-
var value = pair.slice(idx + 1).trim();
|
|
2532
|
-
output[prop] = value;
|
|
2533
|
-
return output;
|
|
2534
|
-
}, {});
|
|
2535
|
-
}
|
|
2536
|
-
function classToObject(classes) {
|
|
2537
|
-
return classes.split(/\s+/).reduce(function(output, className) {
|
|
2538
|
-
output[className] = true;
|
|
2539
|
-
return output;
|
|
2540
|
-
}, {});
|
|
2541
|
-
}
|
|
2542
|
-
function convert(abstractElement) {
|
|
2543
|
-
var props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2544
|
-
var attrs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2545
|
-
if (typeof abstractElement === "string") {
|
|
2546
|
-
return abstractElement;
|
|
2547
|
-
}
|
|
2548
|
-
var children = (abstractElement.children || []).map(function(child) {
|
|
2549
|
-
return convert(child);
|
|
2550
|
-
});
|
|
2551
|
-
var mixins = Object.keys(abstractElement.attributes || {}).reduce(function(mixins2, key) {
|
|
2552
|
-
var value = abstractElement.attributes[key];
|
|
2553
|
-
switch (key) {
|
|
2554
|
-
case "class":
|
|
2555
|
-
mixins2.class = classToObject(value);
|
|
2556
|
-
break;
|
|
2557
|
-
case "style":
|
|
2558
|
-
mixins2.style = styleToObject(value);
|
|
2559
|
-
break;
|
|
2560
|
-
default:
|
|
2561
|
-
mixins2.attrs[key] = value;
|
|
2562
|
-
}
|
|
2563
|
-
return mixins2;
|
|
2564
|
-
}, {
|
|
2565
|
-
attrs: {},
|
|
2566
|
-
class: {},
|
|
2567
|
-
style: {}
|
|
2568
|
-
});
|
|
2569
|
-
attrs.class;
|
|
2570
|
-
var _attrs$style = attrs.style, aStyle = _attrs$style === void 0 ? {} : _attrs$style, otherAttrs = objectWithoutProperties(attrs, ["class", "style"]);
|
|
2571
|
-
return h(abstractElement.tag, _extends({}, props, {
|
|
2572
|
-
class: mixins.class,
|
|
2573
|
-
style: _extends({}, mixins.style, aStyle)
|
|
2574
|
-
}, mixins.attrs, otherAttrs), children);
|
|
2575
|
-
}
|
|
2576
|
-
var PRODUCTION = false;
|
|
2577
|
-
try {
|
|
2578
|
-
PRODUCTION = true;
|
|
2579
|
-
} catch (e) {
|
|
2580
|
-
}
|
|
2581
|
-
function log() {
|
|
2582
|
-
if (!PRODUCTION && console && typeof console.error === "function") {
|
|
2583
|
-
var _console;
|
|
2584
|
-
(_console = console).error.apply(_console, arguments);
|
|
2585
|
-
}
|
|
2586
|
-
}
|
|
2587
|
-
function objectWithKey(key, value) {
|
|
2588
|
-
return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? defineProperty$2({}, key, value) : {};
|
|
2589
|
-
}
|
|
2590
|
-
function classList(props) {
|
|
2591
|
-
var _classes;
|
|
2592
|
-
var classes = (_classes = {
|
|
2593
|
-
"fa-spin": props.spin,
|
|
2594
|
-
"fa-pulse": props.pulse,
|
|
2595
|
-
"fa-fw": props.fixedWidth,
|
|
2596
|
-
"fa-border": props.border,
|
|
2597
|
-
"fa-li": props.listItem,
|
|
2598
|
-
"fa-inverse": props.inverse,
|
|
2599
|
-
"fa-flip-horizontal": props.flip === "horizontal" || props.flip === "both",
|
|
2600
|
-
"fa-flip-vertical": props.flip === "vertical" || props.flip === "both"
|
|
2601
|
-
}, defineProperty$2(_classes, "fa-" + props.size, props.size !== null), defineProperty$2(_classes, "fa-rotate-" + props.rotation, props.rotation !== null), defineProperty$2(_classes, "fa-pull-" + props.pull, props.pull !== null), defineProperty$2(_classes, "fa-swap-opacity", props.swapOpacity), _classes);
|
|
2602
|
-
return Object.keys(classes).map(function(key) {
|
|
2603
|
-
return classes[key] ? key : null;
|
|
2604
|
-
}).filter(function(key) {
|
|
2605
|
-
return key;
|
|
2606
|
-
});
|
|
2607
|
-
}
|
|
2608
|
-
function normalizeIconArgs(icon$$1) {
|
|
2609
|
-
if (icon$$1 === null) {
|
|
2610
|
-
return null;
|
|
2611
|
-
}
|
|
2612
|
-
if ((typeof icon$$1 === "undefined" ? "undefined" : _typeof(icon$$1)) === "object" && icon$$1.prefix && icon$$1.iconName) {
|
|
2613
|
-
return icon$$1;
|
|
2614
|
-
}
|
|
2615
|
-
if (Array.isArray(icon$$1) && icon$$1.length === 2) {
|
|
2616
|
-
return { prefix: icon$$1[0], iconName: icon$$1[1] };
|
|
2617
|
-
}
|
|
2618
|
-
if (typeof icon$$1 === "string") {
|
|
2619
|
-
return { prefix: "fas", iconName: icon$$1 };
|
|
2620
|
-
}
|
|
2621
|
-
}
|
|
2622
|
-
var FontAwesomeIcon = defineComponent({
|
|
2623
|
-
name: "FontAwesomeIcon",
|
|
2624
|
-
props: {
|
|
2625
|
-
border: {
|
|
2626
|
-
type: Boolean,
|
|
2627
|
-
default: false
|
|
2628
|
-
},
|
|
2629
|
-
fixedWidth: {
|
|
2630
|
-
type: Boolean,
|
|
2631
|
-
default: false
|
|
2632
|
-
},
|
|
2633
|
-
flip: {
|
|
2634
|
-
type: String,
|
|
2635
|
-
default: null,
|
|
2636
|
-
validator: function validator(value) {
|
|
2637
|
-
return ["horizontal", "vertical", "both"].indexOf(value) > -1;
|
|
2638
|
-
}
|
|
2639
|
-
},
|
|
2640
|
-
icon: {
|
|
2641
|
-
type: [Object, Array, String],
|
|
2642
|
-
required: true
|
|
2643
|
-
},
|
|
2644
|
-
mask: {
|
|
2645
|
-
type: [Object, Array, String],
|
|
2646
|
-
default: null
|
|
2647
|
-
},
|
|
2648
|
-
listItem: {
|
|
2649
|
-
type: Boolean,
|
|
2650
|
-
default: false
|
|
2651
|
-
},
|
|
2652
|
-
pull: {
|
|
2653
|
-
type: String,
|
|
2654
|
-
default: null,
|
|
2655
|
-
validator: function validator2(value) {
|
|
2656
|
-
return ["right", "left"].indexOf(value) > -1;
|
|
2657
|
-
}
|
|
2658
|
-
},
|
|
2659
|
-
pulse: {
|
|
2660
|
-
type: Boolean,
|
|
2661
|
-
default: false
|
|
2662
|
-
},
|
|
2663
|
-
rotation: {
|
|
2664
|
-
type: [String, Number],
|
|
2665
|
-
default: null,
|
|
2666
|
-
validator: function validator3(value) {
|
|
2667
|
-
return [90, 180, 270].indexOf(Number.parseInt(value, 10)) > -1;
|
|
2668
|
-
}
|
|
2669
|
-
},
|
|
2670
|
-
swapOpacity: {
|
|
2671
|
-
type: Boolean,
|
|
2672
|
-
default: false
|
|
2673
|
-
},
|
|
2674
|
-
size: {
|
|
2675
|
-
type: String,
|
|
2676
|
-
default: null,
|
|
2677
|
-
validator: function validator4(value) {
|
|
2678
|
-
return ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"].indexOf(value) > -1;
|
|
2679
|
-
}
|
|
2680
|
-
},
|
|
2681
|
-
spin: {
|
|
2682
|
-
type: Boolean,
|
|
2683
|
-
default: false
|
|
2684
|
-
},
|
|
2685
|
-
transform: {
|
|
2686
|
-
type: [String, Object],
|
|
2687
|
-
default: null
|
|
2688
|
-
},
|
|
2689
|
-
symbol: {
|
|
2690
|
-
type: [Boolean, String],
|
|
2691
|
-
default: false
|
|
2692
|
-
},
|
|
2693
|
-
title: {
|
|
2694
|
-
type: String,
|
|
2695
|
-
default: null
|
|
2696
|
-
},
|
|
2697
|
-
inverse: {
|
|
2698
|
-
type: Boolean,
|
|
2699
|
-
default: false
|
|
2700
|
-
}
|
|
2701
|
-
},
|
|
2702
|
-
setup: function setup(props, _ref2) {
|
|
2703
|
-
var attrs = _ref2.attrs;
|
|
2704
|
-
var icon$$1 = computed(function() {
|
|
2705
|
-
return normalizeIconArgs(props.icon);
|
|
2706
|
-
});
|
|
2707
|
-
var classes = computed(function() {
|
|
2708
|
-
return objectWithKey("classes", classList(props));
|
|
2709
|
-
});
|
|
2710
|
-
var transform = computed(function() {
|
|
2711
|
-
return objectWithKey("transform", typeof props.transform === "string" ? parse$1.transform(props.transform) : props.transform);
|
|
2712
|
-
});
|
|
2713
|
-
var mask = computed(function() {
|
|
2714
|
-
return objectWithKey("mask", normalizeIconArgs(props.mask));
|
|
2715
|
-
});
|
|
2716
|
-
var renderedIcon = computed(function() {
|
|
2717
|
-
return icon2(icon$$1.value, _extends({}, classes.value, transform.value, mask.value, {
|
|
2718
|
-
symbol: props.symbol,
|
|
2719
|
-
title: props.title
|
|
2720
|
-
}));
|
|
2721
|
-
});
|
|
2722
|
-
watch(renderedIcon, function(value) {
|
|
2723
|
-
if (!value) {
|
|
2724
|
-
return log("Could not find one or more icon(s)", icon$$1.value, mask.value);
|
|
2725
|
-
}
|
|
2726
|
-
}, { immediate: true });
|
|
2727
|
-
var vnode = computed(function() {
|
|
2728
|
-
return renderedIcon.value ? convert(renderedIcon.value.abstract[0], {}, attrs) : null;
|
|
2729
|
-
});
|
|
2730
|
-
return function() {
|
|
2731
|
-
return vnode.value;
|
|
2732
|
-
};
|
|
2733
|
-
}
|
|
2734
|
-
});
|
|
2735
|
-
defineComponent({
|
|
2736
|
-
name: "FontAwesomeLayers",
|
|
2737
|
-
props: {
|
|
2738
|
-
fixedWidth: {
|
|
2739
|
-
type: Boolean,
|
|
2740
|
-
default: false
|
|
2741
|
-
}
|
|
2742
|
-
},
|
|
2743
|
-
setup: function setup2(props, _ref2) {
|
|
2744
|
-
var slots = _ref2.slots;
|
|
2745
|
-
var familyPrefix = config$1.familyPrefix;
|
|
2746
|
-
var className = computed(function() {
|
|
2747
|
-
return [familyPrefix + "-layers"].concat(toConsumableArray(props.fixedWidth ? [familyPrefix + "-fw"] : []));
|
|
2748
|
-
});
|
|
2749
|
-
return function() {
|
|
2750
|
-
return h("div", { class: className.value }, slots.default ? slots.default() : []);
|
|
2751
|
-
};
|
|
2752
|
-
}
|
|
2753
|
-
});
|
|
2754
|
-
defineComponent({
|
|
2755
|
-
name: "FontAwesomeLayersText",
|
|
2756
|
-
props: {
|
|
2757
|
-
value: {
|
|
2758
|
-
type: [String, Number],
|
|
2759
|
-
default: ""
|
|
2760
|
-
},
|
|
2761
|
-
transform: {
|
|
2762
|
-
type: [String, Object],
|
|
2763
|
-
default: null
|
|
2764
|
-
},
|
|
2765
|
-
counter: {
|
|
2766
|
-
type: Boolean,
|
|
2767
|
-
default: false
|
|
2768
|
-
},
|
|
2769
|
-
position: {
|
|
2770
|
-
type: String,
|
|
2771
|
-
default: null,
|
|
2772
|
-
validator: function validator5(value) {
|
|
2773
|
-
return ["bottom-left", "bottom-right", "top-left", "top-right"].indexOf(value) > -1;
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
},
|
|
2777
|
-
setup: function setup3(props, _ref2) {
|
|
2778
|
-
var attrs = _ref2.attrs;
|
|
2779
|
-
var familyPrefix = config$1.familyPrefix;
|
|
2780
|
-
var classes = computed(function() {
|
|
2781
|
-
return objectWithKey("classes", [].concat(toConsumableArray(props.counter ? [familyPrefix + "-layers-counter"] : []), toConsumableArray(props.position ? [familyPrefix + "-layers-" + props.position] : [])));
|
|
2782
|
-
});
|
|
2783
|
-
var transform = computed(function() {
|
|
2784
|
-
return objectWithKey("transform", typeof props.transform === "string" ? parse$1.transform(props.transform) : props.transform);
|
|
2785
|
-
});
|
|
2786
|
-
var abstractElement = computed(function() {
|
|
2787
|
-
var _text = text(props.value.toString(), _extends({}, transform.value, classes.value)), abstract = _text.abstract;
|
|
2788
|
-
if (props.counter) {
|
|
2789
|
-
abstract[0].attributes.class = abstract[0].attributes.class.replace("fa-layers-text", "");
|
|
2790
|
-
}
|
|
2791
|
-
return abstract[0];
|
|
2792
|
-
});
|
|
2793
|
-
var vnode = computed(function() {
|
|
2794
|
-
return convert(abstractElement.value, {}, attrs);
|
|
2795
|
-
});
|
|
2796
|
-
return function() {
|
|
2797
|
-
return vnode.value;
|
|
2798
|
-
};
|
|
2799
|
-
}
|
|
2800
|
-
});
|
|
2801
|
-
/*!
|
|
2802
|
-
* Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com
|
|
2803
|
-
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
2804
|
-
* Copyright 2022 Fonticons, Inc.
|
|
2805
|
-
*/
|
|
2806
|
-
var faCheck = {
|
|
2807
|
-
prefix: "fas",
|
|
2808
|
-
iconName: "check",
|
|
2809
|
-
icon: [448, 512, [10004, 10003], "f00c", "M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z"]
|
|
2810
|
-
};
|
|
2811
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2812
|
-
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
2813
|
-
var _freeGlobal = freeGlobal$1;
|
|
2814
|
-
var freeGlobal = _freeGlobal;
|
|
2815
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
2816
|
-
var root$3 = freeGlobal || freeSelf || Function("return this")();
|
|
2817
|
-
var _root = root$3;
|
|
2818
|
-
var root$2 = _root;
|
|
2819
|
-
var Symbol$3 = root$2.Symbol;
|
|
2820
|
-
var _Symbol = Symbol$3;
|
|
2821
|
-
var Symbol$2 = _Symbol;
|
|
2822
|
-
var objectProto$4 = Object.prototype;
|
|
2823
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
2824
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
2825
|
-
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
2826
|
-
function getRawTag$1(value) {
|
|
2827
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
2828
|
-
try {
|
|
2829
|
-
value[symToStringTag$1] = void 0;
|
|
2830
|
-
var unmasked = true;
|
|
2831
|
-
} catch (e) {
|
|
2832
|
-
}
|
|
2833
|
-
var result = nativeObjectToString$1.call(value);
|
|
2834
|
-
if (unmasked) {
|
|
2835
|
-
if (isOwn) {
|
|
2836
|
-
value[symToStringTag$1] = tag;
|
|
2837
|
-
} else {
|
|
2838
|
-
delete value[symToStringTag$1];
|
|
2839
|
-
}
|
|
2840
|
-
}
|
|
2841
|
-
return result;
|
|
2842
|
-
}
|
|
2843
|
-
var _getRawTag = getRawTag$1;
|
|
2844
|
-
var objectProto$3 = Object.prototype;
|
|
2845
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
2846
|
-
function objectToString$1(value) {
|
|
2847
|
-
return nativeObjectToString.call(value);
|
|
2848
|
-
}
|
|
2849
|
-
var _objectToString = objectToString$1;
|
|
2850
|
-
var Symbol$1 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
|
|
2851
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
2852
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
2853
|
-
function baseGetTag$1(value) {
|
|
2854
|
-
if (value == null) {
|
|
2855
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
2856
|
-
}
|
|
2857
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
2858
|
-
}
|
|
2859
|
-
var _baseGetTag = baseGetTag$1;
|
|
2860
|
-
function isObject$2(value) {
|
|
2861
|
-
var type = typeof value;
|
|
2862
|
-
return value != null && (type == "object" || type == "function");
|
|
2863
|
-
}
|
|
2864
|
-
var isObject_1 = isObject$2;
|
|
2865
|
-
var baseGetTag = _baseGetTag, isObject$1 = isObject_1;
|
|
2866
|
-
var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
2867
|
-
function isFunction$2(value) {
|
|
2868
|
-
if (!isObject$1(value)) {
|
|
2869
|
-
return false;
|
|
2870
|
-
}
|
|
2871
|
-
var tag = baseGetTag(value);
|
|
2872
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
2873
|
-
}
|
|
2874
|
-
var isFunction_1 = isFunction$2;
|
|
2875
|
-
var root$1 = _root;
|
|
2876
|
-
var coreJsData$1 = root$1["__core-js_shared__"];
|
|
2877
|
-
var _coreJsData = coreJsData$1;
|
|
2878
|
-
var coreJsData = _coreJsData;
|
|
2879
|
-
var maskSrcKey = function() {
|
|
2880
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
2881
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
2882
|
-
}();
|
|
2883
|
-
function isMasked$1(func) {
|
|
2884
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
2885
|
-
}
|
|
2886
|
-
var _isMasked = isMasked$1;
|
|
2887
|
-
var funcProto$1 = Function.prototype;
|
|
2888
|
-
var funcToString$1 = funcProto$1.toString;
|
|
2889
|
-
function toSource$1(func) {
|
|
2890
|
-
if (func != null) {
|
|
2891
|
-
try {
|
|
2892
|
-
return funcToString$1.call(func);
|
|
2893
|
-
} catch (e) {
|
|
2894
|
-
}
|
|
2895
|
-
try {
|
|
2896
|
-
return func + "";
|
|
2897
|
-
} catch (e) {
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
return "";
|
|
2901
|
-
}
|
|
2902
|
-
var _toSource = toSource$1;
|
|
2903
|
-
var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject = isObject_1, toSource = _toSource;
|
|
2904
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
2905
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
2906
|
-
var funcProto = Function.prototype, objectProto$2 = Object.prototype;
|
|
2907
|
-
var funcToString = funcProto.toString;
|
|
2908
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
2909
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
2910
|
-
function baseIsNative$1(value) {
|
|
2911
|
-
if (!isObject(value) || isMasked(value)) {
|
|
2912
|
-
return false;
|
|
2913
|
-
}
|
|
2914
|
-
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
2915
|
-
return pattern.test(toSource(value));
|
|
2916
|
-
}
|
|
2917
|
-
var _baseIsNative = baseIsNative$1;
|
|
2918
|
-
function getValue$1(object, key) {
|
|
2919
|
-
return object == null ? void 0 : object[key];
|
|
2920
|
-
}
|
|
2921
|
-
var _getValue = getValue$1;
|
|
2922
|
-
var baseIsNative = _baseIsNative, getValue = _getValue;
|
|
2923
|
-
function getNative$3(object, key) {
|
|
2924
|
-
var value = getValue(object, key);
|
|
2925
|
-
return baseIsNative(value) ? value : void 0;
|
|
2926
|
-
}
|
|
2927
|
-
var _getNative = getNative$3;
|
|
2928
|
-
var getNative$2 = _getNative;
|
|
2929
|
-
var nativeCreate$4 = getNative$2(Object, "create");
|
|
2930
|
-
var _nativeCreate = nativeCreate$4;
|
|
2931
|
-
var nativeCreate$3 = _nativeCreate;
|
|
2932
|
-
function hashClear$1() {
|
|
2933
|
-
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
2934
|
-
this.size = 0;
|
|
2935
|
-
}
|
|
2936
|
-
var _hashClear = hashClear$1;
|
|
2937
|
-
function hashDelete$1(key) {
|
|
2938
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
2939
|
-
this.size -= result ? 1 : 0;
|
|
2940
|
-
return result;
|
|
2941
|
-
}
|
|
2942
|
-
var _hashDelete = hashDelete$1;
|
|
2943
|
-
var nativeCreate$2 = _nativeCreate;
|
|
2944
|
-
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
2945
|
-
var objectProto$1 = Object.prototype;
|
|
2946
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
2947
|
-
function hashGet$1(key) {
|
|
2948
|
-
var data = this.__data__;
|
|
2949
|
-
if (nativeCreate$2) {
|
|
2950
|
-
var result = data[key];
|
|
2951
|
-
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
2952
|
-
}
|
|
2953
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
2954
|
-
}
|
|
2955
|
-
var _hashGet = hashGet$1;
|
|
2956
|
-
var nativeCreate$1 = _nativeCreate;
|
|
2957
|
-
var objectProto = Object.prototype;
|
|
2958
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2959
|
-
function hashHas$1(key) {
|
|
2960
|
-
var data = this.__data__;
|
|
2961
|
-
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
2962
|
-
}
|
|
2963
|
-
var _hashHas = hashHas$1;
|
|
2964
|
-
var nativeCreate = _nativeCreate;
|
|
2965
|
-
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
2966
|
-
function hashSet$1(key, value) {
|
|
2967
|
-
var data = this.__data__;
|
|
2968
|
-
this.size += this.has(key) ? 0 : 1;
|
|
2969
|
-
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
2970
|
-
return this;
|
|
2971
|
-
}
|
|
2972
|
-
var _hashSet = hashSet$1;
|
|
2973
|
-
var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet;
|
|
2974
|
-
function Hash$1(entries) {
|
|
2975
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
2976
|
-
this.clear();
|
|
2977
|
-
while (++index < length) {
|
|
2978
|
-
var entry = entries[index];
|
|
2979
|
-
this.set(entry[0], entry[1]);
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
Hash$1.prototype.clear = hashClear;
|
|
2983
|
-
Hash$1.prototype["delete"] = hashDelete;
|
|
2984
|
-
Hash$1.prototype.get = hashGet;
|
|
2985
|
-
Hash$1.prototype.has = hashHas;
|
|
2986
|
-
Hash$1.prototype.set = hashSet;
|
|
2987
|
-
var _Hash = Hash$1;
|
|
2988
|
-
function listCacheClear$1() {
|
|
2989
|
-
this.__data__ = [];
|
|
2990
|
-
this.size = 0;
|
|
2991
|
-
}
|
|
2992
|
-
var _listCacheClear = listCacheClear$1;
|
|
2993
|
-
function eq$1(value, other) {
|
|
2994
|
-
return value === other || value !== value && other !== other;
|
|
2995
|
-
}
|
|
2996
|
-
var eq_1 = eq$1;
|
|
2997
|
-
var eq = eq_1;
|
|
2998
|
-
function assocIndexOf$4(array, key) {
|
|
2999
|
-
var length = array.length;
|
|
3000
|
-
while (length--) {
|
|
3001
|
-
if (eq(array[length][0], key)) {
|
|
3002
|
-
return length;
|
|
3003
|
-
}
|
|
3004
|
-
}
|
|
3005
|
-
return -1;
|
|
3006
|
-
}
|
|
3007
|
-
var _assocIndexOf = assocIndexOf$4;
|
|
3008
|
-
var assocIndexOf$3 = _assocIndexOf;
|
|
3009
|
-
var arrayProto = Array.prototype;
|
|
3010
|
-
var splice = arrayProto.splice;
|
|
3011
|
-
function listCacheDelete$1(key) {
|
|
3012
|
-
var data = this.__data__, index = assocIndexOf$3(data, key);
|
|
3013
|
-
if (index < 0) {
|
|
3014
|
-
return false;
|
|
3015
|
-
}
|
|
3016
|
-
var lastIndex = data.length - 1;
|
|
3017
|
-
if (index == lastIndex) {
|
|
3018
|
-
data.pop();
|
|
3019
|
-
} else {
|
|
3020
|
-
splice.call(data, index, 1);
|
|
3021
|
-
}
|
|
3022
|
-
--this.size;
|
|
3023
|
-
return true;
|
|
3024
|
-
}
|
|
3025
|
-
var _listCacheDelete = listCacheDelete$1;
|
|
3026
|
-
var assocIndexOf$2 = _assocIndexOf;
|
|
3027
|
-
function listCacheGet$1(key) {
|
|
3028
|
-
var data = this.__data__, index = assocIndexOf$2(data, key);
|
|
3029
|
-
return index < 0 ? void 0 : data[index][1];
|
|
3030
|
-
}
|
|
3031
|
-
var _listCacheGet = listCacheGet$1;
|
|
3032
|
-
var assocIndexOf$1 = _assocIndexOf;
|
|
3033
|
-
function listCacheHas$1(key) {
|
|
3034
|
-
return assocIndexOf$1(this.__data__, key) > -1;
|
|
3035
|
-
}
|
|
3036
|
-
var _listCacheHas = listCacheHas$1;
|
|
3037
|
-
var assocIndexOf = _assocIndexOf;
|
|
3038
|
-
function listCacheSet$1(key, value) {
|
|
3039
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
3040
|
-
if (index < 0) {
|
|
3041
|
-
++this.size;
|
|
3042
|
-
data.push([key, value]);
|
|
3043
|
-
} else {
|
|
3044
|
-
data[index][1] = value;
|
|
3045
|
-
}
|
|
3046
|
-
return this;
|
|
3047
|
-
}
|
|
3048
|
-
var _listCacheSet = listCacheSet$1;
|
|
3049
|
-
var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
|
|
3050
|
-
function ListCache$1(entries) {
|
|
3051
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
3052
|
-
this.clear();
|
|
3053
|
-
while (++index < length) {
|
|
3054
|
-
var entry = entries[index];
|
|
3055
|
-
this.set(entry[0], entry[1]);
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
ListCache$1.prototype.clear = listCacheClear;
|
|
3059
|
-
ListCache$1.prototype["delete"] = listCacheDelete;
|
|
3060
|
-
ListCache$1.prototype.get = listCacheGet;
|
|
3061
|
-
ListCache$1.prototype.has = listCacheHas;
|
|
3062
|
-
ListCache$1.prototype.set = listCacheSet;
|
|
3063
|
-
var _ListCache = ListCache$1;
|
|
3064
|
-
var getNative$1 = _getNative, root = _root;
|
|
3065
|
-
var Map$1 = getNative$1(root, "Map");
|
|
3066
|
-
var _Map = Map$1;
|
|
3067
|
-
var Hash = _Hash, ListCache = _ListCache, Map = _Map;
|
|
3068
|
-
function mapCacheClear$1() {
|
|
3069
|
-
this.size = 0;
|
|
3070
|
-
this.__data__ = {
|
|
3071
|
-
"hash": new Hash(),
|
|
3072
|
-
"map": new (Map || ListCache)(),
|
|
3073
|
-
"string": new Hash()
|
|
3074
|
-
};
|
|
3075
|
-
}
|
|
3076
|
-
var _mapCacheClear = mapCacheClear$1;
|
|
3077
|
-
function isKeyable$1(value) {
|
|
3078
|
-
var type = typeof value;
|
|
3079
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
3080
|
-
}
|
|
3081
|
-
var _isKeyable = isKeyable$1;
|
|
3082
|
-
var isKeyable = _isKeyable;
|
|
3083
|
-
function getMapData$4(map, key) {
|
|
3084
|
-
var data = map.__data__;
|
|
3085
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
3086
|
-
}
|
|
3087
|
-
var _getMapData = getMapData$4;
|
|
3088
|
-
var getMapData$3 = _getMapData;
|
|
3089
|
-
function mapCacheDelete$1(key) {
|
|
3090
|
-
var result = getMapData$3(this, key)["delete"](key);
|
|
3091
|
-
this.size -= result ? 1 : 0;
|
|
3092
|
-
return result;
|
|
3093
|
-
}
|
|
3094
|
-
var _mapCacheDelete = mapCacheDelete$1;
|
|
3095
|
-
var getMapData$2 = _getMapData;
|
|
3096
|
-
function mapCacheGet$1(key) {
|
|
3097
|
-
return getMapData$2(this, key).get(key);
|
|
3098
|
-
}
|
|
3099
|
-
var _mapCacheGet = mapCacheGet$1;
|
|
3100
|
-
var getMapData$1 = _getMapData;
|
|
3101
|
-
function mapCacheHas$1(key) {
|
|
3102
|
-
return getMapData$1(this, key).has(key);
|
|
3103
|
-
}
|
|
3104
|
-
var _mapCacheHas = mapCacheHas$1;
|
|
3105
|
-
var getMapData = _getMapData;
|
|
3106
|
-
function mapCacheSet$1(key, value) {
|
|
3107
|
-
var data = getMapData(this, key), size = data.size;
|
|
3108
|
-
data.set(key, value);
|
|
3109
|
-
this.size += data.size == size ? 0 : 1;
|
|
3110
|
-
return this;
|
|
3111
|
-
}
|
|
3112
|
-
var _mapCacheSet = mapCacheSet$1;
|
|
3113
|
-
var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet;
|
|
3114
|
-
function MapCache$1(entries) {
|
|
3115
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
3116
|
-
this.clear();
|
|
3117
|
-
while (++index < length) {
|
|
3118
|
-
var entry = entries[index];
|
|
3119
|
-
this.set(entry[0], entry[1]);
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
MapCache$1.prototype.clear = mapCacheClear;
|
|
3123
|
-
MapCache$1.prototype["delete"] = mapCacheDelete;
|
|
3124
|
-
MapCache$1.prototype.get = mapCacheGet;
|
|
3125
|
-
MapCache$1.prototype.has = mapCacheHas;
|
|
3126
|
-
MapCache$1.prototype.set = mapCacheSet;
|
|
3127
|
-
var _MapCache = MapCache$1;
|
|
3128
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
3129
|
-
function setCacheAdd$1(value) {
|
|
3130
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
3131
|
-
return this;
|
|
3132
|
-
}
|
|
3133
|
-
var _setCacheAdd = setCacheAdd$1;
|
|
3134
|
-
function setCacheHas$1(value) {
|
|
3135
|
-
return this.__data__.has(value);
|
|
3136
|
-
}
|
|
3137
|
-
var _setCacheHas = setCacheHas$1;
|
|
3138
|
-
var MapCache = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
|
|
3139
|
-
function SetCache$1(values) {
|
|
3140
|
-
var index = -1, length = values == null ? 0 : values.length;
|
|
3141
|
-
this.__data__ = new MapCache();
|
|
3142
|
-
while (++index < length) {
|
|
3143
|
-
this.add(values[index]);
|
|
3144
|
-
}
|
|
3145
|
-
}
|
|
3146
|
-
SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
|
|
3147
|
-
SetCache$1.prototype.has = setCacheHas;
|
|
3148
|
-
var _SetCache = SetCache$1;
|
|
3149
|
-
function baseFindIndex$1(array, predicate, fromIndex, fromRight) {
|
|
3150
|
-
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
3151
|
-
while (fromRight ? index-- : ++index < length) {
|
|
3152
|
-
if (predicate(array[index], index, array)) {
|
|
3153
|
-
return index;
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
|
-
return -1;
|
|
3157
|
-
}
|
|
3158
|
-
var _baseFindIndex = baseFindIndex$1;
|
|
3159
|
-
function baseIsNaN$1(value) {
|
|
3160
|
-
return value !== value;
|
|
3161
|
-
}
|
|
3162
|
-
var _baseIsNaN = baseIsNaN$1;
|
|
3163
|
-
function strictIndexOf$1(array, value, fromIndex) {
|
|
3164
|
-
var index = fromIndex - 1, length = array.length;
|
|
3165
|
-
while (++index < length) {
|
|
3166
|
-
if (array[index] === value) {
|
|
3167
|
-
return index;
|
|
3168
|
-
}
|
|
3169
|
-
}
|
|
3170
|
-
return -1;
|
|
3171
|
-
}
|
|
3172
|
-
var _strictIndexOf = strictIndexOf$1;
|
|
3173
|
-
var baseFindIndex = _baseFindIndex, baseIsNaN = _baseIsNaN, strictIndexOf = _strictIndexOf;
|
|
3174
|
-
function baseIndexOf$1(array, value, fromIndex) {
|
|
3175
|
-
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
3176
|
-
}
|
|
3177
|
-
var _baseIndexOf = baseIndexOf$1;
|
|
3178
|
-
var baseIndexOf = _baseIndexOf;
|
|
3179
|
-
function arrayIncludes$1(array, value) {
|
|
3180
|
-
var length = array == null ? 0 : array.length;
|
|
3181
|
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
3182
|
-
}
|
|
3183
|
-
var _arrayIncludes = arrayIncludes$1;
|
|
3184
|
-
function arrayIncludesWith$1(array, value, comparator) {
|
|
3185
|
-
var index = -1, length = array == null ? 0 : array.length;
|
|
3186
|
-
while (++index < length) {
|
|
3187
|
-
if (comparator(value, array[index])) {
|
|
3188
|
-
return true;
|
|
3189
|
-
}
|
|
3190
|
-
}
|
|
3191
|
-
return false;
|
|
3192
|
-
}
|
|
3193
|
-
var _arrayIncludesWith = arrayIncludesWith$1;
|
|
3194
|
-
function arrayMap$1(array, iteratee) {
|
|
3195
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
3196
|
-
while (++index < length) {
|
|
3197
|
-
result[index] = iteratee(array[index], index, array);
|
|
3198
|
-
}
|
|
3199
|
-
return result;
|
|
3200
|
-
}
|
|
3201
|
-
var _arrayMap = arrayMap$1;
|
|
3202
|
-
function baseUnary$1(func) {
|
|
3203
|
-
return function(value) {
|
|
3204
|
-
return func(value);
|
|
3205
|
-
};
|
|
3206
|
-
}
|
|
3207
|
-
var _baseUnary = baseUnary$1;
|
|
3208
|
-
function cacheHas$1(cache, key) {
|
|
3209
|
-
return cache.has(key);
|
|
3210
|
-
}
|
|
3211
|
-
var _cacheHas = cacheHas$1;
|
|
3212
|
-
var SetCache = _SetCache, arrayIncludes = _arrayIncludes, arrayIncludesWith = _arrayIncludesWith, arrayMap = _arrayMap, baseUnary = _baseUnary, cacheHas = _cacheHas;
|
|
3213
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
3214
|
-
function baseDifference$1(array, values, iteratee, comparator) {
|
|
3215
|
-
var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
|
|
3216
|
-
if (!length) {
|
|
3217
|
-
return result;
|
|
3218
|
-
}
|
|
3219
|
-
if (iteratee) {
|
|
3220
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
3221
|
-
}
|
|
3222
|
-
if (comparator) {
|
|
3223
|
-
includes = arrayIncludesWith;
|
|
3224
|
-
isCommon = false;
|
|
3225
|
-
} else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
3226
|
-
includes = cacheHas;
|
|
3227
|
-
isCommon = false;
|
|
3228
|
-
values = new SetCache(values);
|
|
3229
|
-
}
|
|
3230
|
-
outer:
|
|
3231
|
-
while (++index < length) {
|
|
3232
|
-
var value = array[index], computed2 = iteratee == null ? value : iteratee(value);
|
|
3233
|
-
value = comparator || value !== 0 ? value : 0;
|
|
3234
|
-
if (isCommon && computed2 === computed2) {
|
|
3235
|
-
var valuesIndex = valuesLength;
|
|
3236
|
-
while (valuesIndex--) {
|
|
3237
|
-
if (values[valuesIndex] === computed2) {
|
|
3238
|
-
continue outer;
|
|
3239
|
-
}
|
|
3240
|
-
}
|
|
3241
|
-
result.push(value);
|
|
3242
|
-
} else if (!includes(values, computed2, comparator)) {
|
|
3243
|
-
result.push(value);
|
|
3244
|
-
}
|
|
3245
|
-
}
|
|
3246
|
-
return result;
|
|
3247
|
-
}
|
|
3248
|
-
var _baseDifference = baseDifference$1;
|
|
3249
|
-
function identity$2(value) {
|
|
3250
|
-
return value;
|
|
3251
|
-
}
|
|
3252
|
-
var identity_1 = identity$2;
|
|
3253
|
-
function apply$1(func, thisArg, args) {
|
|
3254
|
-
switch (args.length) {
|
|
3255
|
-
case 0:
|
|
3256
|
-
return func.call(thisArg);
|
|
3257
|
-
case 1:
|
|
3258
|
-
return func.call(thisArg, args[0]);
|
|
3259
|
-
case 2:
|
|
3260
|
-
return func.call(thisArg, args[0], args[1]);
|
|
3261
|
-
case 3:
|
|
3262
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
3263
|
-
}
|
|
3264
|
-
return func.apply(thisArg, args);
|
|
3265
|
-
}
|
|
3266
|
-
var _apply = apply$1;
|
|
3267
|
-
var apply = _apply;
|
|
3268
|
-
var nativeMax = Math.max;
|
|
3269
|
-
function overRest$1(func, start, transform) {
|
|
3270
|
-
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
3271
|
-
return function() {
|
|
3272
|
-
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
3273
|
-
while (++index < length) {
|
|
3274
|
-
array[index] = args[start + index];
|
|
3275
|
-
}
|
|
3276
|
-
index = -1;
|
|
3277
|
-
var otherArgs = Array(start + 1);
|
|
3278
|
-
while (++index < start) {
|
|
3279
|
-
otherArgs[index] = args[index];
|
|
3280
|
-
}
|
|
3281
|
-
otherArgs[start] = transform(array);
|
|
3282
|
-
return apply(func, this, otherArgs);
|
|
3283
|
-
};
|
|
3284
|
-
}
|
|
3285
|
-
var _overRest = overRest$1;
|
|
3286
|
-
function constant$1(value) {
|
|
3287
|
-
return function() {
|
|
3288
|
-
return value;
|
|
3289
|
-
};
|
|
3290
|
-
}
|
|
3291
|
-
var constant_1 = constant$1;
|
|
3292
|
-
var getNative = _getNative;
|
|
3293
|
-
var defineProperty$1 = function() {
|
|
3294
|
-
try {
|
|
3295
|
-
var func = getNative(Object, "defineProperty");
|
|
3296
|
-
func({}, "", {});
|
|
3297
|
-
return func;
|
|
3298
|
-
} catch (e) {
|
|
3299
|
-
}
|
|
3300
|
-
}();
|
|
3301
|
-
var _defineProperty = defineProperty$1;
|
|
3302
|
-
var constant = constant_1, defineProperty = _defineProperty, identity$1 = identity_1;
|
|
3303
|
-
var baseSetToString$1 = !defineProperty ? identity$1 : function(func, string) {
|
|
3304
|
-
return defineProperty(func, "toString", {
|
|
3305
|
-
"configurable": true,
|
|
3306
|
-
"enumerable": false,
|
|
3307
|
-
"value": constant(string),
|
|
3308
|
-
"writable": true
|
|
3309
|
-
});
|
|
3310
|
-
};
|
|
3311
|
-
var _baseSetToString = baseSetToString$1;
|
|
3312
|
-
var HOT_COUNT = 800, HOT_SPAN = 16;
|
|
3313
|
-
var nativeNow = Date.now;
|
|
3314
|
-
function shortOut$1(func) {
|
|
3315
|
-
var count = 0, lastCalled = 0;
|
|
3316
|
-
return function() {
|
|
3317
|
-
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
3318
|
-
lastCalled = stamp;
|
|
3319
|
-
if (remaining > 0) {
|
|
3320
|
-
if (++count >= HOT_COUNT) {
|
|
3321
|
-
return arguments[0];
|
|
3322
|
-
}
|
|
3323
|
-
} else {
|
|
3324
|
-
count = 0;
|
|
3325
|
-
}
|
|
3326
|
-
return func.apply(void 0, arguments);
|
|
3327
|
-
};
|
|
3328
|
-
}
|
|
3329
|
-
var _shortOut = shortOut$1;
|
|
3330
|
-
var baseSetToString = _baseSetToString, shortOut = _shortOut;
|
|
3331
|
-
var setToString$1 = shortOut(baseSetToString);
|
|
3332
|
-
var _setToString = setToString$1;
|
|
3333
|
-
var identity = identity_1, overRest = _overRest, setToString = _setToString;
|
|
3334
|
-
function baseRest$1(func, start) {
|
|
3335
|
-
return setToString(overRest(func, start, identity), func + "");
|
|
3336
|
-
}
|
|
3337
|
-
var _baseRest = baseRest$1;
|
|
3338
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
3339
|
-
function isLength$1(value) {
|
|
3340
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
3341
|
-
}
|
|
3342
|
-
var isLength_1 = isLength$1;
|
|
3343
|
-
var isFunction = isFunction_1, isLength = isLength_1;
|
|
3344
|
-
function isArrayLike$1(value) {
|
|
3345
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
3346
|
-
}
|
|
3347
|
-
var isArrayLike_1 = isArrayLike$1;
|
|
3348
|
-
function isObjectLike$1(value) {
|
|
3349
|
-
return value != null && typeof value == "object";
|
|
3350
|
-
}
|
|
3351
|
-
var isObjectLike_1 = isObjectLike$1;
|
|
3352
|
-
var isArrayLike = isArrayLike_1, isObjectLike = isObjectLike_1;
|
|
3353
|
-
function isArrayLikeObject$1(value) {
|
|
3354
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
3355
|
-
}
|
|
3356
|
-
var isArrayLikeObject_1 = isArrayLikeObject$1;
|
|
3357
|
-
var baseDifference = _baseDifference, baseRest = _baseRest, isArrayLikeObject = isArrayLikeObject_1;
|
|
3358
|
-
var without = baseRest(function(array, values) {
|
|
3359
|
-
return isArrayLikeObject(array) ? baseDifference(array, values) : [];
|
|
3360
|
-
});
|
|
3361
|
-
var without_1 = without;
|
|
3362
|
-
var Checkbox_vue_vue_type_style_index_0_lang = "";
|
|
3363
|
-
var Checkbox_vue_vue_type_style_index_1_scoped_true_lang = "";
|
|
3364
|
-
var _export_sfc = (sfc, props) => {
|
|
3365
|
-
const target = sfc.__vccOpts || sfc;
|
|
3366
|
-
for (const [key, val] of props) {
|
|
3367
|
-
target[key] = val;
|
|
3368
|
-
}
|
|
3369
|
-
return target;
|
|
3370
|
-
};
|
|
3371
|
-
const _sfc_main = {
|
|
1
|
+
import { defineComponent as h, useAttrs as _, ref as i, computed as v, watch as f, openBlock as x, createElementBlock as m, normalizeClass as p, unref as n, createElementVNode as r, createVNode as y, withDirectives as C, mergeProps as g, vModelCheckbox as A, toDisplayString as w } from "vue";
|
|
2
|
+
import { FontAwesomeIcon as B } from "@fortawesome/vue-fontawesome";
|
|
3
|
+
import { faCheck as E } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import F from "lodash/without";
|
|
5
|
+
const O = (a, o) => {
|
|
6
|
+
const t = a.__vccOpts || a;
|
|
7
|
+
for (const [u, c] of o)
|
|
8
|
+
t[u] = c;
|
|
9
|
+
return t;
|
|
10
|
+
}, S = ["value", "disabled"], V = { class: "checkbox-label" }, j = h({
|
|
3372
11
|
name: "Checkbox",
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
},
|
|
3376
|
-
inheritAttrs: false,
|
|
12
|
+
inheritAttrs: !1
|
|
13
|
+
}), D = /* @__PURE__ */ Object.assign(j, {
|
|
3377
14
|
props: {
|
|
3378
15
|
checked: {
|
|
3379
16
|
type: [Boolean, Array],
|
|
3380
|
-
default:
|
|
17
|
+
default: !1
|
|
3381
18
|
},
|
|
3382
19
|
value: {
|
|
3383
20
|
type: String,
|
|
@@ -3389,89 +26,60 @@ const _sfc_main = {
|
|
|
3389
26
|
},
|
|
3390
27
|
disabled: {
|
|
3391
28
|
type: Boolean,
|
|
3392
|
-
default:
|
|
29
|
+
default: !1
|
|
3393
30
|
}
|
|
3394
31
|
},
|
|
3395
32
|
emits: ["update:checked"],
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
},
|
|
3403
|
-
computed: {
|
|
3404
|
-
isChecked() {
|
|
3405
|
-
if (typeof this.internalChecked === "boolean") {
|
|
3406
|
-
return this.internalChecked;
|
|
3407
|
-
} else {
|
|
3408
|
-
return this.internalChecked.includes(this.value);
|
|
3409
|
-
}
|
|
3410
|
-
},
|
|
3411
|
-
attrs() {
|
|
3412
|
-
let self2 = this;
|
|
3413
|
-
let attrs = Object.assign({}, this.$attrs, {
|
|
3414
|
-
onKeyup(event) {
|
|
3415
|
-
self2.$emit("keyup", event);
|
|
3416
|
-
if (event.key === "Enter") {
|
|
3417
|
-
self2.$emit("click");
|
|
3418
|
-
if (typeof self2.internalChecked == "boolean") {
|
|
3419
|
-
self2.internalChecked = !self2.internalChecked;
|
|
3420
|
-
} else {
|
|
3421
|
-
if (self2.internalChecked.includes(self2.value)) {
|
|
3422
|
-
self2.internalChecked = without_1(self2.internalChecked, self2.value);
|
|
3423
|
-
} else {
|
|
3424
|
-
self2.internalChecked.push(self2.value);
|
|
3425
|
-
}
|
|
3426
|
-
}
|
|
3427
|
-
}
|
|
33
|
+
setup(a, { emit: o }) {
|
|
34
|
+
const t = a, u = _(), c = i(!1), e = i(t.checked), k = v(() => typeof e.value == "boolean" ? e.value : e.value.includes(t.value)), b = v(() => {
|
|
35
|
+
let s = Object.assign({}, u, {
|
|
36
|
+
// Pressing the enter key gets handled like a click.
|
|
37
|
+
onKeyup(l) {
|
|
38
|
+
o("keyup", l), l.key === "Enter" && (o("click"), typeof e.value == "boolean" ? e.value = !e.value : e.value.includes(t.value) ? e.value = F(e.value, t.value) : e.value.push(t.value));
|
|
3428
39
|
}
|
|
3429
40
|
});
|
|
3430
|
-
delete
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
this.internalChecked = this.checked;
|
|
3437
|
-
},
|
|
3438
|
-
internalChecked() {
|
|
3439
|
-
if (this.internalChecked != this.checked) {
|
|
3440
|
-
this.$emit("update:checked", this.internalChecked);
|
|
41
|
+
return delete s.class, s;
|
|
42
|
+
});
|
|
43
|
+
return f(
|
|
44
|
+
() => t.checked,
|
|
45
|
+
(s) => {
|
|
46
|
+
e.value = s;
|
|
3441
47
|
}
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
return openBlock(), createElementBlock("label", {
|
|
3450
|
-
class: normalizeClass(["checkbox", { "checkbox-disabled": $props.disabled }, _ctx.$attrs.class])
|
|
3451
|
-
}, [
|
|
3452
|
-
createElementVNode("span", {
|
|
3453
|
-
class: normalizeClass([
|
|
3454
|
-
"checkbox-input",
|
|
3455
|
-
{ "checkbox-checked": $options.isChecked, "checkbox-focused": $data.focused }
|
|
3456
|
-
])
|
|
48
|
+
), f(
|
|
49
|
+
() => e.value,
|
|
50
|
+
() => {
|
|
51
|
+
e.value != t.checked && o("update:checked", e.value);
|
|
52
|
+
}
|
|
53
|
+
), (s, l) => (x(), m("label", {
|
|
54
|
+
class: p(["checkbox", { "checkbox-disabled": a.disabled }, n(u).class])
|
|
3457
55
|
}, [
|
|
3458
|
-
|
|
3459
|
-
class:
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
56
|
+
r("span", {
|
|
57
|
+
class: p([
|
|
58
|
+
"checkbox-input",
|
|
59
|
+
{ "checkbox-checked": n(k), "checkbox-focused": c.value }
|
|
60
|
+
])
|
|
61
|
+
}, [
|
|
62
|
+
y(n(B), {
|
|
63
|
+
class: "checkbox-input-icon",
|
|
64
|
+
icon: n(E),
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}, null, 8, ["icon"]),
|
|
67
|
+
C(r("input", g(n(b), {
|
|
68
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => e.value = d),
|
|
69
|
+
type: "checkbox",
|
|
70
|
+
value: a.value,
|
|
71
|
+
disabled: a.disabled,
|
|
72
|
+
onFocus: l[1] || (l[1] = (d) => c.value = !0),
|
|
73
|
+
onFocusout: l[2] || (l[2] = (d) => c.value = !1)
|
|
74
|
+
}), null, 16, S), [
|
|
75
|
+
[A, e.value]
|
|
76
|
+
])
|
|
77
|
+
], 2),
|
|
78
|
+
r("span", V, w(a.label), 1)
|
|
79
|
+
], 2));
|
|
80
|
+
}
|
|
81
|
+
}), K = /* @__PURE__ */ O(D, [["__scopeId", "data-v-86921f23"]]);
|
|
82
|
+
export {
|
|
83
|
+
K as Checkbox
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=checkbox.es.js.map
|