svelte-fa.cjs.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var internal = require('svelte/internal');
  4. const parseNumber = parseFloat;
  5. function joinCss(obj, separator = ';') {
  6. let texts;
  7. if (Array.isArray(obj)) {
  8. texts = obj.filter((text) => text);
  9. } else {
  10. texts = [];
  11. for (const prop in obj) {
  12. if (obj[prop]) {
  13. texts.push(`${prop}:${obj[prop]}`);
  14. }
  15. }
  16. }
  17. return texts.join(separator);
  18. }
  19. function getStyles(style, size, pull, fw) {
  20. let float;
  21. let width;
  22. const height = '1em';
  23. let lineHeight;
  24. let fontSize;
  25. let textAlign;
  26. let verticalAlign = '-.125em';
  27. const overflow = 'visible';
  28. if (fw) {
  29. textAlign = 'center';
  30. width = '1.25em';
  31. }
  32. if (pull) {
  33. float = pull;
  34. }
  35. if (size) {
  36. if (size == 'lg') {
  37. fontSize = '1.33333em';
  38. lineHeight = '.75em';
  39. verticalAlign = '-.225em';
  40. } else if (size == 'xs') {
  41. fontSize = '.75em';
  42. } else if (size == 'sm') {
  43. fontSize = '.875em';
  44. } else {
  45. fontSize = size.replace('x', 'em');
  46. }
  47. }
  48. return joinCss([
  49. joinCss({
  50. float,
  51. width,
  52. height,
  53. 'line-height': lineHeight,
  54. 'font-size': fontSize,
  55. 'text-align': textAlign,
  56. 'vertical-align': verticalAlign,
  57. 'transform-origin': 'center',
  58. overflow,
  59. }),
  60. style,
  61. ]);
  62. }
  63. function getTransform(
  64. scale,
  65. translateX,
  66. translateY,
  67. rotate,
  68. flip,
  69. translateTimes = 1,
  70. translateUnit = '',
  71. rotateUnit = '',
  72. ) {
  73. let flipX = 1;
  74. let flipY = 1;
  75. if (flip) {
  76. if (flip == 'horizontal') {
  77. flipX = -1;
  78. } else if (flip == 'vertical') {
  79. flipY = -1;
  80. } else {
  81. flipX = flipY = -1;
  82. }
  83. }
  84. return joinCss(
  85. [
  86. `translate(${parseNumber(translateX) * translateTimes}${translateUnit},${parseNumber(translateY) * translateTimes}${translateUnit})`,
  87. `scale(${flipX * parseNumber(scale)},${flipY * parseNumber(scale)})`,
  88. rotate && `rotate(${rotate}${rotateUnit})`,
  89. ],
  90. ' ',
  91. );
  92. }
  93. /* src\fa.svelte generated by Svelte v3.16.7 */
  94. function add_css$1() {
  95. var style = internal.element("style");
  96. style.id = "svelte-1cj2gr0-style";
  97. style.textContent = ".spin.svelte-1cj2gr0{animation:svelte-1cj2gr0-spin 2s 0s infinite linear}.pulse.svelte-1cj2gr0{animation:svelte-1cj2gr0-spin 1s infinite steps(8)}@keyframes svelte-1cj2gr0-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
  98. internal.append(document.head, style);
  99. }
  100. // (78:0) {#if i[4]}
  101. function create_if_block(ctx) {
  102. let svg;
  103. let g1;
  104. let g0;
  105. let g1_transform_value;
  106. let g1_transform_origin_value;
  107. let svg_class_value;
  108. let svg_viewBox_value;
  109. function select_block_type(ctx, dirty) {
  110. if (typeof /*i*/ ctx[7][4] == "string") return create_if_block_1;
  111. return create_else_block;
  112. }
  113. let current_block_type = select_block_type(ctx);
  114. let if_block = current_block_type(ctx);
  115. return {
  116. c() {
  117. svg = internal.svg_element("svg");
  118. g1 = internal.svg_element("g");
  119. g0 = internal.svg_element("g");
  120. if_block.c();
  121. internal.attr(g0, "transform", /*transform*/ ctx[10]);
  122. internal.attr(g1, "transform", g1_transform_value = `translate(${/*i*/ ctx[7][0] / 2} ${/*i*/ ctx[7][1] / 2})`);
  123. internal.attr(g1, "transform-origin", g1_transform_origin_value = `${/*i*/ ctx[7][0] / 4} 0`);
  124. internal.attr(svg, "id", /*id*/ ctx[0]);
  125. internal.attr(svg, "class", svg_class_value = "" + (internal.null_to_empty(/*c*/ ctx[8]) + " svelte-1cj2gr0"));
  126. internal.attr(svg, "style", /*s*/ ctx[9]);
  127. internal.attr(svg, "viewBox", svg_viewBox_value = `0 0 ${/*i*/ ctx[7][0]} ${/*i*/ ctx[7][1]}`);
  128. internal.attr(svg, "aria-hidden", "true");
  129. internal.attr(svg, "role", "img");
  130. internal.attr(svg, "xmlns", "http://www.w3.org/2000/svg");
  131. },
  132. m(target, anchor) {
  133. internal.insert(target, svg, anchor);
  134. internal.append(svg, g1);
  135. internal.append(g1, g0);
  136. if_block.m(g0, null);
  137. },
  138. p(ctx, dirty) {
  139. if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
  140. if_block.p(ctx, dirty);
  141. } else {
  142. if_block.d(1);
  143. if_block = current_block_type(ctx);
  144. if (if_block) {
  145. if_block.c();
  146. if_block.m(g0, null);
  147. }
  148. }
  149. if (dirty & /*transform*/ 1024) {
  150. internal.attr(g0, "transform", /*transform*/ ctx[10]);
  151. }
  152. if (dirty & /*i*/ 128 && g1_transform_value !== (g1_transform_value = `translate(${/*i*/ ctx[7][0] / 2} ${/*i*/ ctx[7][1] / 2})`)) {
  153. internal.attr(g1, "transform", g1_transform_value);
  154. }
  155. if (dirty & /*i*/ 128 && g1_transform_origin_value !== (g1_transform_origin_value = `${/*i*/ ctx[7][0] / 4} 0`)) {
  156. internal.attr(g1, "transform-origin", g1_transform_origin_value);
  157. }
  158. if (dirty & /*id*/ 1) {
  159. internal.attr(svg, "id", /*id*/ ctx[0]);
  160. }
  161. if (dirty & /*c*/ 256 && svg_class_value !== (svg_class_value = "" + (internal.null_to_empty(/*c*/ ctx[8]) + " svelte-1cj2gr0"))) {
  162. internal.attr(svg, "class", svg_class_value);
  163. }
  164. if (dirty & /*s*/ 512) {
  165. internal.attr(svg, "style", /*s*/ ctx[9]);
  166. }
  167. if (dirty & /*i*/ 128 && svg_viewBox_value !== (svg_viewBox_value = `0 0 ${/*i*/ ctx[7][0]} ${/*i*/ ctx[7][1]}`)) {
  168. internal.attr(svg, "viewBox", svg_viewBox_value);
  169. }
  170. },
  171. d(detaching) {
  172. if (detaching) internal.detach(svg);
  173. if_block.d();
  174. }
  175. };
  176. }
  177. // (99:8) {:else}
  178. function create_else_block(ctx) {
  179. let path0;
  180. let path0_d_value;
  181. let path0_fill_value;
  182. let path0_fill_opacity_value;
  183. let path0_transform_value;
  184. let path1;
  185. let path1_d_value;
  186. let path1_fill_value;
  187. let path1_fill_opacity_value;
  188. let path1_transform_value;
  189. return {
  190. c() {
  191. path0 = internal.svg_element("path");
  192. path1 = internal.svg_element("path");
  193. internal.attr(path0, "d", path0_d_value = /*i*/ ctx[7][4][0]);
  194. internal.attr(path0, "fill", path0_fill_value = /*secondaryColor*/ ctx[3] || /*color*/ ctx[1] || "currentColor");
  195. internal.attr(path0, "fill-opacity", path0_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  196. ? /*primaryOpacity*/ ctx[4]
  197. : /*secondaryOpacity*/ ctx[5]);
  198. internal.attr(path0, "transform", path0_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`);
  199. internal.attr(path1, "d", path1_d_value = /*i*/ ctx[7][4][1]);
  200. internal.attr(path1, "fill", path1_fill_value = /*primaryColor*/ ctx[2] || /*color*/ ctx[1] || "currentColor");
  201. internal.attr(path1, "fill-opacity", path1_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  202. ? /*secondaryOpacity*/ ctx[5]
  203. : /*primaryOpacity*/ ctx[4]);
  204. internal.attr(path1, "transform", path1_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`);
  205. },
  206. m(target, anchor) {
  207. internal.insert(target, path0, anchor);
  208. internal.insert(target, path1, anchor);
  209. },
  210. p(ctx, dirty) {
  211. if (dirty & /*i*/ 128 && path0_d_value !== (path0_d_value = /*i*/ ctx[7][4][0])) {
  212. internal.attr(path0, "d", path0_d_value);
  213. }
  214. if (dirty & /*secondaryColor, color*/ 10 && path0_fill_value !== (path0_fill_value = /*secondaryColor*/ ctx[3] || /*color*/ ctx[1] || "currentColor")) {
  215. internal.attr(path0, "fill", path0_fill_value);
  216. }
  217. if (dirty & /*swapOpacity, primaryOpacity, secondaryOpacity*/ 112 && path0_fill_opacity_value !== (path0_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  218. ? /*primaryOpacity*/ ctx[4]
  219. : /*secondaryOpacity*/ ctx[5])) {
  220. internal.attr(path0, "fill-opacity", path0_fill_opacity_value);
  221. }
  222. if (dirty & /*i*/ 128 && path0_transform_value !== (path0_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`)) {
  223. internal.attr(path0, "transform", path0_transform_value);
  224. }
  225. if (dirty & /*i*/ 128 && path1_d_value !== (path1_d_value = /*i*/ ctx[7][4][1])) {
  226. internal.attr(path1, "d", path1_d_value);
  227. }
  228. if (dirty & /*primaryColor, color*/ 6 && path1_fill_value !== (path1_fill_value = /*primaryColor*/ ctx[2] || /*color*/ ctx[1] || "currentColor")) {
  229. internal.attr(path1, "fill", path1_fill_value);
  230. }
  231. if (dirty & /*swapOpacity, secondaryOpacity, primaryOpacity*/ 112 && path1_fill_opacity_value !== (path1_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  232. ? /*secondaryOpacity*/ ctx[5]
  233. : /*primaryOpacity*/ ctx[4])) {
  234. internal.attr(path1, "fill-opacity", path1_fill_opacity_value);
  235. }
  236. if (dirty & /*i*/ 128 && path1_transform_value !== (path1_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`)) {
  237. internal.attr(path1, "transform", path1_transform_value);
  238. }
  239. },
  240. d(detaching) {
  241. if (detaching) internal.detach(path0);
  242. if (detaching) internal.detach(path1);
  243. }
  244. };
  245. }
  246. // (93:8) {#if typeof i[4] == 'string'}
  247. function create_if_block_1(ctx) {
  248. let path;
  249. let path_d_value;
  250. let path_fill_value;
  251. let path_transform_value;
  252. return {
  253. c() {
  254. path = internal.svg_element("path");
  255. internal.attr(path, "d", path_d_value = /*i*/ ctx[7][4]);
  256. internal.attr(path, "fill", path_fill_value = /*color*/ ctx[1] || /*primaryColor*/ ctx[2] || "currentColor");
  257. internal.attr(path, "transform", path_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`);
  258. },
  259. m(target, anchor) {
  260. internal.insert(target, path, anchor);
  261. },
  262. p(ctx, dirty) {
  263. if (dirty & /*i*/ 128 && path_d_value !== (path_d_value = /*i*/ ctx[7][4])) {
  264. internal.attr(path, "d", path_d_value);
  265. }
  266. if (dirty & /*color, primaryColor*/ 6 && path_fill_value !== (path_fill_value = /*color*/ ctx[1] || /*primaryColor*/ ctx[2] || "currentColor")) {
  267. internal.attr(path, "fill", path_fill_value);
  268. }
  269. if (dirty & /*i*/ 128 && path_transform_value !== (path_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`)) {
  270. internal.attr(path, "transform", path_transform_value);
  271. }
  272. },
  273. d(detaching) {
  274. if (detaching) internal.detach(path);
  275. }
  276. };
  277. }
  278. function create_fragment$2(ctx) {
  279. let if_block_anchor;
  280. let if_block = /*i*/ ctx[7][4] && create_if_block(ctx);
  281. return {
  282. c() {
  283. if (if_block) if_block.c();
  284. if_block_anchor = internal.empty();
  285. },
  286. m(target, anchor) {
  287. if (if_block) if_block.m(target, anchor);
  288. internal.insert(target, if_block_anchor, anchor);
  289. },
  290. p(ctx, [dirty]) {
  291. if (/*i*/ ctx[7][4]) {
  292. if (if_block) {
  293. if_block.p(ctx, dirty);
  294. } else {
  295. if_block = create_if_block(ctx);
  296. if_block.c();
  297. if_block.m(if_block_anchor.parentNode, if_block_anchor);
  298. }
  299. } else if (if_block) {
  300. if_block.d(1);
  301. if_block = null;
  302. }
  303. },
  304. i: internal.noop,
  305. o: internal.noop,
  306. d(detaching) {
  307. if (if_block) if_block.d(detaching);
  308. if (detaching) internal.detach(if_block_anchor);
  309. }
  310. };
  311. }
  312. function instance$2($$self, $$props, $$invalidate) {
  313. let { class: clazz = "" } = $$props;
  314. let { id = "" } = $$props;
  315. let { style = "" } = $$props;
  316. let { icon } = $$props;
  317. let { size = "" } = $$props;
  318. let { color = "" } = $$props;
  319. let { fw = false } = $$props;
  320. let { pull = "" } = $$props;
  321. let { scale = 1 } = $$props;
  322. let { translateX = 0 } = $$props;
  323. let { translateY = 0 } = $$props;
  324. let { rotate = "" } = $$props;
  325. let { flip = false } = $$props;
  326. let { spin = false } = $$props;
  327. let { pulse = false } = $$props;
  328. let { primaryColor = "" } = $$props;
  329. let { secondaryColor = "" } = $$props;
  330. let { primaryOpacity = 1 } = $$props;
  331. let { secondaryOpacity = 0.4 } = $$props;
  332. let { swapOpacity = false } = $$props;
  333. let i;
  334. let c;
  335. let s;
  336. let transform;
  337. $$self.$set = $$props => {
  338. if ("class" in $$props) $$invalidate(11, clazz = $$props.class);
  339. if ("id" in $$props) $$invalidate(0, id = $$props.id);
  340. if ("style" in $$props) $$invalidate(12, style = $$props.style);
  341. if ("icon" in $$props) $$invalidate(13, icon = $$props.icon);
  342. if ("size" in $$props) $$invalidate(14, size = $$props.size);
  343. if ("color" in $$props) $$invalidate(1, color = $$props.color);
  344. if ("fw" in $$props) $$invalidate(15, fw = $$props.fw);
  345. if ("pull" in $$props) $$invalidate(16, pull = $$props.pull);
  346. if ("scale" in $$props) $$invalidate(17, scale = $$props.scale);
  347. if ("translateX" in $$props) $$invalidate(18, translateX = $$props.translateX);
  348. if ("translateY" in $$props) $$invalidate(19, translateY = $$props.translateY);
  349. if ("rotate" in $$props) $$invalidate(20, rotate = $$props.rotate);
  350. if ("flip" in $$props) $$invalidate(21, flip = $$props.flip);
  351. if ("spin" in $$props) $$invalidate(22, spin = $$props.spin);
  352. if ("pulse" in $$props) $$invalidate(23, pulse = $$props.pulse);
  353. if ("primaryColor" in $$props) $$invalidate(2, primaryColor = $$props.primaryColor);
  354. if ("secondaryColor" in $$props) $$invalidate(3, secondaryColor = $$props.secondaryColor);
  355. if ("primaryOpacity" in $$props) $$invalidate(4, primaryOpacity = $$props.primaryOpacity);
  356. if ("secondaryOpacity" in $$props) $$invalidate(5, secondaryOpacity = $$props.secondaryOpacity);
  357. if ("swapOpacity" in $$props) $$invalidate(6, swapOpacity = $$props.swapOpacity);
  358. };
  359. $$self.$$.update = () => {
  360. if ($$self.$$.dirty & /*icon*/ 8192) {
  361. $$invalidate(7, i = icon && icon.icon || [0, 0, "", [], ""]);
  362. }
  363. if ($$self.$$.dirty & /*clazz, spin, pulse*/ 12584960) {
  364. $$invalidate(8, c = joinCss([clazz, "fa", spin && "spin", pulse && "pulse"], " "));
  365. }
  366. if ($$self.$$.dirty & /*style, size, pull, fw*/ 118784) {
  367. $$invalidate(9, s = getStyles(style, size, pull, fw));
  368. }
  369. if ($$self.$$.dirty & /*scale, translateX, translateY, rotate, flip*/ 4063232) {
  370. $$invalidate(10, transform = getTransform(scale, translateX, translateY, rotate, flip, 512));
  371. }
  372. };
  373. return [
  374. id,
  375. color,
  376. primaryColor,
  377. secondaryColor,
  378. primaryOpacity,
  379. secondaryOpacity,
  380. swapOpacity,
  381. i,
  382. c,
  383. s,
  384. transform,
  385. clazz,
  386. style,
  387. icon,
  388. size,
  389. fw,
  390. pull,
  391. scale,
  392. translateX,
  393. translateY,
  394. rotate,
  395. flip,
  396. spin,
  397. pulse
  398. ];
  399. }
  400. class Fa extends internal.SvelteComponent {
  401. constructor(options) {
  402. super();
  403. if (!document.getElementById("svelte-1cj2gr0-style")) add_css$1();
  404. internal.init(this, options, instance$2, create_fragment$2, internal.safe_not_equal, {
  405. class: 11,
  406. id: 0,
  407. style: 12,
  408. icon: 13,
  409. size: 14,
  410. color: 1,
  411. fw: 15,
  412. pull: 16,
  413. scale: 17,
  414. translateX: 18,
  415. translateY: 19,
  416. rotate: 20,
  417. flip: 21,
  418. spin: 22,
  419. pulse: 23,
  420. primaryColor: 2,
  421. secondaryColor: 3,
  422. primaryOpacity: 4,
  423. secondaryOpacity: 5,
  424. swapOpacity: 6
  425. });
  426. }
  427. }
  428. /* src\fa-layers.svelte generated by Svelte v3.16.7 */
  429. function add_css() {
  430. var style = internal.element("style");
  431. style.id = "svelte-snamjk-style";
  432. style.textContent = ".layers.svelte-snamjk{display:inline-block;position:relative}.layers.svelte-snamjk .fa{position:absolute;bottom:0;left:0;right:0;top:0;margin:auto;text-align:center}.layers.svelte-snamjk .layers-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.layers.svelte-snamjk .layers-text span{display:inline-block}";
  433. internal.append(document.head, style);
  434. }
  435. function create_fragment$1(ctx) {
  436. let span;
  437. let span_class_value;
  438. let current;
  439. const default_slot_template = /*$$slots*/ ctx[8].default;
  440. const default_slot = internal.create_slot(default_slot_template, ctx, /*$$scope*/ ctx[7], null);
  441. return {
  442. c() {
  443. span = internal.element("span");
  444. if (default_slot) default_slot.c();
  445. internal.attr(span, "id", /*id*/ ctx[0]);
  446. internal.attr(span, "class", span_class_value = "" + (internal.null_to_empty(/*c*/ ctx[1]) + " svelte-snamjk"));
  447. internal.attr(span, "style", /*s*/ ctx[2]);
  448. },
  449. m(target, anchor) {
  450. internal.insert(target, span, anchor);
  451. if (default_slot) {
  452. default_slot.m(span, null);
  453. }
  454. current = true;
  455. },
  456. p(ctx, [dirty]) {
  457. if (default_slot && default_slot.p && dirty & /*$$scope*/ 128) {
  458. default_slot.p(internal.get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[7], null), internal.get_slot_changes(default_slot_template, /*$$scope*/ ctx[7], dirty, null));
  459. }
  460. if (!current || dirty & /*id*/ 1) {
  461. internal.attr(span, "id", /*id*/ ctx[0]);
  462. }
  463. if (!current || dirty & /*c*/ 2 && span_class_value !== (span_class_value = "" + (internal.null_to_empty(/*c*/ ctx[1]) + " svelte-snamjk"))) {
  464. internal.attr(span, "class", span_class_value);
  465. }
  466. if (!current || dirty & /*s*/ 4) {
  467. internal.attr(span, "style", /*s*/ ctx[2]);
  468. }
  469. },
  470. i(local) {
  471. if (current) return;
  472. internal.transition_in(default_slot, local);
  473. current = true;
  474. },
  475. o(local) {
  476. internal.transition_out(default_slot, local);
  477. current = false;
  478. },
  479. d(detaching) {
  480. if (detaching) internal.detach(span);
  481. if (default_slot) default_slot.d(detaching);
  482. }
  483. };
  484. }
  485. function instance$1($$self, $$props, $$invalidate) {
  486. let { class: clazz = "" } = $$props;
  487. let { id = "" } = $$props;
  488. let { style = "" } = $$props;
  489. let { size = "" } = $$props;
  490. let { pull = "" } = $$props;
  491. let c;
  492. let s;
  493. let { $$slots = {}, $$scope } = $$props;
  494. $$self.$set = $$props => {
  495. if ("class" in $$props) $$invalidate(3, clazz = $$props.class);
  496. if ("id" in $$props) $$invalidate(0, id = $$props.id);
  497. if ("style" in $$props) $$invalidate(4, style = $$props.style);
  498. if ("size" in $$props) $$invalidate(5, size = $$props.size);
  499. if ("pull" in $$props) $$invalidate(6, pull = $$props.pull);
  500. if ("$$scope" in $$props) $$invalidate(7, $$scope = $$props.$$scope);
  501. };
  502. $$self.$$.update = () => {
  503. if ($$self.$$.dirty & /*clazz*/ 8) {
  504. $$invalidate(1, c = joinCss([clazz, "layers"], " "));
  505. }
  506. if ($$self.$$.dirty & /*style, size, pull*/ 112) {
  507. $$invalidate(2, s = getStyles(style, size, pull, true));
  508. }
  509. };
  510. return [id, c, s, clazz, style, size, pull, $$scope, $$slots];
  511. }
  512. class Fa_layers extends internal.SvelteComponent {
  513. constructor(options) {
  514. super();
  515. if (!document.getElementById("svelte-snamjk-style")) add_css();
  516. internal.init(this, options, instance$1, create_fragment$1, internal.safe_not_equal, {
  517. class: 3,
  518. id: 0,
  519. style: 4,
  520. size: 5,
  521. pull: 6
  522. });
  523. }
  524. }
  525. /* src\fa-layers-text.svelte generated by Svelte v3.16.7 */
  526. function create_fragment(ctx) {
  527. let span1;
  528. let span0;
  529. let current;
  530. const default_slot_template = /*$$slots*/ ctx[13].default;
  531. const default_slot = internal.create_slot(default_slot_template, ctx, /*$$scope*/ ctx[12], null);
  532. return {
  533. c() {
  534. span1 = internal.element("span");
  535. span0 = internal.element("span");
  536. if (default_slot) default_slot.c();
  537. internal.attr(span0, "style", /*s*/ ctx[2]);
  538. internal.attr(span1, "id", /*id*/ ctx[0]);
  539. internal.attr(span1, "class", /*c*/ ctx[1]);
  540. },
  541. m(target, anchor) {
  542. internal.insert(target, span1, anchor);
  543. internal.append(span1, span0);
  544. if (default_slot) {
  545. default_slot.m(span0, null);
  546. }
  547. current = true;
  548. },
  549. p(ctx, [dirty]) {
  550. if (default_slot && default_slot.p && dirty & /*$$scope*/ 4096) {
  551. default_slot.p(internal.get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[12], null), internal.get_slot_changes(default_slot_template, /*$$scope*/ ctx[12], dirty, null));
  552. }
  553. if (!current || dirty & /*s*/ 4) {
  554. internal.attr(span0, "style", /*s*/ ctx[2]);
  555. }
  556. if (!current || dirty & /*id*/ 1) {
  557. internal.attr(span1, "id", /*id*/ ctx[0]);
  558. }
  559. if (!current || dirty & /*c*/ 2) {
  560. internal.attr(span1, "class", /*c*/ ctx[1]);
  561. }
  562. },
  563. i(local) {
  564. if (current) return;
  565. internal.transition_in(default_slot, local);
  566. current = true;
  567. },
  568. o(local) {
  569. internal.transition_out(default_slot, local);
  570. current = false;
  571. },
  572. d(detaching) {
  573. if (detaching) internal.detach(span1);
  574. if (default_slot) default_slot.d(detaching);
  575. }
  576. };
  577. }
  578. function instance($$self, $$props, $$invalidate) {
  579. let { class: clazz = "" } = $$props;
  580. let { id = "" } = $$props;
  581. let { style = "" } = $$props;
  582. let { size = "" } = $$props;
  583. let { color = "" } = $$props;
  584. let { scale = 1 } = $$props;
  585. let { translateX = 0 } = $$props;
  586. let { translateY = 0 } = $$props;
  587. let { rotate = "" } = $$props;
  588. let { flip = false } = $$props;
  589. let c;
  590. let s;
  591. let { $$slots = {}, $$scope } = $$props;
  592. $$self.$set = $$props => {
  593. if ("class" in $$props) $$invalidate(3, clazz = $$props.class);
  594. if ("id" in $$props) $$invalidate(0, id = $$props.id);
  595. if ("style" in $$props) $$invalidate(4, style = $$props.style);
  596. if ("size" in $$props) $$invalidate(5, size = $$props.size);
  597. if ("color" in $$props) $$invalidate(6, color = $$props.color);
  598. if ("scale" in $$props) $$invalidate(7, scale = $$props.scale);
  599. if ("translateX" in $$props) $$invalidate(8, translateX = $$props.translateX);
  600. if ("translateY" in $$props) $$invalidate(9, translateY = $$props.translateY);
  601. if ("rotate" in $$props) $$invalidate(10, rotate = $$props.rotate);
  602. if ("flip" in $$props) $$invalidate(11, flip = $$props.flip);
  603. if ("$$scope" in $$props) $$invalidate(12, $$scope = $$props.$$scope);
  604. };
  605. $$self.$$.update = () => {
  606. if ($$self.$$.dirty & /*clazz*/ 8) {
  607. $$invalidate(1, c = joinCss([clazz, "layers-text"], " "));
  608. }
  609. if ($$self.$$.dirty & /*color, scale, translateX, translateY, rotate, flip, style, size*/ 4080) {
  610. $$invalidate(2, s = getStyles(
  611. joinCss([
  612. joinCss({
  613. color,
  614. display: "inline-block",
  615. height: "auto",
  616. transform: getTransform(scale, translateX, translateY, rotate, flip, undefined, "em", "deg")
  617. }),
  618. style
  619. ]),
  620. size
  621. ));
  622. }
  623. };
  624. return [
  625. id,
  626. c,
  627. s,
  628. clazz,
  629. style,
  630. size,
  631. color,
  632. scale,
  633. translateX,
  634. translateY,
  635. rotate,
  636. flip,
  637. $$scope,
  638. $$slots
  639. ];
  640. }
  641. class Fa_layers_text extends internal.SvelteComponent {
  642. constructor(options) {
  643. super();
  644. internal.init(this, options, instance, create_fragment, internal.safe_not_equal, {
  645. class: 3,
  646. id: 0,
  647. style: 4,
  648. size: 5,
  649. color: 6,
  650. scale: 7,
  651. translateX: 8,
  652. translateY: 9,
  653. rotate: 10,
  654. flip: 11
  655. });
  656. }
  657. }
  658. exports.Fa = Fa;
  659. exports.FaLayers = Fa_layers;
  660. exports.FaLayersText = Fa_layers_text;
  661. exports.default = Fa;