@process.co/ui 0.0.19 → 0.0.21
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/css/ui.css +100 -0
- package/dist/components/slots/index.cjs +3832 -35
- package/dist/components/slots/index.cjs.map +1 -1
- package/dist/components/slots/index.d.cts +1 -1
- package/dist/components/slots/index.d.ts +1 -1
- package/dist/components/slots/index.js +3829 -37
- package/dist/components/slots/index.js.map +1 -1
- package/dist/index-NpNmoYuX.d.cts +43 -0
- package/dist/index-NpNmoYuX.d.ts +43 -0
- package/dist/index.cjs +3748 -247
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3745 -247
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-CcOhL3Cy.d.cts +0 -13
- package/dist/index-CcOhL3Cy.d.ts +0 -13
|
@@ -1,8 +1,97 @@
|
|
|
1
1
|
import * as React3 from 'react';
|
|
2
|
-
import
|
|
2
|
+
import React3__default from 'react';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// ../../node_modules/.pnpm/@fortawesome+fontawesome-svg-core@6.7.2/node_modules/@fortawesome/fontawesome-svg-core/package.json
|
|
13
|
+
var require_package = __commonJS({
|
|
14
|
+
"../../node_modules/.pnpm/@fortawesome+fontawesome-svg-core@6.7.2/node_modules/@fortawesome/fontawesome-svg-core/package.json"(exports$1, module) {
|
|
15
|
+
module.exports = {
|
|
16
|
+
description: "The iconic font, CSS, and SVG framework",
|
|
17
|
+
keywords: [
|
|
18
|
+
"font",
|
|
19
|
+
"awesome",
|
|
20
|
+
"fontawesome",
|
|
21
|
+
"icon",
|
|
22
|
+
"svg",
|
|
23
|
+
"bootstrap"
|
|
24
|
+
],
|
|
25
|
+
homepage: "https://fontawesome.com",
|
|
26
|
+
bugs: {
|
|
27
|
+
url: "https://github.com/FortAwesome/Font-Awesome/issues"
|
|
28
|
+
},
|
|
29
|
+
author: "The Font Awesome Team (https://github.com/orgs/FortAwesome/people)",
|
|
30
|
+
repository: {
|
|
31
|
+
type: "git",
|
|
32
|
+
url: "https://github.com/FortAwesome/Font-Awesome"
|
|
33
|
+
},
|
|
34
|
+
engines: {
|
|
35
|
+
node: ">=6"
|
|
36
|
+
},
|
|
37
|
+
dependencies: {
|
|
38
|
+
"@fortawesome/fontawesome-common-types": "6.7.2"
|
|
39
|
+
},
|
|
40
|
+
version: "6.7.2",
|
|
41
|
+
name: "@fortawesome/fontawesome-svg-core",
|
|
42
|
+
main: "index.js",
|
|
43
|
+
module: "index.mjs",
|
|
44
|
+
"jsnext:main": "index.mjs",
|
|
45
|
+
style: "styles.css",
|
|
46
|
+
license: "MIT",
|
|
47
|
+
types: "./index.d.ts",
|
|
48
|
+
exports: {
|
|
49
|
+
".": {
|
|
50
|
+
types: "./index.d.ts",
|
|
51
|
+
module: "./index.mjs",
|
|
52
|
+
import: "./index.mjs",
|
|
53
|
+
require: "./index.js",
|
|
54
|
+
style: "./styles.css",
|
|
55
|
+
default: "./index.js"
|
|
56
|
+
},
|
|
57
|
+
"./index": {
|
|
58
|
+
types: "./index.d.ts",
|
|
59
|
+
module: "./index.mjs",
|
|
60
|
+
import: "./index.mjs",
|
|
61
|
+
require: "./index.js",
|
|
62
|
+
default: "./index.js"
|
|
63
|
+
},
|
|
64
|
+
"./index.js": {
|
|
65
|
+
types: "./index.d.ts",
|
|
66
|
+
module: "./index.mjs",
|
|
67
|
+
import: "./index.mjs",
|
|
68
|
+
require: "./index.js",
|
|
69
|
+
default: "./index.js"
|
|
70
|
+
},
|
|
71
|
+
"./plugins": {
|
|
72
|
+
types: "./index.d.ts",
|
|
73
|
+
module: "./plugins.mjs",
|
|
74
|
+
import: "./plugins.mjs",
|
|
75
|
+
default: "./plugins.mjs"
|
|
76
|
+
},
|
|
77
|
+
"./import.macro": "./import.macro.js",
|
|
78
|
+
"./import.macro.js": "./import.macro.js",
|
|
79
|
+
"./styles": "./styles.css",
|
|
80
|
+
"./styles.css": "./styles.css",
|
|
81
|
+
"./package.json": "./package.json"
|
|
82
|
+
},
|
|
83
|
+
sideEffects: [
|
|
84
|
+
"./index.js",
|
|
85
|
+
"./index.mjs",
|
|
86
|
+
"./styles.css"
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
3
91
|
|
|
4
92
|
// src/components/slots/SlotElements.tsx
|
|
5
|
-
var SlotElements = () => {
|
|
93
|
+
var SlotElements = (props) => {
|
|
94
|
+
const { slotId } = props;
|
|
6
95
|
return /* @__PURE__ */ React.createElement("div", { className: "uii:flex uii:flex-row uii:gap-2 uii:border-dashed uii:border uii:border-gray-300 \n uii:rounded-sm uii:p-2 uii:h-10 uii:w-full uii:items-center uii:justify-start uii:p-1" }, /* @__PURE__ */ React.createElement("div", { className: "uii:w-8 uii:h-8 uii:rounded-xs uii:overflow-hidden uii:flex uii:items-center uii:justify-center uii:relative uii:z-20" }, /* @__PURE__ */ React.createElement("img", { alt: "Send GET Request", className: "uii:w-8 uii:h-8 uii:object-contain uii:rounded-xs uii:z-20", src: "https://res.cloudinary.com/process-co/image/fetch/w_64,h_64,c_fill,g_face/https://res.cloudinary.com/process-co/image/upload/v1755226713/namespace-icons/http.svg" })), /* @__PURE__ */ React.createElement("div", { className: "uii:w-8 uii:h-8 uii:rounded-xs uii:overflow-hidden uii:flex uii:items-center uii:justify-center uii:relative uii:z-20" }, /* @__PURE__ */ React.createElement("img", { alt: "Send GET Request", className: "uii:w-8 uii:h-8 uii:object-contain uii:rounded-xs uii:z-20", src: "https://res.cloudinary.com/process-co/image/fetch/w_64,h_64,c_fill,g_face/https://res.cloudinary.com/process-co/image/upload/v1755227094/namespace-icons/mailgun.svg" })), /* @__PURE__ */ React.createElement("div", { className: "uii:w-8 uii:h-8 uii:rounded-xs uii:overflow-hidden uii:flex uii:items-center uii:justify-center uii:relative uii:z-20" }, /* @__PURE__ */ React.createElement("img", { alt: "Send GET Request", className: "uii:w-8 uii:h-8 uii:object-contain uii:rounded-xs uii:z-20", src: "https://res.cloudinary.com/process-co/image/upload/v1772002004/img.icons8.com.png" })), /* @__PURE__ */ React.createElement("div", { className: "uii:w-8 uii:h-8 uii:rounded-xs uii:overflow-hidden uii:flex uii:items-center uii:justify-center uii:relative uii:z-20" }, /* @__PURE__ */ React.createElement("img", { alt: "Send GET Request", className: "uii:w-8 uii:h-8 uii:object-contain uii:rounded-xs uii:z-20", src: "https://res.cloudinary.com/process-co/image/fetch/w_64,h_64,c_fill,g_face/https://res.cloudinary.com/process-co/image/upload/v1755226713/namespace-icons/http.svg" })));
|
|
7
96
|
};
|
|
8
97
|
function setRef(ref, value) {
|
|
@@ -36,6 +125,9 @@ function composeRefs(...refs) {
|
|
|
36
125
|
}
|
|
37
126
|
};
|
|
38
127
|
}
|
|
128
|
+
function useComposedRefs(...refs) {
|
|
129
|
+
return React3.useCallback(composeRefs(...refs), refs);
|
|
130
|
+
}
|
|
39
131
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
40
132
|
var use = React3[" use ".trim().toString()];
|
|
41
133
|
function isPromiseLike(value) {
|
|
@@ -136,26 +228,26 @@ function getElementRef(element) {
|
|
|
136
228
|
|
|
137
229
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
138
230
|
function r(e) {
|
|
139
|
-
var
|
|
231
|
+
var t2, f, n = "";
|
|
140
232
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
141
233
|
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
142
|
-
var
|
|
143
|
-
for (
|
|
234
|
+
var o2 = e.length;
|
|
235
|
+
for (t2 = 0; t2 < o2; t2++) e[t2] && (f = r(e[t2])) && (n && (n += " "), n += f);
|
|
144
236
|
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
145
237
|
return n;
|
|
146
238
|
}
|
|
147
239
|
function clsx() {
|
|
148
|
-
for (var e,
|
|
240
|
+
for (var e, t2, f = 0, n = "", o2 = arguments.length; f < o2; f++) (e = arguments[f]) && (t2 = r(e)) && (n && (n += " "), n += t2);
|
|
149
241
|
return n;
|
|
150
242
|
}
|
|
151
243
|
|
|
152
244
|
// ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
153
245
|
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
154
246
|
var cx = clsx;
|
|
155
|
-
var cva = (base,
|
|
247
|
+
var cva = (base, config2) => (props) => {
|
|
156
248
|
var _config_compoundVariants;
|
|
157
|
-
if ((
|
|
158
|
-
const { variants, defaultVariants } =
|
|
249
|
+
if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
250
|
+
const { variants, defaultVariants } = config2;
|
|
159
251
|
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
160
252
|
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
161
253
|
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
@@ -171,7 +263,7 @@ var cva = (base, config) => (props) => {
|
|
|
171
263
|
acc[key] = value;
|
|
172
264
|
return acc;
|
|
173
265
|
}, {});
|
|
174
|
-
const getCompoundVariantClassNames =
|
|
266
|
+
const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (_config_compoundVariants = config2.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
175
267
|
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
176
268
|
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
177
269
|
let [key, value] = param2;
|
|
@@ -214,12 +306,12 @@ var createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators =
|
|
|
214
306
|
var CLASS_PART_SEPARATOR = "-";
|
|
215
307
|
var EMPTY_CONFLICTS = [];
|
|
216
308
|
var ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
217
|
-
var createClassGroupUtils = (
|
|
218
|
-
const classMap = createClassMap(
|
|
309
|
+
var createClassGroupUtils = (config2) => {
|
|
310
|
+
const classMap = createClassMap(config2);
|
|
219
311
|
const {
|
|
220
312
|
conflictingClassGroups,
|
|
221
313
|
conflictingClassGroupModifiers
|
|
222
|
-
} =
|
|
314
|
+
} = config2;
|
|
223
315
|
const getClassGroupId = (className) => {
|
|
224
316
|
if (className.startsWith("[") && className.endsWith("]")) {
|
|
225
317
|
return getGroupIdForArbitraryProperty(className);
|
|
@@ -278,11 +370,11 @@ var getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).index
|
|
|
278
370
|
const property = content.slice(0, colonIndex);
|
|
279
371
|
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
280
372
|
})();
|
|
281
|
-
var createClassMap = (
|
|
373
|
+
var createClassMap = (config2) => {
|
|
282
374
|
const {
|
|
283
375
|
theme,
|
|
284
376
|
classGroups
|
|
285
|
-
} =
|
|
377
|
+
} = config2;
|
|
286
378
|
return processClassGroups(classGroups, theme);
|
|
287
379
|
};
|
|
288
380
|
var processClassGroups = (classGroups, theme) => {
|
|
@@ -399,11 +491,11 @@ var createResultObject = (modifiers, hasImportantModifier, baseClassName, maybeP
|
|
|
399
491
|
maybePostfixModifierPosition,
|
|
400
492
|
isExternal
|
|
401
493
|
});
|
|
402
|
-
var createParseClassName = (
|
|
494
|
+
var createParseClassName = (config2) => {
|
|
403
495
|
const {
|
|
404
496
|
prefix,
|
|
405
497
|
experimentalParseClassName
|
|
406
|
-
} =
|
|
498
|
+
} = config2;
|
|
407
499
|
let parseClassName = (className) => {
|
|
408
500
|
const modifiers = [];
|
|
409
501
|
let bracketDepth = 0;
|
|
@@ -462,9 +554,9 @@ var createParseClassName = (config) => {
|
|
|
462
554
|
}
|
|
463
555
|
return parseClassName;
|
|
464
556
|
};
|
|
465
|
-
var createSortModifiers = (
|
|
557
|
+
var createSortModifiers = (config2) => {
|
|
466
558
|
const modifierWeights = /* @__PURE__ */ new Map();
|
|
467
|
-
|
|
559
|
+
config2.orderSensitiveModifiers.forEach((mod, index) => {
|
|
468
560
|
modifierWeights.set(mod, 1e6 + index);
|
|
469
561
|
});
|
|
470
562
|
return (modifiers) => {
|
|
@@ -492,14 +584,14 @@ var createSortModifiers = (config) => {
|
|
|
492
584
|
return result;
|
|
493
585
|
};
|
|
494
586
|
};
|
|
495
|
-
var createConfigUtils = (
|
|
496
|
-
cache: createLruCache(
|
|
497
|
-
parseClassName: createParseClassName(
|
|
498
|
-
sortModifiers: createSortModifiers(
|
|
499
|
-
...createClassGroupUtils(
|
|
587
|
+
var createConfigUtils = (config2) => ({
|
|
588
|
+
cache: createLruCache(config2.cacheSize),
|
|
589
|
+
parseClassName: createParseClassName(config2),
|
|
590
|
+
sortModifiers: createSortModifiers(config2),
|
|
591
|
+
...createClassGroupUtils(config2)
|
|
500
592
|
});
|
|
501
593
|
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
502
|
-
var mergeClassList = (
|
|
594
|
+
var mergeClassList = (classList2, configUtils) => {
|
|
503
595
|
const {
|
|
504
596
|
parseClassName,
|
|
505
597
|
getClassGroupId,
|
|
@@ -507,7 +599,7 @@ var mergeClassList = (classList, configUtils) => {
|
|
|
507
599
|
sortModifiers
|
|
508
600
|
} = configUtils;
|
|
509
601
|
const classGroupsInConflict = [];
|
|
510
|
-
const classNames =
|
|
602
|
+
const classNames = classList2.trim().split(SPLIT_CLASSES_REGEX);
|
|
511
603
|
let result = "";
|
|
512
604
|
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
513
605
|
const originalClassName = classNames[index];
|
|
@@ -588,21 +680,21 @@ var createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
|
588
680
|
let cacheGet;
|
|
589
681
|
let cacheSet;
|
|
590
682
|
let functionToCall;
|
|
591
|
-
const initTailwindMerge = (
|
|
592
|
-
const
|
|
593
|
-
configUtils = createConfigUtils(
|
|
683
|
+
const initTailwindMerge = (classList2) => {
|
|
684
|
+
const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
685
|
+
configUtils = createConfigUtils(config2);
|
|
594
686
|
cacheGet = configUtils.cache.get;
|
|
595
687
|
cacheSet = configUtils.cache.set;
|
|
596
688
|
functionToCall = tailwindMerge;
|
|
597
|
-
return tailwindMerge(
|
|
689
|
+
return tailwindMerge(classList2);
|
|
598
690
|
};
|
|
599
|
-
const tailwindMerge = (
|
|
600
|
-
const cachedResult = cacheGet(
|
|
691
|
+
const tailwindMerge = (classList2) => {
|
|
692
|
+
const cachedResult = cacheGet(classList2);
|
|
601
693
|
if (cachedResult) {
|
|
602
694
|
return cachedResult;
|
|
603
695
|
}
|
|
604
|
-
const result = mergeClassList(
|
|
605
|
-
cacheSet(
|
|
696
|
+
const result = mergeClassList(classList2, configUtils);
|
|
697
|
+
cacheSet(classList2, result);
|
|
606
698
|
return result;
|
|
607
699
|
};
|
|
608
700
|
functionToCall = initTailwindMerge;
|
|
@@ -3252,10 +3344,3710 @@ function Button({
|
|
|
3252
3344
|
}
|
|
3253
3345
|
|
|
3254
3346
|
// src/components/slots/ExportManager.tsx
|
|
3255
|
-
var ExportManager = () => {
|
|
3256
|
-
|
|
3347
|
+
var ExportManager = (props) => {
|
|
3348
|
+
const { slotId } = props;
|
|
3349
|
+
return /* @__PURE__ */ React.createElement(Button, { variant: "outline", size: "sm" }, "Manage Exports");
|
|
3350
|
+
};
|
|
3351
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3352
|
+
return function handleEvent(event) {
|
|
3353
|
+
originalEventHandler?.(event);
|
|
3354
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
3355
|
+
return ourEventHandler?.(event);
|
|
3356
|
+
}
|
|
3357
|
+
};
|
|
3358
|
+
}
|
|
3359
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
3360
|
+
let defaultContexts = [];
|
|
3361
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
3362
|
+
const BaseContext = React3.createContext(defaultContext);
|
|
3363
|
+
const index = defaultContexts.length;
|
|
3364
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
3365
|
+
const Provider = (props) => {
|
|
3366
|
+
const { scope, children, ...context } = props;
|
|
3367
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
3368
|
+
const value = React3.useMemo(() => context, Object.values(context));
|
|
3369
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
3370
|
+
};
|
|
3371
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
3372
|
+
function useContext2(consumerName, scope) {
|
|
3373
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
3374
|
+
const context = React3.useContext(Context);
|
|
3375
|
+
if (context) return context;
|
|
3376
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
3377
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
3378
|
+
}
|
|
3379
|
+
return [Provider, useContext2];
|
|
3380
|
+
}
|
|
3381
|
+
const createScope = () => {
|
|
3382
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
3383
|
+
return React3.createContext(defaultContext);
|
|
3384
|
+
});
|
|
3385
|
+
return function useScope(scope) {
|
|
3386
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
3387
|
+
return React3.useMemo(
|
|
3388
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
3389
|
+
[scope, contexts]
|
|
3390
|
+
);
|
|
3391
|
+
};
|
|
3392
|
+
};
|
|
3393
|
+
createScope.scopeName = scopeName;
|
|
3394
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
3395
|
+
}
|
|
3396
|
+
function composeContextScopes(...scopes) {
|
|
3397
|
+
const baseScope = scopes[0];
|
|
3398
|
+
if (scopes.length === 1) return baseScope;
|
|
3399
|
+
const createScope = () => {
|
|
3400
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
3401
|
+
useScope: createScope2(),
|
|
3402
|
+
scopeName: createScope2.scopeName
|
|
3403
|
+
}));
|
|
3404
|
+
return function useComposedScopes(overrideScopes) {
|
|
3405
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
3406
|
+
const scopeProps = useScope(overrideScopes);
|
|
3407
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
3408
|
+
return { ...nextScopes2, ...currentScope };
|
|
3409
|
+
}, {});
|
|
3410
|
+
return React3.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
3411
|
+
};
|
|
3412
|
+
};
|
|
3413
|
+
createScope.scopeName = baseScope.scopeName;
|
|
3414
|
+
return createScope;
|
|
3415
|
+
}
|
|
3416
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
|
3417
|
+
};
|
|
3418
|
+
var useInsertionEffect = React3[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3419
|
+
function useControllableState({
|
|
3420
|
+
prop,
|
|
3421
|
+
defaultProp,
|
|
3422
|
+
onChange: onChange2 = () => {
|
|
3423
|
+
},
|
|
3424
|
+
caller
|
|
3425
|
+
}) {
|
|
3426
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
3427
|
+
defaultProp,
|
|
3428
|
+
onChange: onChange2
|
|
3429
|
+
});
|
|
3430
|
+
const isControlled = prop !== void 0;
|
|
3431
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
3432
|
+
{
|
|
3433
|
+
const isControlledRef = React3.useRef(prop !== void 0);
|
|
3434
|
+
React3.useEffect(() => {
|
|
3435
|
+
const wasControlled = isControlledRef.current;
|
|
3436
|
+
if (wasControlled !== isControlled) {
|
|
3437
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
3438
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
3439
|
+
console.warn(
|
|
3440
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
3441
|
+
);
|
|
3442
|
+
}
|
|
3443
|
+
isControlledRef.current = isControlled;
|
|
3444
|
+
}, [isControlled, caller]);
|
|
3445
|
+
}
|
|
3446
|
+
const setValue = React3.useCallback(
|
|
3447
|
+
(nextValue) => {
|
|
3448
|
+
if (isControlled) {
|
|
3449
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
3450
|
+
if (value2 !== prop) {
|
|
3451
|
+
onChangeRef.current?.(value2);
|
|
3452
|
+
}
|
|
3453
|
+
} else {
|
|
3454
|
+
setUncontrolledProp(nextValue);
|
|
3455
|
+
}
|
|
3456
|
+
},
|
|
3457
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
3458
|
+
);
|
|
3459
|
+
return [value, setValue];
|
|
3460
|
+
}
|
|
3461
|
+
function useUncontrolledState({
|
|
3462
|
+
defaultProp,
|
|
3463
|
+
onChange: onChange2
|
|
3464
|
+
}) {
|
|
3465
|
+
const [value, setValue] = React3.useState(defaultProp);
|
|
3466
|
+
const prevValueRef = React3.useRef(value);
|
|
3467
|
+
const onChangeRef = React3.useRef(onChange2);
|
|
3468
|
+
useInsertionEffect(() => {
|
|
3469
|
+
onChangeRef.current = onChange2;
|
|
3470
|
+
}, [onChange2]);
|
|
3471
|
+
React3.useEffect(() => {
|
|
3472
|
+
if (prevValueRef.current !== value) {
|
|
3473
|
+
onChangeRef.current?.(value);
|
|
3474
|
+
prevValueRef.current = value;
|
|
3475
|
+
}
|
|
3476
|
+
}, [value, prevValueRef]);
|
|
3477
|
+
return [value, setValue, onChangeRef];
|
|
3478
|
+
}
|
|
3479
|
+
function isFunction(value) {
|
|
3480
|
+
return typeof value === "function";
|
|
3481
|
+
}
|
|
3482
|
+
function usePrevious(value) {
|
|
3483
|
+
const ref = React3.useRef({ value, previous: value });
|
|
3484
|
+
return React3.useMemo(() => {
|
|
3485
|
+
if (ref.current.value !== value) {
|
|
3486
|
+
ref.current.previous = ref.current.value;
|
|
3487
|
+
ref.current.value = value;
|
|
3488
|
+
}
|
|
3489
|
+
return ref.current.previous;
|
|
3490
|
+
}, [value]);
|
|
3491
|
+
}
|
|
3492
|
+
function useSize(element) {
|
|
3493
|
+
const [size, setSize] = React3.useState(void 0);
|
|
3494
|
+
useLayoutEffect2(() => {
|
|
3495
|
+
if (element) {
|
|
3496
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
3497
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
3498
|
+
if (!Array.isArray(entries)) {
|
|
3499
|
+
return;
|
|
3500
|
+
}
|
|
3501
|
+
if (!entries.length) {
|
|
3502
|
+
return;
|
|
3503
|
+
}
|
|
3504
|
+
const entry = entries[0];
|
|
3505
|
+
let width;
|
|
3506
|
+
let height;
|
|
3507
|
+
if ("borderBoxSize" in entry) {
|
|
3508
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
3509
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
3510
|
+
width = borderSize["inlineSize"];
|
|
3511
|
+
height = borderSize["blockSize"];
|
|
3512
|
+
} else {
|
|
3513
|
+
width = element.offsetWidth;
|
|
3514
|
+
height = element.offsetHeight;
|
|
3515
|
+
}
|
|
3516
|
+
setSize({ width, height });
|
|
3517
|
+
});
|
|
3518
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
3519
|
+
return () => resizeObserver.unobserve(element);
|
|
3520
|
+
} else {
|
|
3521
|
+
setSize(void 0);
|
|
3522
|
+
}
|
|
3523
|
+
}, [element]);
|
|
3524
|
+
return size;
|
|
3525
|
+
}
|
|
3526
|
+
// @__NO_SIDE_EFFECTS__
|
|
3527
|
+
function createSlot2(ownerName) {
|
|
3528
|
+
const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
3529
|
+
const Slot2 = React3.forwardRef((props, forwardedRef) => {
|
|
3530
|
+
const { children, ...slotProps } = props;
|
|
3531
|
+
const childrenArray = React3.Children.toArray(children);
|
|
3532
|
+
const slottable = childrenArray.find(isSlottable2);
|
|
3533
|
+
if (slottable) {
|
|
3534
|
+
const newElement = slottable.props.children;
|
|
3535
|
+
const newChildren = childrenArray.map((child) => {
|
|
3536
|
+
if (child === slottable) {
|
|
3537
|
+
if (React3.Children.count(newElement) > 1) return React3.Children.only(null);
|
|
3538
|
+
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
|
3539
|
+
} else {
|
|
3540
|
+
return child;
|
|
3541
|
+
}
|
|
3542
|
+
});
|
|
3543
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
3544
|
+
}
|
|
3545
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
3546
|
+
});
|
|
3547
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
3548
|
+
return Slot2;
|
|
3549
|
+
}
|
|
3550
|
+
// @__NO_SIDE_EFFECTS__
|
|
3551
|
+
function createSlotClone2(ownerName) {
|
|
3552
|
+
const SlotClone = React3.forwardRef((props, forwardedRef) => {
|
|
3553
|
+
const { children, ...slotProps } = props;
|
|
3554
|
+
if (React3.isValidElement(children)) {
|
|
3555
|
+
const childrenRef = getElementRef2(children);
|
|
3556
|
+
const props2 = mergeProps2(slotProps, children.props);
|
|
3557
|
+
if (children.type !== React3.Fragment) {
|
|
3558
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3559
|
+
}
|
|
3560
|
+
return React3.cloneElement(children, props2);
|
|
3561
|
+
}
|
|
3562
|
+
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
|
3563
|
+
});
|
|
3564
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3565
|
+
return SlotClone;
|
|
3566
|
+
}
|
|
3567
|
+
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
3568
|
+
function isSlottable2(child) {
|
|
3569
|
+
return React3.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
3570
|
+
}
|
|
3571
|
+
function mergeProps2(slotProps, childProps) {
|
|
3572
|
+
const overrideProps = { ...childProps };
|
|
3573
|
+
for (const propName in childProps) {
|
|
3574
|
+
const slotPropValue = slotProps[propName];
|
|
3575
|
+
const childPropValue = childProps[propName];
|
|
3576
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
3577
|
+
if (isHandler) {
|
|
3578
|
+
if (slotPropValue && childPropValue) {
|
|
3579
|
+
overrideProps[propName] = (...args) => {
|
|
3580
|
+
const result = childPropValue(...args);
|
|
3581
|
+
slotPropValue(...args);
|
|
3582
|
+
return result;
|
|
3583
|
+
};
|
|
3584
|
+
} else if (slotPropValue) {
|
|
3585
|
+
overrideProps[propName] = slotPropValue;
|
|
3586
|
+
}
|
|
3587
|
+
} else if (propName === "style") {
|
|
3588
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
3589
|
+
} else if (propName === "className") {
|
|
3590
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
return { ...slotProps, ...overrideProps };
|
|
3594
|
+
}
|
|
3595
|
+
function getElementRef2(element) {
|
|
3596
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
3597
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3598
|
+
if (mayWarn) {
|
|
3599
|
+
return element.ref;
|
|
3600
|
+
}
|
|
3601
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
3602
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3603
|
+
if (mayWarn) {
|
|
3604
|
+
return element.props.ref;
|
|
3605
|
+
}
|
|
3606
|
+
return element.props.ref || element.ref;
|
|
3607
|
+
}
|
|
3608
|
+
var NODES = [
|
|
3609
|
+
"a",
|
|
3610
|
+
"button",
|
|
3611
|
+
"div",
|
|
3612
|
+
"form",
|
|
3613
|
+
"h2",
|
|
3614
|
+
"h3",
|
|
3615
|
+
"img",
|
|
3616
|
+
"input",
|
|
3617
|
+
"label",
|
|
3618
|
+
"li",
|
|
3619
|
+
"nav",
|
|
3620
|
+
"ol",
|
|
3621
|
+
"p",
|
|
3622
|
+
"select",
|
|
3623
|
+
"span",
|
|
3624
|
+
"svg",
|
|
3625
|
+
"ul"
|
|
3626
|
+
];
|
|
3627
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
3628
|
+
const Slot2 = createSlot2(`Primitive.${node}`);
|
|
3629
|
+
const Node2 = React3.forwardRef((props, forwardedRef) => {
|
|
3630
|
+
const { asChild, ...primitiveProps } = props;
|
|
3631
|
+
const Comp = asChild ? Slot2 : node;
|
|
3632
|
+
if (typeof window !== "undefined") {
|
|
3633
|
+
window[Symbol.for("radix-ui")] = true;
|
|
3634
|
+
}
|
|
3635
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
3636
|
+
});
|
|
3637
|
+
Node2.displayName = `Primitive.${node}`;
|
|
3638
|
+
return { ...primitive, [node]: Node2 };
|
|
3639
|
+
}, {});
|
|
3640
|
+
var SWITCH_NAME = "Switch";
|
|
3641
|
+
var [createSwitchContext] = createContextScope(SWITCH_NAME);
|
|
3642
|
+
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
3643
|
+
var Switch = React3.forwardRef(
|
|
3644
|
+
(props, forwardedRef) => {
|
|
3645
|
+
const {
|
|
3646
|
+
__scopeSwitch,
|
|
3647
|
+
name,
|
|
3648
|
+
checked: checkedProp,
|
|
3649
|
+
defaultChecked,
|
|
3650
|
+
required,
|
|
3651
|
+
disabled: disabled2,
|
|
3652
|
+
value = "on",
|
|
3653
|
+
onCheckedChange,
|
|
3654
|
+
form,
|
|
3655
|
+
...switchProps
|
|
3656
|
+
} = props;
|
|
3657
|
+
const [button, setButton] = React3.useState(null);
|
|
3658
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
3659
|
+
const hasConsumerStoppedPropagationRef = React3.useRef(false);
|
|
3660
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
3661
|
+
const [checked, setChecked] = useControllableState({
|
|
3662
|
+
prop: checkedProp,
|
|
3663
|
+
defaultProp: defaultChecked ?? false,
|
|
3664
|
+
onChange: onCheckedChange,
|
|
3665
|
+
caller: SWITCH_NAME
|
|
3666
|
+
});
|
|
3667
|
+
return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled: disabled2, children: [
|
|
3668
|
+
/* @__PURE__ */ jsx(
|
|
3669
|
+
Primitive.button,
|
|
3670
|
+
{
|
|
3671
|
+
type: "button",
|
|
3672
|
+
role: "switch",
|
|
3673
|
+
"aria-checked": checked,
|
|
3674
|
+
"aria-required": required,
|
|
3675
|
+
"data-state": getState(checked),
|
|
3676
|
+
"data-disabled": disabled2 ? "" : void 0,
|
|
3677
|
+
disabled: disabled2,
|
|
3678
|
+
value,
|
|
3679
|
+
...switchProps,
|
|
3680
|
+
ref: composedRefs,
|
|
3681
|
+
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
3682
|
+
setChecked((prevChecked) => !prevChecked);
|
|
3683
|
+
if (isFormControl) {
|
|
3684
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
3685
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
3686
|
+
}
|
|
3687
|
+
})
|
|
3688
|
+
}
|
|
3689
|
+
),
|
|
3690
|
+
isFormControl && /* @__PURE__ */ jsx(
|
|
3691
|
+
SwitchBubbleInput,
|
|
3692
|
+
{
|
|
3693
|
+
control: button,
|
|
3694
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
3695
|
+
name,
|
|
3696
|
+
value,
|
|
3697
|
+
checked,
|
|
3698
|
+
required,
|
|
3699
|
+
disabled: disabled2,
|
|
3700
|
+
form,
|
|
3701
|
+
style: { transform: "translateX(-100%)" }
|
|
3702
|
+
}
|
|
3703
|
+
)
|
|
3704
|
+
] });
|
|
3705
|
+
}
|
|
3706
|
+
);
|
|
3707
|
+
Switch.displayName = SWITCH_NAME;
|
|
3708
|
+
var THUMB_NAME = "SwitchThumb";
|
|
3709
|
+
var SwitchThumb = React3.forwardRef(
|
|
3710
|
+
(props, forwardedRef) => {
|
|
3711
|
+
const { __scopeSwitch, ...thumbProps } = props;
|
|
3712
|
+
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
3713
|
+
return /* @__PURE__ */ jsx(
|
|
3714
|
+
Primitive.span,
|
|
3715
|
+
{
|
|
3716
|
+
"data-state": getState(context.checked),
|
|
3717
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
3718
|
+
...thumbProps,
|
|
3719
|
+
ref: forwardedRef
|
|
3720
|
+
}
|
|
3721
|
+
);
|
|
3722
|
+
}
|
|
3723
|
+
);
|
|
3724
|
+
SwitchThumb.displayName = THUMB_NAME;
|
|
3725
|
+
var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
|
|
3726
|
+
var SwitchBubbleInput = React3.forwardRef(
|
|
3727
|
+
({
|
|
3728
|
+
__scopeSwitch,
|
|
3729
|
+
control,
|
|
3730
|
+
checked,
|
|
3731
|
+
bubbles = true,
|
|
3732
|
+
...props
|
|
3733
|
+
}, forwardedRef) => {
|
|
3734
|
+
const ref = React3.useRef(null);
|
|
3735
|
+
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
3736
|
+
const prevChecked = usePrevious(checked);
|
|
3737
|
+
const controlSize = useSize(control);
|
|
3738
|
+
React3.useEffect(() => {
|
|
3739
|
+
const input = ref.current;
|
|
3740
|
+
if (!input) return;
|
|
3741
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
3742
|
+
const descriptor = Object.getOwnPropertyDescriptor(
|
|
3743
|
+
inputProto,
|
|
3744
|
+
"checked"
|
|
3745
|
+
);
|
|
3746
|
+
const setChecked = descriptor.set;
|
|
3747
|
+
if (prevChecked !== checked && setChecked) {
|
|
3748
|
+
const event = new Event("click", { bubbles });
|
|
3749
|
+
setChecked.call(input, checked);
|
|
3750
|
+
input.dispatchEvent(event);
|
|
3751
|
+
}
|
|
3752
|
+
}, [prevChecked, checked, bubbles]);
|
|
3753
|
+
return /* @__PURE__ */ jsx(
|
|
3754
|
+
"input",
|
|
3755
|
+
{
|
|
3756
|
+
type: "checkbox",
|
|
3757
|
+
"aria-hidden": true,
|
|
3758
|
+
defaultChecked: checked,
|
|
3759
|
+
...props,
|
|
3760
|
+
tabIndex: -1,
|
|
3761
|
+
ref: composedRefs,
|
|
3762
|
+
style: {
|
|
3763
|
+
...props.style,
|
|
3764
|
+
...controlSize,
|
|
3765
|
+
position: "absolute",
|
|
3766
|
+
pointerEvents: "none",
|
|
3767
|
+
opacity: 0,
|
|
3768
|
+
margin: 0
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
);
|
|
3772
|
+
}
|
|
3773
|
+
);
|
|
3774
|
+
SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
|
3775
|
+
function getState(checked) {
|
|
3776
|
+
return checked ? "checked" : "unchecked";
|
|
3777
|
+
}
|
|
3778
|
+
var Root = Switch;
|
|
3779
|
+
var Thumb = SwitchThumb;
|
|
3780
|
+
|
|
3781
|
+
// src/components/ui/switch.tsx
|
|
3782
|
+
var switchRootVariants = cva(
|
|
3783
|
+
"uii:peer uii:inline-flex uii:shrink-0 uii:cursor-pointer uii:items-center uii:rounded-full uii:border-2 uii:border-transparent uii:transition-all uii:outline-none uii:focus-visible:border-ring uii:focus-visible:ring-ring/50 uii:focus-visible:ring-[3px] uii:disabled:cursor-not-allowed uii:disabled:opacity-50 uii:data-[state=checked]:bg-primary uii:data-[state=unchecked]:bg-input uii:shadow-xs",
|
|
3784
|
+
{
|
|
3785
|
+
variants: {
|
|
3786
|
+
size: {
|
|
3787
|
+
xs: "uii:h-3 uii:w-6",
|
|
3788
|
+
// tiny track
|
|
3789
|
+
sm: "uii:h-4 uii:w-7",
|
|
3790
|
+
// small track
|
|
3791
|
+
md: "uii:h-5 uii:w-9",
|
|
3792
|
+
// current default
|
|
3793
|
+
lg: "uii:h-7 uii:w-14",
|
|
3794
|
+
// larger track
|
|
3795
|
+
xl: "uii:h-9 uii:w-20"
|
|
3796
|
+
// extra large track
|
|
3797
|
+
}
|
|
3798
|
+
},
|
|
3799
|
+
defaultVariants: { size: "md" }
|
|
3800
|
+
}
|
|
3801
|
+
);
|
|
3802
|
+
var switchThumbVariants = cva(
|
|
3803
|
+
"uii:bg-background uii:pointer-events-none uii:block uii:rounded-full uii:ring-0 uii:shadow-lg uii:transition-transform uii:data-[state=unchecked]:translate-x-0",
|
|
3804
|
+
{
|
|
3805
|
+
variants: {
|
|
3806
|
+
size: {
|
|
3807
|
+
xs: "uii:size-2 uii:data-[state=checked]:translate-x-3",
|
|
3808
|
+
sm: "uii:size-3 uii:data-[state=checked]:translate-x-3",
|
|
3809
|
+
md: "uii:size-4 uii:data-[state=checked]:translate-x-4",
|
|
3810
|
+
// current default
|
|
3811
|
+
lg: "uii:size-6 uii:data-[state=checked]:translate-x-6",
|
|
3812
|
+
xl: "uii:size-8 uii:data-[state=checked]:translate-x-8"
|
|
3813
|
+
}
|
|
3814
|
+
},
|
|
3815
|
+
defaultVariants: { size: "md" }
|
|
3816
|
+
}
|
|
3817
|
+
);
|
|
3818
|
+
function Switch2({ className, size, ...props }) {
|
|
3819
|
+
return /* @__PURE__ */ React3.createElement(
|
|
3820
|
+
Root,
|
|
3821
|
+
{
|
|
3822
|
+
"data-slot": "switch",
|
|
3823
|
+
className: cn(switchRootVariants({ size }), className),
|
|
3824
|
+
...props
|
|
3825
|
+
},
|
|
3826
|
+
/* @__PURE__ */ React3.createElement(
|
|
3827
|
+
Thumb,
|
|
3828
|
+
{
|
|
3829
|
+
"data-slot": "switch-thumb",
|
|
3830
|
+
className: cn(switchThumbVariants({ size }))
|
|
3831
|
+
}
|
|
3832
|
+
)
|
|
3833
|
+
);
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3836
|
+
// src/components/slots/SlotEnable.tsx
|
|
3837
|
+
var SlotEnable = (props) => {
|
|
3838
|
+
const { slotId } = props;
|
|
3839
|
+
return /* @__PURE__ */ React.createElement("div", { className: "uii:flex uii:items-center uii:justify-center uii:ml-1" }, /* @__PURE__ */ React.createElement(Switch2, { size: "xs", checked: true, onCheckedChange: () => {
|
|
3840
|
+
} }));
|
|
3841
|
+
};
|
|
3842
|
+
|
|
3843
|
+
// ../../node_modules/.pnpm/@fortawesome+fontawesome-svg-core@6.7.2/node_modules/@fortawesome/fontawesome-svg-core/index.mjs
|
|
3844
|
+
function _defineProperty(e, r3, t2) {
|
|
3845
|
+
return (r3 = _toPropertyKey(r3)) in e ? Object.defineProperty(e, r3, {
|
|
3846
|
+
value: t2,
|
|
3847
|
+
enumerable: true,
|
|
3848
|
+
configurable: true,
|
|
3849
|
+
writable: true
|
|
3850
|
+
}) : e[r3] = t2, e;
|
|
3851
|
+
}
|
|
3852
|
+
function ownKeys(e, r3) {
|
|
3853
|
+
var t2 = Object.keys(e);
|
|
3854
|
+
if (Object.getOwnPropertySymbols) {
|
|
3855
|
+
var o2 = Object.getOwnPropertySymbols(e);
|
|
3856
|
+
r3 && (o2 = o2.filter(function(r4) {
|
|
3857
|
+
return Object.getOwnPropertyDescriptor(e, r4).enumerable;
|
|
3858
|
+
})), t2.push.apply(t2, o2);
|
|
3859
|
+
}
|
|
3860
|
+
return t2;
|
|
3861
|
+
}
|
|
3862
|
+
function _objectSpread2(e) {
|
|
3863
|
+
for (var r3 = 1; r3 < arguments.length; r3++) {
|
|
3864
|
+
var t2 = null != arguments[r3] ? arguments[r3] : {};
|
|
3865
|
+
r3 % 2 ? ownKeys(Object(t2), true).forEach(function(r4) {
|
|
3866
|
+
_defineProperty(e, r4, t2[r4]);
|
|
3867
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r4) {
|
|
3868
|
+
Object.defineProperty(e, r4, Object.getOwnPropertyDescriptor(t2, r4));
|
|
3869
|
+
});
|
|
3870
|
+
}
|
|
3871
|
+
return e;
|
|
3872
|
+
}
|
|
3873
|
+
function _toPrimitive(t2, r3) {
|
|
3874
|
+
if ("object" != typeof t2 || !t2) return t2;
|
|
3875
|
+
var e = t2[Symbol.toPrimitive];
|
|
3876
|
+
if (void 0 !== e) {
|
|
3877
|
+
var i = e.call(t2, r3);
|
|
3878
|
+
if ("object" != typeof i) return i;
|
|
3879
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3880
|
+
}
|
|
3881
|
+
return ("string" === r3 ? String : Number)(t2);
|
|
3882
|
+
}
|
|
3883
|
+
function _toPropertyKey(t2) {
|
|
3884
|
+
var i = _toPrimitive(t2, "string");
|
|
3885
|
+
return "symbol" == typeof i ? i : i + "";
|
|
3886
|
+
}
|
|
3887
|
+
var noop = () => {
|
|
3888
|
+
};
|
|
3889
|
+
var _WINDOW = {};
|
|
3890
|
+
var _DOCUMENT = {};
|
|
3891
|
+
var _MUTATION_OBSERVER = null;
|
|
3892
|
+
var _PERFORMANCE = {
|
|
3893
|
+
mark: noop,
|
|
3894
|
+
measure: noop
|
|
3895
|
+
};
|
|
3896
|
+
try {
|
|
3897
|
+
if (typeof window !== "undefined") _WINDOW = window;
|
|
3898
|
+
if (typeof document !== "undefined") _DOCUMENT = document;
|
|
3899
|
+
if (typeof MutationObserver !== "undefined") _MUTATION_OBSERVER = MutationObserver;
|
|
3900
|
+
if (typeof performance !== "undefined") _PERFORMANCE = performance;
|
|
3901
|
+
} catch (e) {
|
|
3902
|
+
}
|
|
3903
|
+
var {
|
|
3904
|
+
userAgent = ""
|
|
3905
|
+
} = _WINDOW.navigator || {};
|
|
3906
|
+
var WINDOW = _WINDOW;
|
|
3907
|
+
var DOCUMENT = _DOCUMENT;
|
|
3908
|
+
var MUTATION_OBSERVER = _MUTATION_OBSERVER;
|
|
3909
|
+
var PERFORMANCE = _PERFORMANCE;
|
|
3910
|
+
!!WINDOW.document;
|
|
3911
|
+
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === "function" && typeof DOCUMENT.createElement === "function";
|
|
3912
|
+
var IS_IE = ~userAgent.indexOf("MSIE") || ~userAgent.indexOf("Trident/");
|
|
3913
|
+
var p = /fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/;
|
|
3914
|
+
var g = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;
|
|
3915
|
+
var S = {
|
|
3916
|
+
classic: {
|
|
3917
|
+
fa: "solid",
|
|
3918
|
+
fas: "solid",
|
|
3919
|
+
"fa-solid": "solid",
|
|
3920
|
+
far: "regular",
|
|
3921
|
+
"fa-regular": "regular",
|
|
3922
|
+
fal: "light",
|
|
3923
|
+
"fa-light": "light",
|
|
3924
|
+
fat: "thin",
|
|
3925
|
+
"fa-thin": "thin",
|
|
3926
|
+
fab: "brands",
|
|
3927
|
+
"fa-brands": "brands"
|
|
3928
|
+
},
|
|
3929
|
+
duotone: {
|
|
3930
|
+
fa: "solid",
|
|
3931
|
+
fad: "solid",
|
|
3932
|
+
"fa-solid": "solid",
|
|
3933
|
+
"fa-duotone": "solid",
|
|
3934
|
+
fadr: "regular",
|
|
3935
|
+
"fa-regular": "regular",
|
|
3936
|
+
fadl: "light",
|
|
3937
|
+
"fa-light": "light",
|
|
3938
|
+
fadt: "thin",
|
|
3939
|
+
"fa-thin": "thin"
|
|
3940
|
+
},
|
|
3941
|
+
sharp: {
|
|
3942
|
+
fa: "solid",
|
|
3943
|
+
fass: "solid",
|
|
3944
|
+
"fa-solid": "solid",
|
|
3945
|
+
fasr: "regular",
|
|
3946
|
+
"fa-regular": "regular",
|
|
3947
|
+
fasl: "light",
|
|
3948
|
+
"fa-light": "light",
|
|
3949
|
+
fast: "thin",
|
|
3950
|
+
"fa-thin": "thin"
|
|
3951
|
+
},
|
|
3952
|
+
"sharp-duotone": {
|
|
3953
|
+
fa: "solid",
|
|
3954
|
+
fasds: "solid",
|
|
3955
|
+
"fa-solid": "solid",
|
|
3956
|
+
fasdr: "regular",
|
|
3957
|
+
"fa-regular": "regular",
|
|
3958
|
+
fasdl: "light",
|
|
3959
|
+
"fa-light": "light",
|
|
3960
|
+
fasdt: "thin",
|
|
3961
|
+
"fa-thin": "thin"
|
|
3962
|
+
}
|
|
3963
|
+
};
|
|
3964
|
+
var A = {
|
|
3965
|
+
GROUP: "duotone-group",
|
|
3966
|
+
PRIMARY: "primary",
|
|
3967
|
+
SECONDARY: "secondary"
|
|
3968
|
+
};
|
|
3969
|
+
var P = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone"];
|
|
3970
|
+
var s = "classic";
|
|
3971
|
+
var t = "duotone";
|
|
3972
|
+
var r2 = "sharp";
|
|
3973
|
+
var o = "sharp-duotone";
|
|
3974
|
+
var L = [s, t, r2, o];
|
|
3975
|
+
var G = {
|
|
3976
|
+
classic: {
|
|
3977
|
+
900: "fas",
|
|
3978
|
+
400: "far",
|
|
3979
|
+
normal: "far",
|
|
3980
|
+
300: "fal",
|
|
3981
|
+
100: "fat"
|
|
3982
|
+
},
|
|
3983
|
+
duotone: {
|
|
3984
|
+
900: "fad",
|
|
3985
|
+
400: "fadr",
|
|
3986
|
+
300: "fadl",
|
|
3987
|
+
100: "fadt"
|
|
3988
|
+
},
|
|
3989
|
+
sharp: {
|
|
3990
|
+
900: "fass",
|
|
3991
|
+
400: "fasr",
|
|
3992
|
+
300: "fasl",
|
|
3993
|
+
100: "fast"
|
|
3994
|
+
},
|
|
3995
|
+
"sharp-duotone": {
|
|
3996
|
+
900: "fasds",
|
|
3997
|
+
400: "fasdr",
|
|
3998
|
+
300: "fasdl",
|
|
3999
|
+
100: "fasdt"
|
|
4000
|
+
}
|
|
4001
|
+
};
|
|
4002
|
+
var lt = {
|
|
4003
|
+
"Font Awesome 6 Free": {
|
|
4004
|
+
900: "fas",
|
|
4005
|
+
400: "far"
|
|
4006
|
+
},
|
|
4007
|
+
"Font Awesome 6 Pro": {
|
|
4008
|
+
900: "fas",
|
|
4009
|
+
400: "far",
|
|
4010
|
+
normal: "far",
|
|
4011
|
+
300: "fal",
|
|
4012
|
+
100: "fat"
|
|
4013
|
+
},
|
|
4014
|
+
"Font Awesome 6 Brands": {
|
|
4015
|
+
400: "fab",
|
|
4016
|
+
normal: "fab"
|
|
4017
|
+
},
|
|
4018
|
+
"Font Awesome 6 Duotone": {
|
|
4019
|
+
900: "fad",
|
|
4020
|
+
400: "fadr",
|
|
4021
|
+
normal: "fadr",
|
|
4022
|
+
300: "fadl",
|
|
4023
|
+
100: "fadt"
|
|
4024
|
+
},
|
|
4025
|
+
"Font Awesome 6 Sharp": {
|
|
4026
|
+
900: "fass",
|
|
4027
|
+
400: "fasr",
|
|
4028
|
+
normal: "fasr",
|
|
4029
|
+
300: "fasl",
|
|
4030
|
+
100: "fast"
|
|
4031
|
+
},
|
|
4032
|
+
"Font Awesome 6 Sharp Duotone": {
|
|
4033
|
+
900: "fasds",
|
|
4034
|
+
400: "fasdr",
|
|
4035
|
+
normal: "fasdr",
|
|
4036
|
+
300: "fasdl",
|
|
4037
|
+
100: "fasdt"
|
|
4038
|
+
}
|
|
4039
|
+
};
|
|
4040
|
+
var pt = /* @__PURE__ */ new Map([["classic", {
|
|
4041
|
+
defaultShortPrefixId: "fas",
|
|
4042
|
+
defaultStyleId: "solid",
|
|
4043
|
+
styleIds: ["solid", "regular", "light", "thin", "brands"],
|
|
4044
|
+
futureStyleIds: [],
|
|
4045
|
+
defaultFontWeight: 900
|
|
4046
|
+
}], ["sharp", {
|
|
4047
|
+
defaultShortPrefixId: "fass",
|
|
4048
|
+
defaultStyleId: "solid",
|
|
4049
|
+
styleIds: ["solid", "regular", "light", "thin"],
|
|
4050
|
+
futureStyleIds: [],
|
|
4051
|
+
defaultFontWeight: 900
|
|
4052
|
+
}], ["duotone", {
|
|
4053
|
+
defaultShortPrefixId: "fad",
|
|
4054
|
+
defaultStyleId: "solid",
|
|
4055
|
+
styleIds: ["solid", "regular", "light", "thin"],
|
|
4056
|
+
futureStyleIds: [],
|
|
4057
|
+
defaultFontWeight: 900
|
|
4058
|
+
}], ["sharp-duotone", {
|
|
4059
|
+
defaultShortPrefixId: "fasds",
|
|
4060
|
+
defaultStyleId: "solid",
|
|
4061
|
+
styleIds: ["solid", "regular", "light", "thin"],
|
|
4062
|
+
futureStyleIds: [],
|
|
4063
|
+
defaultFontWeight: 900
|
|
4064
|
+
}]]);
|
|
4065
|
+
var xt = {
|
|
4066
|
+
classic: {
|
|
4067
|
+
solid: "fas",
|
|
4068
|
+
regular: "far",
|
|
4069
|
+
light: "fal",
|
|
4070
|
+
thin: "fat",
|
|
4071
|
+
brands: "fab"
|
|
4072
|
+
},
|
|
4073
|
+
duotone: {
|
|
4074
|
+
solid: "fad",
|
|
4075
|
+
regular: "fadr",
|
|
4076
|
+
light: "fadl",
|
|
4077
|
+
thin: "fadt"
|
|
4078
|
+
},
|
|
4079
|
+
sharp: {
|
|
4080
|
+
solid: "fass",
|
|
4081
|
+
regular: "fasr",
|
|
4082
|
+
light: "fasl",
|
|
4083
|
+
thin: "fast"
|
|
4084
|
+
},
|
|
4085
|
+
"sharp-duotone": {
|
|
4086
|
+
solid: "fasds",
|
|
4087
|
+
regular: "fasdr",
|
|
4088
|
+
light: "fasdl",
|
|
4089
|
+
thin: "fasdt"
|
|
4090
|
+
}
|
|
4091
|
+
};
|
|
4092
|
+
var Ft = ["fak", "fa-kit", "fakd", "fa-kit-duotone"];
|
|
4093
|
+
var St = {
|
|
4094
|
+
kit: {
|
|
4095
|
+
fak: "kit",
|
|
4096
|
+
"fa-kit": "kit"
|
|
4097
|
+
},
|
|
4098
|
+
"kit-duotone": {
|
|
4099
|
+
fakd: "kit-duotone",
|
|
4100
|
+
"fa-kit-duotone": "kit-duotone"
|
|
4101
|
+
}
|
|
4102
|
+
};
|
|
4103
|
+
var At = ["kit"];
|
|
4104
|
+
var Ct = {
|
|
4105
|
+
kit: {
|
|
4106
|
+
"fa-kit": "fak"
|
|
4107
|
+
}};
|
|
4108
|
+
var Lt = ["fak", "fakd"];
|
|
4109
|
+
var Wt = {
|
|
4110
|
+
kit: {
|
|
4111
|
+
fak: "fa-kit"
|
|
4112
|
+
}};
|
|
4113
|
+
var Et = {
|
|
4114
|
+
kit: {
|
|
4115
|
+
kit: "fak"
|
|
4116
|
+
},
|
|
4117
|
+
"kit-duotone": {
|
|
4118
|
+
"kit-duotone": "fakd"
|
|
4119
|
+
}
|
|
4120
|
+
};
|
|
4121
|
+
var t$1 = {
|
|
4122
|
+
GROUP: "duotone-group",
|
|
4123
|
+
SWAP_OPACITY: "swap-opacity",
|
|
4124
|
+
PRIMARY: "primary",
|
|
4125
|
+
SECONDARY: "secondary"
|
|
4126
|
+
};
|
|
4127
|
+
var r$1 = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone"];
|
|
4128
|
+
var bt$1 = ["fak", "fa-kit", "fakd", "fa-kit-duotone"];
|
|
4129
|
+
var Yt = {
|
|
4130
|
+
"Font Awesome Kit": {
|
|
4131
|
+
400: "fak",
|
|
4132
|
+
normal: "fak"
|
|
4133
|
+
},
|
|
4134
|
+
"Font Awesome Kit Duotone": {
|
|
4135
|
+
400: "fakd",
|
|
4136
|
+
normal: "fakd"
|
|
4137
|
+
}
|
|
4138
|
+
};
|
|
4139
|
+
var ua = {
|
|
4140
|
+
classic: {
|
|
4141
|
+
"fa-brands": "fab",
|
|
4142
|
+
"fa-duotone": "fad",
|
|
4143
|
+
"fa-light": "fal",
|
|
4144
|
+
"fa-regular": "far",
|
|
4145
|
+
"fa-solid": "fas",
|
|
4146
|
+
"fa-thin": "fat"
|
|
4147
|
+
},
|
|
4148
|
+
duotone: {
|
|
4149
|
+
"fa-regular": "fadr",
|
|
4150
|
+
"fa-light": "fadl",
|
|
4151
|
+
"fa-thin": "fadt"
|
|
4152
|
+
},
|
|
4153
|
+
sharp: {
|
|
4154
|
+
"fa-solid": "fass",
|
|
4155
|
+
"fa-regular": "fasr",
|
|
4156
|
+
"fa-light": "fasl",
|
|
4157
|
+
"fa-thin": "fast"
|
|
4158
|
+
},
|
|
4159
|
+
"sharp-duotone": {
|
|
4160
|
+
"fa-solid": "fasds",
|
|
4161
|
+
"fa-regular": "fasdr",
|
|
4162
|
+
"fa-light": "fasdl",
|
|
4163
|
+
"fa-thin": "fasdt"
|
|
4164
|
+
}
|
|
4165
|
+
};
|
|
4166
|
+
var I$1 = {
|
|
4167
|
+
classic: ["fas", "far", "fal", "fat", "fad"],
|
|
4168
|
+
duotone: ["fadr", "fadl", "fadt"],
|
|
4169
|
+
sharp: ["fass", "fasr", "fasl", "fast"],
|
|
4170
|
+
"sharp-duotone": ["fasds", "fasdr", "fasdl", "fasdt"]
|
|
3257
4171
|
};
|
|
4172
|
+
var ga = {
|
|
4173
|
+
classic: {
|
|
4174
|
+
fab: "fa-brands",
|
|
4175
|
+
fad: "fa-duotone",
|
|
4176
|
+
fal: "fa-light",
|
|
4177
|
+
far: "fa-regular",
|
|
4178
|
+
fas: "fa-solid",
|
|
4179
|
+
fat: "fa-thin"
|
|
4180
|
+
},
|
|
4181
|
+
duotone: {
|
|
4182
|
+
fadr: "fa-regular",
|
|
4183
|
+
fadl: "fa-light",
|
|
4184
|
+
fadt: "fa-thin"
|
|
4185
|
+
},
|
|
4186
|
+
sharp: {
|
|
4187
|
+
fass: "fa-solid",
|
|
4188
|
+
fasr: "fa-regular",
|
|
4189
|
+
fasl: "fa-light",
|
|
4190
|
+
fast: "fa-thin"
|
|
4191
|
+
},
|
|
4192
|
+
"sharp-duotone": {
|
|
4193
|
+
fasds: "fa-solid",
|
|
4194
|
+
fasdr: "fa-regular",
|
|
4195
|
+
fasdl: "fa-light",
|
|
4196
|
+
fasdt: "fa-thin"
|
|
4197
|
+
}
|
|
4198
|
+
};
|
|
4199
|
+
var x = ["fa-solid", "fa-regular", "fa-light", "fa-thin", "fa-duotone", "fa-brands"];
|
|
4200
|
+
var Ia = ["fa", "fas", "far", "fal", "fat", "fad", "fadr", "fadl", "fadt", "fab", "fass", "fasr", "fasl", "fast", "fasds", "fasdr", "fasdl", "fasdt", ...r$1, ...x];
|
|
4201
|
+
var m$1 = ["solid", "regular", "light", "thin", "duotone", "brands"];
|
|
4202
|
+
var c$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
4203
|
+
var F$1 = c$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
|
|
4204
|
+
var ma = [...Object.keys(I$1), ...m$1, "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", t$1.GROUP, t$1.SWAP_OPACITY, t$1.PRIMARY, t$1.SECONDARY].concat(c$1.map((a) => "".concat(a, "x"))).concat(F$1.map((a) => "w-".concat(a)));
|
|
4205
|
+
var wa = {
|
|
4206
|
+
"Font Awesome 5 Free": {
|
|
4207
|
+
900: "fas",
|
|
4208
|
+
400: "far"
|
|
4209
|
+
},
|
|
4210
|
+
"Font Awesome 5 Pro": {
|
|
4211
|
+
900: "fas",
|
|
4212
|
+
400: "far",
|
|
4213
|
+
normal: "far",
|
|
4214
|
+
300: "fal"
|
|
4215
|
+
},
|
|
4216
|
+
"Font Awesome 5 Brands": {
|
|
4217
|
+
400: "fab",
|
|
4218
|
+
normal: "fab"
|
|
4219
|
+
},
|
|
4220
|
+
"Font Awesome 5 Duotone": {
|
|
4221
|
+
900: "fad"
|
|
4222
|
+
}
|
|
4223
|
+
};
|
|
4224
|
+
var NAMESPACE_IDENTIFIER = "___FONT_AWESOME___";
|
|
4225
|
+
var UNITS_IN_GRID = 16;
|
|
4226
|
+
var DEFAULT_CSS_PREFIX = "fa";
|
|
4227
|
+
var DEFAULT_REPLACEMENT_CLASS = "svg-inline--fa";
|
|
4228
|
+
var DATA_FA_I2SVG = "data-fa-i2svg";
|
|
4229
|
+
var DATA_FA_PSEUDO_ELEMENT = "data-fa-pseudo-element";
|
|
4230
|
+
var DATA_FA_PSEUDO_ELEMENT_PENDING = "data-fa-pseudo-element-pending";
|
|
4231
|
+
var DATA_PREFIX = "data-prefix";
|
|
4232
|
+
var DATA_ICON = "data-icon";
|
|
4233
|
+
var HTML_CLASS_I2SVG_BASE_CLASS = "fontawesome-i2svg";
|
|
4234
|
+
var MUTATION_APPROACH_ASYNC = "async";
|
|
4235
|
+
var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ["HTML", "HEAD", "STYLE", "SCRIPT"];
|
|
4236
|
+
var PRODUCTION = (() => {
|
|
4237
|
+
try {
|
|
4238
|
+
return process.env.NODE_ENV === "production";
|
|
4239
|
+
} catch (e$$1) {
|
|
4240
|
+
return false;
|
|
4241
|
+
}
|
|
4242
|
+
})();
|
|
4243
|
+
function familyProxy(obj) {
|
|
4244
|
+
return new Proxy(obj, {
|
|
4245
|
+
get(target, prop) {
|
|
4246
|
+
return prop in target ? target[prop] : target[s];
|
|
4247
|
+
}
|
|
4248
|
+
});
|
|
4249
|
+
}
|
|
4250
|
+
var _PREFIX_TO_STYLE = _objectSpread2({}, S);
|
|
4251
|
+
_PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
4252
|
+
"fa-duotone": "duotone"
|
|
4253
|
+
}), S[s]), St["kit"]), St["kit-duotone"]);
|
|
4254
|
+
var PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE);
|
|
4255
|
+
var _STYLE_TO_PREFIX = _objectSpread2({}, xt);
|
|
4256
|
+
_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
4257
|
+
duotone: "fad"
|
|
4258
|
+
}), _STYLE_TO_PREFIX[s]), Et["kit"]), Et["kit-duotone"]);
|
|
4259
|
+
var STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX);
|
|
4260
|
+
var _PREFIX_TO_LONG_STYLE = _objectSpread2({}, ga);
|
|
4261
|
+
_PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt["kit"]);
|
|
4262
|
+
var PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE);
|
|
4263
|
+
var _LONG_STYLE_TO_PREFIX = _objectSpread2({}, ua);
|
|
4264
|
+
_LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct["kit"]);
|
|
4265
|
+
familyProxy(_LONG_STYLE_TO_PREFIX);
|
|
4266
|
+
var ICON_SELECTION_SYNTAX_PATTERN = p;
|
|
4267
|
+
var LAYERS_TEXT_CLASSNAME = "fa-layers-text";
|
|
4268
|
+
var FONT_FAMILY_PATTERN = g;
|
|
4269
|
+
var _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G);
|
|
4270
|
+
familyProxy(_FONT_WEIGHT_TO_PREFIX);
|
|
4271
|
+
var ATTRIBUTES_WATCHED_FOR_MUTATION = ["class", "data-prefix", "data-icon", "data-fa-transform", "data-fa-mask"];
|
|
4272
|
+
var DUOTONE_CLASSES = A;
|
|
4273
|
+
var RESERVED_CLASSES = [...At, ...ma];
|
|
4274
|
+
var initial = WINDOW.FontAwesomeConfig || {};
|
|
4275
|
+
function getAttrConfig(attr) {
|
|
4276
|
+
var element = DOCUMENT.querySelector("script[" + attr + "]");
|
|
4277
|
+
if (element) {
|
|
4278
|
+
return element.getAttribute(attr);
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
function coerce(val) {
|
|
4282
|
+
if (val === "") return true;
|
|
4283
|
+
if (val === "false") return false;
|
|
4284
|
+
if (val === "true") return true;
|
|
4285
|
+
return val;
|
|
4286
|
+
}
|
|
4287
|
+
if (DOCUMENT && typeof DOCUMENT.querySelector === "function") {
|
|
4288
|
+
const attrs = [["data-family-prefix", "familyPrefix"], ["data-css-prefix", "cssPrefix"], ["data-family-default", "familyDefault"], ["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"]];
|
|
4289
|
+
attrs.forEach((_ref) => {
|
|
4290
|
+
let [attr, key] = _ref;
|
|
4291
|
+
const val = coerce(getAttrConfig(attr));
|
|
4292
|
+
if (val !== void 0 && val !== null) {
|
|
4293
|
+
initial[key] = val;
|
|
4294
|
+
}
|
|
4295
|
+
});
|
|
4296
|
+
}
|
|
4297
|
+
var _default = {
|
|
4298
|
+
styleDefault: "solid",
|
|
4299
|
+
familyDefault: s,
|
|
4300
|
+
cssPrefix: DEFAULT_CSS_PREFIX,
|
|
4301
|
+
replacementClass: DEFAULT_REPLACEMENT_CLASS,
|
|
4302
|
+
autoReplaceSvg: true,
|
|
4303
|
+
autoAddCss: true,
|
|
4304
|
+
autoA11y: true,
|
|
4305
|
+
searchPseudoElements: false,
|
|
4306
|
+
observeMutations: true,
|
|
4307
|
+
mutateApproach: "async",
|
|
4308
|
+
keepOriginalSource: true,
|
|
4309
|
+
measurePerformance: false,
|
|
4310
|
+
showMissingIcons: true
|
|
4311
|
+
};
|
|
4312
|
+
if (initial.familyPrefix) {
|
|
4313
|
+
initial.cssPrefix = initial.familyPrefix;
|
|
4314
|
+
}
|
|
4315
|
+
var _config = _objectSpread2(_objectSpread2({}, _default), initial);
|
|
4316
|
+
if (!_config.autoReplaceSvg) _config.observeMutations = false;
|
|
4317
|
+
var config = {};
|
|
4318
|
+
Object.keys(_default).forEach((key) => {
|
|
4319
|
+
Object.defineProperty(config, key, {
|
|
4320
|
+
enumerable: true,
|
|
4321
|
+
set: function(val) {
|
|
4322
|
+
_config[key] = val;
|
|
4323
|
+
_onChangeCb.forEach((cb) => cb(config));
|
|
4324
|
+
},
|
|
4325
|
+
get: function() {
|
|
4326
|
+
return _config[key];
|
|
4327
|
+
}
|
|
4328
|
+
});
|
|
4329
|
+
});
|
|
4330
|
+
Object.defineProperty(config, "familyPrefix", {
|
|
4331
|
+
enumerable: true,
|
|
4332
|
+
set: function(val) {
|
|
4333
|
+
_config.cssPrefix = val;
|
|
4334
|
+
_onChangeCb.forEach((cb) => cb(config));
|
|
4335
|
+
},
|
|
4336
|
+
get: function() {
|
|
4337
|
+
return _config.cssPrefix;
|
|
4338
|
+
}
|
|
4339
|
+
});
|
|
4340
|
+
WINDOW.FontAwesomeConfig = config;
|
|
4341
|
+
var _onChangeCb = [];
|
|
4342
|
+
function onChange(cb) {
|
|
4343
|
+
_onChangeCb.push(cb);
|
|
4344
|
+
return () => {
|
|
4345
|
+
_onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
|
|
4346
|
+
};
|
|
4347
|
+
}
|
|
4348
|
+
var d$2 = UNITS_IN_GRID;
|
|
4349
|
+
var meaninglessTransform = {
|
|
4350
|
+
size: 16,
|
|
4351
|
+
x: 0,
|
|
4352
|
+
y: 0,
|
|
4353
|
+
rotate: 0,
|
|
4354
|
+
flipX: false,
|
|
4355
|
+
flipY: false
|
|
4356
|
+
};
|
|
4357
|
+
function insertCss(css2) {
|
|
4358
|
+
if (!css2 || !IS_DOM) {
|
|
4359
|
+
return;
|
|
4360
|
+
}
|
|
4361
|
+
const style = DOCUMENT.createElement("style");
|
|
4362
|
+
style.setAttribute("type", "text/css");
|
|
4363
|
+
style.innerHTML = css2;
|
|
4364
|
+
const headChildren = DOCUMENT.head.childNodes;
|
|
4365
|
+
let beforeChild = null;
|
|
4366
|
+
for (let i = headChildren.length - 1; i > -1; i--) {
|
|
4367
|
+
const child = headChildren[i];
|
|
4368
|
+
const tagName = (child.tagName || "").toUpperCase();
|
|
4369
|
+
if (["STYLE", "LINK"].indexOf(tagName) > -1) {
|
|
4370
|
+
beforeChild = child;
|
|
4371
|
+
}
|
|
4372
|
+
}
|
|
4373
|
+
DOCUMENT.head.insertBefore(style, beforeChild);
|
|
4374
|
+
return css2;
|
|
4375
|
+
}
|
|
4376
|
+
var idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
4377
|
+
function nextUniqueId() {
|
|
4378
|
+
let size = 12;
|
|
4379
|
+
let id = "";
|
|
4380
|
+
while (size-- > 0) {
|
|
4381
|
+
id += idPool[Math.random() * 62 | 0];
|
|
4382
|
+
}
|
|
4383
|
+
return id;
|
|
4384
|
+
}
|
|
4385
|
+
function toArray(obj) {
|
|
4386
|
+
const array = [];
|
|
4387
|
+
for (let i = (obj || []).length >>> 0; i--; ) {
|
|
4388
|
+
array[i] = obj[i];
|
|
4389
|
+
}
|
|
4390
|
+
return array;
|
|
4391
|
+
}
|
|
4392
|
+
function classArray(node) {
|
|
4393
|
+
if (node.classList) {
|
|
4394
|
+
return toArray(node.classList);
|
|
4395
|
+
} else {
|
|
4396
|
+
return (node.getAttribute("class") || "").split(" ").filter((i) => i);
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
function htmlEscape(str) {
|
|
4400
|
+
return "".concat(str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
4401
|
+
}
|
|
4402
|
+
function joinAttributes(attributes) {
|
|
4403
|
+
return Object.keys(attributes || {}).reduce((acc, attributeName) => {
|
|
4404
|
+
return acc + "".concat(attributeName, '="').concat(htmlEscape(attributes[attributeName]), '" ');
|
|
4405
|
+
}, "").trim();
|
|
4406
|
+
}
|
|
4407
|
+
function joinStyles(styles2) {
|
|
4408
|
+
return Object.keys(styles2 || {}).reduce((acc, styleName) => {
|
|
4409
|
+
return acc + "".concat(styleName, ": ").concat(styles2[styleName].trim(), ";");
|
|
4410
|
+
}, "");
|
|
4411
|
+
}
|
|
4412
|
+
function transformIsMeaningful(transform) {
|
|
4413
|
+
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
|
|
4414
|
+
}
|
|
4415
|
+
function transformForSvg(_ref) {
|
|
4416
|
+
let {
|
|
4417
|
+
transform,
|
|
4418
|
+
containerWidth,
|
|
4419
|
+
iconWidth
|
|
4420
|
+
} = _ref;
|
|
4421
|
+
const outer = {
|
|
4422
|
+
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
4423
|
+
};
|
|
4424
|
+
const innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
4425
|
+
const innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
4426
|
+
const innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
4427
|
+
const inner = {
|
|
4428
|
+
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
4429
|
+
};
|
|
4430
|
+
const path = {
|
|
4431
|
+
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
4432
|
+
};
|
|
4433
|
+
return {
|
|
4434
|
+
outer,
|
|
4435
|
+
inner,
|
|
4436
|
+
path
|
|
4437
|
+
};
|
|
4438
|
+
}
|
|
4439
|
+
function transformForCss(_ref2) {
|
|
4440
|
+
let {
|
|
4441
|
+
transform,
|
|
4442
|
+
width = UNITS_IN_GRID,
|
|
4443
|
+
height = UNITS_IN_GRID,
|
|
4444
|
+
startCentered = false
|
|
4445
|
+
} = _ref2;
|
|
4446
|
+
let val = "";
|
|
4447
|
+
if (startCentered && IS_IE) {
|
|
4448
|
+
val += "translate(".concat(transform.x / d$2 - width / 2, "em, ").concat(transform.y / d$2 - height / 2, "em) ");
|
|
4449
|
+
} else if (startCentered) {
|
|
4450
|
+
val += "translate(calc(-50% + ".concat(transform.x / d$2, "em), calc(-50% + ").concat(transform.y / d$2, "em)) ");
|
|
4451
|
+
} else {
|
|
4452
|
+
val += "translate(".concat(transform.x / d$2, "em, ").concat(transform.y / d$2, "em) ");
|
|
4453
|
+
}
|
|
4454
|
+
val += "scale(".concat(transform.size / d$2 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d$2 * (transform.flipY ? -1 : 1), ") ");
|
|
4455
|
+
val += "rotate(".concat(transform.rotate, "deg) ");
|
|
4456
|
+
return val;
|
|
4457
|
+
}
|
|
4458
|
+
var baseStyles = ':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone";\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 transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\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 transform: scale(var(--fa-counter-scale, 0.25));\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 transform: scale(var(--fa-layers-scale, 0.25));\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 transform: scale(var(--fa-layers-scale, 0.25));\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 transform: scale(var(--fa-layers-scale, 0.25));\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 transform: scale(var(--fa-layers-scale, 0.25));\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(-1 * var(--fa-li-width, 2em));\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 animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\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 animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\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 animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\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 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 transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\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-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\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}';
|
|
4459
|
+
function css() {
|
|
4460
|
+
const dcp = DEFAULT_CSS_PREFIX;
|
|
4461
|
+
const drc = DEFAULT_REPLACEMENT_CLASS;
|
|
4462
|
+
const fp = config.cssPrefix;
|
|
4463
|
+
const rc = config.replacementClass;
|
|
4464
|
+
let s2 = baseStyles;
|
|
4465
|
+
if (fp !== dcp || rc !== drc) {
|
|
4466
|
+
const dPatt = new RegExp("\\.".concat(dcp, "\\-"), "g");
|
|
4467
|
+
const customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), "g");
|
|
4468
|
+
const rPatt = new RegExp("\\.".concat(drc), "g");
|
|
4469
|
+
s2 = s2.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
|
|
4470
|
+
}
|
|
4471
|
+
return s2;
|
|
4472
|
+
}
|
|
4473
|
+
var _cssInserted = false;
|
|
4474
|
+
function ensureCss() {
|
|
4475
|
+
if (config.autoAddCss && !_cssInserted) {
|
|
4476
|
+
insertCss(css());
|
|
4477
|
+
_cssInserted = true;
|
|
4478
|
+
}
|
|
4479
|
+
}
|
|
4480
|
+
var InjectCSS = {
|
|
4481
|
+
mixout() {
|
|
4482
|
+
return {
|
|
4483
|
+
dom: {
|
|
4484
|
+
css,
|
|
4485
|
+
insertCss: ensureCss
|
|
4486
|
+
}
|
|
4487
|
+
};
|
|
4488
|
+
},
|
|
4489
|
+
hooks() {
|
|
4490
|
+
return {
|
|
4491
|
+
beforeDOMElementCreation() {
|
|
4492
|
+
ensureCss();
|
|
4493
|
+
},
|
|
4494
|
+
beforeI2svg() {
|
|
4495
|
+
ensureCss();
|
|
4496
|
+
}
|
|
4497
|
+
};
|
|
4498
|
+
}
|
|
4499
|
+
};
|
|
4500
|
+
var w = WINDOW || {};
|
|
4501
|
+
if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
|
|
4502
|
+
if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
|
|
4503
|
+
if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
|
|
4504
|
+
if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
|
|
4505
|
+
var namespace = w[NAMESPACE_IDENTIFIER];
|
|
4506
|
+
var functions = [];
|
|
4507
|
+
var listener = function() {
|
|
4508
|
+
DOCUMENT.removeEventListener("DOMContentLoaded", listener);
|
|
4509
|
+
loaded = 1;
|
|
4510
|
+
functions.map((fn) => fn());
|
|
4511
|
+
};
|
|
4512
|
+
var loaded = false;
|
|
4513
|
+
if (IS_DOM) {
|
|
4514
|
+
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
|
|
4515
|
+
if (!loaded) DOCUMENT.addEventListener("DOMContentLoaded", listener);
|
|
4516
|
+
}
|
|
4517
|
+
function domready(fn) {
|
|
4518
|
+
if (!IS_DOM) return;
|
|
4519
|
+
loaded ? setTimeout(fn, 0) : functions.push(fn);
|
|
4520
|
+
}
|
|
4521
|
+
function toHtml(abstractNodes) {
|
|
4522
|
+
const {
|
|
4523
|
+
tag,
|
|
4524
|
+
attributes = {},
|
|
4525
|
+
children = []
|
|
4526
|
+
} = abstractNodes;
|
|
4527
|
+
if (typeof abstractNodes === "string") {
|
|
4528
|
+
return htmlEscape(abstractNodes);
|
|
4529
|
+
} else {
|
|
4530
|
+
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(""), "</").concat(tag, ">");
|
|
4531
|
+
}
|
|
4532
|
+
}
|
|
4533
|
+
function iconFromMapping(mapping, prefix, iconName) {
|
|
4534
|
+
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
4535
|
+
return {
|
|
4536
|
+
prefix,
|
|
4537
|
+
iconName,
|
|
4538
|
+
icon: mapping[prefix][iconName]
|
|
4539
|
+
};
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4542
|
+
var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
4543
|
+
var keys = Object.keys(subject), length = keys.length, iterator = fn, i, key, result;
|
|
4544
|
+
if (initialValue === void 0) {
|
|
4545
|
+
i = 1;
|
|
4546
|
+
result = subject[keys[0]];
|
|
4547
|
+
} else {
|
|
4548
|
+
i = 0;
|
|
4549
|
+
result = initialValue;
|
|
4550
|
+
}
|
|
4551
|
+
for (; i < length; i++) {
|
|
4552
|
+
key = keys[i];
|
|
4553
|
+
result = iterator(result, subject[key], key, subject);
|
|
4554
|
+
}
|
|
4555
|
+
return result;
|
|
4556
|
+
};
|
|
4557
|
+
function ucs2decode(string) {
|
|
4558
|
+
const output = [];
|
|
4559
|
+
let counter2 = 0;
|
|
4560
|
+
const length = string.length;
|
|
4561
|
+
while (counter2 < length) {
|
|
4562
|
+
const value = string.charCodeAt(counter2++);
|
|
4563
|
+
if (value >= 55296 && value <= 56319 && counter2 < length) {
|
|
4564
|
+
const extra = string.charCodeAt(counter2++);
|
|
4565
|
+
if ((extra & 64512) == 56320) {
|
|
4566
|
+
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
4567
|
+
} else {
|
|
4568
|
+
output.push(value);
|
|
4569
|
+
counter2--;
|
|
4570
|
+
}
|
|
4571
|
+
} else {
|
|
4572
|
+
output.push(value);
|
|
4573
|
+
}
|
|
4574
|
+
}
|
|
4575
|
+
return output;
|
|
4576
|
+
}
|
|
4577
|
+
function toHex(unicode) {
|
|
4578
|
+
const decoded = ucs2decode(unicode);
|
|
4579
|
+
return decoded.length === 1 ? decoded[0].toString(16) : null;
|
|
4580
|
+
}
|
|
4581
|
+
function codePointAt(string, index) {
|
|
4582
|
+
const size = string.length;
|
|
4583
|
+
let first = string.charCodeAt(index);
|
|
4584
|
+
let second;
|
|
4585
|
+
if (first >= 55296 && first <= 56319 && size > index + 1) {
|
|
4586
|
+
second = string.charCodeAt(index + 1);
|
|
4587
|
+
if (second >= 56320 && second <= 57343) {
|
|
4588
|
+
return (first - 55296) * 1024 + second - 56320 + 65536;
|
|
4589
|
+
}
|
|
4590
|
+
}
|
|
4591
|
+
return first;
|
|
4592
|
+
}
|
|
4593
|
+
function normalizeIcons(icons) {
|
|
4594
|
+
return Object.keys(icons).reduce((acc, iconName) => {
|
|
4595
|
+
const icon2 = icons[iconName];
|
|
4596
|
+
const expanded = !!icon2.icon;
|
|
4597
|
+
if (expanded) {
|
|
4598
|
+
acc[icon2.iconName] = icon2.icon;
|
|
4599
|
+
} else {
|
|
4600
|
+
acc[iconName] = icon2;
|
|
4601
|
+
}
|
|
4602
|
+
return acc;
|
|
4603
|
+
}, {});
|
|
4604
|
+
}
|
|
4605
|
+
function defineIcons(prefix, icons) {
|
|
4606
|
+
let params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
4607
|
+
const {
|
|
4608
|
+
skipHooks = false
|
|
4609
|
+
} = params;
|
|
4610
|
+
const normalized = normalizeIcons(icons);
|
|
4611
|
+
if (typeof namespace.hooks.addPack === "function" && !skipHooks) {
|
|
4612
|
+
namespace.hooks.addPack(prefix, normalizeIcons(icons));
|
|
4613
|
+
} else {
|
|
4614
|
+
namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);
|
|
4615
|
+
}
|
|
4616
|
+
if (prefix === "fas") {
|
|
4617
|
+
defineIcons("fa", icons);
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
var {
|
|
4621
|
+
styles,
|
|
4622
|
+
shims
|
|
4623
|
+
} = namespace;
|
|
4624
|
+
var FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE);
|
|
4625
|
+
var PREFIXES_FOR_FAMILY = FAMILY_NAMES.reduce((acc, familyId) => {
|
|
4626
|
+
acc[familyId] = Object.keys(PREFIX_TO_LONG_STYLE[familyId]);
|
|
4627
|
+
return acc;
|
|
4628
|
+
}, {});
|
|
4629
|
+
var _defaultUsablePrefix = null;
|
|
4630
|
+
var _byUnicode = {};
|
|
4631
|
+
var _byLigature = {};
|
|
4632
|
+
var _byOldName = {};
|
|
4633
|
+
var _byOldUnicode = {};
|
|
4634
|
+
var _byAlias = {};
|
|
4635
|
+
function isReserved(name) {
|
|
4636
|
+
return ~RESERVED_CLASSES.indexOf(name);
|
|
4637
|
+
}
|
|
4638
|
+
function getIconName(cssPrefix, cls) {
|
|
4639
|
+
const parts = cls.split("-");
|
|
4640
|
+
const prefix = parts[0];
|
|
4641
|
+
const iconName = parts.slice(1).join("-");
|
|
4642
|
+
if (prefix === cssPrefix && iconName !== "" && !isReserved(iconName)) {
|
|
4643
|
+
return iconName;
|
|
4644
|
+
} else {
|
|
4645
|
+
return null;
|
|
4646
|
+
}
|
|
4647
|
+
}
|
|
4648
|
+
var build = () => {
|
|
4649
|
+
const lookup = (reducer) => {
|
|
4650
|
+
return reduce(styles, (o$$1, style, prefix) => {
|
|
4651
|
+
o$$1[prefix] = reduce(style, reducer, {});
|
|
4652
|
+
return o$$1;
|
|
4653
|
+
}, {});
|
|
4654
|
+
};
|
|
4655
|
+
_byUnicode = lookup((acc, icon2, iconName) => {
|
|
4656
|
+
if (icon2[3]) {
|
|
4657
|
+
acc[icon2[3]] = iconName;
|
|
4658
|
+
}
|
|
4659
|
+
if (icon2[2]) {
|
|
4660
|
+
const aliases = icon2[2].filter((a$$1) => {
|
|
4661
|
+
return typeof a$$1 === "number";
|
|
4662
|
+
});
|
|
4663
|
+
aliases.forEach((alias) => {
|
|
4664
|
+
acc[alias.toString(16)] = iconName;
|
|
4665
|
+
});
|
|
4666
|
+
}
|
|
4667
|
+
return acc;
|
|
4668
|
+
});
|
|
4669
|
+
_byLigature = lookup((acc, icon2, iconName) => {
|
|
4670
|
+
acc[iconName] = iconName;
|
|
4671
|
+
if (icon2[2]) {
|
|
4672
|
+
const aliases = icon2[2].filter((a$$1) => {
|
|
4673
|
+
return typeof a$$1 === "string";
|
|
4674
|
+
});
|
|
4675
|
+
aliases.forEach((alias) => {
|
|
4676
|
+
acc[alias] = iconName;
|
|
4677
|
+
});
|
|
4678
|
+
}
|
|
4679
|
+
return acc;
|
|
4680
|
+
});
|
|
4681
|
+
_byAlias = lookup((acc, icon2, iconName) => {
|
|
4682
|
+
const aliases = icon2[2];
|
|
4683
|
+
acc[iconName] = iconName;
|
|
4684
|
+
aliases.forEach((alias) => {
|
|
4685
|
+
acc[alias] = iconName;
|
|
4686
|
+
});
|
|
4687
|
+
return acc;
|
|
4688
|
+
});
|
|
4689
|
+
const hasRegular = "far" in styles || config.autoFetchSvg;
|
|
4690
|
+
const shimLookups = reduce(shims, (acc, shim) => {
|
|
4691
|
+
const maybeNameMaybeUnicode = shim[0];
|
|
4692
|
+
let prefix = shim[1];
|
|
4693
|
+
const iconName = shim[2];
|
|
4694
|
+
if (prefix === "far" && !hasRegular) {
|
|
4695
|
+
prefix = "fas";
|
|
4696
|
+
}
|
|
4697
|
+
if (typeof maybeNameMaybeUnicode === "string") {
|
|
4698
|
+
acc.names[maybeNameMaybeUnicode] = {
|
|
4699
|
+
prefix,
|
|
4700
|
+
iconName
|
|
4701
|
+
};
|
|
4702
|
+
}
|
|
4703
|
+
if (typeof maybeNameMaybeUnicode === "number") {
|
|
4704
|
+
acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
|
|
4705
|
+
prefix,
|
|
4706
|
+
iconName
|
|
4707
|
+
};
|
|
4708
|
+
}
|
|
4709
|
+
return acc;
|
|
4710
|
+
}, {
|
|
4711
|
+
names: {},
|
|
4712
|
+
unicodes: {}
|
|
4713
|
+
});
|
|
4714
|
+
_byOldName = shimLookups.names;
|
|
4715
|
+
_byOldUnicode = shimLookups.unicodes;
|
|
4716
|
+
_defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {
|
|
4717
|
+
family: config.familyDefault
|
|
4718
|
+
});
|
|
4719
|
+
};
|
|
4720
|
+
onChange((c$$1) => {
|
|
4721
|
+
_defaultUsablePrefix = getCanonicalPrefix(c$$1.styleDefault, {
|
|
4722
|
+
family: config.familyDefault
|
|
4723
|
+
});
|
|
4724
|
+
});
|
|
4725
|
+
build();
|
|
4726
|
+
function byUnicode(prefix, unicode) {
|
|
4727
|
+
return (_byUnicode[prefix] || {})[unicode];
|
|
4728
|
+
}
|
|
4729
|
+
function byLigature(prefix, ligature) {
|
|
4730
|
+
return (_byLigature[prefix] || {})[ligature];
|
|
4731
|
+
}
|
|
4732
|
+
function byAlias(prefix, alias) {
|
|
4733
|
+
return (_byAlias[prefix] || {})[alias];
|
|
4734
|
+
}
|
|
4735
|
+
function byOldName(name) {
|
|
4736
|
+
return _byOldName[name] || {
|
|
4737
|
+
prefix: null,
|
|
4738
|
+
iconName: null
|
|
4739
|
+
};
|
|
4740
|
+
}
|
|
4741
|
+
function byOldUnicode(unicode) {
|
|
4742
|
+
const oldUnicode = _byOldUnicode[unicode];
|
|
4743
|
+
const newUnicode = byUnicode("fas", unicode);
|
|
4744
|
+
return oldUnicode || (newUnicode ? {
|
|
4745
|
+
prefix: "fas",
|
|
4746
|
+
iconName: newUnicode
|
|
4747
|
+
} : null) || {
|
|
4748
|
+
prefix: null,
|
|
4749
|
+
iconName: null
|
|
4750
|
+
};
|
|
4751
|
+
}
|
|
4752
|
+
function getDefaultUsablePrefix() {
|
|
4753
|
+
return _defaultUsablePrefix;
|
|
4754
|
+
}
|
|
4755
|
+
var emptyCanonicalIcon = () => {
|
|
4756
|
+
return {
|
|
4757
|
+
prefix: null,
|
|
4758
|
+
iconName: null,
|
|
4759
|
+
rest: []
|
|
4760
|
+
};
|
|
4761
|
+
};
|
|
4762
|
+
function getFamilyId(values) {
|
|
4763
|
+
let family = s;
|
|
4764
|
+
const famProps = FAMILY_NAMES.reduce((acc, familyId) => {
|
|
4765
|
+
acc[familyId] = "".concat(config.cssPrefix, "-").concat(familyId);
|
|
4766
|
+
return acc;
|
|
4767
|
+
}, {});
|
|
4768
|
+
L.forEach((familyId) => {
|
|
4769
|
+
if (values.includes(famProps[familyId]) || values.some((v$$1) => PREFIXES_FOR_FAMILY[familyId].includes(v$$1))) {
|
|
4770
|
+
family = familyId;
|
|
4771
|
+
}
|
|
4772
|
+
});
|
|
4773
|
+
return family;
|
|
4774
|
+
}
|
|
4775
|
+
function getCanonicalPrefix(styleOrPrefix) {
|
|
4776
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4777
|
+
const {
|
|
4778
|
+
family = s
|
|
4779
|
+
} = params;
|
|
4780
|
+
const style = PREFIX_TO_STYLE[family][styleOrPrefix];
|
|
4781
|
+
if (family === t && !styleOrPrefix) {
|
|
4782
|
+
return "fad";
|
|
4783
|
+
}
|
|
4784
|
+
const prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];
|
|
4785
|
+
const defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
|
|
4786
|
+
const result = prefix || defined || null;
|
|
4787
|
+
return result;
|
|
4788
|
+
}
|
|
4789
|
+
function moveNonFaClassesToRest(classNames) {
|
|
4790
|
+
let rest = [];
|
|
4791
|
+
let iconName = null;
|
|
4792
|
+
classNames.forEach((cls) => {
|
|
4793
|
+
const result = getIconName(config.cssPrefix, cls);
|
|
4794
|
+
if (result) {
|
|
4795
|
+
iconName = result;
|
|
4796
|
+
} else if (cls) {
|
|
4797
|
+
rest.push(cls);
|
|
4798
|
+
}
|
|
4799
|
+
});
|
|
4800
|
+
return {
|
|
4801
|
+
iconName,
|
|
4802
|
+
rest
|
|
4803
|
+
};
|
|
4804
|
+
}
|
|
4805
|
+
function sortedUniqueValues(arr) {
|
|
4806
|
+
return arr.sort().filter((value, index, arr2) => {
|
|
4807
|
+
return arr2.indexOf(value) === index;
|
|
4808
|
+
});
|
|
4809
|
+
}
|
|
4810
|
+
function getCanonicalIcon(values) {
|
|
4811
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4812
|
+
const {
|
|
4813
|
+
skipLookups = false
|
|
4814
|
+
} = params;
|
|
4815
|
+
let givenPrefix = null;
|
|
4816
|
+
const faCombinedClasses = Ia.concat(bt$1);
|
|
4817
|
+
const faStyleOrFamilyClasses = sortedUniqueValues(values.filter((cls) => faCombinedClasses.includes(cls)));
|
|
4818
|
+
const nonStyleOrFamilyClasses = sortedUniqueValues(values.filter((cls) => !Ia.includes(cls)));
|
|
4819
|
+
const faStyles = faStyleOrFamilyClasses.filter((cls) => {
|
|
4820
|
+
givenPrefix = cls;
|
|
4821
|
+
return !P.includes(cls);
|
|
4822
|
+
});
|
|
4823
|
+
const [styleFromValues = null] = faStyles;
|
|
4824
|
+
const family = getFamilyId(faStyleOrFamilyClasses);
|
|
4825
|
+
const canonical = _objectSpread2(_objectSpread2({}, moveNonFaClassesToRest(nonStyleOrFamilyClasses)), {}, {
|
|
4826
|
+
prefix: getCanonicalPrefix(styleFromValues, {
|
|
4827
|
+
family
|
|
4828
|
+
})
|
|
4829
|
+
});
|
|
4830
|
+
return _objectSpread2(_objectSpread2(_objectSpread2({}, canonical), getDefaultCanonicalPrefix({
|
|
4831
|
+
values,
|
|
4832
|
+
family,
|
|
4833
|
+
styles,
|
|
4834
|
+
config,
|
|
4835
|
+
canonical,
|
|
4836
|
+
givenPrefix
|
|
4837
|
+
})), applyShimAndAlias(skipLookups, givenPrefix, canonical));
|
|
4838
|
+
}
|
|
4839
|
+
function applyShimAndAlias(skipLookups, givenPrefix, canonical) {
|
|
4840
|
+
let {
|
|
4841
|
+
prefix,
|
|
4842
|
+
iconName
|
|
4843
|
+
} = canonical;
|
|
4844
|
+
if (skipLookups || !prefix || !iconName) {
|
|
4845
|
+
return {
|
|
4846
|
+
prefix,
|
|
4847
|
+
iconName
|
|
4848
|
+
};
|
|
4849
|
+
}
|
|
4850
|
+
const shim = givenPrefix === "fa" ? byOldName(iconName) : {};
|
|
4851
|
+
const aliasIconName = byAlias(prefix, iconName);
|
|
4852
|
+
iconName = shim.iconName || aliasIconName || iconName;
|
|
4853
|
+
prefix = shim.prefix || prefix;
|
|
4854
|
+
if (prefix === "far" && !styles["far"] && styles["fas"] && !config.autoFetchSvg) {
|
|
4855
|
+
prefix = "fas";
|
|
4856
|
+
}
|
|
4857
|
+
return {
|
|
4858
|
+
prefix,
|
|
4859
|
+
iconName
|
|
4860
|
+
};
|
|
4861
|
+
}
|
|
4862
|
+
var newCanonicalFamilies = L.filter((familyId) => {
|
|
4863
|
+
return familyId !== s || familyId !== t;
|
|
4864
|
+
});
|
|
4865
|
+
var newCanonicalStyles = Object.keys(ga).filter((key) => key !== s).map((key) => Object.keys(ga[key])).flat();
|
|
4866
|
+
function getDefaultCanonicalPrefix(prefixOptions) {
|
|
4867
|
+
const {
|
|
4868
|
+
values,
|
|
4869
|
+
family,
|
|
4870
|
+
canonical,
|
|
4871
|
+
givenPrefix = "",
|
|
4872
|
+
styles: styles2 = {},
|
|
4873
|
+
config: config$$1 = {}
|
|
4874
|
+
} = prefixOptions;
|
|
4875
|
+
const isDuotoneFamily = family === t;
|
|
4876
|
+
const valuesHasDuotone = values.includes("fa-duotone") || values.includes("fad");
|
|
4877
|
+
const defaultFamilyIsDuotone = config$$1.familyDefault === "duotone";
|
|
4878
|
+
const canonicalPrefixIsDuotone = canonical.prefix === "fad" || canonical.prefix === "fa-duotone";
|
|
4879
|
+
if (!isDuotoneFamily && (valuesHasDuotone || defaultFamilyIsDuotone || canonicalPrefixIsDuotone)) {
|
|
4880
|
+
canonical.prefix = "fad";
|
|
4881
|
+
}
|
|
4882
|
+
if (values.includes("fa-brands") || values.includes("fab")) {
|
|
4883
|
+
canonical.prefix = "fab";
|
|
4884
|
+
}
|
|
4885
|
+
if (!canonical.prefix && newCanonicalFamilies.includes(family)) {
|
|
4886
|
+
const validPrefix = Object.keys(styles2).find((key) => newCanonicalStyles.includes(key));
|
|
4887
|
+
if (validPrefix || config$$1.autoFetchSvg) {
|
|
4888
|
+
const defaultPrefix = pt.get(family).defaultShortPrefixId;
|
|
4889
|
+
canonical.prefix = defaultPrefix;
|
|
4890
|
+
canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4893
|
+
if (canonical.prefix === "fa" || givenPrefix === "fa") {
|
|
4894
|
+
canonical.prefix = getDefaultUsablePrefix() || "fas";
|
|
4895
|
+
}
|
|
4896
|
+
return canonical;
|
|
4897
|
+
}
|
|
4898
|
+
var Library = class {
|
|
4899
|
+
constructor() {
|
|
4900
|
+
this.definitions = {};
|
|
4901
|
+
}
|
|
4902
|
+
add() {
|
|
4903
|
+
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4904
|
+
definitions[_key] = arguments[_key];
|
|
4905
|
+
}
|
|
4906
|
+
const additions = definitions.reduce(this._pullDefinitions, {});
|
|
4907
|
+
Object.keys(additions).forEach((key) => {
|
|
4908
|
+
this.definitions[key] = _objectSpread2(_objectSpread2({}, this.definitions[key] || {}), additions[key]);
|
|
4909
|
+
defineIcons(key, additions[key]);
|
|
4910
|
+
const longPrefix = PREFIX_TO_LONG_STYLE[s][key];
|
|
4911
|
+
if (longPrefix) defineIcons(longPrefix, additions[key]);
|
|
4912
|
+
build();
|
|
4913
|
+
});
|
|
4914
|
+
}
|
|
4915
|
+
reset() {
|
|
4916
|
+
this.definitions = {};
|
|
4917
|
+
}
|
|
4918
|
+
_pullDefinitions(additions, definition) {
|
|
4919
|
+
const normalized = definition.prefix && definition.iconName && definition.icon ? {
|
|
4920
|
+
0: definition
|
|
4921
|
+
} : definition;
|
|
4922
|
+
Object.keys(normalized).map((key) => {
|
|
4923
|
+
const {
|
|
4924
|
+
prefix,
|
|
4925
|
+
iconName,
|
|
4926
|
+
icon: icon2
|
|
4927
|
+
} = normalized[key];
|
|
4928
|
+
const aliases = icon2[2];
|
|
4929
|
+
if (!additions[prefix]) additions[prefix] = {};
|
|
4930
|
+
if (aliases.length > 0) {
|
|
4931
|
+
aliases.forEach((alias) => {
|
|
4932
|
+
if (typeof alias === "string") {
|
|
4933
|
+
additions[prefix][alias] = icon2;
|
|
4934
|
+
}
|
|
4935
|
+
});
|
|
4936
|
+
}
|
|
4937
|
+
additions[prefix][iconName] = icon2;
|
|
4938
|
+
});
|
|
4939
|
+
return additions;
|
|
4940
|
+
}
|
|
4941
|
+
};
|
|
4942
|
+
var _plugins = [];
|
|
4943
|
+
var _hooks = {};
|
|
4944
|
+
var providers = {};
|
|
4945
|
+
var defaultProviderKeys = Object.keys(providers);
|
|
4946
|
+
function registerPlugins(nextPlugins, _ref) {
|
|
4947
|
+
let {
|
|
4948
|
+
mixoutsTo: obj
|
|
4949
|
+
} = _ref;
|
|
4950
|
+
_plugins = nextPlugins;
|
|
4951
|
+
_hooks = {};
|
|
4952
|
+
Object.keys(providers).forEach((k) => {
|
|
4953
|
+
if (defaultProviderKeys.indexOf(k) === -1) {
|
|
4954
|
+
delete providers[k];
|
|
4955
|
+
}
|
|
4956
|
+
});
|
|
4957
|
+
_plugins.forEach((plugin) => {
|
|
4958
|
+
const mixout = plugin.mixout ? plugin.mixout() : {};
|
|
4959
|
+
Object.keys(mixout).forEach((tk) => {
|
|
4960
|
+
if (typeof mixout[tk] === "function") {
|
|
4961
|
+
obj[tk] = mixout[tk];
|
|
4962
|
+
}
|
|
4963
|
+
if (typeof mixout[tk] === "object") {
|
|
4964
|
+
Object.keys(mixout[tk]).forEach((sk) => {
|
|
4965
|
+
if (!obj[tk]) {
|
|
4966
|
+
obj[tk] = {};
|
|
4967
|
+
}
|
|
4968
|
+
obj[tk][sk] = mixout[tk][sk];
|
|
4969
|
+
});
|
|
4970
|
+
}
|
|
4971
|
+
});
|
|
4972
|
+
if (plugin.hooks) {
|
|
4973
|
+
const hooks = plugin.hooks();
|
|
4974
|
+
Object.keys(hooks).forEach((hook) => {
|
|
4975
|
+
if (!_hooks[hook]) {
|
|
4976
|
+
_hooks[hook] = [];
|
|
4977
|
+
}
|
|
4978
|
+
_hooks[hook].push(hooks[hook]);
|
|
4979
|
+
});
|
|
4980
|
+
}
|
|
4981
|
+
if (plugin.provides) {
|
|
4982
|
+
plugin.provides(providers);
|
|
4983
|
+
}
|
|
4984
|
+
});
|
|
4985
|
+
return obj;
|
|
4986
|
+
}
|
|
4987
|
+
function chainHooks(hook, accumulator) {
|
|
4988
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
4989
|
+
args[_key - 2] = arguments[_key];
|
|
4990
|
+
}
|
|
4991
|
+
const hookFns = _hooks[hook] || [];
|
|
4992
|
+
hookFns.forEach((hookFn) => {
|
|
4993
|
+
accumulator = hookFn.apply(null, [accumulator, ...args]);
|
|
4994
|
+
});
|
|
4995
|
+
return accumulator;
|
|
4996
|
+
}
|
|
4997
|
+
function callHooks(hook) {
|
|
4998
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
4999
|
+
args[_key2 - 1] = arguments[_key2];
|
|
5000
|
+
}
|
|
5001
|
+
const hookFns = _hooks[hook] || [];
|
|
5002
|
+
hookFns.forEach((hookFn) => {
|
|
5003
|
+
hookFn.apply(null, args);
|
|
5004
|
+
});
|
|
5005
|
+
return void 0;
|
|
5006
|
+
}
|
|
5007
|
+
function callProvided() {
|
|
5008
|
+
const hook = arguments[0];
|
|
5009
|
+
const args = Array.prototype.slice.call(arguments, 1);
|
|
5010
|
+
return providers[hook] ? providers[hook].apply(null, args) : void 0;
|
|
5011
|
+
}
|
|
5012
|
+
function findIconDefinition(iconLookup) {
|
|
5013
|
+
if (iconLookup.prefix === "fa") {
|
|
5014
|
+
iconLookup.prefix = "fas";
|
|
5015
|
+
}
|
|
5016
|
+
let {
|
|
5017
|
+
iconName
|
|
5018
|
+
} = iconLookup;
|
|
5019
|
+
const prefix = iconLookup.prefix || getDefaultUsablePrefix();
|
|
5020
|
+
if (!iconName) return;
|
|
5021
|
+
iconName = byAlias(prefix, iconName) || iconName;
|
|
5022
|
+
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
5023
|
+
}
|
|
5024
|
+
var library = new Library();
|
|
5025
|
+
var noAuto = () => {
|
|
5026
|
+
config.autoReplaceSvg = false;
|
|
5027
|
+
config.observeMutations = false;
|
|
5028
|
+
callHooks("noAuto");
|
|
5029
|
+
};
|
|
5030
|
+
var dom = {
|
|
5031
|
+
i2svg: function() {
|
|
5032
|
+
let params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5033
|
+
if (IS_DOM) {
|
|
5034
|
+
callHooks("beforeI2svg", params);
|
|
5035
|
+
callProvided("pseudoElements2svg", params);
|
|
5036
|
+
return callProvided("i2svg", params);
|
|
5037
|
+
} else {
|
|
5038
|
+
return Promise.reject(new Error("Operation requires a DOM of some kind."));
|
|
5039
|
+
}
|
|
5040
|
+
},
|
|
5041
|
+
watch: function() {
|
|
5042
|
+
let params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5043
|
+
const {
|
|
5044
|
+
autoReplaceSvgRoot
|
|
5045
|
+
} = params;
|
|
5046
|
+
if (config.autoReplaceSvg === false) {
|
|
5047
|
+
config.autoReplaceSvg = true;
|
|
5048
|
+
}
|
|
5049
|
+
config.observeMutations = true;
|
|
5050
|
+
domready(() => {
|
|
5051
|
+
autoReplace({
|
|
5052
|
+
autoReplaceSvgRoot
|
|
5053
|
+
});
|
|
5054
|
+
callHooks("watch", params);
|
|
5055
|
+
});
|
|
5056
|
+
}
|
|
5057
|
+
};
|
|
5058
|
+
var parse = {
|
|
5059
|
+
icon: (icon2) => {
|
|
5060
|
+
if (icon2 === null) {
|
|
5061
|
+
return null;
|
|
5062
|
+
}
|
|
5063
|
+
if (typeof icon2 === "object" && icon2.prefix && icon2.iconName) {
|
|
5064
|
+
return {
|
|
5065
|
+
prefix: icon2.prefix,
|
|
5066
|
+
iconName: byAlias(icon2.prefix, icon2.iconName) || icon2.iconName
|
|
5067
|
+
};
|
|
5068
|
+
}
|
|
5069
|
+
if (Array.isArray(icon2) && icon2.length === 2) {
|
|
5070
|
+
const iconName = icon2[1].indexOf("fa-") === 0 ? icon2[1].slice(3) : icon2[1];
|
|
5071
|
+
const prefix = getCanonicalPrefix(icon2[0]);
|
|
5072
|
+
return {
|
|
5073
|
+
prefix,
|
|
5074
|
+
iconName: byAlias(prefix, iconName) || iconName
|
|
5075
|
+
};
|
|
5076
|
+
}
|
|
5077
|
+
if (typeof icon2 === "string" && (icon2.indexOf("".concat(config.cssPrefix, "-")) > -1 || icon2.match(ICON_SELECTION_SYNTAX_PATTERN))) {
|
|
5078
|
+
const canonicalIcon = getCanonicalIcon(icon2.split(" "), {
|
|
5079
|
+
skipLookups: true
|
|
5080
|
+
});
|
|
5081
|
+
return {
|
|
5082
|
+
prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
|
|
5083
|
+
iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
|
|
5084
|
+
};
|
|
5085
|
+
}
|
|
5086
|
+
if (typeof icon2 === "string") {
|
|
5087
|
+
const prefix = getDefaultUsablePrefix();
|
|
5088
|
+
return {
|
|
5089
|
+
prefix,
|
|
5090
|
+
iconName: byAlias(prefix, icon2) || icon2
|
|
5091
|
+
};
|
|
5092
|
+
}
|
|
5093
|
+
}
|
|
5094
|
+
};
|
|
5095
|
+
var api = {
|
|
5096
|
+
noAuto,
|
|
5097
|
+
config,
|
|
5098
|
+
dom,
|
|
5099
|
+
parse,
|
|
5100
|
+
library,
|
|
5101
|
+
findIconDefinition,
|
|
5102
|
+
toHtml
|
|
5103
|
+
};
|
|
5104
|
+
var autoReplace = function() {
|
|
5105
|
+
let params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5106
|
+
const {
|
|
5107
|
+
autoReplaceSvgRoot = DOCUMENT
|
|
5108
|
+
} = params;
|
|
5109
|
+
if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({
|
|
5110
|
+
node: autoReplaceSvgRoot
|
|
5111
|
+
});
|
|
5112
|
+
};
|
|
5113
|
+
function domVariants(val, abstractCreator) {
|
|
5114
|
+
Object.defineProperty(val, "abstract", {
|
|
5115
|
+
get: abstractCreator
|
|
5116
|
+
});
|
|
5117
|
+
Object.defineProperty(val, "html", {
|
|
5118
|
+
get: function() {
|
|
5119
|
+
return val.abstract.map((a) => toHtml(a));
|
|
5120
|
+
}
|
|
5121
|
+
});
|
|
5122
|
+
Object.defineProperty(val, "node", {
|
|
5123
|
+
get: function() {
|
|
5124
|
+
if (!IS_DOM) return;
|
|
5125
|
+
const container = DOCUMENT.createElement("div");
|
|
5126
|
+
container.innerHTML = val.html;
|
|
5127
|
+
return container.children;
|
|
5128
|
+
}
|
|
5129
|
+
});
|
|
5130
|
+
return val;
|
|
5131
|
+
}
|
|
5132
|
+
function asIcon(_ref) {
|
|
5133
|
+
let {
|
|
5134
|
+
children,
|
|
5135
|
+
main,
|
|
5136
|
+
mask,
|
|
5137
|
+
attributes,
|
|
5138
|
+
styles: styles2,
|
|
5139
|
+
transform
|
|
5140
|
+
} = _ref;
|
|
5141
|
+
if (transformIsMeaningful(transform) && main.found && !mask.found) {
|
|
5142
|
+
const {
|
|
5143
|
+
width,
|
|
5144
|
+
height
|
|
5145
|
+
} = main;
|
|
5146
|
+
const offset = {
|
|
5147
|
+
x: width / height / 2,
|
|
5148
|
+
y: 0.5
|
|
5149
|
+
};
|
|
5150
|
+
attributes["style"] = joinStyles(_objectSpread2(_objectSpread2({}, styles2), {}, {
|
|
5151
|
+
"transform-origin": "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
|
|
5152
|
+
}));
|
|
5153
|
+
}
|
|
5154
|
+
return [{
|
|
5155
|
+
tag: "svg",
|
|
5156
|
+
attributes,
|
|
5157
|
+
children
|
|
5158
|
+
}];
|
|
5159
|
+
}
|
|
5160
|
+
function asSymbol(_ref) {
|
|
5161
|
+
let {
|
|
5162
|
+
prefix,
|
|
5163
|
+
iconName,
|
|
5164
|
+
children,
|
|
5165
|
+
attributes,
|
|
5166
|
+
symbol
|
|
5167
|
+
} = _ref;
|
|
5168
|
+
const id = symbol === true ? "".concat(prefix, "-").concat(config.cssPrefix, "-").concat(iconName) : symbol;
|
|
5169
|
+
return [{
|
|
5170
|
+
tag: "svg",
|
|
5171
|
+
attributes: {
|
|
5172
|
+
style: "display: none;"
|
|
5173
|
+
},
|
|
5174
|
+
children: [{
|
|
5175
|
+
tag: "symbol",
|
|
5176
|
+
attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {
|
|
5177
|
+
id
|
|
5178
|
+
}),
|
|
5179
|
+
children
|
|
5180
|
+
}]
|
|
5181
|
+
}];
|
|
5182
|
+
}
|
|
5183
|
+
function makeInlineSvgAbstract(params) {
|
|
5184
|
+
const {
|
|
5185
|
+
icons: {
|
|
5186
|
+
main,
|
|
5187
|
+
mask
|
|
5188
|
+
},
|
|
5189
|
+
prefix,
|
|
5190
|
+
iconName,
|
|
5191
|
+
transform,
|
|
5192
|
+
symbol,
|
|
5193
|
+
title,
|
|
5194
|
+
maskId,
|
|
5195
|
+
titleId,
|
|
5196
|
+
extra,
|
|
5197
|
+
watchable = false
|
|
5198
|
+
} = params;
|
|
5199
|
+
const {
|
|
5200
|
+
width,
|
|
5201
|
+
height
|
|
5202
|
+
} = mask.found ? mask : main;
|
|
5203
|
+
const isUploadedIcon = Lt.includes(prefix);
|
|
5204
|
+
const attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ""].filter((c$$1) => extra.classes.indexOf(c$$1) === -1).filter((c$$1) => c$$1 !== "" || !!c$$1).concat(extra.classes).join(" ");
|
|
5205
|
+
let content = {
|
|
5206
|
+
children: [],
|
|
5207
|
+
attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
|
|
5208
|
+
"data-prefix": prefix,
|
|
5209
|
+
"data-icon": iconName,
|
|
5210
|
+
"class": attrClass,
|
|
5211
|
+
"role": extra.attributes.role || "img",
|
|
5212
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
5213
|
+
"viewBox": "0 0 ".concat(width, " ").concat(height)
|
|
5214
|
+
})
|
|
5215
|
+
};
|
|
5216
|
+
const uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf("fa-fw") ? {
|
|
5217
|
+
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
5218
|
+
} : {};
|
|
5219
|
+
if (watchable) {
|
|
5220
|
+
content.attributes[DATA_FA_I2SVG] = "";
|
|
5221
|
+
}
|
|
5222
|
+
if (title) {
|
|
5223
|
+
content.children.push({
|
|
5224
|
+
tag: "title",
|
|
5225
|
+
attributes: {
|
|
5226
|
+
id: content.attributes["aria-labelledby"] || "title-".concat(titleId || nextUniqueId())
|
|
5227
|
+
},
|
|
5228
|
+
children: [title]
|
|
5229
|
+
});
|
|
5230
|
+
delete content.attributes.title;
|
|
5231
|
+
}
|
|
5232
|
+
const args = _objectSpread2(_objectSpread2({}, content), {}, {
|
|
5233
|
+
prefix,
|
|
5234
|
+
iconName,
|
|
5235
|
+
main,
|
|
5236
|
+
mask,
|
|
5237
|
+
maskId,
|
|
5238
|
+
transform,
|
|
5239
|
+
symbol,
|
|
5240
|
+
styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)
|
|
5241
|
+
});
|
|
5242
|
+
const {
|
|
5243
|
+
children,
|
|
5244
|
+
attributes
|
|
5245
|
+
} = mask.found && main.found ? callProvided("generateAbstractMask", args) || {
|
|
5246
|
+
children: [],
|
|
5247
|
+
attributes: {}
|
|
5248
|
+
} : callProvided("generateAbstractIcon", args) || {
|
|
5249
|
+
children: [],
|
|
5250
|
+
attributes: {}
|
|
5251
|
+
};
|
|
5252
|
+
args.children = children;
|
|
5253
|
+
args.attributes = attributes;
|
|
5254
|
+
if (symbol) {
|
|
5255
|
+
return asSymbol(args);
|
|
5256
|
+
} else {
|
|
5257
|
+
return asIcon(args);
|
|
5258
|
+
}
|
|
5259
|
+
}
|
|
5260
|
+
function makeLayersTextAbstract(params) {
|
|
5261
|
+
const {
|
|
5262
|
+
content,
|
|
5263
|
+
width,
|
|
5264
|
+
height,
|
|
5265
|
+
transform,
|
|
5266
|
+
title,
|
|
5267
|
+
extra,
|
|
5268
|
+
watchable = false
|
|
5269
|
+
} = params;
|
|
5270
|
+
const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
5271
|
+
"title": title
|
|
5272
|
+
} : {}), {}, {
|
|
5273
|
+
"class": extra.classes.join(" ")
|
|
5274
|
+
});
|
|
5275
|
+
if (watchable) {
|
|
5276
|
+
attributes[DATA_FA_I2SVG] = "";
|
|
5277
|
+
}
|
|
5278
|
+
const styles2 = _objectSpread2({}, extra.styles);
|
|
5279
|
+
if (transformIsMeaningful(transform)) {
|
|
5280
|
+
styles2["transform"] = transformForCss({
|
|
5281
|
+
transform,
|
|
5282
|
+
startCentered: true,
|
|
5283
|
+
width,
|
|
5284
|
+
height
|
|
5285
|
+
});
|
|
5286
|
+
styles2["-webkit-transform"] = styles2["transform"];
|
|
5287
|
+
}
|
|
5288
|
+
const styleString = joinStyles(styles2);
|
|
5289
|
+
if (styleString.length > 0) {
|
|
5290
|
+
attributes["style"] = styleString;
|
|
5291
|
+
}
|
|
5292
|
+
const val = [];
|
|
5293
|
+
val.push({
|
|
5294
|
+
tag: "span",
|
|
5295
|
+
attributes,
|
|
5296
|
+
children: [content]
|
|
5297
|
+
});
|
|
5298
|
+
if (title) {
|
|
5299
|
+
val.push({
|
|
5300
|
+
tag: "span",
|
|
5301
|
+
attributes: {
|
|
5302
|
+
class: "sr-only"
|
|
5303
|
+
},
|
|
5304
|
+
children: [title]
|
|
5305
|
+
});
|
|
5306
|
+
}
|
|
5307
|
+
return val;
|
|
5308
|
+
}
|
|
5309
|
+
function makeLayersCounterAbstract(params) {
|
|
5310
|
+
const {
|
|
5311
|
+
content,
|
|
5312
|
+
title,
|
|
5313
|
+
extra
|
|
5314
|
+
} = params;
|
|
5315
|
+
const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
5316
|
+
"title": title
|
|
5317
|
+
} : {}), {}, {
|
|
5318
|
+
"class": extra.classes.join(" ")
|
|
5319
|
+
});
|
|
5320
|
+
const styleString = joinStyles(extra.styles);
|
|
5321
|
+
if (styleString.length > 0) {
|
|
5322
|
+
attributes["style"] = styleString;
|
|
5323
|
+
}
|
|
5324
|
+
const val = [];
|
|
5325
|
+
val.push({
|
|
5326
|
+
tag: "span",
|
|
5327
|
+
attributes,
|
|
5328
|
+
children: [content]
|
|
5329
|
+
});
|
|
5330
|
+
if (title) {
|
|
5331
|
+
val.push({
|
|
5332
|
+
tag: "span",
|
|
5333
|
+
attributes: {
|
|
5334
|
+
class: "sr-only"
|
|
5335
|
+
},
|
|
5336
|
+
children: [title]
|
|
5337
|
+
});
|
|
5338
|
+
}
|
|
5339
|
+
return val;
|
|
5340
|
+
}
|
|
5341
|
+
var {
|
|
5342
|
+
styles: styles$1
|
|
5343
|
+
} = namespace;
|
|
5344
|
+
function asFoundIcon(icon2) {
|
|
5345
|
+
const width = icon2[0];
|
|
5346
|
+
const height = icon2[1];
|
|
5347
|
+
const [vectorData] = icon2.slice(4);
|
|
5348
|
+
let element = null;
|
|
5349
|
+
if (Array.isArray(vectorData)) {
|
|
5350
|
+
element = {
|
|
5351
|
+
tag: "g",
|
|
5352
|
+
attributes: {
|
|
5353
|
+
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
5354
|
+
},
|
|
5355
|
+
children: [{
|
|
5356
|
+
tag: "path",
|
|
5357
|
+
attributes: {
|
|
5358
|
+
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
5359
|
+
fill: "currentColor",
|
|
5360
|
+
d: vectorData[0]
|
|
5361
|
+
}
|
|
5362
|
+
}, {
|
|
5363
|
+
tag: "path",
|
|
5364
|
+
attributes: {
|
|
5365
|
+
class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
5366
|
+
fill: "currentColor",
|
|
5367
|
+
d: vectorData[1]
|
|
5368
|
+
}
|
|
5369
|
+
}]
|
|
5370
|
+
};
|
|
5371
|
+
} else {
|
|
5372
|
+
element = {
|
|
5373
|
+
tag: "path",
|
|
5374
|
+
attributes: {
|
|
5375
|
+
fill: "currentColor",
|
|
5376
|
+
d: vectorData
|
|
5377
|
+
}
|
|
5378
|
+
};
|
|
5379
|
+
}
|
|
5380
|
+
return {
|
|
5381
|
+
found: true,
|
|
5382
|
+
width,
|
|
5383
|
+
height,
|
|
5384
|
+
icon: element
|
|
5385
|
+
};
|
|
5386
|
+
}
|
|
5387
|
+
var missingIconResolutionMixin = {
|
|
5388
|
+
found: false,
|
|
5389
|
+
width: 512,
|
|
5390
|
+
height: 512
|
|
5391
|
+
};
|
|
5392
|
+
function maybeNotifyMissing(iconName, prefix) {
|
|
5393
|
+
if (!PRODUCTION && !config.showMissingIcons && iconName) {
|
|
5394
|
+
console.error('Icon with name "'.concat(iconName, '" and prefix "').concat(prefix, '" is missing.'));
|
|
5395
|
+
}
|
|
5396
|
+
}
|
|
5397
|
+
function findIcon(iconName, prefix) {
|
|
5398
|
+
let givenPrefix = prefix;
|
|
5399
|
+
if (prefix === "fa" && config.styleDefault !== null) {
|
|
5400
|
+
prefix = getDefaultUsablePrefix();
|
|
5401
|
+
}
|
|
5402
|
+
return new Promise((resolve, reject) => {
|
|
5403
|
+
if (givenPrefix === "fa") {
|
|
5404
|
+
const shim = byOldName(iconName) || {};
|
|
5405
|
+
iconName = shim.iconName || iconName;
|
|
5406
|
+
prefix = shim.prefix || prefix;
|
|
5407
|
+
}
|
|
5408
|
+
if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
|
|
5409
|
+
const icon2 = styles$1[prefix][iconName];
|
|
5410
|
+
return resolve(asFoundIcon(icon2));
|
|
5411
|
+
}
|
|
5412
|
+
maybeNotifyMissing(iconName, prefix);
|
|
5413
|
+
resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {
|
|
5414
|
+
icon: config.showMissingIcons && iconName ? callProvided("missingIconAbstract") || {} : {}
|
|
5415
|
+
}));
|
|
5416
|
+
});
|
|
5417
|
+
}
|
|
5418
|
+
var noop$1 = () => {
|
|
5419
|
+
};
|
|
5420
|
+
var p$2 = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
|
|
5421
|
+
mark: noop$1,
|
|
5422
|
+
measure: noop$1
|
|
5423
|
+
};
|
|
5424
|
+
var preamble = 'FA "6.7.2"';
|
|
5425
|
+
var begin = (name) => {
|
|
5426
|
+
p$2.mark("".concat(preamble, " ").concat(name, " begins"));
|
|
5427
|
+
return () => end(name);
|
|
5428
|
+
};
|
|
5429
|
+
var end = (name) => {
|
|
5430
|
+
p$2.mark("".concat(preamble, " ").concat(name, " ends"));
|
|
5431
|
+
p$2.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
|
|
5432
|
+
};
|
|
5433
|
+
var perf = {
|
|
5434
|
+
begin,
|
|
5435
|
+
end
|
|
5436
|
+
};
|
|
5437
|
+
var noop$2 = () => {
|
|
5438
|
+
};
|
|
5439
|
+
function isWatched(node) {
|
|
5440
|
+
const i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
|
|
5441
|
+
return typeof i2svg === "string";
|
|
5442
|
+
}
|
|
5443
|
+
function hasPrefixAndIcon(node) {
|
|
5444
|
+
const prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
|
|
5445
|
+
const icon2 = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
|
|
5446
|
+
return prefix && icon2;
|
|
5447
|
+
}
|
|
5448
|
+
function hasBeenReplaced(node) {
|
|
5449
|
+
return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
|
|
5450
|
+
}
|
|
5451
|
+
function getMutator() {
|
|
5452
|
+
if (config.autoReplaceSvg === true) {
|
|
5453
|
+
return mutators.replace;
|
|
5454
|
+
}
|
|
5455
|
+
const mutator = mutators[config.autoReplaceSvg];
|
|
5456
|
+
return mutator || mutators.replace;
|
|
5457
|
+
}
|
|
5458
|
+
function createElementNS(tag) {
|
|
5459
|
+
return DOCUMENT.createElementNS("http://www.w3.org/2000/svg", tag);
|
|
5460
|
+
}
|
|
5461
|
+
function createElement3(tag) {
|
|
5462
|
+
return DOCUMENT.createElement(tag);
|
|
5463
|
+
}
|
|
5464
|
+
function convertSVG(abstractObj) {
|
|
5465
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5466
|
+
const {
|
|
5467
|
+
ceFn = abstractObj.tag === "svg" ? createElementNS : createElement3
|
|
5468
|
+
} = params;
|
|
5469
|
+
if (typeof abstractObj === "string") {
|
|
5470
|
+
return DOCUMENT.createTextNode(abstractObj);
|
|
5471
|
+
}
|
|
5472
|
+
const tag = ceFn(abstractObj.tag);
|
|
5473
|
+
Object.keys(abstractObj.attributes || []).forEach(function(key) {
|
|
5474
|
+
tag.setAttribute(key, abstractObj.attributes[key]);
|
|
5475
|
+
});
|
|
5476
|
+
const children = abstractObj.children || [];
|
|
5477
|
+
children.forEach(function(child) {
|
|
5478
|
+
tag.appendChild(convertSVG(child, {
|
|
5479
|
+
ceFn
|
|
5480
|
+
}));
|
|
5481
|
+
});
|
|
5482
|
+
return tag;
|
|
5483
|
+
}
|
|
5484
|
+
function nodeAsComment(node) {
|
|
5485
|
+
let comment = " ".concat(node.outerHTML, " ");
|
|
5486
|
+
comment = "".concat(comment, "Font Awesome fontawesome.com ");
|
|
5487
|
+
return comment;
|
|
5488
|
+
}
|
|
5489
|
+
var mutators = {
|
|
5490
|
+
replace: function(mutation) {
|
|
5491
|
+
const node = mutation[0];
|
|
5492
|
+
if (node.parentNode) {
|
|
5493
|
+
mutation[1].forEach((abstract) => {
|
|
5494
|
+
node.parentNode.insertBefore(convertSVG(abstract), node);
|
|
5495
|
+
});
|
|
5496
|
+
if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
|
|
5497
|
+
let comment = DOCUMENT.createComment(nodeAsComment(node));
|
|
5498
|
+
node.parentNode.replaceChild(comment, node);
|
|
5499
|
+
} else {
|
|
5500
|
+
node.remove();
|
|
5501
|
+
}
|
|
5502
|
+
}
|
|
5503
|
+
},
|
|
5504
|
+
nest: function(mutation) {
|
|
5505
|
+
const node = mutation[0];
|
|
5506
|
+
const abstract = mutation[1];
|
|
5507
|
+
if (~classArray(node).indexOf(config.replacementClass)) {
|
|
5508
|
+
return mutators.replace(mutation);
|
|
5509
|
+
}
|
|
5510
|
+
const forSvg = new RegExp("".concat(config.cssPrefix, "-.*"));
|
|
5511
|
+
delete abstract[0].attributes.id;
|
|
5512
|
+
if (abstract[0].attributes.class) {
|
|
5513
|
+
const splitClasses = abstract[0].attributes.class.split(" ").reduce((acc, cls) => {
|
|
5514
|
+
if (cls === config.replacementClass || cls.match(forSvg)) {
|
|
5515
|
+
acc.toSvg.push(cls);
|
|
5516
|
+
} else {
|
|
5517
|
+
acc.toNode.push(cls);
|
|
5518
|
+
}
|
|
5519
|
+
return acc;
|
|
5520
|
+
}, {
|
|
5521
|
+
toNode: [],
|
|
5522
|
+
toSvg: []
|
|
5523
|
+
});
|
|
5524
|
+
abstract[0].attributes.class = splitClasses.toSvg.join(" ");
|
|
5525
|
+
if (splitClasses.toNode.length === 0) {
|
|
5526
|
+
node.removeAttribute("class");
|
|
5527
|
+
} else {
|
|
5528
|
+
node.setAttribute("class", splitClasses.toNode.join(" "));
|
|
5529
|
+
}
|
|
5530
|
+
}
|
|
5531
|
+
const newInnerHTML = abstract.map((a) => toHtml(a)).join("\n");
|
|
5532
|
+
node.setAttribute(DATA_FA_I2SVG, "");
|
|
5533
|
+
node.innerHTML = newInnerHTML;
|
|
5534
|
+
}
|
|
5535
|
+
};
|
|
5536
|
+
function performOperationSync(op) {
|
|
5537
|
+
op();
|
|
5538
|
+
}
|
|
5539
|
+
function perform(mutations, callback) {
|
|
5540
|
+
const callbackFunction = typeof callback === "function" ? callback : noop$2;
|
|
5541
|
+
if (mutations.length === 0) {
|
|
5542
|
+
callbackFunction();
|
|
5543
|
+
} else {
|
|
5544
|
+
let frame = performOperationSync;
|
|
5545
|
+
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
|
|
5546
|
+
frame = WINDOW.requestAnimationFrame || performOperationSync;
|
|
5547
|
+
}
|
|
5548
|
+
frame(() => {
|
|
5549
|
+
const mutator = getMutator();
|
|
5550
|
+
const mark = perf.begin("mutate");
|
|
5551
|
+
mutations.map(mutator);
|
|
5552
|
+
mark();
|
|
5553
|
+
callbackFunction();
|
|
5554
|
+
});
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5557
|
+
var disabled = false;
|
|
5558
|
+
function disableObservation() {
|
|
5559
|
+
disabled = true;
|
|
5560
|
+
}
|
|
5561
|
+
function enableObservation() {
|
|
5562
|
+
disabled = false;
|
|
5563
|
+
}
|
|
5564
|
+
var mo = null;
|
|
5565
|
+
function observe(options) {
|
|
5566
|
+
if (!MUTATION_OBSERVER) {
|
|
5567
|
+
return;
|
|
5568
|
+
}
|
|
5569
|
+
if (!config.observeMutations) {
|
|
5570
|
+
return;
|
|
5571
|
+
}
|
|
5572
|
+
const {
|
|
5573
|
+
treeCallback = noop$2,
|
|
5574
|
+
nodeCallback = noop$2,
|
|
5575
|
+
pseudoElementsCallback = noop$2,
|
|
5576
|
+
observeMutationsRoot = DOCUMENT
|
|
5577
|
+
} = options;
|
|
5578
|
+
mo = new MUTATION_OBSERVER((objects) => {
|
|
5579
|
+
if (disabled) return;
|
|
5580
|
+
const defaultPrefix = getDefaultUsablePrefix();
|
|
5581
|
+
toArray(objects).forEach((mutationRecord) => {
|
|
5582
|
+
if (mutationRecord.type === "childList" && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
|
5583
|
+
if (config.searchPseudoElements) {
|
|
5584
|
+
pseudoElementsCallback(mutationRecord.target);
|
|
5585
|
+
}
|
|
5586
|
+
treeCallback(mutationRecord.target);
|
|
5587
|
+
}
|
|
5588
|
+
if (mutationRecord.type === "attributes" && mutationRecord.target.parentNode && config.searchPseudoElements) {
|
|
5589
|
+
pseudoElementsCallback(mutationRecord.target.parentNode);
|
|
5590
|
+
}
|
|
5591
|
+
if (mutationRecord.type === "attributes" && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
|
|
5592
|
+
if (mutationRecord.attributeName === "class" && hasPrefixAndIcon(mutationRecord.target)) {
|
|
5593
|
+
const {
|
|
5594
|
+
prefix,
|
|
5595
|
+
iconName
|
|
5596
|
+
} = getCanonicalIcon(classArray(mutationRecord.target));
|
|
5597
|
+
mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
|
|
5598
|
+
if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);
|
|
5599
|
+
} else if (hasBeenReplaced(mutationRecord.target)) {
|
|
5600
|
+
nodeCallback(mutationRecord.target);
|
|
5601
|
+
}
|
|
5602
|
+
}
|
|
5603
|
+
});
|
|
5604
|
+
});
|
|
5605
|
+
if (!IS_DOM) return;
|
|
5606
|
+
mo.observe(observeMutationsRoot, {
|
|
5607
|
+
childList: true,
|
|
5608
|
+
attributes: true,
|
|
5609
|
+
characterData: true,
|
|
5610
|
+
subtree: true
|
|
5611
|
+
});
|
|
5612
|
+
}
|
|
5613
|
+
function disconnect() {
|
|
5614
|
+
if (!mo) return;
|
|
5615
|
+
mo.disconnect();
|
|
5616
|
+
}
|
|
5617
|
+
function styleParser(node) {
|
|
5618
|
+
const style = node.getAttribute("style");
|
|
5619
|
+
let val = [];
|
|
5620
|
+
if (style) {
|
|
5621
|
+
val = style.split(";").reduce((acc, style2) => {
|
|
5622
|
+
const styles2 = style2.split(":");
|
|
5623
|
+
const prop = styles2[0];
|
|
5624
|
+
const value = styles2.slice(1);
|
|
5625
|
+
if (prop && value.length > 0) {
|
|
5626
|
+
acc[prop] = value.join(":").trim();
|
|
5627
|
+
}
|
|
5628
|
+
return acc;
|
|
5629
|
+
}, {});
|
|
5630
|
+
}
|
|
5631
|
+
return val;
|
|
5632
|
+
}
|
|
5633
|
+
function classParser(node) {
|
|
5634
|
+
const existingPrefix = node.getAttribute("data-prefix");
|
|
5635
|
+
const existingIconName = node.getAttribute("data-icon");
|
|
5636
|
+
const innerText = node.innerText !== void 0 ? node.innerText.trim() : "";
|
|
5637
|
+
let val = getCanonicalIcon(classArray(node));
|
|
5638
|
+
if (!val.prefix) {
|
|
5639
|
+
val.prefix = getDefaultUsablePrefix();
|
|
5640
|
+
}
|
|
5641
|
+
if (existingPrefix && existingIconName) {
|
|
5642
|
+
val.prefix = existingPrefix;
|
|
5643
|
+
val.iconName = existingIconName;
|
|
5644
|
+
}
|
|
5645
|
+
if (val.iconName && val.prefix) {
|
|
5646
|
+
return val;
|
|
5647
|
+
}
|
|
5648
|
+
if (val.prefix && innerText.length > 0) {
|
|
5649
|
+
val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
|
|
5650
|
+
}
|
|
5651
|
+
if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {
|
|
5652
|
+
val.iconName = node.firstChild.data;
|
|
5653
|
+
}
|
|
5654
|
+
return val;
|
|
5655
|
+
}
|
|
5656
|
+
function attributesParser(node) {
|
|
5657
|
+
const extraAttributes = toArray(node.attributes).reduce((acc, attr) => {
|
|
5658
|
+
if (acc.name !== "class" && acc.name !== "style") {
|
|
5659
|
+
acc[attr.name] = attr.value;
|
|
5660
|
+
}
|
|
5661
|
+
return acc;
|
|
5662
|
+
}, {});
|
|
5663
|
+
const title = node.getAttribute("title");
|
|
5664
|
+
const titleId = node.getAttribute("data-fa-title-id");
|
|
5665
|
+
if (config.autoA11y) {
|
|
5666
|
+
if (title) {
|
|
5667
|
+
extraAttributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
5668
|
+
} else {
|
|
5669
|
+
extraAttributes["aria-hidden"] = "true";
|
|
5670
|
+
extraAttributes["focusable"] = "false";
|
|
5671
|
+
}
|
|
5672
|
+
}
|
|
5673
|
+
return extraAttributes;
|
|
5674
|
+
}
|
|
5675
|
+
function blankMeta() {
|
|
5676
|
+
return {
|
|
5677
|
+
iconName: null,
|
|
5678
|
+
title: null,
|
|
5679
|
+
titleId: null,
|
|
5680
|
+
prefix: null,
|
|
5681
|
+
transform: meaninglessTransform,
|
|
5682
|
+
symbol: false,
|
|
5683
|
+
mask: {
|
|
5684
|
+
iconName: null,
|
|
5685
|
+
prefix: null,
|
|
5686
|
+
rest: []
|
|
5687
|
+
},
|
|
5688
|
+
maskId: null,
|
|
5689
|
+
extra: {
|
|
5690
|
+
classes: [],
|
|
5691
|
+
styles: {},
|
|
5692
|
+
attributes: {}
|
|
5693
|
+
}
|
|
5694
|
+
};
|
|
5695
|
+
}
|
|
5696
|
+
function parseMeta(node) {
|
|
5697
|
+
let parser = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
5698
|
+
styleParser: true
|
|
5699
|
+
};
|
|
5700
|
+
const {
|
|
5701
|
+
iconName,
|
|
5702
|
+
prefix,
|
|
5703
|
+
rest: extraClasses
|
|
5704
|
+
} = classParser(node);
|
|
5705
|
+
const extraAttributes = attributesParser(node);
|
|
5706
|
+
const pluginMeta = chainHooks("parseNodeAttributes", {}, node);
|
|
5707
|
+
let extraStyles = parser.styleParser ? styleParser(node) : [];
|
|
5708
|
+
return _objectSpread2({
|
|
5709
|
+
iconName,
|
|
5710
|
+
title: node.getAttribute("title"),
|
|
5711
|
+
titleId: node.getAttribute("data-fa-title-id"),
|
|
5712
|
+
prefix,
|
|
5713
|
+
transform: meaninglessTransform,
|
|
5714
|
+
mask: {
|
|
5715
|
+
iconName: null,
|
|
5716
|
+
prefix: null,
|
|
5717
|
+
rest: []
|
|
5718
|
+
},
|
|
5719
|
+
maskId: null,
|
|
5720
|
+
symbol: false,
|
|
5721
|
+
extra: {
|
|
5722
|
+
classes: extraClasses,
|
|
5723
|
+
styles: extraStyles,
|
|
5724
|
+
attributes: extraAttributes
|
|
5725
|
+
}
|
|
5726
|
+
}, pluginMeta);
|
|
5727
|
+
}
|
|
5728
|
+
var {
|
|
5729
|
+
styles: styles$2
|
|
5730
|
+
} = namespace;
|
|
5731
|
+
function generateMutation(node) {
|
|
5732
|
+
const nodeMeta = config.autoReplaceSvg === "nest" ? parseMeta(node, {
|
|
5733
|
+
styleParser: false
|
|
5734
|
+
}) : parseMeta(node);
|
|
5735
|
+
if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
|
|
5736
|
+
return callProvided("generateLayersText", node, nodeMeta);
|
|
5737
|
+
} else {
|
|
5738
|
+
return callProvided("generateSvgReplacementMutation", node, nodeMeta);
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
function getKnownPrefixes() {
|
|
5742
|
+
return [...Ft, ...Ia];
|
|
5743
|
+
}
|
|
5744
|
+
function onTree(root) {
|
|
5745
|
+
let callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
5746
|
+
if (!IS_DOM) return Promise.resolve();
|
|
5747
|
+
const htmlClassList = DOCUMENT.documentElement.classList;
|
|
5748
|
+
const hclAdd = (suffix) => htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
5749
|
+
const hclRemove = (suffix) => htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
5750
|
+
const prefixes = config.autoFetchSvg ? getKnownPrefixes() : P.concat(Object.keys(styles$2));
|
|
5751
|
+
if (!prefixes.includes("fa")) {
|
|
5752
|
+
prefixes.push("fa");
|
|
5753
|
+
}
|
|
5754
|
+
const prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map((p$$1) => ".".concat(p$$1, ":not([").concat(DATA_FA_I2SVG, "])"))).join(", ");
|
|
5755
|
+
if (prefixesDomQuery.length === 0) {
|
|
5756
|
+
return Promise.resolve();
|
|
5757
|
+
}
|
|
5758
|
+
let candidates = [];
|
|
5759
|
+
try {
|
|
5760
|
+
candidates = toArray(root.querySelectorAll(prefixesDomQuery));
|
|
5761
|
+
} catch (e$$1) {
|
|
5762
|
+
}
|
|
5763
|
+
if (candidates.length > 0) {
|
|
5764
|
+
hclAdd("pending");
|
|
5765
|
+
hclRemove("complete");
|
|
5766
|
+
} else {
|
|
5767
|
+
return Promise.resolve();
|
|
5768
|
+
}
|
|
5769
|
+
const mark = perf.begin("onTree");
|
|
5770
|
+
const mutations = candidates.reduce((acc, node) => {
|
|
5771
|
+
try {
|
|
5772
|
+
const mutation = generateMutation(node);
|
|
5773
|
+
if (mutation) {
|
|
5774
|
+
acc.push(mutation);
|
|
5775
|
+
}
|
|
5776
|
+
} catch (e$$1) {
|
|
5777
|
+
if (!PRODUCTION) {
|
|
5778
|
+
if (e$$1.name === "MissingIcon") {
|
|
5779
|
+
console.error(e$$1);
|
|
5780
|
+
}
|
|
5781
|
+
}
|
|
5782
|
+
}
|
|
5783
|
+
return acc;
|
|
5784
|
+
}, []);
|
|
5785
|
+
return new Promise((resolve, reject) => {
|
|
5786
|
+
Promise.all(mutations).then((resolvedMutations) => {
|
|
5787
|
+
perform(resolvedMutations, () => {
|
|
5788
|
+
hclAdd("active");
|
|
5789
|
+
hclAdd("complete");
|
|
5790
|
+
hclRemove("pending");
|
|
5791
|
+
if (typeof callback === "function") callback();
|
|
5792
|
+
mark();
|
|
5793
|
+
resolve();
|
|
5794
|
+
});
|
|
5795
|
+
}).catch((e$$1) => {
|
|
5796
|
+
mark();
|
|
5797
|
+
reject(e$$1);
|
|
5798
|
+
});
|
|
5799
|
+
});
|
|
5800
|
+
}
|
|
5801
|
+
function onNode(node) {
|
|
5802
|
+
let callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
5803
|
+
generateMutation(node).then((mutation) => {
|
|
5804
|
+
if (mutation) {
|
|
5805
|
+
perform([mutation], callback);
|
|
5806
|
+
}
|
|
5807
|
+
});
|
|
5808
|
+
}
|
|
5809
|
+
function resolveIcons(next) {
|
|
5810
|
+
return function(maybeIconDefinition) {
|
|
5811
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5812
|
+
const iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
5813
|
+
let {
|
|
5814
|
+
mask
|
|
5815
|
+
} = params;
|
|
5816
|
+
if (mask) {
|
|
5817
|
+
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
5818
|
+
}
|
|
5819
|
+
return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
5820
|
+
mask
|
|
5821
|
+
}));
|
|
5822
|
+
};
|
|
5823
|
+
}
|
|
5824
|
+
var render = function(iconDefinition) {
|
|
5825
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5826
|
+
const {
|
|
5827
|
+
transform = meaninglessTransform,
|
|
5828
|
+
symbol = false,
|
|
5829
|
+
mask = null,
|
|
5830
|
+
maskId = null,
|
|
5831
|
+
title = null,
|
|
5832
|
+
titleId = null,
|
|
5833
|
+
classes = [],
|
|
5834
|
+
attributes = {},
|
|
5835
|
+
styles: styles2 = {}
|
|
5836
|
+
} = params;
|
|
5837
|
+
if (!iconDefinition) return;
|
|
5838
|
+
const {
|
|
5839
|
+
prefix,
|
|
5840
|
+
iconName,
|
|
5841
|
+
icon: icon2
|
|
5842
|
+
} = iconDefinition;
|
|
5843
|
+
return domVariants(_objectSpread2({
|
|
5844
|
+
type: "icon"
|
|
5845
|
+
}, iconDefinition), () => {
|
|
5846
|
+
callHooks("beforeDOMElementCreation", {
|
|
5847
|
+
iconDefinition,
|
|
5848
|
+
params
|
|
5849
|
+
});
|
|
5850
|
+
if (config.autoA11y) {
|
|
5851
|
+
if (title) {
|
|
5852
|
+
attributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
5853
|
+
} else {
|
|
5854
|
+
attributes["aria-hidden"] = "true";
|
|
5855
|
+
attributes["focusable"] = "false";
|
|
5856
|
+
}
|
|
5857
|
+
}
|
|
5858
|
+
return makeInlineSvgAbstract({
|
|
5859
|
+
icons: {
|
|
5860
|
+
main: asFoundIcon(icon2),
|
|
5861
|
+
mask: mask ? asFoundIcon(mask.icon) : {
|
|
5862
|
+
found: false,
|
|
5863
|
+
width: null,
|
|
5864
|
+
height: null,
|
|
5865
|
+
icon: {}
|
|
5866
|
+
}
|
|
5867
|
+
},
|
|
5868
|
+
prefix,
|
|
5869
|
+
iconName,
|
|
5870
|
+
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
5871
|
+
symbol,
|
|
5872
|
+
title,
|
|
5873
|
+
maskId,
|
|
5874
|
+
titleId,
|
|
5875
|
+
extra: {
|
|
5876
|
+
attributes,
|
|
5877
|
+
styles: styles2,
|
|
5878
|
+
classes
|
|
5879
|
+
}
|
|
5880
|
+
});
|
|
5881
|
+
});
|
|
5882
|
+
};
|
|
5883
|
+
var ReplaceElements = {
|
|
5884
|
+
mixout() {
|
|
5885
|
+
return {
|
|
5886
|
+
icon: resolveIcons(render)
|
|
5887
|
+
};
|
|
5888
|
+
},
|
|
5889
|
+
hooks() {
|
|
5890
|
+
return {
|
|
5891
|
+
mutationObserverCallbacks(accumulator) {
|
|
5892
|
+
accumulator.treeCallback = onTree;
|
|
5893
|
+
accumulator.nodeCallback = onNode;
|
|
5894
|
+
return accumulator;
|
|
5895
|
+
}
|
|
5896
|
+
};
|
|
5897
|
+
},
|
|
5898
|
+
provides(providers$$1) {
|
|
5899
|
+
providers$$1.i2svg = function(params) {
|
|
5900
|
+
const {
|
|
5901
|
+
node = DOCUMENT,
|
|
5902
|
+
callback = () => {
|
|
5903
|
+
}
|
|
5904
|
+
} = params;
|
|
5905
|
+
return onTree(node, callback);
|
|
5906
|
+
};
|
|
5907
|
+
providers$$1.generateSvgReplacementMutation = function(node, nodeMeta) {
|
|
5908
|
+
const {
|
|
5909
|
+
iconName,
|
|
5910
|
+
title,
|
|
5911
|
+
titleId,
|
|
5912
|
+
prefix,
|
|
5913
|
+
transform,
|
|
5914
|
+
symbol,
|
|
5915
|
+
mask,
|
|
5916
|
+
maskId,
|
|
5917
|
+
extra
|
|
5918
|
+
} = nodeMeta;
|
|
5919
|
+
return new Promise((resolve, reject) => {
|
|
5920
|
+
Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
|
|
5921
|
+
found: false,
|
|
5922
|
+
width: 512,
|
|
5923
|
+
height: 512,
|
|
5924
|
+
icon: {}
|
|
5925
|
+
})]).then((_ref) => {
|
|
5926
|
+
let [main, mask2] = _ref;
|
|
5927
|
+
resolve([node, makeInlineSvgAbstract({
|
|
5928
|
+
icons: {
|
|
5929
|
+
main,
|
|
5930
|
+
mask: mask2
|
|
5931
|
+
},
|
|
5932
|
+
prefix,
|
|
5933
|
+
iconName,
|
|
5934
|
+
transform,
|
|
5935
|
+
symbol,
|
|
5936
|
+
maskId,
|
|
5937
|
+
title,
|
|
5938
|
+
titleId,
|
|
5939
|
+
extra,
|
|
5940
|
+
watchable: true
|
|
5941
|
+
})]);
|
|
5942
|
+
}).catch(reject);
|
|
5943
|
+
});
|
|
5944
|
+
};
|
|
5945
|
+
providers$$1.generateAbstractIcon = function(_ref2) {
|
|
5946
|
+
let {
|
|
5947
|
+
children,
|
|
5948
|
+
attributes,
|
|
5949
|
+
main,
|
|
5950
|
+
transform,
|
|
5951
|
+
styles: styles2
|
|
5952
|
+
} = _ref2;
|
|
5953
|
+
const styleString = joinStyles(styles2);
|
|
5954
|
+
if (styleString.length > 0) {
|
|
5955
|
+
attributes["style"] = styleString;
|
|
5956
|
+
}
|
|
5957
|
+
let nextChild;
|
|
5958
|
+
if (transformIsMeaningful(transform)) {
|
|
5959
|
+
nextChild = callProvided("generateAbstractTransformGrouping", {
|
|
5960
|
+
main,
|
|
5961
|
+
transform,
|
|
5962
|
+
containerWidth: main.width,
|
|
5963
|
+
iconWidth: main.width
|
|
5964
|
+
});
|
|
5965
|
+
}
|
|
5966
|
+
children.push(nextChild || main.icon);
|
|
5967
|
+
return {
|
|
5968
|
+
children,
|
|
5969
|
+
attributes
|
|
5970
|
+
};
|
|
5971
|
+
};
|
|
5972
|
+
}
|
|
5973
|
+
};
|
|
5974
|
+
var Layers = {
|
|
5975
|
+
mixout() {
|
|
5976
|
+
return {
|
|
5977
|
+
layer(assembler) {
|
|
5978
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5979
|
+
const {
|
|
5980
|
+
classes = []
|
|
5981
|
+
} = params;
|
|
5982
|
+
return domVariants({
|
|
5983
|
+
type: "layer"
|
|
5984
|
+
}, () => {
|
|
5985
|
+
callHooks("beforeDOMElementCreation", {
|
|
5986
|
+
assembler,
|
|
5987
|
+
params
|
|
5988
|
+
});
|
|
5989
|
+
let children = [];
|
|
5990
|
+
assembler((args) => {
|
|
5991
|
+
Array.isArray(args) ? args.map((a) => {
|
|
5992
|
+
children = children.concat(a.abstract);
|
|
5993
|
+
}) : children = children.concat(args.abstract);
|
|
5994
|
+
});
|
|
5995
|
+
return [{
|
|
5996
|
+
tag: "span",
|
|
5997
|
+
attributes: {
|
|
5998
|
+
class: ["".concat(config.cssPrefix, "-layers"), ...classes].join(" ")
|
|
5999
|
+
},
|
|
6000
|
+
children
|
|
6001
|
+
}];
|
|
6002
|
+
});
|
|
6003
|
+
}
|
|
6004
|
+
};
|
|
6005
|
+
}
|
|
6006
|
+
};
|
|
6007
|
+
var LayersCounter = {
|
|
6008
|
+
mixout() {
|
|
6009
|
+
return {
|
|
6010
|
+
counter(content) {
|
|
6011
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6012
|
+
const {
|
|
6013
|
+
title = null,
|
|
6014
|
+
classes = [],
|
|
6015
|
+
attributes = {},
|
|
6016
|
+
styles: styles2 = {}
|
|
6017
|
+
} = params;
|
|
6018
|
+
return domVariants({
|
|
6019
|
+
type: "counter",
|
|
6020
|
+
content
|
|
6021
|
+
}, () => {
|
|
6022
|
+
callHooks("beforeDOMElementCreation", {
|
|
6023
|
+
content,
|
|
6024
|
+
params
|
|
6025
|
+
});
|
|
6026
|
+
return makeLayersCounterAbstract({
|
|
6027
|
+
content: content.toString(),
|
|
6028
|
+
title,
|
|
6029
|
+
extra: {
|
|
6030
|
+
attributes,
|
|
6031
|
+
styles: styles2,
|
|
6032
|
+
classes: ["".concat(config.cssPrefix, "-layers-counter"), ...classes]
|
|
6033
|
+
}
|
|
6034
|
+
});
|
|
6035
|
+
});
|
|
6036
|
+
}
|
|
6037
|
+
};
|
|
6038
|
+
}
|
|
6039
|
+
};
|
|
6040
|
+
var LayersText = {
|
|
6041
|
+
mixout() {
|
|
6042
|
+
return {
|
|
6043
|
+
text(content) {
|
|
6044
|
+
let params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6045
|
+
const {
|
|
6046
|
+
transform = meaninglessTransform,
|
|
6047
|
+
title = null,
|
|
6048
|
+
classes = [],
|
|
6049
|
+
attributes = {},
|
|
6050
|
+
styles: styles2 = {}
|
|
6051
|
+
} = params;
|
|
6052
|
+
return domVariants({
|
|
6053
|
+
type: "text",
|
|
6054
|
+
content
|
|
6055
|
+
}, () => {
|
|
6056
|
+
callHooks("beforeDOMElementCreation", {
|
|
6057
|
+
content,
|
|
6058
|
+
params
|
|
6059
|
+
});
|
|
6060
|
+
return makeLayersTextAbstract({
|
|
6061
|
+
content,
|
|
6062
|
+
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
6063
|
+
title,
|
|
6064
|
+
extra: {
|
|
6065
|
+
attributes,
|
|
6066
|
+
styles: styles2,
|
|
6067
|
+
classes: ["".concat(config.cssPrefix, "-layers-text"), ...classes]
|
|
6068
|
+
}
|
|
6069
|
+
});
|
|
6070
|
+
});
|
|
6071
|
+
}
|
|
6072
|
+
};
|
|
6073
|
+
},
|
|
6074
|
+
provides(providers$$1) {
|
|
6075
|
+
providers$$1.generateLayersText = function(node, nodeMeta) {
|
|
6076
|
+
const {
|
|
6077
|
+
title,
|
|
6078
|
+
transform,
|
|
6079
|
+
extra
|
|
6080
|
+
} = nodeMeta;
|
|
6081
|
+
let width = null;
|
|
6082
|
+
let height = null;
|
|
6083
|
+
if (IS_IE) {
|
|
6084
|
+
const computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
|
|
6085
|
+
const boundingClientRect = node.getBoundingClientRect();
|
|
6086
|
+
width = boundingClientRect.width / computedFontSize;
|
|
6087
|
+
height = boundingClientRect.height / computedFontSize;
|
|
6088
|
+
}
|
|
6089
|
+
if (config.autoA11y && !title) {
|
|
6090
|
+
extra.attributes["aria-hidden"] = "true";
|
|
6091
|
+
}
|
|
6092
|
+
return Promise.resolve([node, makeLayersTextAbstract({
|
|
6093
|
+
content: node.innerHTML,
|
|
6094
|
+
width,
|
|
6095
|
+
height,
|
|
6096
|
+
transform,
|
|
6097
|
+
title,
|
|
6098
|
+
extra,
|
|
6099
|
+
watchable: true
|
|
6100
|
+
})]);
|
|
6101
|
+
};
|
|
6102
|
+
}
|
|
6103
|
+
};
|
|
6104
|
+
var CLEAN_CONTENT_PATTERN = new RegExp('"', "ug");
|
|
6105
|
+
var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
|
|
6106
|
+
var _FONT_FAMILY_WEIGHT_TO_PREFIX = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
6107
|
+
FontAwesome: {
|
|
6108
|
+
normal: "fas",
|
|
6109
|
+
400: "fas"
|
|
6110
|
+
}
|
|
6111
|
+
}), lt), wa), Yt);
|
|
6112
|
+
var FONT_FAMILY_WEIGHT_TO_PREFIX = Object.keys(_FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, key) => {
|
|
6113
|
+
acc[key.toLowerCase()] = _FONT_FAMILY_WEIGHT_TO_PREFIX[key];
|
|
6114
|
+
return acc;
|
|
6115
|
+
}, {});
|
|
6116
|
+
var FONT_FAMILY_WEIGHT_FALLBACK = Object.keys(FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, fontFamily) => {
|
|
6117
|
+
const weights = FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamily];
|
|
6118
|
+
acc[fontFamily] = weights[900] || [...Object.entries(weights)][0][1];
|
|
6119
|
+
return acc;
|
|
6120
|
+
}, {});
|
|
6121
|
+
function hexValueFromContent(content) {
|
|
6122
|
+
const cleaned = content.replace(CLEAN_CONTENT_PATTERN, "");
|
|
6123
|
+
const codePoint = codePointAt(cleaned, 0);
|
|
6124
|
+
const isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
|
|
6125
|
+
const isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
|
|
6126
|
+
return {
|
|
6127
|
+
value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
|
|
6128
|
+
isSecondary: isPrependTen || isDoubled
|
|
6129
|
+
};
|
|
6130
|
+
}
|
|
6131
|
+
function getPrefix(fontFamily, fontWeight) {
|
|
6132
|
+
const fontFamilySanitized = fontFamily.replace(/^['"]|['"]$/g, "").toLowerCase();
|
|
6133
|
+
const fontWeightInteger = parseInt(fontWeight);
|
|
6134
|
+
const fontWeightSanitized = isNaN(fontWeightInteger) ? "normal" : fontWeightInteger;
|
|
6135
|
+
return (FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamilySanitized] || {})[fontWeightSanitized] || FONT_FAMILY_WEIGHT_FALLBACK[fontFamilySanitized];
|
|
6136
|
+
}
|
|
6137
|
+
function replaceForPosition(node, position) {
|
|
6138
|
+
const pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(":", "-"));
|
|
6139
|
+
return new Promise((resolve, reject) => {
|
|
6140
|
+
if (node.getAttribute(pendingAttribute) !== null) {
|
|
6141
|
+
return resolve();
|
|
6142
|
+
}
|
|
6143
|
+
const children = toArray(node.children);
|
|
6144
|
+
const alreadyProcessedPseudoElement = children.filter((c$$1) => c$$1.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position)[0];
|
|
6145
|
+
const styles2 = WINDOW.getComputedStyle(node, position);
|
|
6146
|
+
const fontFamily = styles2.getPropertyValue("font-family");
|
|
6147
|
+
const fontFamilyMatch = fontFamily.match(FONT_FAMILY_PATTERN);
|
|
6148
|
+
const fontWeight = styles2.getPropertyValue("font-weight");
|
|
6149
|
+
const content = styles2.getPropertyValue("content");
|
|
6150
|
+
if (alreadyProcessedPseudoElement && !fontFamilyMatch) {
|
|
6151
|
+
node.removeChild(alreadyProcessedPseudoElement);
|
|
6152
|
+
return resolve();
|
|
6153
|
+
} else if (fontFamilyMatch && content !== "none" && content !== "") {
|
|
6154
|
+
const content2 = styles2.getPropertyValue("content");
|
|
6155
|
+
let prefix = getPrefix(fontFamily, fontWeight);
|
|
6156
|
+
const {
|
|
6157
|
+
value: hexValue,
|
|
6158
|
+
isSecondary
|
|
6159
|
+
} = hexValueFromContent(content2);
|
|
6160
|
+
const isV4 = fontFamilyMatch[0].startsWith("FontAwesome");
|
|
6161
|
+
let iconName = byUnicode(prefix, hexValue);
|
|
6162
|
+
let iconIdentifier = iconName;
|
|
6163
|
+
if (isV4) {
|
|
6164
|
+
const iconName4 = byOldUnicode(hexValue);
|
|
6165
|
+
if (iconName4.iconName && iconName4.prefix) {
|
|
6166
|
+
iconName = iconName4.iconName;
|
|
6167
|
+
prefix = iconName4.prefix;
|
|
6168
|
+
}
|
|
6169
|
+
}
|
|
6170
|
+
if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
|
|
6171
|
+
node.setAttribute(pendingAttribute, iconIdentifier);
|
|
6172
|
+
if (alreadyProcessedPseudoElement) {
|
|
6173
|
+
node.removeChild(alreadyProcessedPseudoElement);
|
|
6174
|
+
}
|
|
6175
|
+
const meta = blankMeta();
|
|
6176
|
+
const {
|
|
6177
|
+
extra
|
|
6178
|
+
} = meta;
|
|
6179
|
+
extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
|
|
6180
|
+
findIcon(iconName, prefix).then((main) => {
|
|
6181
|
+
const abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
|
|
6182
|
+
icons: {
|
|
6183
|
+
main,
|
|
6184
|
+
mask: emptyCanonicalIcon()
|
|
6185
|
+
},
|
|
6186
|
+
prefix,
|
|
6187
|
+
iconName: iconIdentifier,
|
|
6188
|
+
extra,
|
|
6189
|
+
watchable: true
|
|
6190
|
+
}));
|
|
6191
|
+
const element = DOCUMENT.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
6192
|
+
if (position === "::before") {
|
|
6193
|
+
node.insertBefore(element, node.firstChild);
|
|
6194
|
+
} else {
|
|
6195
|
+
node.appendChild(element);
|
|
6196
|
+
}
|
|
6197
|
+
element.outerHTML = abstract.map((a$$1) => toHtml(a$$1)).join("\n");
|
|
6198
|
+
node.removeAttribute(pendingAttribute);
|
|
6199
|
+
resolve();
|
|
6200
|
+
}).catch(reject);
|
|
6201
|
+
} else {
|
|
6202
|
+
resolve();
|
|
6203
|
+
}
|
|
6204
|
+
} else {
|
|
6205
|
+
resolve();
|
|
6206
|
+
}
|
|
6207
|
+
});
|
|
6208
|
+
}
|
|
6209
|
+
function replace(node) {
|
|
6210
|
+
return Promise.all([replaceForPosition(node, "::before"), replaceForPosition(node, "::after")]);
|
|
6211
|
+
}
|
|
6212
|
+
function processable(node) {
|
|
6213
|
+
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");
|
|
6214
|
+
}
|
|
6215
|
+
function searchPseudoElements(root) {
|
|
6216
|
+
if (!IS_DOM) return;
|
|
6217
|
+
return new Promise((resolve, reject) => {
|
|
6218
|
+
const operations = toArray(root.querySelectorAll("*")).filter(processable).map(replace);
|
|
6219
|
+
const end2 = perf.begin("searchPseudoElements");
|
|
6220
|
+
disableObservation();
|
|
6221
|
+
Promise.all(operations).then(() => {
|
|
6222
|
+
end2();
|
|
6223
|
+
enableObservation();
|
|
6224
|
+
resolve();
|
|
6225
|
+
}).catch(() => {
|
|
6226
|
+
end2();
|
|
6227
|
+
enableObservation();
|
|
6228
|
+
reject();
|
|
6229
|
+
});
|
|
6230
|
+
});
|
|
6231
|
+
}
|
|
6232
|
+
var PseudoElements = {
|
|
6233
|
+
hooks() {
|
|
6234
|
+
return {
|
|
6235
|
+
mutationObserverCallbacks(accumulator) {
|
|
6236
|
+
accumulator.pseudoElementsCallback = searchPseudoElements;
|
|
6237
|
+
return accumulator;
|
|
6238
|
+
}
|
|
6239
|
+
};
|
|
6240
|
+
},
|
|
6241
|
+
provides(providers2) {
|
|
6242
|
+
providers2.pseudoElements2svg = function(params) {
|
|
6243
|
+
const {
|
|
6244
|
+
node = DOCUMENT
|
|
6245
|
+
} = params;
|
|
6246
|
+
if (config.searchPseudoElements) {
|
|
6247
|
+
searchPseudoElements(node);
|
|
6248
|
+
}
|
|
6249
|
+
};
|
|
6250
|
+
}
|
|
6251
|
+
};
|
|
6252
|
+
var _unwatched = false;
|
|
6253
|
+
var MutationObserver$1 = {
|
|
6254
|
+
mixout() {
|
|
6255
|
+
return {
|
|
6256
|
+
dom: {
|
|
6257
|
+
unwatch() {
|
|
6258
|
+
disableObservation();
|
|
6259
|
+
_unwatched = true;
|
|
6260
|
+
}
|
|
6261
|
+
}
|
|
6262
|
+
};
|
|
6263
|
+
},
|
|
6264
|
+
hooks() {
|
|
6265
|
+
return {
|
|
6266
|
+
bootstrap() {
|
|
6267
|
+
observe(chainHooks("mutationObserverCallbacks", {}));
|
|
6268
|
+
},
|
|
6269
|
+
noAuto() {
|
|
6270
|
+
disconnect();
|
|
6271
|
+
},
|
|
6272
|
+
watch(params) {
|
|
6273
|
+
const {
|
|
6274
|
+
observeMutationsRoot
|
|
6275
|
+
} = params;
|
|
6276
|
+
if (_unwatched) {
|
|
6277
|
+
enableObservation();
|
|
6278
|
+
} else {
|
|
6279
|
+
observe(chainHooks("mutationObserverCallbacks", {
|
|
6280
|
+
observeMutationsRoot
|
|
6281
|
+
}));
|
|
6282
|
+
}
|
|
6283
|
+
}
|
|
6284
|
+
};
|
|
6285
|
+
}
|
|
6286
|
+
};
|
|
6287
|
+
var parseTransformString = (transformString) => {
|
|
6288
|
+
let transform = {
|
|
6289
|
+
size: 16,
|
|
6290
|
+
x: 0,
|
|
6291
|
+
y: 0,
|
|
6292
|
+
flipX: false,
|
|
6293
|
+
flipY: false,
|
|
6294
|
+
rotate: 0
|
|
6295
|
+
};
|
|
6296
|
+
return transformString.toLowerCase().split(" ").reduce((acc, n) => {
|
|
6297
|
+
const parts = n.toLowerCase().split("-");
|
|
6298
|
+
const first = parts[0];
|
|
6299
|
+
let rest = parts.slice(1).join("-");
|
|
6300
|
+
if (first && rest === "h") {
|
|
6301
|
+
acc.flipX = true;
|
|
6302
|
+
return acc;
|
|
6303
|
+
}
|
|
6304
|
+
if (first && rest === "v") {
|
|
6305
|
+
acc.flipY = true;
|
|
6306
|
+
return acc;
|
|
6307
|
+
}
|
|
6308
|
+
rest = parseFloat(rest);
|
|
6309
|
+
if (isNaN(rest)) {
|
|
6310
|
+
return acc;
|
|
6311
|
+
}
|
|
6312
|
+
switch (first) {
|
|
6313
|
+
case "grow":
|
|
6314
|
+
acc.size = acc.size + rest;
|
|
6315
|
+
break;
|
|
6316
|
+
case "shrink":
|
|
6317
|
+
acc.size = acc.size - rest;
|
|
6318
|
+
break;
|
|
6319
|
+
case "left":
|
|
6320
|
+
acc.x = acc.x - rest;
|
|
6321
|
+
break;
|
|
6322
|
+
case "right":
|
|
6323
|
+
acc.x = acc.x + rest;
|
|
6324
|
+
break;
|
|
6325
|
+
case "up":
|
|
6326
|
+
acc.y = acc.y - rest;
|
|
6327
|
+
break;
|
|
6328
|
+
case "down":
|
|
6329
|
+
acc.y = acc.y + rest;
|
|
6330
|
+
break;
|
|
6331
|
+
case "rotate":
|
|
6332
|
+
acc.rotate = acc.rotate + rest;
|
|
6333
|
+
break;
|
|
6334
|
+
}
|
|
6335
|
+
return acc;
|
|
6336
|
+
}, transform);
|
|
6337
|
+
};
|
|
6338
|
+
var PowerTransforms = {
|
|
6339
|
+
mixout() {
|
|
6340
|
+
return {
|
|
6341
|
+
parse: {
|
|
6342
|
+
transform: (transformString) => {
|
|
6343
|
+
return parseTransformString(transformString);
|
|
6344
|
+
}
|
|
6345
|
+
}
|
|
6346
|
+
};
|
|
6347
|
+
},
|
|
6348
|
+
hooks() {
|
|
6349
|
+
return {
|
|
6350
|
+
parseNodeAttributes(accumulator, node) {
|
|
6351
|
+
const transformString = node.getAttribute("data-fa-transform");
|
|
6352
|
+
if (transformString) {
|
|
6353
|
+
accumulator.transform = parseTransformString(transformString);
|
|
6354
|
+
}
|
|
6355
|
+
return accumulator;
|
|
6356
|
+
}
|
|
6357
|
+
};
|
|
6358
|
+
},
|
|
6359
|
+
provides(providers2) {
|
|
6360
|
+
providers2.generateAbstractTransformGrouping = function(_ref) {
|
|
6361
|
+
let {
|
|
6362
|
+
main,
|
|
6363
|
+
transform,
|
|
6364
|
+
containerWidth,
|
|
6365
|
+
iconWidth
|
|
6366
|
+
} = _ref;
|
|
6367
|
+
const outer = {
|
|
6368
|
+
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
6369
|
+
};
|
|
6370
|
+
const innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
6371
|
+
const innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
6372
|
+
const innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
6373
|
+
const inner = {
|
|
6374
|
+
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
6375
|
+
};
|
|
6376
|
+
const path = {
|
|
6377
|
+
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
6378
|
+
};
|
|
6379
|
+
const operations = {
|
|
6380
|
+
outer,
|
|
6381
|
+
inner,
|
|
6382
|
+
path
|
|
6383
|
+
};
|
|
6384
|
+
return {
|
|
6385
|
+
tag: "g",
|
|
6386
|
+
attributes: _objectSpread2({}, operations.outer),
|
|
6387
|
+
children: [{
|
|
6388
|
+
tag: "g",
|
|
6389
|
+
attributes: _objectSpread2({}, operations.inner),
|
|
6390
|
+
children: [{
|
|
6391
|
+
tag: main.icon.tag,
|
|
6392
|
+
children: main.icon.children,
|
|
6393
|
+
attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
|
|
6394
|
+
}]
|
|
6395
|
+
}]
|
|
6396
|
+
};
|
|
6397
|
+
};
|
|
6398
|
+
}
|
|
6399
|
+
};
|
|
6400
|
+
var ALL_SPACE = {
|
|
6401
|
+
x: 0,
|
|
6402
|
+
y: 0,
|
|
6403
|
+
width: "100%",
|
|
6404
|
+
height: "100%"
|
|
6405
|
+
};
|
|
6406
|
+
function fillBlack(abstract) {
|
|
6407
|
+
let force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
6408
|
+
if (abstract.attributes && (abstract.attributes.fill || force)) {
|
|
6409
|
+
abstract.attributes.fill = "black";
|
|
6410
|
+
}
|
|
6411
|
+
return abstract;
|
|
6412
|
+
}
|
|
6413
|
+
function deGroup(abstract) {
|
|
6414
|
+
if (abstract.tag === "g") {
|
|
6415
|
+
return abstract.children;
|
|
6416
|
+
} else {
|
|
6417
|
+
return [abstract];
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
var Masks = {
|
|
6421
|
+
hooks() {
|
|
6422
|
+
return {
|
|
6423
|
+
parseNodeAttributes(accumulator, node) {
|
|
6424
|
+
const maskData = node.getAttribute("data-fa-mask");
|
|
6425
|
+
const mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(" ").map((i) => i.trim()));
|
|
6426
|
+
if (!mask.prefix) {
|
|
6427
|
+
mask.prefix = getDefaultUsablePrefix();
|
|
6428
|
+
}
|
|
6429
|
+
accumulator.mask = mask;
|
|
6430
|
+
accumulator.maskId = node.getAttribute("data-fa-mask-id");
|
|
6431
|
+
return accumulator;
|
|
6432
|
+
}
|
|
6433
|
+
};
|
|
6434
|
+
},
|
|
6435
|
+
provides(providers2) {
|
|
6436
|
+
providers2.generateAbstractMask = function(_ref) {
|
|
6437
|
+
let {
|
|
6438
|
+
children,
|
|
6439
|
+
attributes,
|
|
6440
|
+
main,
|
|
6441
|
+
mask,
|
|
6442
|
+
maskId: explicitMaskId,
|
|
6443
|
+
transform
|
|
6444
|
+
} = _ref;
|
|
6445
|
+
const {
|
|
6446
|
+
width: mainWidth,
|
|
6447
|
+
icon: mainPath
|
|
6448
|
+
} = main;
|
|
6449
|
+
const {
|
|
6450
|
+
width: maskWidth,
|
|
6451
|
+
icon: maskPath
|
|
6452
|
+
} = mask;
|
|
6453
|
+
const trans = transformForSvg({
|
|
6454
|
+
transform,
|
|
6455
|
+
containerWidth: maskWidth,
|
|
6456
|
+
iconWidth: mainWidth
|
|
6457
|
+
});
|
|
6458
|
+
const maskRect = {
|
|
6459
|
+
tag: "rect",
|
|
6460
|
+
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
6461
|
+
fill: "white"
|
|
6462
|
+
})
|
|
6463
|
+
};
|
|
6464
|
+
const maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
6465
|
+
children: mainPath.children.map(fillBlack)
|
|
6466
|
+
} : {};
|
|
6467
|
+
const maskInnerGroup = {
|
|
6468
|
+
tag: "g",
|
|
6469
|
+
attributes: _objectSpread2({}, trans.inner),
|
|
6470
|
+
children: [fillBlack(_objectSpread2({
|
|
6471
|
+
tag: mainPath.tag,
|
|
6472
|
+
attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
|
|
6473
|
+
}, maskInnerGroupChildrenMixin))]
|
|
6474
|
+
};
|
|
6475
|
+
const maskOuterGroup = {
|
|
6476
|
+
tag: "g",
|
|
6477
|
+
attributes: _objectSpread2({}, trans.outer),
|
|
6478
|
+
children: [maskInnerGroup]
|
|
6479
|
+
};
|
|
6480
|
+
const maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
6481
|
+
const clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
6482
|
+
const maskTag = {
|
|
6483
|
+
tag: "mask",
|
|
6484
|
+
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
6485
|
+
id: maskId,
|
|
6486
|
+
maskUnits: "userSpaceOnUse",
|
|
6487
|
+
maskContentUnits: "userSpaceOnUse"
|
|
6488
|
+
}),
|
|
6489
|
+
children: [maskRect, maskOuterGroup]
|
|
6490
|
+
};
|
|
6491
|
+
const defs = {
|
|
6492
|
+
tag: "defs",
|
|
6493
|
+
children: [{
|
|
6494
|
+
tag: "clipPath",
|
|
6495
|
+
attributes: {
|
|
6496
|
+
id: clipId
|
|
6497
|
+
},
|
|
6498
|
+
children: deGroup(maskPath)
|
|
6499
|
+
}, maskTag]
|
|
6500
|
+
};
|
|
6501
|
+
children.push(defs, {
|
|
6502
|
+
tag: "rect",
|
|
6503
|
+
attributes: _objectSpread2({
|
|
6504
|
+
fill: "currentColor",
|
|
6505
|
+
"clip-path": "url(#".concat(clipId, ")"),
|
|
6506
|
+
mask: "url(#".concat(maskId, ")")
|
|
6507
|
+
}, ALL_SPACE)
|
|
6508
|
+
});
|
|
6509
|
+
return {
|
|
6510
|
+
children,
|
|
6511
|
+
attributes
|
|
6512
|
+
};
|
|
6513
|
+
};
|
|
6514
|
+
}
|
|
6515
|
+
};
|
|
6516
|
+
var MissingIconIndicator = {
|
|
6517
|
+
provides(providers2) {
|
|
6518
|
+
let reduceMotion = false;
|
|
6519
|
+
if (WINDOW.matchMedia) {
|
|
6520
|
+
reduceMotion = WINDOW.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
6521
|
+
}
|
|
6522
|
+
providers2.missingIconAbstract = function() {
|
|
6523
|
+
const gChildren = [];
|
|
6524
|
+
const FILL = {
|
|
6525
|
+
fill: "currentColor"
|
|
6526
|
+
};
|
|
6527
|
+
const ANIMATION_BASE = {
|
|
6528
|
+
attributeType: "XML",
|
|
6529
|
+
repeatCount: "indefinite",
|
|
6530
|
+
dur: "2s"
|
|
6531
|
+
};
|
|
6532
|
+
gChildren.push({
|
|
6533
|
+
tag: "path",
|
|
6534
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
6535
|
+
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"
|
|
6536
|
+
})
|
|
6537
|
+
});
|
|
6538
|
+
const OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
6539
|
+
attributeName: "opacity"
|
|
6540
|
+
});
|
|
6541
|
+
const dot = {
|
|
6542
|
+
tag: "circle",
|
|
6543
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
6544
|
+
cx: "256",
|
|
6545
|
+
cy: "364",
|
|
6546
|
+
r: "28"
|
|
6547
|
+
}),
|
|
6548
|
+
children: []
|
|
6549
|
+
};
|
|
6550
|
+
if (!reduceMotion) {
|
|
6551
|
+
dot.children.push({
|
|
6552
|
+
tag: "animate",
|
|
6553
|
+
attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
6554
|
+
attributeName: "r",
|
|
6555
|
+
values: "28;14;28;28;14;28;"
|
|
6556
|
+
})
|
|
6557
|
+
}, {
|
|
6558
|
+
tag: "animate",
|
|
6559
|
+
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
6560
|
+
values: "1;0;1;1;0;1;"
|
|
6561
|
+
})
|
|
6562
|
+
});
|
|
6563
|
+
}
|
|
6564
|
+
gChildren.push(dot);
|
|
6565
|
+
gChildren.push({
|
|
6566
|
+
tag: "path",
|
|
6567
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
6568
|
+
opacity: "1",
|
|
6569
|
+
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"
|
|
6570
|
+
}),
|
|
6571
|
+
children: reduceMotion ? [] : [{
|
|
6572
|
+
tag: "animate",
|
|
6573
|
+
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
6574
|
+
values: "1;0;0;0;0;1;"
|
|
6575
|
+
})
|
|
6576
|
+
}]
|
|
6577
|
+
});
|
|
6578
|
+
if (!reduceMotion) {
|
|
6579
|
+
gChildren.push({
|
|
6580
|
+
tag: "path",
|
|
6581
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
6582
|
+
opacity: "0",
|
|
6583
|
+
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"
|
|
6584
|
+
}),
|
|
6585
|
+
children: [{
|
|
6586
|
+
tag: "animate",
|
|
6587
|
+
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
6588
|
+
values: "0;0;1;1;0;0;"
|
|
6589
|
+
})
|
|
6590
|
+
}]
|
|
6591
|
+
});
|
|
6592
|
+
}
|
|
6593
|
+
return {
|
|
6594
|
+
tag: "g",
|
|
6595
|
+
attributes: {
|
|
6596
|
+
"class": "missing"
|
|
6597
|
+
},
|
|
6598
|
+
children: gChildren
|
|
6599
|
+
};
|
|
6600
|
+
};
|
|
6601
|
+
}
|
|
6602
|
+
};
|
|
6603
|
+
var SvgSymbols = {
|
|
6604
|
+
hooks() {
|
|
6605
|
+
return {
|
|
6606
|
+
parseNodeAttributes(accumulator, node) {
|
|
6607
|
+
const symbolData = node.getAttribute("data-fa-symbol");
|
|
6608
|
+
const symbol = symbolData === null ? false : symbolData === "" ? true : symbolData;
|
|
6609
|
+
accumulator["symbol"] = symbol;
|
|
6610
|
+
return accumulator;
|
|
6611
|
+
}
|
|
6612
|
+
};
|
|
6613
|
+
}
|
|
6614
|
+
};
|
|
6615
|
+
var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
|
|
6616
|
+
registerPlugins(plugins, {
|
|
6617
|
+
mixoutsTo: api
|
|
6618
|
+
});
|
|
6619
|
+
api.noAuto;
|
|
6620
|
+
api.config;
|
|
6621
|
+
api.library;
|
|
6622
|
+
api.dom;
|
|
6623
|
+
var parse$1 = api.parse;
|
|
6624
|
+
api.findIconDefinition;
|
|
6625
|
+
api.toHtml;
|
|
6626
|
+
var icon = api.icon;
|
|
6627
|
+
api.layer;
|
|
6628
|
+
api.text;
|
|
6629
|
+
api.counter;
|
|
6630
|
+
function _arrayLikeToArray(r3, a) {
|
|
6631
|
+
(null == a || a > r3.length) && (a = r3.length);
|
|
6632
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r3[e];
|
|
6633
|
+
return n;
|
|
6634
|
+
}
|
|
6635
|
+
function _arrayWithHoles(r3) {
|
|
6636
|
+
if (Array.isArray(r3)) return r3;
|
|
6637
|
+
}
|
|
6638
|
+
function _arrayWithoutHoles(r3) {
|
|
6639
|
+
if (Array.isArray(r3)) return _arrayLikeToArray(r3);
|
|
6640
|
+
}
|
|
6641
|
+
function _defineProperty2(e, r3, t2) {
|
|
6642
|
+
return (r3 = _toPropertyKey2(r3)) in e ? Object.defineProperty(e, r3, {
|
|
6643
|
+
value: t2,
|
|
6644
|
+
enumerable: true,
|
|
6645
|
+
configurable: true,
|
|
6646
|
+
writable: true
|
|
6647
|
+
}) : e[r3] = t2, e;
|
|
6648
|
+
}
|
|
6649
|
+
function _iterableToArray(r3) {
|
|
6650
|
+
if ("undefined" != typeof Symbol && null != r3[Symbol.iterator] || null != r3["@@iterator"]) return Array.from(r3);
|
|
6651
|
+
}
|
|
6652
|
+
function _iterableToArrayLimit(r3, l) {
|
|
6653
|
+
var t2 = null == r3 ? null : "undefined" != typeof Symbol && r3[Symbol.iterator] || r3["@@iterator"];
|
|
6654
|
+
if (null != t2) {
|
|
6655
|
+
var e, n, i, u, a = [], f = true, o2 = false;
|
|
6656
|
+
try {
|
|
6657
|
+
if (i = (t2 = t2.call(r3)).next, 0 === l) ; else for (; !(f = (e = i.call(t2)).done) && (a.push(e.value), a.length !== l); f = true) ;
|
|
6658
|
+
} catch (r4) {
|
|
6659
|
+
o2 = true, n = r4;
|
|
6660
|
+
} finally {
|
|
6661
|
+
try {
|
|
6662
|
+
if (!f && null != t2.return && (u = t2.return(), Object(u) !== u)) return;
|
|
6663
|
+
} finally {
|
|
6664
|
+
if (o2) throw n;
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
return a;
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
function _nonIterableRest() {
|
|
6671
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6672
|
+
}
|
|
6673
|
+
function _nonIterableSpread() {
|
|
6674
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6675
|
+
}
|
|
6676
|
+
function ownKeys2(e, r3) {
|
|
6677
|
+
var t2 = Object.keys(e);
|
|
6678
|
+
if (Object.getOwnPropertySymbols) {
|
|
6679
|
+
var o2 = Object.getOwnPropertySymbols(e);
|
|
6680
|
+
r3 && (o2 = o2.filter(function(r4) {
|
|
6681
|
+
return Object.getOwnPropertyDescriptor(e, r4).enumerable;
|
|
6682
|
+
})), t2.push.apply(t2, o2);
|
|
6683
|
+
}
|
|
6684
|
+
return t2;
|
|
6685
|
+
}
|
|
6686
|
+
function _objectSpread22(e) {
|
|
6687
|
+
for (var r3 = 1; r3 < arguments.length; r3++) {
|
|
6688
|
+
var t2 = null != arguments[r3] ? arguments[r3] : {};
|
|
6689
|
+
r3 % 2 ? ownKeys2(Object(t2), true).forEach(function(r4) {
|
|
6690
|
+
_defineProperty2(e, r4, t2[r4]);
|
|
6691
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t2)) : ownKeys2(Object(t2)).forEach(function(r4) {
|
|
6692
|
+
Object.defineProperty(e, r4, Object.getOwnPropertyDescriptor(t2, r4));
|
|
6693
|
+
});
|
|
6694
|
+
}
|
|
6695
|
+
return e;
|
|
6696
|
+
}
|
|
6697
|
+
function _objectWithoutProperties(e, t2) {
|
|
6698
|
+
if (null == e) return {};
|
|
6699
|
+
var o2, r3, i = _objectWithoutPropertiesLoose(e, t2);
|
|
6700
|
+
if (Object.getOwnPropertySymbols) {
|
|
6701
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
6702
|
+
for (r3 = 0; r3 < n.length; r3++) o2 = n[r3], -1 === t2.indexOf(o2) && {}.propertyIsEnumerable.call(e, o2) && (i[o2] = e[o2]);
|
|
6703
|
+
}
|
|
6704
|
+
return i;
|
|
6705
|
+
}
|
|
6706
|
+
function _objectWithoutPropertiesLoose(r3, e) {
|
|
6707
|
+
if (null == r3) return {};
|
|
6708
|
+
var t2 = {};
|
|
6709
|
+
for (var n in r3) if ({}.hasOwnProperty.call(r3, n)) {
|
|
6710
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
6711
|
+
t2[n] = r3[n];
|
|
6712
|
+
}
|
|
6713
|
+
return t2;
|
|
6714
|
+
}
|
|
6715
|
+
function _slicedToArray(r3, e) {
|
|
6716
|
+
return _arrayWithHoles(r3) || _iterableToArrayLimit(r3, e) || _unsupportedIterableToArray(r3, e) || _nonIterableRest();
|
|
6717
|
+
}
|
|
6718
|
+
function _toConsumableArray(r3) {
|
|
6719
|
+
return _arrayWithoutHoles(r3) || _iterableToArray(r3) || _unsupportedIterableToArray(r3) || _nonIterableSpread();
|
|
6720
|
+
}
|
|
6721
|
+
function _toPrimitive2(t2, r3) {
|
|
6722
|
+
if ("object" != typeof t2 || !t2) return t2;
|
|
6723
|
+
var e = t2[Symbol.toPrimitive];
|
|
6724
|
+
if (void 0 !== e) {
|
|
6725
|
+
var i = e.call(t2, r3);
|
|
6726
|
+
if ("object" != typeof i) return i;
|
|
6727
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
6728
|
+
}
|
|
6729
|
+
return ("string" === r3 ? String : Number)(t2);
|
|
6730
|
+
}
|
|
6731
|
+
function _toPropertyKey2(t2) {
|
|
6732
|
+
var i = _toPrimitive2(t2, "string");
|
|
6733
|
+
return "symbol" == typeof i ? i : i + "";
|
|
6734
|
+
}
|
|
6735
|
+
function _typeof(o2) {
|
|
6736
|
+
"@babel/helpers - typeof";
|
|
6737
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
|
|
6738
|
+
return typeof o3;
|
|
6739
|
+
} : function(o3) {
|
|
6740
|
+
return o3 && "function" == typeof Symbol && o3.constructor === Symbol && o3 !== Symbol.prototype ? "symbol" : typeof o3;
|
|
6741
|
+
}, _typeof(o2);
|
|
6742
|
+
}
|
|
6743
|
+
function _unsupportedIterableToArray(r3, a) {
|
|
6744
|
+
if (r3) {
|
|
6745
|
+
if ("string" == typeof r3) return _arrayLikeToArray(r3, a);
|
|
6746
|
+
var t2 = {}.toString.call(r3).slice(8, -1);
|
|
6747
|
+
return "Object" === t2 && r3.constructor && (t2 = r3.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r3) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r3, a) : void 0;
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
var ICON_PACKS_STARTING_VERSION = "7.0.0";
|
|
6751
|
+
var SVG_CORE_VERSION;
|
|
6752
|
+
try {
|
|
6753
|
+
svgCorePackageJson = require_package();
|
|
6754
|
+
SVG_CORE_VERSION = svgCorePackageJson.version;
|
|
6755
|
+
} catch (e) {
|
|
6756
|
+
SVG_CORE_VERSION = typeof process !== "undefined" && process.env.FA_VERSION || "7.0.0";
|
|
6757
|
+
}
|
|
6758
|
+
var svgCorePackageJson;
|
|
6759
|
+
function classList(props) {
|
|
6760
|
+
var beat = props.beat, fade = props.fade, beatFade = props.beatFade, bounce = props.bounce, shake = props.shake, flash = props.flash, spin = props.spin, spinPulse = props.spinPulse, spinReverse = props.spinReverse, pulse = props.pulse, fixedWidth = props.fixedWidth, inverse = props.inverse, border = props.border, listItem = props.listItem, flip = props.flip, size = props.size, rotation = props.rotation, pull = props.pull, swapOpacity = props.swapOpacity, rotateBy = props.rotateBy, widthAuto = props.widthAuto;
|
|
6761
|
+
var isVersion7OrLater = versionCheckGte(SVG_CORE_VERSION, ICON_PACKS_STARTING_VERSION);
|
|
6762
|
+
var classes = _defineProperty2(_defineProperty2(_defineProperty2(_defineProperty2(_defineProperty2(_defineProperty2({
|
|
6763
|
+
"fa-beat": beat,
|
|
6764
|
+
"fa-fade": fade,
|
|
6765
|
+
"fa-beat-fade": beatFade,
|
|
6766
|
+
"fa-bounce": bounce,
|
|
6767
|
+
"fa-shake": shake,
|
|
6768
|
+
"fa-flash": flash,
|
|
6769
|
+
"fa-spin": spin,
|
|
6770
|
+
"fa-spin-reverse": spinReverse,
|
|
6771
|
+
"fa-spin-pulse": spinPulse,
|
|
6772
|
+
"fa-pulse": pulse,
|
|
6773
|
+
"fa-fw": fixedWidth,
|
|
6774
|
+
"fa-inverse": inverse,
|
|
6775
|
+
"fa-border": border,
|
|
6776
|
+
"fa-li": listItem,
|
|
6777
|
+
"fa-flip": flip === true,
|
|
6778
|
+
"fa-flip-horizontal": flip === "horizontal" || flip === "both",
|
|
6779
|
+
"fa-flip-vertical": flip === "vertical" || flip === "both"
|
|
6780
|
+
}, "fa-".concat(size), typeof size !== "undefined" && size !== null), "fa-rotate-".concat(rotation), typeof rotation !== "undefined" && rotation !== null && rotation !== 0), "fa-pull-".concat(pull), typeof pull !== "undefined" && pull !== null), "fa-swap-opacity", swapOpacity), "fa-rotate-by", isVersion7OrLater && rotateBy), "fa-width-auto", isVersion7OrLater && widthAuto);
|
|
6781
|
+
return Object.keys(classes).map(function(key) {
|
|
6782
|
+
return classes[key] ? key : null;
|
|
6783
|
+
}).filter(function(key) {
|
|
6784
|
+
return key;
|
|
6785
|
+
});
|
|
6786
|
+
}
|
|
6787
|
+
function versionCheckGte(version1, version2) {
|
|
6788
|
+
var _version1$split = version1.split("-"), _version1$split2 = _slicedToArray(_version1$split, 2), v1Base = _version1$split2[0], v1PreRelease = _version1$split2[1];
|
|
6789
|
+
var _version2$split = version2.split("-"), _version2$split2 = _slicedToArray(_version2$split, 2), v2Base = _version2$split2[0], v2PreRelease = _version2$split2[1];
|
|
6790
|
+
var v1Parts = v1Base.split(".");
|
|
6791
|
+
var v2Parts = v2Base.split(".");
|
|
6792
|
+
for (var i = 0; i < Math.max(v1Parts.length, v2Parts.length); i++) {
|
|
6793
|
+
var v1Part = v1Parts[i] || "0";
|
|
6794
|
+
var v2Part = v2Parts[i] || "0";
|
|
6795
|
+
var v1Num = parseInt(v1Part, 10);
|
|
6796
|
+
var v2Num = parseInt(v2Part, 10);
|
|
6797
|
+
if (v1Num !== v2Num) {
|
|
6798
|
+
return v1Num > v2Num;
|
|
6799
|
+
}
|
|
6800
|
+
}
|
|
6801
|
+
for (var _i = 0; _i < Math.max(v1Parts.length, v2Parts.length); _i++) {
|
|
6802
|
+
var _v1Part = v1Parts[_i] || "0";
|
|
6803
|
+
var _v2Part = v2Parts[_i] || "0";
|
|
6804
|
+
if (_v1Part !== _v2Part) {
|
|
6805
|
+
if (_v1Part.length !== _v2Part.length) {
|
|
6806
|
+
return _v1Part.length < _v2Part.length;
|
|
6807
|
+
}
|
|
6808
|
+
}
|
|
6809
|
+
}
|
|
6810
|
+
if (v1PreRelease && !v2PreRelease) return false;
|
|
6811
|
+
if (!v1PreRelease && v2PreRelease) return true;
|
|
6812
|
+
return true;
|
|
6813
|
+
}
|
|
6814
|
+
function _isNumerical(obj) {
|
|
6815
|
+
obj = obj - 0;
|
|
6816
|
+
return obj === obj;
|
|
6817
|
+
}
|
|
6818
|
+
function camelize(string) {
|
|
6819
|
+
if (_isNumerical(string)) {
|
|
6820
|
+
return string;
|
|
6821
|
+
}
|
|
6822
|
+
string = string.replace(/[\-_\s]+(.)?/g, function(match, chr) {
|
|
6823
|
+
return chr ? chr.toUpperCase() : "";
|
|
6824
|
+
});
|
|
6825
|
+
return string.substr(0, 1).toLowerCase() + string.substr(1);
|
|
6826
|
+
}
|
|
6827
|
+
var _excluded = ["style"];
|
|
6828
|
+
function capitalize(val) {
|
|
6829
|
+
return val.charAt(0).toUpperCase() + val.slice(1);
|
|
6830
|
+
}
|
|
6831
|
+
function styleToObject(style) {
|
|
6832
|
+
return style.split(";").map(function(s2) {
|
|
6833
|
+
return s2.trim();
|
|
6834
|
+
}).filter(function(s2) {
|
|
6835
|
+
return s2;
|
|
6836
|
+
}).reduce(function(acc, pair) {
|
|
6837
|
+
var i = pair.indexOf(":");
|
|
6838
|
+
var prop = camelize(pair.slice(0, i));
|
|
6839
|
+
var value = pair.slice(i + 1).trim();
|
|
6840
|
+
prop.startsWith("webkit") ? acc[capitalize(prop)] = value : acc[prop] = value;
|
|
6841
|
+
return acc;
|
|
6842
|
+
}, {});
|
|
6843
|
+
}
|
|
6844
|
+
function convert(createElement4, element) {
|
|
6845
|
+
var extraProps = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6846
|
+
if (typeof element === "string") {
|
|
6847
|
+
return element;
|
|
6848
|
+
}
|
|
6849
|
+
var children = (element.children || []).map(function(child) {
|
|
6850
|
+
return convert(createElement4, child);
|
|
6851
|
+
});
|
|
6852
|
+
var mixins = Object.keys(element.attributes || {}).reduce(function(acc, key) {
|
|
6853
|
+
var val = element.attributes[key];
|
|
6854
|
+
switch (key) {
|
|
6855
|
+
case "class":
|
|
6856
|
+
acc.attrs["className"] = val;
|
|
6857
|
+
delete element.attributes["class"];
|
|
6858
|
+
break;
|
|
6859
|
+
case "style":
|
|
6860
|
+
acc.attrs["style"] = styleToObject(val);
|
|
6861
|
+
break;
|
|
6862
|
+
default:
|
|
6863
|
+
if (key.indexOf("aria-") === 0 || key.indexOf("data-") === 0) {
|
|
6864
|
+
acc.attrs[key.toLowerCase()] = val;
|
|
6865
|
+
} else {
|
|
6866
|
+
acc.attrs[camelize(key)] = val;
|
|
6867
|
+
}
|
|
6868
|
+
}
|
|
6869
|
+
return acc;
|
|
6870
|
+
}, {
|
|
6871
|
+
attrs: {}
|
|
6872
|
+
});
|
|
6873
|
+
var _extraProps$style = extraProps.style, existingStyle = _extraProps$style === void 0 ? {} : _extraProps$style, remaining = _objectWithoutProperties(extraProps, _excluded);
|
|
6874
|
+
mixins.attrs["style"] = _objectSpread22(_objectSpread22({}, mixins.attrs["style"]), existingStyle);
|
|
6875
|
+
return createElement4.apply(void 0, [element.tag, _objectSpread22(_objectSpread22({}, mixins.attrs), remaining)].concat(_toConsumableArray(children)));
|
|
6876
|
+
}
|
|
6877
|
+
var PRODUCTION2 = false;
|
|
6878
|
+
try {
|
|
6879
|
+
PRODUCTION2 = process.env.NODE_ENV === "production";
|
|
6880
|
+
} catch (e) {
|
|
6881
|
+
}
|
|
6882
|
+
function log() {
|
|
6883
|
+
if (!PRODUCTION2 && console && typeof console.error === "function") {
|
|
6884
|
+
var _console;
|
|
6885
|
+
(_console = console).error.apply(_console, arguments);
|
|
6886
|
+
}
|
|
6887
|
+
}
|
|
6888
|
+
function normalizeIconArgs(icon2) {
|
|
6889
|
+
if (icon2 && _typeof(icon2) === "object" && icon2.prefix && icon2.iconName && icon2.icon) {
|
|
6890
|
+
return icon2;
|
|
6891
|
+
}
|
|
6892
|
+
if (parse$1.icon) {
|
|
6893
|
+
return parse$1.icon(icon2);
|
|
6894
|
+
}
|
|
6895
|
+
if (icon2 === null) {
|
|
6896
|
+
return null;
|
|
6897
|
+
}
|
|
6898
|
+
if (icon2 && _typeof(icon2) === "object" && icon2.prefix && icon2.iconName) {
|
|
6899
|
+
return icon2;
|
|
6900
|
+
}
|
|
6901
|
+
if (Array.isArray(icon2) && icon2.length === 2) {
|
|
6902
|
+
return {
|
|
6903
|
+
prefix: icon2[0],
|
|
6904
|
+
iconName: icon2[1]
|
|
6905
|
+
};
|
|
6906
|
+
}
|
|
6907
|
+
if (typeof icon2 === "string") {
|
|
6908
|
+
return {
|
|
6909
|
+
prefix: "fas",
|
|
6910
|
+
iconName: icon2
|
|
6911
|
+
};
|
|
6912
|
+
}
|
|
6913
|
+
}
|
|
6914
|
+
function objectWithKey(key, value) {
|
|
6915
|
+
return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? _defineProperty2({}, key, value) : {};
|
|
6916
|
+
}
|
|
6917
|
+
var defaultProps = {
|
|
6918
|
+
border: false,
|
|
6919
|
+
className: "",
|
|
6920
|
+
mask: null,
|
|
6921
|
+
maskId: null,
|
|
6922
|
+
// the fixedWidth property has been deprecated as of version 7
|
|
6923
|
+
fixedWidth: false,
|
|
6924
|
+
inverse: false,
|
|
6925
|
+
flip: false,
|
|
6926
|
+
icon: null,
|
|
6927
|
+
listItem: false,
|
|
6928
|
+
pull: null,
|
|
6929
|
+
pulse: false,
|
|
6930
|
+
rotation: null,
|
|
6931
|
+
rotateBy: false,
|
|
6932
|
+
size: null,
|
|
6933
|
+
spin: false,
|
|
6934
|
+
spinPulse: false,
|
|
6935
|
+
spinReverse: false,
|
|
6936
|
+
beat: false,
|
|
6937
|
+
fade: false,
|
|
6938
|
+
beatFade: false,
|
|
6939
|
+
bounce: false,
|
|
6940
|
+
shake: false,
|
|
6941
|
+
symbol: false,
|
|
6942
|
+
title: "",
|
|
6943
|
+
titleId: null,
|
|
6944
|
+
transform: null,
|
|
6945
|
+
swapOpacity: false,
|
|
6946
|
+
widthAuto: false
|
|
6947
|
+
};
|
|
6948
|
+
var FontAwesomeIcon = /* @__PURE__ */ React3__default.forwardRef(function(props, ref) {
|
|
6949
|
+
var allProps = _objectSpread22(_objectSpread22({}, defaultProps), props);
|
|
6950
|
+
var iconArgs = allProps.icon, maskArgs = allProps.mask, symbol = allProps.symbol, className = allProps.className, title = allProps.title, titleId = allProps.titleId, maskId = allProps.maskId;
|
|
6951
|
+
var iconLookup = normalizeIconArgs(iconArgs);
|
|
6952
|
+
var classes = objectWithKey("classes", [].concat(_toConsumableArray(classList(allProps)), _toConsumableArray((className || "").split(" "))));
|
|
6953
|
+
var transform = objectWithKey("transform", typeof allProps.transform === "string" ? parse$1.transform(allProps.transform) : allProps.transform);
|
|
6954
|
+
var mask = objectWithKey("mask", normalizeIconArgs(maskArgs));
|
|
6955
|
+
var renderedIcon = icon(iconLookup, _objectSpread22(_objectSpread22(_objectSpread22(_objectSpread22({}, classes), transform), mask), {}, {
|
|
6956
|
+
symbol,
|
|
6957
|
+
title,
|
|
6958
|
+
titleId,
|
|
6959
|
+
maskId
|
|
6960
|
+
}));
|
|
6961
|
+
if (!renderedIcon) {
|
|
6962
|
+
log("Could not find icon", iconLookup);
|
|
6963
|
+
return null;
|
|
6964
|
+
}
|
|
6965
|
+
var abstract = renderedIcon.abstract;
|
|
6966
|
+
var extraProps = {
|
|
6967
|
+
ref
|
|
6968
|
+
};
|
|
6969
|
+
Object.keys(allProps).forEach(function(key) {
|
|
6970
|
+
if (!defaultProps.hasOwnProperty(key)) {
|
|
6971
|
+
extraProps[key] = allProps[key];
|
|
6972
|
+
}
|
|
6973
|
+
});
|
|
6974
|
+
return convertCurry(abstract[0], extraProps);
|
|
6975
|
+
});
|
|
6976
|
+
FontAwesomeIcon.displayName = "FontAwesomeIcon";
|
|
6977
|
+
FontAwesomeIcon.propTypes = {
|
|
6978
|
+
beat: PropTypes.bool,
|
|
6979
|
+
border: PropTypes.bool,
|
|
6980
|
+
beatFade: PropTypes.bool,
|
|
6981
|
+
bounce: PropTypes.bool,
|
|
6982
|
+
className: PropTypes.string,
|
|
6983
|
+
fade: PropTypes.bool,
|
|
6984
|
+
flash: PropTypes.bool,
|
|
6985
|
+
mask: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),
|
|
6986
|
+
maskId: PropTypes.string,
|
|
6987
|
+
// the fixedWidth property has been deprecated as of version 7
|
|
6988
|
+
fixedWidth: PropTypes.bool,
|
|
6989
|
+
inverse: PropTypes.bool,
|
|
6990
|
+
flip: PropTypes.oneOf([true, false, "horizontal", "vertical", "both"]),
|
|
6991
|
+
icon: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),
|
|
6992
|
+
listItem: PropTypes.bool,
|
|
6993
|
+
pull: PropTypes.oneOf(["right", "left"]),
|
|
6994
|
+
pulse: PropTypes.bool,
|
|
6995
|
+
rotation: PropTypes.oneOf([0, 90, 180, 270]),
|
|
6996
|
+
rotateBy: PropTypes.bool,
|
|
6997
|
+
shake: PropTypes.bool,
|
|
6998
|
+
size: PropTypes.oneOf(["2xs", "xs", "sm", "lg", "xl", "2xl", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"]),
|
|
6999
|
+
spin: PropTypes.bool,
|
|
7000
|
+
spinPulse: PropTypes.bool,
|
|
7001
|
+
spinReverse: PropTypes.bool,
|
|
7002
|
+
symbol: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
7003
|
+
title: PropTypes.string,
|
|
7004
|
+
titleId: PropTypes.string,
|
|
7005
|
+
transform: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
7006
|
+
swapOpacity: PropTypes.bool,
|
|
7007
|
+
widthAuto: PropTypes.bool
|
|
7008
|
+
};
|
|
7009
|
+
var convertCurry = convert.bind(null, React3__default.createElement);
|
|
7010
|
+
|
|
7011
|
+
// ../../node_modules/.pnpm/@fortawesome+pro-solid-svg-icons@6.7.2/node_modules/@fortawesome/pro-solid-svg-icons/index.mjs
|
|
7012
|
+
var faGripVertical = {
|
|
7013
|
+
prefix: "fas",
|
|
7014
|
+
iconName: "grip-vertical",
|
|
7015
|
+
icon: [320, 512, [], "f58e", "M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"]
|
|
7016
|
+
};
|
|
7017
|
+
var faCircleXmark = {
|
|
7018
|
+
prefix: "fas",
|
|
7019
|
+
iconName: "circle-xmark",
|
|
7020
|
+
icon: [512, 512, [61532, "times-circle", "xmark-circle"], "f057", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]
|
|
7021
|
+
};
|
|
7022
|
+
|
|
7023
|
+
// src/components/slots/SlotDelete.tsx
|
|
7024
|
+
var SlotDelete = (props) => {
|
|
7025
|
+
const { slotId, onDelete } = props;
|
|
7026
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Button, { variant: "ghost", size: "iconSm", onClick: onDelete }, /* @__PURE__ */ React.createElement(FontAwesomeIcon, { icon: faCircleXmark, className: "uii:text-red-500" })));
|
|
7027
|
+
};
|
|
7028
|
+
|
|
7029
|
+
// src/components/slots/SlotDragHandle.tsx
|
|
7030
|
+
var SlotDragHandle = (props) => {
|
|
7031
|
+
const { slotId } = props;
|
|
7032
|
+
return /* @__PURE__ */ React.createElement("div", { className: "uii:cursor-grab" }, /* @__PURE__ */ React.createElement(FontAwesomeIcon, { icon: faGripVertical }));
|
|
7033
|
+
};
|
|
7034
|
+
/*! Bundled license information:
|
|
7035
|
+
|
|
7036
|
+
@fortawesome/fontawesome-svg-core/index.mjs:
|
|
7037
|
+
(*!
|
|
7038
|
+
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
7039
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
7040
|
+
* Copyright 2024 Fonticons, Inc.
|
|
7041
|
+
*)
|
|
7042
|
+
|
|
7043
|
+
@fortawesome/pro-solid-svg-icons/index.mjs:
|
|
7044
|
+
(*!
|
|
7045
|
+
* Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com
|
|
7046
|
+
* License - https://fontawesome.com/license (Commercial License)
|
|
7047
|
+
* Copyright 2024 Fonticons, Inc.
|
|
7048
|
+
*)
|
|
7049
|
+
*/
|
|
3258
7050
|
|
|
3259
|
-
export { ExportManager, SlotElements };
|
|
7051
|
+
export { ExportManager, SlotDelete, SlotDragHandle, SlotElements, SlotEnable };
|
|
3260
7052
|
//# sourceMappingURL=index.js.map
|
|
3261
7053
|
//# sourceMappingURL=index.js.map
|