@memberstack/dom 1.9.38 → 1.9.40

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/lib/index.js CHANGED
@@ -168,6 +168,9 @@ function assign(tar, src) {
168
168
  tar[k] = src[k];
169
169
  return tar;
170
170
  }
171
+ function is_promise(value) {
172
+ return !!value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
173
+ }
171
174
  function run(fn) {
172
175
  return fn();
173
176
  }
@@ -749,6 +752,84 @@ function create_bidirectional_transition(node, fn, params, intro) {
749
752
  }
750
753
  };
751
754
  }
755
+ function handle_promise(promise2, info) {
756
+ const token = info.token = {};
757
+ function update2(type, index, key, value) {
758
+ if (info.token !== token)
759
+ return;
760
+ info.resolved = value;
761
+ let child_ctx = info.ctx;
762
+ if (key !== void 0) {
763
+ child_ctx = child_ctx.slice();
764
+ child_ctx[key] = value;
765
+ }
766
+ const block = type && (info.current = type)(child_ctx);
767
+ let needs_flush = false;
768
+ if (info.block) {
769
+ if (info.blocks) {
770
+ info.blocks.forEach((block2, i) => {
771
+ if (i !== index && block2) {
772
+ group_outros();
773
+ transition_out(block2, 1, 1, () => {
774
+ if (info.blocks[i] === block2) {
775
+ info.blocks[i] = null;
776
+ }
777
+ });
778
+ check_outros();
779
+ }
780
+ });
781
+ } else {
782
+ info.block.d(1);
783
+ }
784
+ block.c();
785
+ transition_in(block, 1);
786
+ block.m(info.mount(), info.anchor);
787
+ needs_flush = true;
788
+ }
789
+ info.block = block;
790
+ if (info.blocks)
791
+ info.blocks[index] = block;
792
+ if (needs_flush) {
793
+ flush();
794
+ }
795
+ }
796
+ if (is_promise(promise2)) {
797
+ const current_component2 = get_current_component();
798
+ promise2.then((value) => {
799
+ set_current_component(current_component2);
800
+ update2(info.then, 1, info.value, value);
801
+ set_current_component(null);
802
+ }, (error) => {
803
+ set_current_component(current_component2);
804
+ update2(info.catch, 2, info.error, error);
805
+ set_current_component(null);
806
+ if (!info.hasCatch) {
807
+ throw error;
808
+ }
809
+ });
810
+ if (info.current !== info.pending) {
811
+ update2(info.pending, 0);
812
+ return true;
813
+ }
814
+ } else {
815
+ if (info.current !== info.then) {
816
+ update2(info.then, 1, info.value, promise2);
817
+ return true;
818
+ }
819
+ info.resolved = promise2;
820
+ }
821
+ }
822
+ function update_await_block_branch(info, ctx, dirty) {
823
+ const child_ctx = ctx.slice();
824
+ const { resolved } = info;
825
+ if (info.current === info.then) {
826
+ child_ctx[info.value] = resolved;
827
+ }
828
+ if (info.current === info.catch) {
829
+ child_ctx[info.error] = resolved;
830
+ }
831
+ info.block.p(child_ctx, dirty);
832
+ }
752
833
  function destroy_block(block, lookup) {
753
834
  block.d(1);
754
835
  lookup.delete(block.key);
@@ -1038,7 +1119,7 @@ var get_default_slot_context = (ctx) => ({ matches: (
1038
1119
  /*matches*/
1039
1120
  ctx[0]
1040
1121
  ) });
1041
- function create_fragment$1l(ctx) {
1122
+ function create_fragment$1n(ctx) {
1042
1123
  let current;
1043
1124
  const default_slot_template = (
1044
1125
  /*#slots*/
@@ -1103,7 +1184,7 @@ function create_fragment$1l(ctx) {
1103
1184
  }
1104
1185
  };
1105
1186
  }
1106
- function instance$I($$self, $$props, $$invalidate) {
1187
+ function instance$J($$self, $$props, $$invalidate) {
1107
1188
  let { $$slots: slots = {}, $$scope } = $$props;
1108
1189
  let { query } = $$props;
1109
1190
  let mql;
@@ -1149,10 +1230,10 @@ function instance$I($$self, $$props, $$invalidate) {
1149
1230
  var MediaQuery = class extends SvelteComponent {
1150
1231
  constructor(options) {
1151
1232
  super();
1152
- init(this, options, instance$I, create_fragment$1l, safe_not_equal, { query: 1 });
1233
+ init(this, options, instance$J, create_fragment$1n, safe_not_equal, { query: 1 });
1153
1234
  }
1154
1235
  };
1155
- function create_fragment$1k(ctx) {
1236
+ function create_fragment$1m(ctx) {
1156
1237
  let svg;
1157
1238
  let path;
1158
1239
  let animateTransform;
@@ -1196,10 +1277,10 @@ function create_fragment$1k(ctx) {
1196
1277
  var LoadingIcon = class extends SvelteComponent {
1197
1278
  constructor(options) {
1198
1279
  super();
1199
- init(this, options, null, create_fragment$1k, safe_not_equal, {});
1280
+ init(this, options, null, create_fragment$1m, safe_not_equal, {});
1200
1281
  }
1201
1282
  };
1202
- function create_fragment$1j(ctx) {
1283
+ function create_fragment$1l(ctx) {
1203
1284
  let div;
1204
1285
  let loadingicon;
1205
1286
  let current;
@@ -1236,10 +1317,10 @@ function create_fragment$1j(ctx) {
1236
1317
  var Loader = class extends SvelteComponent {
1237
1318
  constructor(options) {
1238
1319
  super();
1239
- init(this, options, null, create_fragment$1j, safe_not_equal, {});
1320
+ init(this, options, null, create_fragment$1l, safe_not_equal, {});
1240
1321
  }
1241
1322
  };
1242
- function create_fragment$1i(ctx) {
1323
+ function create_fragment$1k(ctx) {
1243
1324
  let svg;
1244
1325
  let path;
1245
1326
  return {
@@ -1270,10 +1351,10 @@ function create_fragment$1i(ctx) {
1270
1351
  var CloseIcon = class extends SvelteComponent {
1271
1352
  constructor(options) {
1272
1353
  super();
1273
- init(this, options, null, create_fragment$1i, safe_not_equal, {});
1354
+ init(this, options, null, create_fragment$1k, safe_not_equal, {});
1274
1355
  }
1275
1356
  };
1276
- function create_fragment$1h(ctx) {
1357
+ function create_fragment$1j(ctx) {
1277
1358
  let div;
1278
1359
  let button;
1279
1360
  let closeicon;
@@ -1326,7 +1407,7 @@ function create_fragment$1h(ctx) {
1326
1407
  }
1327
1408
  };
1328
1409
  }
1329
- function instance$H($$self, $$props, $$invalidate) {
1410
+ function instance$I($$self, $$props, $$invalidate) {
1330
1411
  let { closeModal } = $$props;
1331
1412
  $$self.$$set = ($$props2) => {
1332
1413
  if ("closeModal" in $$props2)
@@ -1337,10 +1418,10 @@ function instance$H($$self, $$props, $$invalidate) {
1337
1418
  var CloseButton = class extends SvelteComponent {
1338
1419
  constructor(options) {
1339
1420
  super();
1340
- init(this, options, instance$H, create_fragment$1h, safe_not_equal, { closeModal: 0 });
1421
+ init(this, options, instance$I, create_fragment$1j, safe_not_equal, { closeModal: 0 });
1341
1422
  }
1342
1423
  };
1343
- function create_fragment$1g(ctx) {
1424
+ function create_fragment$1i(ctx) {
1344
1425
  let svg;
1345
1426
  let path0;
1346
1427
  let path1;
@@ -1393,10 +1474,10 @@ function create_fragment$1g(ctx) {
1393
1474
  var MemberstackIcon = class extends SvelteComponent {
1394
1475
  constructor(options) {
1395
1476
  super();
1396
- init(this, options, null, create_fragment$1g, safe_not_equal, {});
1477
+ init(this, options, null, create_fragment$1i, safe_not_equal, {});
1397
1478
  }
1398
1479
  };
1399
- function create_else_block$h(ctx) {
1480
+ function create_else_block$i(ctx) {
1400
1481
  let memberstackicon;
1401
1482
  let current;
1402
1483
  memberstackicon = new MemberstackIcon({});
@@ -1424,7 +1505,7 @@ function create_else_block$h(ctx) {
1424
1505
  }
1425
1506
  };
1426
1507
  }
1427
- function create_if_block$z(ctx) {
1508
+ function create_if_block$A(ctx) {
1428
1509
  let img;
1429
1510
  let img_src_value;
1430
1511
  let img_alt_value;
@@ -1461,12 +1542,12 @@ function create_if_block$z(ctx) {
1461
1542
  }
1462
1543
  };
1463
1544
  }
1464
- function create_fragment$1f(ctx) {
1545
+ function create_fragment$1h(ctx) {
1465
1546
  let figure;
1466
1547
  let current_block_type_index;
1467
1548
  let if_block;
1468
1549
  let current;
1469
- const if_block_creators = [create_if_block$z, create_else_block$h];
1550
+ const if_block_creators = [create_if_block$A, create_else_block$i];
1470
1551
  const if_blocks = [];
1471
1552
  function select_block_type(ctx2, dirty) {
1472
1553
  if (
@@ -1528,7 +1609,7 @@ function create_fragment$1f(ctx) {
1528
1609
  }
1529
1610
  };
1530
1611
  }
1531
- function instance$G($$self, $$props, $$invalidate) {
1612
+ function instance$H($$self, $$props, $$invalidate) {
1532
1613
  let app = {};
1533
1614
  AppStore.subscribe((data) => {
1534
1615
  $$invalidate(0, app = data);
@@ -1538,10 +1619,10 @@ function instance$G($$self, $$props, $$invalidate) {
1538
1619
  var FigureElement = class extends SvelteComponent {
1539
1620
  constructor(options) {
1540
1621
  super();
1541
- init(this, options, instance$G, create_fragment$1f, safe_not_equal, {});
1622
+ init(this, options, instance$H, create_fragment$1h, safe_not_equal, {});
1542
1623
  }
1543
1624
  };
1544
- function create_else_block$g(ctx) {
1625
+ function create_else_block$h(ctx) {
1545
1626
  let button;
1546
1627
  let loadingicon;
1547
1628
  let current;
@@ -1593,7 +1674,7 @@ function create_else_block$g(ctx) {
1593
1674
  }
1594
1675
  };
1595
1676
  }
1596
- function create_if_block$y(ctx) {
1677
+ function create_if_block$z(ctx) {
1597
1678
  let button;
1598
1679
  let t;
1599
1680
  return {
@@ -1642,12 +1723,12 @@ function create_if_block$y(ctx) {
1642
1723
  }
1643
1724
  };
1644
1725
  }
1645
- function create_fragment$1e(ctx) {
1726
+ function create_fragment$1g(ctx) {
1646
1727
  let div;
1647
1728
  let current_block_type_index;
1648
1729
  let if_block;
1649
1730
  let current;
1650
- const if_block_creators = [create_if_block$y, create_else_block$g];
1731
+ const if_block_creators = [create_if_block$z, create_else_block$h];
1651
1732
  const if_blocks = [];
1652
1733
  function select_block_type(ctx2, dirty) {
1653
1734
  if (!/*isLoading*/
@@ -1706,7 +1787,7 @@ function create_fragment$1e(ctx) {
1706
1787
  }
1707
1788
  };
1708
1789
  }
1709
- function instance$F($$self, $$props, $$invalidate) {
1790
+ function instance$G($$self, $$props, $$invalidate) {
1710
1791
  let $app;
1711
1792
  component_subscribe($$self, AppStore, ($$value) => $$invalidate(3, $app = $$value));
1712
1793
  let { buttonText = "Submit" } = $$props;
@@ -1726,10 +1807,10 @@ function instance$F($$self, $$props, $$invalidate) {
1726
1807
  var SubmitButton = class extends SvelteComponent {
1727
1808
  constructor(options) {
1728
1809
  super();
1729
- init(this, options, instance$F, create_fragment$1e, safe_not_equal, { buttonText: 0, isLoading: 1 });
1810
+ init(this, options, instance$G, create_fragment$1g, safe_not_equal, { buttonText: 0, isLoading: 1 });
1730
1811
  }
1731
1812
  };
1732
- function create_fragment$1d(ctx) {
1813
+ function create_fragment$1f(ctx) {
1733
1814
  let svg;
1734
1815
  let path;
1735
1816
  return {
@@ -1758,10 +1839,10 @@ function create_fragment$1d(ctx) {
1758
1839
  var ErrorIcon = class extends SvelteComponent {
1759
1840
  constructor(options) {
1760
1841
  super();
1761
- init(this, options, null, create_fragment$1d, safe_not_equal, {});
1842
+ init(this, options, null, create_fragment$1f, safe_not_equal, {});
1762
1843
  }
1763
1844
  };
1764
- function create_if_block$x(ctx) {
1845
+ function create_if_block$y(ctx) {
1765
1846
  let div;
1766
1847
  let erroricon;
1767
1848
  let t0;
@@ -1804,7 +1885,7 @@ function create_if_block$x(ctx) {
1804
1885
  }
1805
1886
  };
1806
1887
  }
1807
- function create_fragment$1c(ctx) {
1888
+ function create_fragment$1e(ctx) {
1808
1889
  let div;
1809
1890
  let label;
1810
1891
  let t0;
@@ -1816,7 +1897,7 @@ function create_fragment$1c(ctx) {
1816
1897
  let dispose;
1817
1898
  let if_block = (
1818
1899
  /*inputError*/
1819
- ctx[2] && create_if_block$x(ctx)
1900
+ ctx[2] && create_if_block$y(ctx)
1820
1901
  );
1821
1902
  return {
1822
1903
  c() {
@@ -1911,7 +1992,7 @@ function create_fragment$1c(ctx) {
1911
1992
  transition_in(if_block, 1);
1912
1993
  }
1913
1994
  } else {
1914
- if_block = create_if_block$x(ctx2);
1995
+ if_block = create_if_block$y(ctx2);
1915
1996
  if_block.c();
1916
1997
  transition_in(if_block, 1);
1917
1998
  if_block.m(div, null);
@@ -1944,7 +2025,7 @@ function create_fragment$1c(ctx) {
1944
2025
  }
1945
2026
  };
1946
2027
  }
1947
- function instance$E($$self, $$props, $$invalidate) {
2028
+ function instance$F($$self, $$props, $$invalidate) {
1948
2029
  let $textStore;
1949
2030
  component_subscribe($$self, TextStore, ($$value) => $$invalidate(9, $textStore = $$value));
1950
2031
  let { emailInputValid = false } = $$props;
@@ -1993,14 +2074,14 @@ function instance$E($$self, $$props, $$invalidate) {
1993
2074
  var EmailInput = class extends SvelteComponent {
1994
2075
  constructor(options) {
1995
2076
  super();
1996
- init(this, options, instance$E, create_fragment$1c, safe_not_equal, {
2077
+ init(this, options, instance$F, create_fragment$1e, safe_not_equal, {
1997
2078
  emailInputValid: 7,
1998
2079
  emailValue: 0,
1999
2080
  placeholder: 1
2000
2081
  });
2001
2082
  }
2002
2083
  };
2003
- function create_fragment$1b(ctx) {
2084
+ function create_fragment$1d(ctx) {
2004
2085
  let svg;
2005
2086
  let path;
2006
2087
  return {
@@ -2030,10 +2111,10 @@ function create_fragment$1b(ctx) {
2030
2111
  var EyeIcon = class extends SvelteComponent {
2031
2112
  constructor(options) {
2032
2113
  super();
2033
- init(this, options, null, create_fragment$1b, safe_not_equal, {});
2114
+ init(this, options, null, create_fragment$1d, safe_not_equal, {});
2034
2115
  }
2035
2116
  };
2036
- function create_fragment$1a(ctx) {
2117
+ function create_fragment$1c(ctx) {
2037
2118
  let svg;
2038
2119
  let path;
2039
2120
  return {
@@ -2063,10 +2144,10 @@ function create_fragment$1a(ctx) {
2063
2144
  var EyeSlashIcon = class extends SvelteComponent {
2064
2145
  constructor(options) {
2065
2146
  super();
2066
- init(this, options, null, create_fragment$1a, safe_not_equal, {});
2147
+ init(this, options, null, create_fragment$1c, safe_not_equal, {});
2067
2148
  }
2068
2149
  };
2069
- function create_if_block_2$i(ctx) {
2150
+ function create_if_block_2$k(ctx) {
2070
2151
  let div;
2071
2152
  let button;
2072
2153
  let mounted;
@@ -2105,7 +2186,7 @@ function create_if_block_2$i(ctx) {
2105
2186
  }
2106
2187
  };
2107
2188
  }
2108
- function create_else_block$f(ctx) {
2189
+ function create_else_block$g(ctx) {
2109
2190
  let eyeslashicon;
2110
2191
  let current;
2111
2192
  eyeslashicon = new EyeSlashIcon({});
@@ -2132,7 +2213,7 @@ function create_else_block$f(ctx) {
2132
2213
  }
2133
2214
  };
2134
2215
  }
2135
- function create_if_block_1$o(ctx) {
2216
+ function create_if_block_1$p(ctx) {
2136
2217
  let eyeicon;
2137
2218
  let current;
2138
2219
  eyeicon = new EyeIcon({});
@@ -2159,7 +2240,7 @@ function create_if_block_1$o(ctx) {
2159
2240
  }
2160
2241
  };
2161
2242
  }
2162
- function create_if_block$w(ctx) {
2243
+ function create_if_block$x(ctx) {
2163
2244
  let div;
2164
2245
  let erroricon;
2165
2246
  let t0;
@@ -2202,7 +2283,7 @@ function create_if_block$w(ctx) {
2202
2283
  }
2203
2284
  };
2204
2285
  }
2205
- function create_fragment$19(ctx) {
2286
+ function create_fragment$1b(ctx) {
2206
2287
  let div3;
2207
2288
  let div0;
2208
2289
  let label;
@@ -2222,9 +2303,9 @@ function create_fragment$19(ctx) {
2222
2303
  let dispose;
2223
2304
  let if_block0 = (
2224
2305
  /*showForgotPasswordLabel*/
2225
- ctx[2] && create_if_block_2$i(ctx)
2306
+ ctx[2] && create_if_block_2$k(ctx)
2226
2307
  );
2227
- const if_block_creators = [create_if_block_1$o, create_else_block$f];
2308
+ const if_block_creators = [create_if_block_1$p, create_else_block$g];
2228
2309
  const if_blocks = [];
2229
2310
  function select_block_type(ctx2, dirty) {
2230
2311
  if (!/*passwordVisible*/
@@ -2236,7 +2317,7 @@ function create_fragment$19(ctx) {
2236
2317
  if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2237
2318
  let if_block2 = (
2238
2319
  /*inputError*/
2239
- ctx[6] && create_if_block$w(ctx)
2320
+ ctx[6] && create_if_block$x(ctx)
2240
2321
  );
2241
2322
  return {
2242
2323
  c() {
@@ -2339,7 +2420,7 @@ function create_fragment$19(ctx) {
2339
2420
  if (if_block0) {
2340
2421
  if_block0.p(ctx2, dirty);
2341
2422
  } else {
2342
- if_block0 = create_if_block_2$i(ctx2);
2423
+ if_block0 = create_if_block_2$k(ctx2);
2343
2424
  if_block0.c();
2344
2425
  if_block0.m(div0, null);
2345
2426
  }
@@ -2397,7 +2478,7 @@ function create_fragment$19(ctx) {
2397
2478
  transition_in(if_block2, 1);
2398
2479
  }
2399
2480
  } else {
2400
- if_block2 = create_if_block$w(ctx2);
2481
+ if_block2 = create_if_block$x(ctx2);
2401
2482
  if_block2.c();
2402
2483
  transition_in(if_block2, 1);
2403
2484
  if_block2.m(div3, null);
@@ -2435,7 +2516,7 @@ function create_fragment$19(ctx) {
2435
2516
  }
2436
2517
  };
2437
2518
  }
2438
- function instance$D($$self, $$props, $$invalidate) {
2519
+ function instance$E($$self, $$props, $$invalidate) {
2439
2520
  let type;
2440
2521
  let $textStore;
2441
2522
  component_subscribe($$self, TextStore, ($$value) => $$invalidate(15, $textStore = $$value));
@@ -2509,7 +2590,7 @@ function instance$D($$self, $$props, $$invalidate) {
2509
2590
  var PasswordInput = class extends SvelteComponent {
2510
2591
  constructor(options) {
2511
2592
  super();
2512
- init(this, options, instance$D, create_fragment$19, safe_not_equal, {
2593
+ init(this, options, instance$E, create_fragment$1b, safe_not_equal, {
2513
2594
  showForgotPasswordLabel: 2,
2514
2595
  passwordInputValid: 13,
2515
2596
  passwordLabel: 3,
@@ -2519,7 +2600,7 @@ var PasswordInput = class extends SvelteComponent {
2519
2600
  });
2520
2601
  }
2521
2602
  };
2522
- function create_fragment$18(ctx) {
2603
+ function create_fragment$1a(ctx) {
2523
2604
  let svg;
2524
2605
  let path;
2525
2606
  return {
@@ -2549,10 +2630,10 @@ function create_fragment$18(ctx) {
2549
2630
  var SecuredIcon = class extends SvelteComponent {
2550
2631
  constructor(options) {
2551
2632
  super();
2552
- init(this, options, null, create_fragment$18, safe_not_equal, {});
2633
+ init(this, options, null, create_fragment$1a, safe_not_equal, {});
2553
2634
  }
2554
2635
  };
2555
- function create_if_block$v(ctx) {
2636
+ function create_if_block$w(ctx) {
2556
2637
  let div;
2557
2638
  let a;
2558
2639
  let securedicon;
@@ -2593,11 +2674,11 @@ function create_if_block$v(ctx) {
2593
2674
  }
2594
2675
  };
2595
2676
  }
2596
- function create_fragment$17(ctx) {
2677
+ function create_fragment$19(ctx) {
2597
2678
  let if_block_anchor;
2598
2679
  let current;
2599
2680
  let if_block = !/*$app*/
2600
- ctx[0].isPaid && create_if_block$v();
2681
+ ctx[0].isPaid && create_if_block$w();
2601
2682
  return {
2602
2683
  c() {
2603
2684
  if (if_block)
@@ -2619,7 +2700,7 @@ function create_fragment$17(ctx) {
2619
2700
  transition_in(if_block, 1);
2620
2701
  }
2621
2702
  } else {
2622
- if_block = create_if_block$v();
2703
+ if_block = create_if_block$w();
2623
2704
  if_block.c();
2624
2705
  transition_in(if_block, 1);
2625
2706
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -2650,7 +2731,7 @@ function create_fragment$17(ctx) {
2650
2731
  }
2651
2732
  };
2652
2733
  }
2653
- function instance$C($$self, $$props, $$invalidate) {
2734
+ function instance$D($$self, $$props, $$invalidate) {
2654
2735
  let $app;
2655
2736
  component_subscribe($$self, AppStore, ($$value) => $$invalidate(0, $app = $$value));
2656
2737
  return [$app];
@@ -2658,10 +2739,10 @@ function instance$C($$self, $$props, $$invalidate) {
2658
2739
  var ModalFooter = class extends SvelteComponent {
2659
2740
  constructor(options) {
2660
2741
  super();
2661
- init(this, options, instance$C, create_fragment$17, safe_not_equal, {});
2742
+ init(this, options, instance$D, create_fragment$19, safe_not_equal, {});
2662
2743
  }
2663
2744
  };
2664
- function create_fragment$16(ctx) {
2745
+ function create_fragment$18(ctx) {
2665
2746
  let svg;
2666
2747
  let path;
2667
2748
  return {
@@ -2690,7 +2771,7 @@ function create_fragment$16(ctx) {
2690
2771
  var EmailIcon = class extends SvelteComponent {
2691
2772
  constructor(options) {
2692
2773
  super();
2693
- init(this, options, null, create_fragment$16, safe_not_equal, {});
2774
+ init(this, options, null, create_fragment$18, safe_not_equal, {});
2694
2775
  }
2695
2776
  };
2696
2777
  var PasswordlessStore = writable({
@@ -2730,7 +2811,7 @@ var setPasswordlessMode = (mode) => {
2730
2811
  return store;
2731
2812
  });
2732
2813
  };
2733
- function get_each_context$c(ctx, list, i) {
2814
+ function get_each_context$d(ctx, list, i) {
2734
2815
  const child_ctx = ctx.slice();
2735
2816
  child_ctx[22] = list[i];
2736
2817
  return child_ctx;
@@ -2775,7 +2856,7 @@ function create_if_block_6$5(ctx) {
2775
2856
  }
2776
2857
  };
2777
2858
  }
2778
- function create_else_block_1$7(ctx) {
2859
+ function create_else_block_1$8(ctx) {
2779
2860
  let submitbutton;
2780
2861
  let current;
2781
2862
  submitbutton = new SubmitButton({
@@ -2821,7 +2902,7 @@ function create_else_block_1$7(ctx) {
2821
2902
  }
2822
2903
  };
2823
2904
  }
2824
- function create_if_block_5$5(ctx) {
2905
+ function create_if_block_5$7(ctx) {
2825
2906
  let passwordinput;
2826
2907
  let updating_passwordInputValid;
2827
2908
  let updating_display;
@@ -2928,7 +3009,7 @@ function create_if_block_5$5(ctx) {
2928
3009
  }
2929
3010
  };
2930
3011
  }
2931
- function create_if_block_4$7(ctx) {
3012
+ function create_if_block_4$8(ctx) {
2932
3013
  let div;
2933
3014
  let button;
2934
3015
  let mounted;
@@ -2965,7 +3046,7 @@ function create_if_block_4$7(ctx) {
2965
3046
  }
2966
3047
  };
2967
3048
  }
2968
- function create_if_block_3$9(ctx) {
3049
+ function create_if_block_3$b(ctx) {
2969
3050
  let div;
2970
3051
  let button;
2971
3052
  let mounted;
@@ -3002,7 +3083,7 @@ function create_if_block_3$9(ctx) {
3002
3083
  }
3003
3084
  };
3004
3085
  }
3005
- function create_if_block$u(ctx) {
3086
+ function create_if_block$v(ctx) {
3006
3087
  let div4;
3007
3088
  let div3;
3008
3089
  let div0;
@@ -3015,7 +3096,7 @@ function create_if_block$u(ctx) {
3015
3096
  let current;
3016
3097
  let if_block = (
3017
3098
  /*$app*/
3018
- ctx[7].additionalAuthMethods.passwordless.enabled === true && create_if_block_1$n(ctx)
3099
+ ctx[7].additionalAuthMethods.passwordless.enabled === true && create_if_block_1$o(ctx)
3019
3100
  );
3020
3101
  let each_value = (
3021
3102
  /*$app*/
@@ -3023,7 +3104,7 @@ function create_if_block$u(ctx) {
3023
3104
  );
3024
3105
  let each_blocks = [];
3025
3106
  for (let i = 0; i < each_value.length; i += 1) {
3026
- each_blocks[i] = create_each_block$c(get_each_context$c(ctx, each_value, i));
3107
+ each_blocks[i] = create_each_block$d(get_each_context$d(ctx, each_value, i));
3027
3108
  }
3028
3109
  return {
3029
3110
  c() {
@@ -3080,7 +3161,7 @@ function create_if_block$u(ctx) {
3080
3161
  transition_in(if_block, 1);
3081
3162
  }
3082
3163
  } else {
3083
- if_block = create_if_block_1$n(ctx2);
3164
+ if_block = create_if_block_1$o(ctx2);
3084
3165
  if_block.c();
3085
3166
  transition_in(if_block, 1);
3086
3167
  if_block.m(div4, t4);
@@ -3098,11 +3179,11 @@ function create_if_block$u(ctx) {
3098
3179
  ctx2[7].authProviders;
3099
3180
  let i;
3100
3181
  for (i = 0; i < each_value.length; i += 1) {
3101
- const child_ctx = get_each_context$c(ctx2, each_value, i);
3182
+ const child_ctx = get_each_context$d(ctx2, each_value, i);
3102
3183
  if (each_blocks[i]) {
3103
3184
  each_blocks[i].p(child_ctx, dirty);
3104
3185
  } else {
3105
- each_blocks[i] = create_each_block$c(child_ctx);
3186
+ each_blocks[i] = create_each_block$d(child_ctx);
3106
3187
  each_blocks[i].c();
3107
3188
  each_blocks[i].m(div4, null);
3108
3189
  }
@@ -3132,12 +3213,12 @@ function create_if_block$u(ctx) {
3132
3213
  }
3133
3214
  };
3134
3215
  }
3135
- function create_if_block_1$n(ctx) {
3216
+ function create_if_block_1$o(ctx) {
3136
3217
  let div;
3137
3218
  let current_block_type_index;
3138
3219
  let if_block;
3139
3220
  let current;
3140
- const if_block_creators = [create_if_block_2$h, create_else_block$e];
3221
+ const if_block_creators = [create_if_block_2$j, create_else_block$f];
3141
3222
  const if_blocks = [];
3142
3223
  function select_block_type_2(ctx2, dirty) {
3143
3224
  if (
@@ -3199,7 +3280,7 @@ function create_if_block_1$n(ctx) {
3199
3280
  }
3200
3281
  };
3201
3282
  }
3202
- function create_else_block$e(ctx) {
3283
+ function create_else_block$f(ctx) {
3203
3284
  let button;
3204
3285
  let span;
3205
3286
  let mounted;
@@ -3238,7 +3319,7 @@ function create_else_block$e(ctx) {
3238
3319
  }
3239
3320
  };
3240
3321
  }
3241
- function create_if_block_2$h(ctx) {
3322
+ function create_if_block_2$j(ctx) {
3242
3323
  let button;
3243
3324
  let emailicon;
3244
3325
  let t0;
@@ -3295,7 +3376,7 @@ function create_if_block_2$h(ctx) {
3295
3376
  }
3296
3377
  };
3297
3378
  }
3298
- function create_each_block$c(ctx) {
3379
+ function create_each_block$d(ctx) {
3299
3380
  let div;
3300
3381
  let button;
3301
3382
  let img;
@@ -3386,7 +3467,7 @@ function create_each_block$c(ctx) {
3386
3467
  }
3387
3468
  };
3388
3469
  }
3389
- function create_fragment$15(ctx) {
3470
+ function create_fragment$17(ctx) {
3390
3471
  let div1;
3391
3472
  let t0;
3392
3473
  let div0;
@@ -3429,7 +3510,7 @@ function create_fragment$15(ctx) {
3429
3510
  }
3430
3511
  emailinput = new EmailInput({ props: emailinput_props });
3431
3512
  binding_callbacks.push(() => bind(emailinput, "emailInputValid", emailinput_emailInputValid_binding));
3432
- const if_block_creators = [create_if_block_5$5, create_else_block_1$7];
3513
+ const if_block_creators = [create_if_block_5$7, create_else_block_1$8];
3433
3514
  const if_blocks = [];
3434
3515
  function select_block_type(ctx2, dirty) {
3435
3516
  if (!/*$PasswordlessStore*/
@@ -3446,19 +3527,19 @@ function create_fragment$15(ctx) {
3446
3527
  ctx2[2].signup && /*params*/
3447
3528
  ctx2[2].signup.plans
3448
3529
  )
3449
- return create_if_block_3$9;
3530
+ return create_if_block_3$b;
3450
3531
  if (
3451
3532
  /*signupButtonURL*/
3452
3533
  ctx2[9]
3453
3534
  )
3454
- return create_if_block_4$7;
3535
+ return create_if_block_4$8;
3455
3536
  }
3456
3537
  let current_block_type = select_block_type_1(ctx);
3457
3538
  let if_block2 = current_block_type && current_block_type(ctx);
3458
3539
  let if_block3 = (
3459
3540
  /*$app*/
3460
3541
  (ctx[7].authProviders.length > 0 || /*$app*/
3461
- ctx[7].additionalAuthMethods.passwordless.enabled === true) && create_if_block$u(ctx)
3542
+ ctx[7].additionalAuthMethods.passwordless.enabled === true) && create_if_block$v(ctx)
3462
3543
  );
3463
3544
  modalfooter = new ModalFooter({});
3464
3545
  return {
@@ -3600,7 +3681,7 @@ function create_fragment$15(ctx) {
3600
3681
  transition_in(if_block3, 1);
3601
3682
  }
3602
3683
  } else {
3603
- if_block3 = create_if_block$u(ctx2);
3684
+ if_block3 = create_if_block$v(ctx2);
3604
3685
  if_block3.c();
3605
3686
  transition_in(if_block3, 1);
3606
3687
  if_block3.m(div0, null);
@@ -3652,7 +3733,7 @@ function create_fragment$15(ctx) {
3652
3733
  }
3653
3734
  };
3654
3735
  }
3655
- function instance$B($$self, $$props, $$invalidate) {
3736
+ function instance$C($$self, $$props, $$invalidate) {
3656
3737
  let $PasswordlessStore;
3657
3738
  let $app;
3658
3739
  let $textStore;
@@ -3778,7 +3859,7 @@ function instance$B($$self, $$props, $$invalidate) {
3778
3859
  var LoginModal = class extends SvelteComponent {
3779
3860
  constructor(options) {
3780
3861
  super();
3781
- init(this, options, instance$B, create_fragment$15, safe_not_equal, {
3862
+ init(this, options, instance$C, create_fragment$17, safe_not_equal, {
3782
3863
  closeModal: 1,
3783
3864
  display: 0,
3784
3865
  onSuccessLogin: 12,
@@ -3786,15 +3867,15 @@ var LoginModal = class extends SvelteComponent {
3786
3867
  });
3787
3868
  }
3788
3869
  };
3789
- function add_css$k(target) {
3870
+ function add_css$l(target) {
3790
3871
  append_styles(target, "svelte-1w8lbd8", ".rey-was-here.svelte-1w8lbd8{display:none !important}");
3791
3872
  }
3792
- function get_each_context$b(ctx, list, i) {
3873
+ function get_each_context$c(ctx, list, i) {
3793
3874
  const child_ctx = ctx.slice();
3794
3875
  child_ctx[25] = list[i];
3795
3876
  return child_ctx;
3796
3877
  }
3797
- function get_each_context_1$4(ctx, list, i) {
3878
+ function get_each_context_1$5(ctx, list, i) {
3798
3879
  const child_ctx = ctx.slice();
3799
3880
  child_ctx[28] = list[i];
3800
3881
  child_ctx[30] = i;
@@ -3840,7 +3921,7 @@ function create_if_block_6$4(ctx) {
3840
3921
  }
3841
3922
  };
3842
3923
  }
3843
- function create_if_block_5$4(ctx) {
3924
+ function create_if_block_5$6(ctx) {
3844
3925
  let div1;
3845
3926
  let div0;
3846
3927
  let label;
@@ -3910,11 +3991,11 @@ function create_if_block_5$4(ctx) {
3910
3991
  }
3911
3992
  };
3912
3993
  }
3913
- function create_each_block_1$4(ctx) {
3994
+ function create_each_block_1$5(ctx) {
3914
3995
  let if_block_anchor;
3915
3996
  let if_block = (
3916
3997
  /*customField*/
3917
- ctx[28].hidden !== true && create_if_block_5$4(ctx)
3998
+ ctx[28].hidden !== true && create_if_block_5$6(ctx)
3918
3999
  );
3919
4000
  return {
3920
4001
  c() {
@@ -3935,7 +4016,7 @@ function create_each_block_1$4(ctx) {
3935
4016
  if (if_block) {
3936
4017
  if_block.p(ctx2, dirty);
3937
4018
  } else {
3938
- if_block = create_if_block_5$4(ctx2);
4019
+ if_block = create_if_block_5$6(ctx2);
3939
4020
  if_block.c();
3940
4021
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
3941
4022
  }
@@ -3952,7 +4033,7 @@ function create_each_block_1$4(ctx) {
3952
4033
  }
3953
4034
  };
3954
4035
  }
3955
- function create_if_block_4$6(ctx) {
4036
+ function create_if_block_4$7(ctx) {
3956
4037
  let passwordinput;
3957
4038
  let updating_passwordInputValid;
3958
4039
  let current;
@@ -4003,7 +4084,7 @@ function create_if_block_4$6(ctx) {
4003
4084
  }
4004
4085
  };
4005
4086
  }
4006
- function create_else_block_1$6(ctx) {
4087
+ function create_else_block_1$7(ctx) {
4007
4088
  let submitbutton;
4008
4089
  let current;
4009
4090
  submitbutton = new SubmitButton({
@@ -4046,7 +4127,7 @@ function create_else_block_1$6(ctx) {
4046
4127
  }
4047
4128
  };
4048
4129
  }
4049
- function create_if_block_3$8(ctx) {
4130
+ function create_if_block_3$a(ctx) {
4050
4131
  let submitbutton;
4051
4132
  let current;
4052
4133
  submitbutton = new SubmitButton({
@@ -4089,7 +4170,7 @@ function create_if_block_3$8(ctx) {
4089
4170
  }
4090
4171
  };
4091
4172
  }
4092
- function create_if_block$t(ctx) {
4173
+ function create_if_block$u(ctx) {
4093
4174
  let div4;
4094
4175
  let div3;
4095
4176
  let t3;
@@ -4097,7 +4178,7 @@ function create_if_block$t(ctx) {
4097
4178
  let current;
4098
4179
  let if_block = (
4099
4180
  /*$app*/
4100
- ctx[7].additionalAuthMethods.passwordless.enabled === true && create_if_block_1$m(ctx)
4181
+ ctx[7].additionalAuthMethods.passwordless.enabled === true && create_if_block_1$n(ctx)
4101
4182
  );
4102
4183
  let each_value = (
4103
4184
  /*$app*/
@@ -4105,7 +4186,7 @@ function create_if_block$t(ctx) {
4105
4186
  );
4106
4187
  let each_blocks = [];
4107
4188
  for (let i = 0; i < each_value.length; i += 1) {
4108
- each_blocks[i] = create_each_block$b(get_each_context$b(ctx, each_value, i));
4189
+ each_blocks[i] = create_each_block$c(get_each_context$c(ctx, each_value, i));
4109
4190
  }
4110
4191
  return {
4111
4192
  c() {
@@ -4150,7 +4231,7 @@ function create_if_block$t(ctx) {
4150
4231
  transition_in(if_block, 1);
4151
4232
  }
4152
4233
  } else {
4153
- if_block = create_if_block_1$m(ctx2);
4234
+ if_block = create_if_block_1$n(ctx2);
4154
4235
  if_block.c();
4155
4236
  transition_in(if_block, 1);
4156
4237
  if_block.m(div4, t4);
@@ -4168,11 +4249,11 @@ function create_if_block$t(ctx) {
4168
4249
  ctx2[7].authProviders;
4169
4250
  let i;
4170
4251
  for (i = 0; i < each_value.length; i += 1) {
4171
- const child_ctx = get_each_context$b(ctx2, each_value, i);
4252
+ const child_ctx = get_each_context$c(ctx2, each_value, i);
4172
4253
  if (each_blocks[i]) {
4173
4254
  each_blocks[i].p(child_ctx, dirty);
4174
4255
  } else {
4175
- each_blocks[i] = create_each_block$b(child_ctx);
4256
+ each_blocks[i] = create_each_block$c(child_ctx);
4176
4257
  each_blocks[i].c();
4177
4258
  each_blocks[i].m(div4, null);
4178
4259
  }
@@ -4202,12 +4283,12 @@ function create_if_block$t(ctx) {
4202
4283
  }
4203
4284
  };
4204
4285
  }
4205
- function create_if_block_1$m(ctx) {
4286
+ function create_if_block_1$n(ctx) {
4206
4287
  let div;
4207
4288
  let current_block_type_index;
4208
4289
  let if_block;
4209
4290
  let current;
4210
- const if_block_creators = [create_if_block_2$g, create_else_block$d];
4291
+ const if_block_creators = [create_if_block_2$i, create_else_block$e];
4211
4292
  const if_blocks = [];
4212
4293
  function select_block_type_1(ctx2, dirty) {
4213
4294
  if (
@@ -4269,7 +4350,7 @@ function create_if_block_1$m(ctx) {
4269
4350
  }
4270
4351
  };
4271
4352
  }
4272
- function create_else_block$d(ctx) {
4353
+ function create_else_block$e(ctx) {
4273
4354
  let button;
4274
4355
  let span;
4275
4356
  let mounted;
@@ -4308,7 +4389,7 @@ function create_else_block$d(ctx) {
4308
4389
  }
4309
4390
  };
4310
4391
  }
4311
- function create_if_block_2$g(ctx) {
4392
+ function create_if_block_2$i(ctx) {
4312
4393
  let button;
4313
4394
  let emailicon;
4314
4395
  let t0;
@@ -4365,7 +4446,7 @@ function create_if_block_2$g(ctx) {
4365
4446
  }
4366
4447
  };
4367
4448
  }
4368
- function create_each_block$b(ctx) {
4449
+ function create_each_block$c(ctx) {
4369
4450
  let div;
4370
4451
  let button;
4371
4452
  let img;
@@ -4449,7 +4530,7 @@ function create_each_block$b(ctx) {
4449
4530
  }
4450
4531
  };
4451
4532
  }
4452
- function create_fragment$14(ctx) {
4533
+ function create_fragment$16(ctx) {
4453
4534
  let div4;
4454
4535
  let t0;
4455
4536
  let div3;
@@ -4488,7 +4569,7 @@ function create_fragment$14(ctx) {
4488
4569
  );
4489
4570
  let each_blocks = [];
4490
4571
  for (let i = 0; i < each_value_1.length; i += 1) {
4491
- each_blocks[i] = create_each_block_1$4(get_each_context_1$4(ctx, each_value_1, i));
4572
+ each_blocks[i] = create_each_block_1$5(get_each_context_1$5(ctx, each_value_1, i));
4492
4573
  }
4493
4574
  function emailinput_emailInputValid_binding(value) {
4494
4575
  ctx[12](value);
@@ -4505,9 +4586,9 @@ function create_fragment$14(ctx) {
4505
4586
  binding_callbacks.push(() => bind(emailinput, "emailInputValid", emailinput_emailInputValid_binding));
4506
4587
  let if_block1 = (
4507
4588
  /*$PasswordlessStore*/
4508
- ctx[6].passwordlessMode === false && create_if_block_4$6(ctx)
4589
+ ctx[6].passwordlessMode === false && create_if_block_4$7(ctx)
4509
4590
  );
4510
- const if_block_creators = [create_if_block_3$8, create_else_block_1$6];
4591
+ const if_block_creators = [create_if_block_3$a, create_else_block_1$7];
4511
4592
  const if_blocks = [];
4512
4593
  function select_block_type(ctx2, dirty) {
4513
4594
  if (
@@ -4522,7 +4603,7 @@ function create_fragment$14(ctx) {
4522
4603
  let if_block3 = (
4523
4604
  /*$app*/
4524
4605
  (ctx[7].authProviders.length > 0 || /*$app*/
4525
- ctx[7].additionalAuthMethods.passwordless.enabled === true) && create_if_block$t(ctx)
4606
+ ctx[7].additionalAuthMethods.passwordless.enabled === true) && create_if_block$u(ctx)
4526
4607
  );
4527
4608
  modalfooter = new ModalFooter({});
4528
4609
  return {
@@ -4657,11 +4738,11 @@ function create_fragment$14(ctx) {
4657
4738
  ctx2[7].customFields;
4658
4739
  let i;
4659
4740
  for (i = 0; i < each_value_1.length; i += 1) {
4660
- const child_ctx = get_each_context_1$4(ctx2, each_value_1, i);
4741
+ const child_ctx = get_each_context_1$5(ctx2, each_value_1, i);
4661
4742
  if (each_blocks[i]) {
4662
4743
  each_blocks[i].p(child_ctx, dirty);
4663
4744
  } else {
4664
- each_blocks[i] = create_each_block_1$4(child_ctx);
4745
+ each_blocks[i] = create_each_block_1$5(child_ctx);
4665
4746
  each_blocks[i].c();
4666
4747
  each_blocks[i].m(form, t4);
4667
4748
  }
@@ -4691,7 +4772,7 @@ function create_fragment$14(ctx) {
4691
4772
  transition_in(if_block1, 1);
4692
4773
  }
4693
4774
  } else {
4694
- if_block1 = create_if_block_4$6(ctx2);
4775
+ if_block1 = create_if_block_4$7(ctx2);
4695
4776
  if_block1.c();
4696
4777
  transition_in(if_block1, 1);
4697
4778
  if_block1.m(form, t9);
@@ -4735,7 +4816,7 @@ function create_fragment$14(ctx) {
4735
4816
  transition_in(if_block3, 1);
4736
4817
  }
4737
4818
  } else {
4738
- if_block3 = create_if_block$t(ctx2);
4819
+ if_block3 = create_if_block$u(ctx2);
4739
4820
  if_block3.c();
4740
4821
  transition_in(if_block3, 1);
4741
4822
  if_block3.m(div3, null);
@@ -4796,7 +4877,7 @@ function executeCaptcha() {
4796
4877
  return response;
4797
4878
  });
4798
4879
  }
4799
- function instance$A($$self, $$props, $$invalidate) {
4880
+ function instance$B($$self, $$props, $$invalidate) {
4800
4881
  var _a;
4801
4882
  let $PasswordlessStore;
4802
4883
  let $app;
@@ -4969,8 +5050,8 @@ var SignupModal = class extends SvelteComponent {
4969
5050
  init(
4970
5051
  this,
4971
5052
  options,
4972
- instance$A,
4973
- create_fragment$14,
5053
+ instance$B,
5054
+ create_fragment$16,
4974
5055
  safe_not_equal,
4975
5056
  {
4976
5057
  closeModal: 1,
@@ -4978,11 +5059,11 @@ var SignupModal = class extends SvelteComponent {
4978
5059
  onSuccessSignup: 11,
4979
5060
  params: 2
4980
5061
  },
4981
- add_css$k
5062
+ add_css$l
4982
5063
  );
4983
5064
  }
4984
5065
  };
4985
- function create_fragment$13(ctx) {
5066
+ function create_fragment$15(ctx) {
4986
5067
  let svg;
4987
5068
  let path;
4988
5069
  return {
@@ -5011,10 +5092,10 @@ function create_fragment$13(ctx) {
5011
5092
  var BackIcon = class extends SvelteComponent {
5012
5093
  constructor(options) {
5013
5094
  super();
5014
- init(this, options, null, create_fragment$13, safe_not_equal, {});
5095
+ init(this, options, null, create_fragment$15, safe_not_equal, {});
5015
5096
  }
5016
5097
  };
5017
- function create_fragment$12(ctx) {
5098
+ function create_fragment$14(ctx) {
5018
5099
  let div4;
5019
5100
  let div0;
5020
5101
  let button;
@@ -5209,7 +5290,7 @@ function create_fragment$12(ctx) {
5209
5290
  }
5210
5291
  };
5211
5292
  }
5212
- function instance$z($$self, $$props, $$invalidate) {
5293
+ function instance$A($$self, $$props, $$invalidate) {
5213
5294
  let $textStore;
5214
5295
  component_subscribe($$self, TextStore, ($$value) => $$invalidate(9, $textStore = $$value));
5215
5296
  let text2 = $textStore.text;
@@ -5262,10 +5343,10 @@ function instance$z($$self, $$props, $$invalidate) {
5262
5343
  var PassResetModal = class extends SvelteComponent {
5263
5344
  constructor(options) {
5264
5345
  super();
5265
- init(this, options, instance$z, create_fragment$12, safe_not_equal, { closeModal: 5, display: 0 });
5346
+ init(this, options, instance$A, create_fragment$14, safe_not_equal, { closeModal: 5, display: 0 });
5266
5347
  }
5267
5348
  };
5268
- function create_if_block$s(ctx) {
5349
+ function create_if_block$t(ctx) {
5269
5350
  let div;
5270
5351
  let erroricon;
5271
5352
  let t;
@@ -5301,7 +5382,7 @@ function create_if_block$s(ctx) {
5301
5382
  }
5302
5383
  };
5303
5384
  }
5304
- function create_fragment$11(ctx) {
5385
+ function create_fragment$13(ctx) {
5305
5386
  let div3;
5306
5387
  let div0;
5307
5388
  let button;
@@ -5339,18 +5420,18 @@ function create_fragment$11(ctx) {
5339
5420
  });
5340
5421
  figureelement = new FigureElement({});
5341
5422
  let if_block = !/*tokenInputValid*/
5342
- ctx[3] && create_if_block$s();
5423
+ ctx[3] && create_if_block$t();
5343
5424
  function passwordinput_passwordInputValid_binding(value) {
5344
5425
  ctx[9](value);
5345
5426
  }
5346
5427
  let passwordinput_props = {
5347
5428
  passwordPlaceholder: (
5348
5429
  /*text*/
5349
- ctx[5]["reset_password_placeholder"]
5430
+ ctx[5]["reset_password_placeholder"] || "New password"
5350
5431
  ),
5351
5432
  passwordLabel: (
5352
5433
  /*text*/
5353
- ctx[5]["password"] || "Password"
5434
+ ctx[5]["password"] || "Enter a new password"
5354
5435
  )
5355
5436
  };
5356
5437
  if (
@@ -5487,7 +5568,7 @@ function create_fragment$11(ctx) {
5487
5568
  transition_in(if_block, 1);
5488
5569
  }
5489
5570
  } else {
5490
- if_block = create_if_block$s();
5571
+ if_block = create_if_block$t();
5491
5572
  if_block.c();
5492
5573
  transition_in(if_block, 1);
5493
5574
  if_block.m(div1, null);
@@ -5553,7 +5634,7 @@ function create_fragment$11(ctx) {
5553
5634
  }
5554
5635
  };
5555
5636
  }
5556
- function instance$y($$self, $$props, $$invalidate) {
5637
+ function instance$z($$self, $$props, $$invalidate) {
5557
5638
  let $textStore;
5558
5639
  component_subscribe($$self, TextStore, ($$value) => $$invalidate(10, $textStore = $$value));
5559
5640
  let text2 = $textStore.text;
@@ -5650,14 +5731,14 @@ function instance$y($$self, $$props, $$invalidate) {
5650
5731
  var PassTokenModal = class extends SvelteComponent {
5651
5732
  constructor(options) {
5652
5733
  super();
5653
- init(this, options, instance$y, create_fragment$11, safe_not_equal, {
5734
+ init(this, options, instance$z, create_fragment$13, safe_not_equal, {
5654
5735
  closeModal: 1,
5655
5736
  display: 0,
5656
5737
  onSuccessPasswordReset: 7
5657
5738
  });
5658
5739
  }
5659
5740
  };
5660
- function create_fragment$10(ctx) {
5741
+ function create_fragment$12(ctx) {
5661
5742
  let div2;
5662
5743
  let div0;
5663
5744
  let t0;
@@ -5753,7 +5834,7 @@ function create_fragment$10(ctx) {
5753
5834
  }
5754
5835
  };
5755
5836
  }
5756
- function instance$x($$self, $$props, $$invalidate) {
5837
+ function instance$y($$self, $$props, $$invalidate) {
5757
5838
  let { closeModal } = $$props;
5758
5839
  $$self.$$set = ($$props2) => {
5759
5840
  if ("closeModal" in $$props2)
@@ -5764,10 +5845,10 @@ function instance$x($$self, $$props, $$invalidate) {
5764
5845
  var PassSuccessModal = class extends SvelteComponent {
5765
5846
  constructor(options) {
5766
5847
  super();
5767
- init(this, options, instance$x, create_fragment$10, safe_not_equal, { closeModal: 0 });
5848
+ init(this, options, instance$y, create_fragment$12, safe_not_equal, { closeModal: 0 });
5768
5849
  }
5769
5850
  };
5770
- function create_else_block_1$5(ctx) {
5851
+ function create_else_block_1$6(ctx) {
5771
5852
  let button;
5772
5853
  let backicon;
5773
5854
  let current;
@@ -5813,7 +5894,7 @@ function create_else_block_1$5(ctx) {
5813
5894
  }
5814
5895
  };
5815
5896
  }
5816
- function create_if_block_2$f(ctx) {
5897
+ function create_if_block_2$h(ctx) {
5817
5898
  let button;
5818
5899
  let backicon;
5819
5900
  let current;
@@ -5859,7 +5940,7 @@ function create_if_block_2$f(ctx) {
5859
5940
  }
5860
5941
  };
5861
5942
  }
5862
- function create_else_block$c(ctx) {
5943
+ function create_else_block$d(ctx) {
5863
5944
  let h2;
5864
5945
  return {
5865
5946
  c() {
@@ -5878,7 +5959,7 @@ function create_else_block$c(ctx) {
5878
5959
  }
5879
5960
  };
5880
5961
  }
5881
- function create_if_block_1$l(ctx) {
5962
+ function create_if_block_1$m(ctx) {
5882
5963
  let h2;
5883
5964
  return {
5884
5965
  c() {
@@ -5897,7 +5978,7 @@ function create_if_block_1$l(ctx) {
5897
5978
  }
5898
5979
  };
5899
5980
  }
5900
- function create_if_block$r(ctx) {
5981
+ function create_if_block$s(ctx) {
5901
5982
  let div;
5902
5983
  let erroricon;
5903
5984
  let t;
@@ -5933,7 +6014,7 @@ function create_if_block$r(ctx) {
5933
6014
  }
5934
6015
  };
5935
6016
  }
5936
- function create_fragment$$(ctx) {
6017
+ function create_fragment$11(ctx) {
5937
6018
  let div3;
5938
6019
  let div0;
5939
6020
  let current_block_type_index;
@@ -5960,7 +6041,7 @@ function create_fragment$$(ctx) {
5960
6041
  let current;
5961
6042
  let mounted;
5962
6043
  let dispose;
5963
- const if_block_creators = [create_if_block_2$f, create_else_block_1$5];
6044
+ const if_block_creators = [create_if_block_2$h, create_else_block_1$6];
5964
6045
  const if_blocks = [];
5965
6046
  function select_block_type(ctx2, dirty) {
5966
6047
  if (
@@ -5984,13 +6065,13 @@ function create_fragment$$(ctx) {
5984
6065
  /*$PasswordlessStore*/
5985
6066
  ctx2[4].passwordlessModalType === "login"
5986
6067
  )
5987
- return create_if_block_1$l;
5988
- return create_else_block$c;
6068
+ return create_if_block_1$m;
6069
+ return create_else_block$d;
5989
6070
  }
5990
6071
  let current_block_type = select_block_type_1(ctx);
5991
6072
  let if_block1 = current_block_type(ctx);
5992
6073
  let if_block2 = !/*tokenInputValid*/
5993
- ctx[3] && create_if_block$r();
6074
+ ctx[3] && create_if_block$s();
5994
6075
  submitbutton = new SubmitButton({
5995
6076
  props: {
5996
6077
  buttonText: (
@@ -6136,7 +6217,7 @@ function create_fragment$$(ctx) {
6136
6217
  transition_in(if_block2, 1);
6137
6218
  }
6138
6219
  } else {
6139
- if_block2 = create_if_block$r();
6220
+ if_block2 = create_if_block$s();
6140
6221
  if_block2.c();
6141
6222
  transition_in(if_block2, 1);
6142
6223
  if_block2.m(div1, null);
@@ -6191,7 +6272,7 @@ function create_fragment$$(ctx) {
6191
6272
  }
6192
6273
  };
6193
6274
  }
6194
- function instance$w($$self, $$props, $$invalidate) {
6275
+ function instance$x($$self, $$props, $$invalidate) {
6195
6276
  let $PasswordlessStore;
6196
6277
  let $textStore;
6197
6278
  component_subscribe($$self, PasswordlessStore, ($$value) => $$invalidate(4, $PasswordlessStore = $$value));
@@ -6311,7 +6392,7 @@ function instance$w($$self, $$props, $$invalidate) {
6311
6392
  var PasswordlessTokenModal = class extends SvelteComponent {
6312
6393
  constructor(options) {
6313
6394
  super();
6314
- init(this, options, instance$w, create_fragment$$, safe_not_equal, {
6395
+ init(this, options, instance$x, create_fragment$11, safe_not_equal, {
6315
6396
  closeModal: 1,
6316
6397
  display: 0,
6317
6398
  onSuccessPasswordlessToken: 7,
@@ -6319,7 +6400,7 @@ var PasswordlessTokenModal = class extends SvelteComponent {
6319
6400
  });
6320
6401
  }
6321
6402
  };
6322
- function create_fragment$_(ctx) {
6403
+ function create_fragment$10(ctx) {
6323
6404
  let svg;
6324
6405
  let path;
6325
6406
  return {
@@ -6348,10 +6429,10 @@ function create_fragment$_(ctx) {
6348
6429
  var ProfileIcon = class extends SvelteComponent {
6349
6430
  constructor(options) {
6350
6431
  super();
6351
- init(this, options, null, create_fragment$_, safe_not_equal, {});
6432
+ init(this, options, null, create_fragment$10, safe_not_equal, {});
6352
6433
  }
6353
6434
  };
6354
- function create_fragment$Z(ctx) {
6435
+ function create_fragment$$(ctx) {
6355
6436
  let svg;
6356
6437
  let path;
6357
6438
  return {
@@ -6380,10 +6461,10 @@ function create_fragment$Z(ctx) {
6380
6461
  var SecurityIcon = class extends SvelteComponent {
6381
6462
  constructor(options) {
6382
6463
  super();
6383
- init(this, options, null, create_fragment$Z, safe_not_equal, {});
6464
+ init(this, options, null, create_fragment$$, safe_not_equal, {});
6384
6465
  }
6385
6466
  };
6386
- function create_fragment$Y(ctx) {
6467
+ function create_fragment$_(ctx) {
6387
6468
  let svg;
6388
6469
  let path;
6389
6470
  return {
@@ -6412,10 +6493,10 @@ function create_fragment$Y(ctx) {
6412
6493
  var LinkOutIcon = class extends SvelteComponent {
6413
6494
  constructor(options) {
6414
6495
  super();
6415
- init(this, options, null, create_fragment$Y, safe_not_equal, {});
6496
+ init(this, options, null, create_fragment$_, safe_not_equal, {});
6416
6497
  }
6417
6498
  };
6418
- function create_fragment$X(ctx) {
6499
+ function create_fragment$Z(ctx) {
6419
6500
  let svg;
6420
6501
  let path;
6421
6502
  return {
@@ -6446,10 +6527,10 @@ function create_fragment$X(ctx) {
6446
6527
  var LogoutIcon = class extends SvelteComponent {
6447
6528
  constructor(options) {
6448
6529
  super();
6449
- init(this, options, null, create_fragment$X, safe_not_equal, {});
6530
+ init(this, options, null, create_fragment$Z, safe_not_equal, {});
6450
6531
  }
6451
6532
  };
6452
- function create_fragment$W(ctx) {
6533
+ function create_fragment$Y(ctx) {
6453
6534
  let svg;
6454
6535
  let path;
6455
6536
  return {
@@ -6478,10 +6559,10 @@ function create_fragment$W(ctx) {
6478
6559
  var PlansIcon = class extends SvelteComponent {
6479
6560
  constructor(options) {
6480
6561
  super();
6481
- init(this, options, null, create_fragment$W, safe_not_equal, {});
6562
+ init(this, options, null, create_fragment$Y, safe_not_equal, {});
6482
6563
  }
6483
6564
  };
6484
- function create_if_block_1$k(ctx) {
6565
+ function create_if_block_2$g(ctx) {
6485
6566
  let button;
6486
6567
  let profileicon;
6487
6568
  let t;
@@ -6513,7 +6594,7 @@ function create_if_block_1$k(ctx) {
6513
6594
  button,
6514
6595
  "click",
6515
6596
  /*click_handler*/
6516
- ctx[7]
6597
+ ctx[8]
6517
6598
  );
6518
6599
  mounted = true;
6519
6600
  }
@@ -6548,7 +6629,7 @@ function create_if_block_1$k(ctx) {
6548
6629
  }
6549
6630
  };
6550
6631
  }
6551
- function create_if_block$q(ctx) {
6632
+ function create_if_block_1$l(ctx) {
6552
6633
  let button;
6553
6634
  let plansicon;
6554
6635
  let t;
@@ -6580,7 +6661,7 @@ function create_if_block$q(ctx) {
6580
6661
  button,
6581
6662
  "click",
6582
6663
  /*click_handler_2*/
6583
- ctx[9]
6664
+ ctx[10]
6584
6665
  );
6585
6666
  mounted = true;
6586
6667
  }
@@ -6615,51 +6696,127 @@ function create_if_block$q(ctx) {
6615
6696
  }
6616
6697
  };
6617
6698
  }
6618
- function create_fragment$V(ctx) {
6619
- let t0;
6620
- let button0;
6621
- let securityicon;
6622
- let t1;
6623
- let t2;
6624
- let show_if = (
6625
- /*showPlansNavButton*/
6626
- ctx[3]()
6627
- );
6628
- let t3;
6629
- let button1;
6630
- let logouticon;
6631
- let t4;
6699
+ function create_if_block$r(ctx) {
6700
+ let button;
6701
+ let plansicon;
6702
+ let t;
6632
6703
  let current;
6633
6704
  let mounted;
6634
6705
  let dispose;
6635
- let if_block0 = !/*hideProfileSection*/
6636
- ctx[1] && create_if_block_1$k(ctx);
6637
- securityicon = new SecurityIcon({});
6638
- let if_block1 = show_if && create_if_block$q(ctx);
6639
- logouticon = new LogoutIcon({});
6706
+ plansicon = new PlansIcon({});
6640
6707
  return {
6641
6708
  c() {
6642
- if (if_block0)
6643
- if_block0.c();
6644
- t0 = space();
6645
- button0 = element("button");
6646
- create_component(securityicon.$$.fragment);
6647
- t1 = text(" Security");
6648
- t2 = space();
6649
- if (if_block1)
6650
- if_block1.c();
6651
- t3 = space();
6652
- button1 = element("button");
6653
- create_component(logouticon.$$.fragment);
6654
- t4 = text(" Logout");
6655
- attr(button0, "data-cy", "security-btn");
6656
- attr(button0, "class", "ms-modal__profile-option");
6709
+ button = element("button");
6710
+ create_component(plansicon.$$.fragment);
6711
+ t = text(" Team");
6712
+ attr(button, "data-cy", "plans-btn");
6713
+ attr(button, "class", "ms-modal__profile-option");
6657
6714
  toggle_class(
6658
- button0,
6715
+ button,
6659
6716
  "ms-modal__profile-option--active",
6660
6717
  /*displayProfile*/
6661
- ctx[0] === "security" || /*displayProfile*/
6662
- ctx[0] === "changePassword"
6718
+ ctx[0] === "team"
6719
+ );
6720
+ },
6721
+ m(target, anchor) {
6722
+ insert(target, button, anchor);
6723
+ mount_component(plansicon, button, null);
6724
+ append(button, t);
6725
+ current = true;
6726
+ if (!mounted) {
6727
+ dispose = listen(
6728
+ button,
6729
+ "click",
6730
+ /*click_handler_3*/
6731
+ ctx[11]
6732
+ );
6733
+ mounted = true;
6734
+ }
6735
+ },
6736
+ p(ctx2, dirty) {
6737
+ if (!current || dirty & /*displayProfile*/
6738
+ 1) {
6739
+ toggle_class(
6740
+ button,
6741
+ "ms-modal__profile-option--active",
6742
+ /*displayProfile*/
6743
+ ctx2[0] === "team"
6744
+ );
6745
+ }
6746
+ },
6747
+ i(local) {
6748
+ if (current)
6749
+ return;
6750
+ transition_in(plansicon.$$.fragment, local);
6751
+ current = true;
6752
+ },
6753
+ o(local) {
6754
+ transition_out(plansicon.$$.fragment, local);
6755
+ current = false;
6756
+ },
6757
+ d(detaching) {
6758
+ if (detaching)
6759
+ detach(button);
6760
+ destroy_component(plansicon);
6761
+ mounted = false;
6762
+ dispose();
6763
+ }
6764
+ };
6765
+ }
6766
+ function create_fragment$X(ctx) {
6767
+ let t0;
6768
+ let button0;
6769
+ let securityicon;
6770
+ let t1;
6771
+ let t2;
6772
+ let show_if_1 = (
6773
+ /*showPlansNavButton*/
6774
+ ctx[3]()
6775
+ );
6776
+ let t3;
6777
+ let show_if = (
6778
+ /*showTeamNavButton*/
6779
+ ctx[4]()
6780
+ );
6781
+ let t4;
6782
+ let button1;
6783
+ let logouticon;
6784
+ let t5;
6785
+ let current;
6786
+ let mounted;
6787
+ let dispose;
6788
+ let if_block0 = !/*hideProfileSection*/
6789
+ ctx[1] && create_if_block_2$g(ctx);
6790
+ securityicon = new SecurityIcon({});
6791
+ let if_block1 = show_if_1 && create_if_block_1$l(ctx);
6792
+ let if_block2 = show_if && create_if_block$r(ctx);
6793
+ logouticon = new LogoutIcon({});
6794
+ return {
6795
+ c() {
6796
+ if (if_block0)
6797
+ if_block0.c();
6798
+ t0 = space();
6799
+ button0 = element("button");
6800
+ create_component(securityicon.$$.fragment);
6801
+ t1 = text(" Security");
6802
+ t2 = space();
6803
+ if (if_block1)
6804
+ if_block1.c();
6805
+ t3 = space();
6806
+ if (if_block2)
6807
+ if_block2.c();
6808
+ t4 = space();
6809
+ button1 = element("button");
6810
+ create_component(logouticon.$$.fragment);
6811
+ t5 = text(" Logout");
6812
+ attr(button0, "data-cy", "security-btn");
6813
+ attr(button0, "class", "ms-modal__profile-option");
6814
+ toggle_class(
6815
+ button0,
6816
+ "ms-modal__profile-option--active",
6817
+ /*displayProfile*/
6818
+ ctx[0] === "security" || /*displayProfile*/
6819
+ ctx[0] === "changePassword"
6663
6820
  );
6664
6821
  attr(button1, "data-cy", "logout-btn");
6665
6822
  attr(button1, "class", "ms-modal__profile-option");
@@ -6675,9 +6832,12 @@ function create_fragment$V(ctx) {
6675
6832
  if (if_block1)
6676
6833
  if_block1.m(target, anchor);
6677
6834
  insert(target, t3, anchor);
6835
+ if (if_block2)
6836
+ if_block2.m(target, anchor);
6837
+ insert(target, t4, anchor);
6678
6838
  insert(target, button1, anchor);
6679
6839
  mount_component(logouticon, button1, null);
6680
- append(button1, t4);
6840
+ append(button1, t5);
6681
6841
  current = true;
6682
6842
  if (!mounted) {
6683
6843
  dispose = [
@@ -6685,7 +6845,7 @@ function create_fragment$V(ctx) {
6685
6845
  button0,
6686
6846
  "click",
6687
6847
  /*click_handler_1*/
6688
- ctx[8]
6848
+ ctx[9]
6689
6849
  ),
6690
6850
  listen(
6691
6851
  button1,
@@ -6707,7 +6867,7 @@ function create_fragment$V(ctx) {
6707
6867
  transition_in(if_block0, 1);
6708
6868
  }
6709
6869
  } else {
6710
- if_block0 = create_if_block_1$k(ctx2);
6870
+ if_block0 = create_if_block_2$g(ctx2);
6711
6871
  if_block0.c();
6712
6872
  transition_in(if_block0, 1);
6713
6873
  if_block0.m(t0.parentNode, t0);
@@ -6729,8 +6889,10 @@ function create_fragment$V(ctx) {
6729
6889
  ctx2[0] === "changePassword"
6730
6890
  );
6731
6891
  }
6732
- if (show_if)
6892
+ if (show_if_1)
6733
6893
  if_block1.p(ctx2, dirty);
6894
+ if (show_if)
6895
+ if_block2.p(ctx2, dirty);
6734
6896
  },
6735
6897
  i(local) {
6736
6898
  if (current)
@@ -6738,6 +6900,7 @@ function create_fragment$V(ctx) {
6738
6900
  transition_in(if_block0);
6739
6901
  transition_in(securityicon.$$.fragment, local);
6740
6902
  transition_in(if_block1);
6903
+ transition_in(if_block2);
6741
6904
  transition_in(logouticon.$$.fragment, local);
6742
6905
  current = true;
6743
6906
  },
@@ -6745,6 +6908,7 @@ function create_fragment$V(ctx) {
6745
6908
  transition_out(if_block0);
6746
6909
  transition_out(securityicon.$$.fragment, local);
6747
6910
  transition_out(if_block1);
6911
+ transition_out(if_block2);
6748
6912
  transition_out(logouticon.$$.fragment, local);
6749
6913
  current = false;
6750
6914
  },
@@ -6762,6 +6926,10 @@ function create_fragment$V(ctx) {
6762
6926
  if_block1.d(detaching);
6763
6927
  if (detaching)
6764
6928
  detach(t3);
6929
+ if (if_block2)
6930
+ if_block2.d(detaching);
6931
+ if (detaching)
6932
+ detach(t4);
6765
6933
  if (detaching)
6766
6934
  detach(button1);
6767
6935
  destroy_component(logouticon);
@@ -6770,7 +6938,7 @@ function create_fragment$V(ctx) {
6770
6938
  }
6771
6939
  };
6772
6940
  }
6773
- function instance$v($$self, $$props, $$invalidate) {
6941
+ function instance$w($$self, $$props, $$invalidate) {
6774
6942
  let { member } = $$props;
6775
6943
  let { onSuccessLogout } = $$props;
6776
6944
  let { displayProfile } = $$props;
@@ -6801,20 +6969,25 @@ function instance$v($$self, $$props, $$invalidate) {
6801
6969
  });
6802
6970
  }
6803
6971
  function showPlansNavButton() {
6804
- return member.stripeCustomerId || member.planConnections.some((plan) => plan.type === "FREE");
6972
+ return member.stripeCustomerId || member.planConnections.some((plan) => plan.type === "FREE") || member.teams.joinedTeams.length > 0;
6973
+ }
6974
+ function showTeamNavButton() {
6975
+ var _a;
6976
+ return ((_a = member.teams) == null ? void 0 : _a.ownedTeams.length) > 0;
6805
6977
  }
6806
6978
  const click_handler = () => $$invalidate(0, displayProfile = "profile");
6807
6979
  const click_handler_1 = () => $$invalidate(0, displayProfile = "security");
6808
6980
  const click_handler_2 = () => $$invalidate(0, displayProfile = "plans");
6981
+ const click_handler_3 = () => $$invalidate(0, displayProfile = "team");
6809
6982
  $$self.$$set = ($$props2) => {
6810
6983
  if ("member" in $$props2)
6811
- $$invalidate(4, member = $$props2.member);
6984
+ $$invalidate(5, member = $$props2.member);
6812
6985
  if ("onSuccessLogout" in $$props2)
6813
- $$invalidate(5, onSuccessLogout = $$props2.onSuccessLogout);
6986
+ $$invalidate(6, onSuccessLogout = $$props2.onSuccessLogout);
6814
6987
  if ("displayProfile" in $$props2)
6815
6988
  $$invalidate(0, displayProfile = $$props2.displayProfile);
6816
6989
  if ("profileLoader" in $$props2)
6817
- $$invalidate(6, profileLoader = $$props2.profileLoader);
6990
+ $$invalidate(7, profileLoader = $$props2.profileLoader);
6818
6991
  if ("hideProfileSection" in $$props2)
6819
6992
  $$invalidate(1, hideProfileSection2 = $$props2.hideProfileSection);
6820
6993
  };
@@ -6823,27 +6996,29 @@ function instance$v($$self, $$props, $$invalidate) {
6823
6996
  hideProfileSection2,
6824
6997
  logout,
6825
6998
  showPlansNavButton,
6999
+ showTeamNavButton,
6826
7000
  member,
6827
7001
  onSuccessLogout,
6828
7002
  profileLoader,
6829
7003
  click_handler,
6830
7004
  click_handler_1,
6831
- click_handler_2
7005
+ click_handler_2,
7006
+ click_handler_3
6832
7007
  ];
6833
7008
  }
6834
7009
  var ProfileModalNav = class extends SvelteComponent {
6835
7010
  constructor(options) {
6836
7011
  super();
6837
- init(this, options, instance$v, create_fragment$V, safe_not_equal, {
6838
- member: 4,
6839
- onSuccessLogout: 5,
7012
+ init(this, options, instance$w, create_fragment$X, safe_not_equal, {
7013
+ member: 5,
7014
+ onSuccessLogout: 6,
6840
7015
  displayProfile: 0,
6841
- profileLoader: 6,
7016
+ profileLoader: 7,
6842
7017
  hideProfileSection: 1
6843
7018
  });
6844
7019
  }
6845
7020
  };
6846
- function create_fragment$U(ctx) {
7021
+ function create_fragment$W(ctx) {
6847
7022
  let svg;
6848
7023
  let path;
6849
7024
  return {
@@ -6874,10 +7049,10 @@ function create_fragment$U(ctx) {
6874
7049
  var ProfileDefaultImage = class extends SvelteComponent {
6875
7050
  constructor(options) {
6876
7051
  super();
6877
- init(this, options, null, create_fragment$U, safe_not_equal, {});
7052
+ init(this, options, null, create_fragment$W, safe_not_equal, {});
6878
7053
  }
6879
7054
  };
6880
- function create_fragment$T(ctx) {
7055
+ function create_fragment$V(ctx) {
6881
7056
  let svg;
6882
7057
  let g;
6883
7058
  let path0;
@@ -6922,17 +7097,17 @@ function create_fragment$T(ctx) {
6922
7097
  var UploadIcon = class extends SvelteComponent {
6923
7098
  constructor(options) {
6924
7099
  super();
6925
- init(this, options, null, create_fragment$T, safe_not_equal, {});
7100
+ init(this, options, null, create_fragment$V, safe_not_equal, {});
6926
7101
  }
6927
7102
  };
6928
- function get_each_context$a(ctx, list, i) {
7103
+ function get_each_context$b(ctx, list, i) {
6929
7104
  const child_ctx = ctx.slice();
6930
7105
  child_ctx[10] = list[i];
6931
7106
  child_ctx[11] = list;
6932
7107
  child_ctx[12] = i;
6933
7108
  return child_ctx;
6934
7109
  }
6935
- function create_else_block_1$4(ctx) {
7110
+ function create_else_block_1$5(ctx) {
6936
7111
  let profiledefaultimage;
6937
7112
  let current;
6938
7113
  profiledefaultimage = new ProfileDefaultImage({});
@@ -6960,7 +7135,7 @@ function create_else_block_1$4(ctx) {
6960
7135
  }
6961
7136
  };
6962
7137
  }
6963
- function create_if_block_2$e(ctx) {
7138
+ function create_if_block_2$f(ctx) {
6964
7139
  let img;
6965
7140
  let img_src_value;
6966
7141
  return {
@@ -6989,7 +7164,7 @@ function create_if_block_2$e(ctx) {
6989
7164
  }
6990
7165
  };
6991
7166
  }
6992
- function create_else_block$b(ctx) {
7167
+ function create_else_block$c(ctx) {
6993
7168
  let t;
6994
7169
  return {
6995
7170
  c() {
@@ -7004,7 +7179,7 @@ function create_else_block$b(ctx) {
7004
7179
  }
7005
7180
  };
7006
7181
  }
7007
- function create_if_block_1$j(ctx) {
7182
+ function create_if_block_1$k(ctx) {
7008
7183
  let t;
7009
7184
  return {
7010
7185
  c() {
@@ -7019,7 +7194,7 @@ function create_if_block_1$j(ctx) {
7019
7194
  }
7020
7195
  };
7021
7196
  }
7022
- function create_if_block$p(ctx) {
7197
+ function create_if_block$q(ctx) {
7023
7198
  let div1;
7024
7199
  let div0;
7025
7200
  let label;
@@ -7144,11 +7319,11 @@ function create_if_block$p(ctx) {
7144
7319
  }
7145
7320
  };
7146
7321
  }
7147
- function create_each_block$a(ctx) {
7322
+ function create_each_block$b(ctx) {
7148
7323
  let if_block_anchor;
7149
7324
  let if_block = (
7150
7325
  /*customField*/
7151
- ctx[10].hidden !== true && create_if_block$p(ctx)
7326
+ ctx[10].hidden !== true && create_if_block$q(ctx)
7152
7327
  );
7153
7328
  return {
7154
7329
  c() {
@@ -7169,7 +7344,7 @@ function create_each_block$a(ctx) {
7169
7344
  if (if_block) {
7170
7345
  if_block.p(ctx2, dirty);
7171
7346
  } else {
7172
- if_block = create_if_block$p(ctx2);
7347
+ if_block = create_if_block$q(ctx2);
7173
7348
  if_block.c();
7174
7349
  if_block.m(if_block_anchor.parentNode, if_block_anchor);
7175
7350
  }
@@ -7186,7 +7361,7 @@ function create_each_block$a(ctx) {
7186
7361
  }
7187
7362
  };
7188
7363
  }
7189
- function create_fragment$S(ctx) {
7364
+ function create_fragment$U(ctx) {
7190
7365
  let div1;
7191
7366
  let h2;
7192
7367
  let t1;
@@ -7207,7 +7382,7 @@ function create_fragment$S(ctx) {
7207
7382
  let current;
7208
7383
  let mounted;
7209
7384
  let dispose;
7210
- const if_block_creators = [create_if_block_2$e, create_else_block_1$4];
7385
+ const if_block_creators = [create_if_block_2$f, create_else_block_1$5];
7211
7386
  const if_blocks = [];
7212
7387
  function select_block_type(ctx2, dirty) {
7213
7388
  if (
@@ -7223,8 +7398,8 @@ function create_fragment$S(ctx) {
7223
7398
  function select_block_type_1(ctx2, dirty) {
7224
7399
  if (!/*member*/
7225
7400
  ctx2[0].profileImage)
7226
- return create_if_block_1$j;
7227
- return create_else_block$b;
7401
+ return create_if_block_1$k;
7402
+ return create_else_block$c;
7228
7403
  }
7229
7404
  let current_block_type = select_block_type_1(ctx);
7230
7405
  let if_block1 = current_block_type(ctx);
@@ -7234,7 +7409,7 @@ function create_fragment$S(ctx) {
7234
7409
  );
7235
7410
  let each_blocks = [];
7236
7411
  for (let i = 0; i < each_value.length; i += 1) {
7237
- each_blocks[i] = create_each_block$a(get_each_context$a(ctx, each_value, i));
7412
+ each_blocks[i] = create_each_block$b(get_each_context$b(ctx, each_value, i));
7238
7413
  }
7239
7414
  return {
7240
7415
  c() {
@@ -7357,11 +7532,11 @@ function create_fragment$S(ctx) {
7357
7532
  ctx2[1];
7358
7533
  let i;
7359
7534
  for (i = 0; i < each_value.length; i += 1) {
7360
- const child_ctx = get_each_context$a(ctx2, each_value, i);
7535
+ const child_ctx = get_each_context$b(ctx2, each_value, i);
7361
7536
  if (each_blocks[i]) {
7362
7537
  each_blocks[i].p(child_ctx, dirty);
7363
7538
  } else {
7364
- each_blocks[i] = create_each_block$a(child_ctx);
7539
+ each_blocks[i] = create_each_block$b(child_ctx);
7365
7540
  each_blocks[i].c();
7366
7541
  each_blocks[i].m(form, null);
7367
7542
  }
@@ -7404,7 +7579,7 @@ function create_fragment$S(ctx) {
7404
7579
  }
7405
7580
  };
7406
7581
  }
7407
- function instance$u($$self, $$props, $$invalidate) {
7582
+ function instance$v($$self, $$props, $$invalidate) {
7408
7583
  let { customFields } = $$props;
7409
7584
  let { member } = $$props;
7410
7585
  let { profileLoader } = $$props;
@@ -7507,14 +7682,14 @@ function instance$u($$self, $$props, $$invalidate) {
7507
7682
  var ProfileInfoContent = class extends SvelteComponent {
7508
7683
  constructor(options) {
7509
7684
  super();
7510
- init(this, options, instance$u, create_fragment$S, safe_not_equal, {
7685
+ init(this, options, instance$v, create_fragment$U, safe_not_equal, {
7511
7686
  customFields: 1,
7512
7687
  member: 0,
7513
7688
  profileLoader: 5
7514
7689
  });
7515
7690
  }
7516
7691
  };
7517
- function create_fragment$R(ctx) {
7692
+ function create_fragment$T(ctx) {
7518
7693
  let svg;
7519
7694
  let path;
7520
7695
  return {
@@ -7543,15 +7718,15 @@ function create_fragment$R(ctx) {
7543
7718
  var PasswordLockIcon = class extends SvelteComponent {
7544
7719
  constructor(options) {
7545
7720
  super();
7546
- init(this, options, null, create_fragment$R, safe_not_equal, {});
7721
+ init(this, options, null, create_fragment$T, safe_not_equal, {});
7547
7722
  }
7548
7723
  };
7549
- function get_each_context$9(ctx, list, i) {
7724
+ function get_each_context$a(ctx, list, i) {
7550
7725
  const child_ctx = ctx.slice();
7551
7726
  child_ctx[16] = list[i];
7552
7727
  return child_ctx;
7553
7728
  }
7554
- function create_else_block_1$3(ctx) {
7729
+ function create_else_block_1$4(ctx) {
7555
7730
  let t;
7556
7731
  return {
7557
7732
  c() {
@@ -7566,7 +7741,7 @@ function create_else_block_1$3(ctx) {
7566
7741
  }
7567
7742
  };
7568
7743
  }
7569
- function create_if_block_2$d(ctx) {
7744
+ function create_if_block_2$e(ctx) {
7570
7745
  let t;
7571
7746
  return {
7572
7747
  c() {
@@ -7581,7 +7756,7 @@ function create_if_block_2$d(ctx) {
7581
7756
  }
7582
7757
  };
7583
7758
  }
7584
- function create_if_block$o(ctx) {
7759
+ function create_if_block$p(ctx) {
7585
7760
  let p;
7586
7761
  let t1;
7587
7762
  let div;
@@ -7596,9 +7771,9 @@ function create_if_block$o(ctx) {
7596
7771
  ctx2[16].provider
7597
7772
  );
7598
7773
  for (let i = 0; i < each_value.length; i += 1) {
7599
- let child_ctx = get_each_context$9(ctx, each_value, i);
7774
+ let child_ctx = get_each_context$a(ctx, each_value, i);
7600
7775
  let key = get_key(child_ctx);
7601
- each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
7776
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$a(key, child_ctx));
7602
7777
  }
7603
7778
  return {
7604
7779
  c() {
@@ -7627,7 +7802,7 @@ function create_if_block$o(ctx) {
7627
7802
  210) {
7628
7803
  each_value = /*$app*/
7629
7804
  ctx2[4].authProviders;
7630
- each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, destroy_block, create_each_block$9, null, get_each_context$9);
7805
+ each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, destroy_block, create_each_block$a, null, get_each_context$a);
7631
7806
  }
7632
7807
  },
7633
7808
  d(detaching) {
@@ -7643,7 +7818,7 @@ function create_if_block$o(ctx) {
7643
7818
  }
7644
7819
  };
7645
7820
  }
7646
- function create_else_block$a(ctx) {
7821
+ function create_else_block$b(ctx) {
7647
7822
  let button;
7648
7823
  let img;
7649
7824
  let img_src_value;
@@ -7720,7 +7895,7 @@ function create_else_block$a(ctx) {
7720
7895
  }
7721
7896
  };
7722
7897
  }
7723
- function create_if_block_1$i(ctx) {
7898
+ function create_if_block_1$j(ctx) {
7724
7899
  let button;
7725
7900
  let img;
7726
7901
  let img_src_value;
@@ -7798,7 +7973,7 @@ function create_if_block_1$i(ctx) {
7798
7973
  }
7799
7974
  };
7800
7975
  }
7801
- function create_each_block$9(key_1, ctx) {
7976
+ function create_each_block$a(key_1, ctx) {
7802
7977
  let div;
7803
7978
  let show_if;
7804
7979
  let t;
@@ -7820,8 +7995,8 @@ function create_each_block$9(key_1, ctx) {
7820
7995
  show_if = !!/*member*/
7821
7996
  ctx2[1].auth.providers.some(func2);
7822
7997
  if (show_if)
7823
- return create_if_block_1$i;
7824
- return create_else_block$a;
7998
+ return create_if_block_1$j;
7999
+ return create_else_block$b;
7825
8000
  }
7826
8001
  let current_block_type = select_block_type_1(ctx, -1);
7827
8002
  let if_block = current_block_type(ctx);
@@ -7860,7 +8035,7 @@ function create_each_block$9(key_1, ctx) {
7860
8035
  }
7861
8036
  };
7862
8037
  }
7863
- function create_fragment$Q(ctx) {
8038
+ function create_fragment$S(ctx) {
7864
8039
  let div1;
7865
8040
  let h2;
7866
8041
  let t1;
@@ -7913,14 +8088,14 @@ function create_fragment$Q(ctx) {
7913
8088
  function select_block_type(ctx2, dirty) {
7914
8089
  if (!/*member*/
7915
8090
  ctx2[1].auth.hasPassword)
7916
- return create_if_block_2$d;
7917
- return create_else_block_1$3;
8091
+ return create_if_block_2$e;
8092
+ return create_else_block_1$4;
7918
8093
  }
7919
8094
  let current_block_type = select_block_type(ctx);
7920
8095
  let if_block0 = current_block_type(ctx);
7921
8096
  let if_block1 = (
7922
8097
  /*$app*/
7923
- ctx[4].authProviders.length > 0 && create_if_block$o(ctx)
8098
+ ctx[4].authProviders.length > 0 && create_if_block$p(ctx)
7924
8099
  );
7925
8100
  return {
7926
8101
  c() {
@@ -8046,7 +8221,7 @@ function create_fragment$Q(ctx) {
8046
8221
  if (if_block1) {
8047
8222
  if_block1.p(ctx2, dirty);
8048
8223
  } else {
8049
- if_block1 = create_if_block$o(ctx2);
8224
+ if_block1 = create_if_block$p(ctx2);
8050
8225
  if_block1.c();
8051
8226
  if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
8052
8227
  }
@@ -8092,7 +8267,7 @@ function create_fragment$Q(ctx) {
8092
8267
  }
8093
8268
  };
8094
8269
  }
8095
- function instance$t($$self, $$props, $$invalidate) {
8270
+ function instance$u($$self, $$props, $$invalidate) {
8096
8271
  let $app;
8097
8272
  component_subscribe($$self, AppStore, ($$value) => $$invalidate(4, $app = $$value));
8098
8273
  let { displayProfile } = $$props;
@@ -8201,7 +8376,7 @@ function instance$t($$self, $$props, $$invalidate) {
8201
8376
  var SecurityInfoContent = class extends SvelteComponent {
8202
8377
  constructor(options) {
8203
8378
  super();
8204
- init(this, options, instance$t, create_fragment$Q, safe_not_equal, {
8379
+ init(this, options, instance$u, create_fragment$S, safe_not_equal, {
8205
8380
  displayProfile: 0,
8206
8381
  member: 1,
8207
8382
  emailValue: 2,
@@ -8209,7 +8384,7 @@ var SecurityInfoContent = class extends SvelteComponent {
8209
8384
  });
8210
8385
  }
8211
8386
  };
8212
- function create_else_block$9(ctx) {
8387
+ function create_else_block$a(ctx) {
8213
8388
  let t;
8214
8389
  return {
8215
8390
  c() {
@@ -8224,7 +8399,7 @@ function create_else_block$9(ctx) {
8224
8399
  }
8225
8400
  };
8226
8401
  }
8227
- function create_if_block_1$h(ctx) {
8402
+ function create_if_block_1$i(ctx) {
8228
8403
  let t;
8229
8404
  return {
8230
8405
  c() {
@@ -8239,7 +8414,7 @@ function create_if_block_1$h(ctx) {
8239
8414
  }
8240
8415
  };
8241
8416
  }
8242
- function create_if_block$n(ctx) {
8417
+ function create_if_block$o(ctx) {
8243
8418
  let passwordinput;
8244
8419
  let updating_passwordValue;
8245
8420
  let updating_passwordInputValid;
@@ -8312,7 +8487,7 @@ function create_if_block$n(ctx) {
8312
8487
  }
8313
8488
  };
8314
8489
  }
8315
- function create_fragment$P(ctx) {
8490
+ function create_fragment$R(ctx) {
8316
8491
  let div3;
8317
8492
  let div1;
8318
8493
  let div0;
@@ -8342,14 +8517,14 @@ function create_fragment$P(ctx) {
8342
8517
  function select_block_type(ctx2, dirty) {
8343
8518
  if (!/*member*/
8344
8519
  ctx2[1].auth.hasPassword)
8345
- return create_if_block_1$h;
8346
- return create_else_block$9;
8520
+ return create_if_block_1$i;
8521
+ return create_else_block$a;
8347
8522
  }
8348
8523
  let current_block_type = select_block_type(ctx);
8349
8524
  let if_block0 = current_block_type(ctx);
8350
8525
  let if_block1 = (
8351
8526
  /*member*/
8352
- ctx[1].auth.hasPassword && create_if_block$n(ctx)
8527
+ ctx[1].auth.hasPassword && create_if_block$o(ctx)
8353
8528
  );
8354
8529
  function passwordinput0_passwordValue_binding(value) {
8355
8530
  ctx[13](value);
@@ -8515,7 +8690,7 @@ function create_fragment$P(ctx) {
8515
8690
  transition_in(if_block1, 1);
8516
8691
  }
8517
8692
  } else {
8518
- if_block1 = create_if_block$n(ctx2);
8693
+ if_block1 = create_if_block$o(ctx2);
8519
8694
  if_block1.c();
8520
8695
  transition_in(if_block1, 1);
8521
8696
  if_block1.m(form, t4);
@@ -8594,7 +8769,7 @@ function create_fragment$P(ctx) {
8594
8769
  }
8595
8770
  };
8596
8771
  }
8597
- function instance$s($$self, $$props, $$invalidate) {
8772
+ function instance$t($$self, $$props, $$invalidate) {
8598
8773
  let { displayProfile } = $$props;
8599
8774
  let { profileLoader } = $$props;
8600
8775
  let { member } = $$props;
@@ -8691,7 +8866,7 @@ function instance$s($$self, $$props, $$invalidate) {
8691
8866
  var PasswordInfoContent = class extends SvelteComponent {
8692
8867
  constructor(options) {
8693
8868
  super();
8694
- init(this, options, instance$s, create_fragment$P, safe_not_equal, {
8869
+ init(this, options, instance$t, create_fragment$R, safe_not_equal, {
8695
8870
  displayProfile: 0,
8696
8871
  profileLoader: 9,
8697
8872
  member: 1
@@ -8731,7 +8906,7 @@ function slide(node, { delay = 0, duration = 400, easing = cubicOut, axis = "y"
8731
8906
  css: (t) => `overflow: hidden;opacity: ${Math.min(t * 20, 1) * opacity};${primary_property}: ${t * primary_property_value}px;padding-${secondary_properties[0]}: ${t * padding_start_value}px;padding-${secondary_properties[1]}: ${t * padding_end_value}px;margin-${secondary_properties[0]}: ${t * margin_start_value}px;margin-${secondary_properties[1]}: ${t * margin_end_value}px;border-${secondary_properties[0]}-width: ${t * border_width_start_value}px;border-${secondary_properties[1]}-width: ${t * border_width_end_value}px;`
8732
8907
  };
8733
8908
  }
8734
- function create_fragment$O(ctx) {
8909
+ function create_fragment$Q(ctx) {
8735
8910
  let div;
8736
8911
  let loadingicon;
8737
8912
  let div_transition;
@@ -8781,10 +8956,10 @@ function create_fragment$O(ctx) {
8781
8956
  var ProfileLoader = class extends SvelteComponent {
8782
8957
  constructor(options) {
8783
8958
  super();
8784
- init(this, options, null, create_fragment$O, safe_not_equal, {});
8959
+ init(this, options, null, create_fragment$Q, safe_not_equal, {});
8785
8960
  }
8786
8961
  };
8787
- function create_fragment$N(ctx) {
8962
+ function create_fragment$P(ctx) {
8788
8963
  let button;
8789
8964
  let switch_instance0;
8790
8965
  let t0;
@@ -8950,7 +9125,7 @@ function create_fragment$N(ctx) {
8950
9125
  }
8951
9126
  };
8952
9127
  }
8953
- function instance$r($$self, $$props, $$invalidate) {
9128
+ function instance$s($$self, $$props, $$invalidate) {
8954
9129
  const omit_props_names = ["buttonText", "buttonRightIcon", "buttonLeftIcon", "onClick"];
8955
9130
  let $$restProps = compute_rest_props($$props, omit_props_names);
8956
9131
  let $app;
@@ -8981,7 +9156,7 @@ function instance$r($$self, $$props, $$invalidate) {
8981
9156
  var RegularButton = class extends SvelteComponent {
8982
9157
  constructor(options) {
8983
9158
  super();
8984
- init(this, options, instance$r, create_fragment$N, safe_not_equal, {
9159
+ init(this, options, instance$s, create_fragment$P, safe_not_equal, {
8985
9160
  buttonText: 0,
8986
9161
  buttonRightIcon: 1,
8987
9162
  buttonLeftIcon: 2,
@@ -8989,7 +9164,7 @@ var RegularButton = class extends SvelteComponent {
8989
9164
  });
8990
9165
  }
8991
9166
  };
8992
- function create_fragment$M(ctx) {
9167
+ function create_fragment$O(ctx) {
8993
9168
  let button;
8994
9169
  let t;
8995
9170
  let button_class_value;
@@ -9059,7 +9234,7 @@ function create_fragment$M(ctx) {
9059
9234
  }
9060
9235
  };
9061
9236
  }
9062
- function instance$q($$self, $$props, $$invalidate) {
9237
+ function instance$r($$self, $$props, $$invalidate) {
9063
9238
  const omit_props_names = ["buttonText", "onClick"];
9064
9239
  let $$restProps = compute_rest_props($$props, omit_props_names);
9065
9240
  let $app;
@@ -9084,16 +9259,21 @@ function instance$q($$self, $$props, $$invalidate) {
9084
9259
  var TextButton = class extends SvelteComponent {
9085
9260
  constructor(options) {
9086
9261
  super();
9087
- init(this, options, instance$q, create_fragment$M, safe_not_equal, { buttonText: 0, onClick: 1 });
9262
+ init(this, options, instance$r, create_fragment$O, safe_not_equal, { buttonText: 0, onClick: 1 });
9088
9263
  }
9089
9264
  };
9090
- function get_each_context$8(ctx, list, i) {
9265
+ function get_each_context$9(ctx, list, i) {
9091
9266
  const child_ctx = ctx.slice();
9092
- child_ctx[8] = list[i];
9093
- child_ctx[10] = i;
9267
+ child_ctx[11] = list[i];
9268
+ child_ctx[13] = i;
9094
9269
  return child_ctx;
9095
9270
  }
9096
- function create_if_block_2$c(ctx) {
9271
+ function get_each_context_1$4(ctx, list, i) {
9272
+ const child_ctx = ctx.slice();
9273
+ child_ctx[14] = list[i];
9274
+ return child_ctx;
9275
+ }
9276
+ function create_if_block_3$9(ctx) {
9097
9277
  let div;
9098
9278
  let regularbutton;
9099
9279
  let current;
@@ -9101,7 +9281,7 @@ function create_if_block_2$c(ctx) {
9101
9281
  props: {
9102
9282
  onClick: (
9103
9283
  /*launchPortal*/
9104
- ctx[3]
9284
+ ctx[4]
9105
9285
  ),
9106
9286
  class: "ms-modal__regular-button--margin-right ms-modal__regular-button--left-icon",
9107
9287
  buttonText: "Manage Subscriptions",
@@ -9138,18 +9318,18 @@ function create_if_block_2$c(ctx) {
9138
9318
  }
9139
9319
  };
9140
9320
  }
9141
- function create_if_block_1$g(ctx) {
9321
+ function create_if_block_2$d(ctx) {
9142
9322
  let h3;
9143
9323
  let t1;
9144
9324
  let each_1_anchor;
9145
9325
  let current;
9146
- let each_value = (
9147
- /*freePlanConnections*/
9326
+ let each_value_1 = (
9327
+ /*joinedTeams*/
9148
9328
  ctx[1]
9149
9329
  );
9150
9330
  let each_blocks = [];
9151
- for (let i = 0; i < each_value.length; i += 1) {
9152
- each_blocks[i] = create_each_block$8(get_each_context$8(ctx, each_value, i));
9331
+ for (let i = 0; i < each_value_1.length; i += 1) {
9332
+ each_blocks[i] = create_each_block_1$4(get_each_context_1$4(ctx, each_value_1, i));
9153
9333
  }
9154
9334
  const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
9155
9335
  each_blocks[i] = null;
@@ -9157,7 +9337,7 @@ function create_if_block_1$g(ctx) {
9157
9337
  return {
9158
9338
  c() {
9159
9339
  h3 = element("h3");
9160
- h3.textContent = "Free Plans";
9340
+ h3.textContent = "Team Plans";
9161
9341
  t1 = space();
9162
9342
  for (let i = 0; i < each_blocks.length; i += 1) {
9163
9343
  each_blocks[i].c();
@@ -9176,25 +9356,25 @@ function create_if_block_1$g(ctx) {
9176
9356
  current = true;
9177
9357
  },
9178
9358
  p(ctx2, dirty) {
9179
- if (dirty & /*removeFreePlan, freePlanConnections, $app*/
9180
- 22) {
9181
- each_value = /*freePlanConnections*/
9359
+ if (dirty & /*removeMemberFromTeam, joinedTeams, member*/
9360
+ 67) {
9361
+ each_value_1 = /*joinedTeams*/
9182
9362
  ctx2[1];
9183
9363
  let i;
9184
- for (i = 0; i < each_value.length; i += 1) {
9185
- const child_ctx = get_each_context$8(ctx2, each_value, i);
9364
+ for (i = 0; i < each_value_1.length; i += 1) {
9365
+ const child_ctx = get_each_context_1$4(ctx2, each_value_1, i);
9186
9366
  if (each_blocks[i]) {
9187
9367
  each_blocks[i].p(child_ctx, dirty);
9188
9368
  transition_in(each_blocks[i], 1);
9189
9369
  } else {
9190
- each_blocks[i] = create_each_block$8(child_ctx);
9370
+ each_blocks[i] = create_each_block_1$4(child_ctx);
9191
9371
  each_blocks[i].c();
9192
9372
  transition_in(each_blocks[i], 1);
9193
9373
  each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
9194
9374
  }
9195
9375
  }
9196
9376
  group_outros();
9197
- for (i = each_value.length; i < each_blocks.length; i += 1) {
9377
+ for (i = each_value_1.length; i < each_blocks.length; i += 1) {
9198
9378
  out(i);
9199
9379
  }
9200
9380
  check_outros();
@@ -9203,7 +9383,7 @@ function create_if_block_1$g(ctx) {
9203
9383
  i(local) {
9204
9384
  if (current)
9205
9385
  return;
9206
- for (let i = 0; i < each_value.length; i += 1) {
9386
+ for (let i = 0; i < each_value_1.length; i += 1) {
9207
9387
  transition_in(each_blocks[i]);
9208
9388
  }
9209
9389
  current = true;
@@ -9226,40 +9406,30 @@ function create_if_block_1$g(ctx) {
9226
9406
  }
9227
9407
  };
9228
9408
  }
9229
- function create_each_block$8(ctx) {
9409
+ function create_each_block_1$4(ctx) {
9230
9410
  let div1;
9231
9411
  let div0;
9232
9412
  let b;
9233
9413
  let t0_value = (
9234
- /*$app*/
9235
- ctx[2].plans.find(func2).name + ""
9414
+ /*team*/
9415
+ ctx[14].planName + ""
9236
9416
  );
9237
9417
  let t0;
9238
9418
  let t1;
9239
9419
  let textbutton;
9240
9420
  let t2;
9241
9421
  let current;
9242
- function func2(...args) {
9422
+ function func2() {
9243
9423
  return (
9244
9424
  /*func*/
9245
- ctx[6](
9246
- /*memberPlan*/
9247
- ctx[8],
9248
- ...args
9249
- )
9250
- );
9251
- }
9252
- function func_12() {
9253
- return (
9254
- /*func_1*/
9255
- ctx[7](
9256
- /*memberPlan*/
9257
- ctx[8]
9425
+ ctx[8](
9426
+ /*team*/
9427
+ ctx[14]
9258
9428
  )
9259
9429
  );
9260
9430
  }
9261
9431
  textbutton = new TextButton({
9262
- props: { buttonText: "Remove", onClick: func_12 }
9432
+ props: { buttonText: "Leave Team", onClick: func2 }
9263
9433
  });
9264
9434
  return {
9265
9435
  c() {
@@ -9284,14 +9454,14 @@ function create_each_block$8(ctx) {
9284
9454
  },
9285
9455
  p(new_ctx, dirty) {
9286
9456
  ctx = new_ctx;
9287
- if ((!current || dirty & /*$app, freePlanConnections*/
9288
- 6) && t0_value !== (t0_value = /*$app*/
9289
- ctx[2].plans.find(func2).name + ""))
9457
+ if ((!current || dirty & /*joinedTeams*/
9458
+ 2) && t0_value !== (t0_value = /*team*/
9459
+ ctx[14].planName + ""))
9290
9460
  set_data(t0, t0_value);
9291
9461
  const textbutton_changes = {};
9292
- if (dirty & /*freePlanConnections*/
9293
- 2)
9294
- textbutton_changes.onClick = func_12;
9462
+ if (dirty & /*joinedTeams, member*/
9463
+ 3)
9464
+ textbutton_changes.onClick = func2;
9295
9465
  textbutton.$set(textbutton_changes);
9296
9466
  },
9297
9467
  i(local) {
@@ -9311,40 +9481,218 @@ function create_each_block$8(ctx) {
9311
9481
  }
9312
9482
  };
9313
9483
  }
9314
- function create_if_block$m(ctx) {
9315
- let div;
9316
- return {
9317
- c() {
9318
- div = element("div");
9319
- div.textContent = "You currently have no plans.";
9320
- },
9321
- m(target, anchor) {
9322
- insert(target, div, anchor);
9323
- },
9484
+ function create_if_block_1$h(ctx) {
9485
+ let h3;
9486
+ let t1;
9487
+ let each_1_anchor;
9488
+ let current;
9489
+ let each_value = (
9490
+ /*freePlanConnections*/
9491
+ ctx[2]
9492
+ );
9493
+ let each_blocks = [];
9494
+ for (let i = 0; i < each_value.length; i += 1) {
9495
+ each_blocks[i] = create_each_block$9(get_each_context$9(ctx, each_value, i));
9496
+ }
9497
+ const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
9498
+ each_blocks[i] = null;
9499
+ });
9500
+ return {
9501
+ c() {
9502
+ h3 = element("h3");
9503
+ h3.textContent = "Free Plans";
9504
+ t1 = space();
9505
+ for (let i = 0; i < each_blocks.length; i += 1) {
9506
+ each_blocks[i].c();
9507
+ }
9508
+ each_1_anchor = empty();
9509
+ },
9510
+ m(target, anchor) {
9511
+ insert(target, h3, anchor);
9512
+ insert(target, t1, anchor);
9513
+ for (let i = 0; i < each_blocks.length; i += 1) {
9514
+ if (each_blocks[i]) {
9515
+ each_blocks[i].m(target, anchor);
9516
+ }
9517
+ }
9518
+ insert(target, each_1_anchor, anchor);
9519
+ current = true;
9520
+ },
9521
+ p(ctx2, dirty) {
9522
+ if (dirty & /*removeFreePlan, freePlanConnections, $app*/
9523
+ 44) {
9524
+ each_value = /*freePlanConnections*/
9525
+ ctx2[2];
9526
+ let i;
9527
+ for (i = 0; i < each_value.length; i += 1) {
9528
+ const child_ctx = get_each_context$9(ctx2, each_value, i);
9529
+ if (each_blocks[i]) {
9530
+ each_blocks[i].p(child_ctx, dirty);
9531
+ transition_in(each_blocks[i], 1);
9532
+ } else {
9533
+ each_blocks[i] = create_each_block$9(child_ctx);
9534
+ each_blocks[i].c();
9535
+ transition_in(each_blocks[i], 1);
9536
+ each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
9537
+ }
9538
+ }
9539
+ group_outros();
9540
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
9541
+ out(i);
9542
+ }
9543
+ check_outros();
9544
+ }
9545
+ },
9546
+ i(local) {
9547
+ if (current)
9548
+ return;
9549
+ for (let i = 0; i < each_value.length; i += 1) {
9550
+ transition_in(each_blocks[i]);
9551
+ }
9552
+ current = true;
9553
+ },
9554
+ o(local) {
9555
+ each_blocks = each_blocks.filter(Boolean);
9556
+ for (let i = 0; i < each_blocks.length; i += 1) {
9557
+ transition_out(each_blocks[i]);
9558
+ }
9559
+ current = false;
9560
+ },
9561
+ d(detaching) {
9562
+ if (detaching)
9563
+ detach(h3);
9564
+ if (detaching)
9565
+ detach(t1);
9566
+ destroy_each(each_blocks, detaching);
9567
+ if (detaching)
9568
+ detach(each_1_anchor);
9569
+ }
9570
+ };
9571
+ }
9572
+ function create_each_block$9(ctx) {
9573
+ let div1;
9574
+ let div0;
9575
+ let b;
9576
+ let t0_value = (
9577
+ /*$app*/
9578
+ ctx[3].plans.find(func_12).name + ""
9579
+ );
9580
+ let t0;
9581
+ let t1;
9582
+ let textbutton;
9583
+ let t2;
9584
+ let current;
9585
+ function func_12(...args) {
9586
+ return (
9587
+ /*func_1*/
9588
+ ctx[9](
9589
+ /*memberPlan*/
9590
+ ctx[11],
9591
+ ...args
9592
+ )
9593
+ );
9594
+ }
9595
+ function func_22() {
9596
+ return (
9597
+ /*func_2*/
9598
+ ctx[10](
9599
+ /*memberPlan*/
9600
+ ctx[11]
9601
+ )
9602
+ );
9603
+ }
9604
+ textbutton = new TextButton({
9605
+ props: { buttonText: "Remove", onClick: func_22 }
9606
+ });
9607
+ return {
9608
+ c() {
9609
+ div1 = element("div");
9610
+ div0 = element("div");
9611
+ b = element("b");
9612
+ t0 = text(t0_value);
9613
+ t1 = space();
9614
+ create_component(textbutton.$$.fragment);
9615
+ t2 = space();
9616
+ attr(div1, "class", "ms-modal__card");
9617
+ },
9618
+ m(target, anchor) {
9619
+ insert(target, div1, anchor);
9620
+ append(div1, div0);
9621
+ append(div0, b);
9622
+ append(b, t0);
9623
+ append(div1, t1);
9624
+ mount_component(textbutton, div1, null);
9625
+ append(div1, t2);
9626
+ current = true;
9627
+ },
9628
+ p(new_ctx, dirty) {
9629
+ ctx = new_ctx;
9630
+ if ((!current || dirty & /*$app, freePlanConnections*/
9631
+ 12) && t0_value !== (t0_value = /*$app*/
9632
+ ctx[3].plans.find(func_12).name + ""))
9633
+ set_data(t0, t0_value);
9634
+ const textbutton_changes = {};
9635
+ if (dirty & /*freePlanConnections*/
9636
+ 4)
9637
+ textbutton_changes.onClick = func_22;
9638
+ textbutton.$set(textbutton_changes);
9639
+ },
9640
+ i(local) {
9641
+ if (current)
9642
+ return;
9643
+ transition_in(textbutton.$$.fragment, local);
9644
+ current = true;
9645
+ },
9646
+ o(local) {
9647
+ transition_out(textbutton.$$.fragment, local);
9648
+ current = false;
9649
+ },
9650
+ d(detaching) {
9651
+ if (detaching)
9652
+ detach(div1);
9653
+ destroy_component(textbutton);
9654
+ }
9655
+ };
9656
+ }
9657
+ function create_if_block$n(ctx) {
9658
+ let div;
9659
+ return {
9660
+ c() {
9661
+ div = element("div");
9662
+ div.textContent = "You currently have free no plans.";
9663
+ },
9664
+ m(target, anchor) {
9665
+ insert(target, div, anchor);
9666
+ },
9324
9667
  d(detaching) {
9325
9668
  if (detaching)
9326
9669
  detach(div);
9327
9670
  }
9328
9671
  };
9329
9672
  }
9330
- function create_fragment$L(ctx) {
9673
+ function create_fragment$N(ctx) {
9331
9674
  let div;
9332
9675
  let t1;
9333
9676
  let t2;
9334
9677
  let t3;
9335
- let if_block2_anchor;
9678
+ let t4;
9679
+ let if_block3_anchor;
9336
9680
  let current;
9337
9681
  let if_block0 = (
9338
9682
  /*member*/
9339
- ctx[0].stripeCustomerId && create_if_block_2$c(ctx)
9683
+ ctx[0].stripeCustomerId && create_if_block_3$9(ctx)
9340
9684
  );
9341
9685
  let if_block1 = (
9686
+ /*joinedTeams*/
9687
+ ctx[1].length > 0 && create_if_block_2$d(ctx)
9688
+ );
9689
+ let if_block2 = (
9342
9690
  /*freePlanConnections*/
9343
- ctx[1].length > 0 && create_if_block_1$g(ctx)
9691
+ ctx[2].length > 0 && create_if_block_1$h(ctx)
9344
9692
  );
9345
- let if_block2 = !/*member*/
9693
+ let if_block3 = !/*member*/
9346
9694
  ctx[0].stripeCustomerId && /*freePlanConnections*/
9347
- ctx[1].length === 0 && create_if_block$m();
9695
+ ctx[2].length === 0 && create_if_block$n();
9348
9696
  return {
9349
9697
  c() {
9350
9698
  div = element("div");
@@ -9358,7 +9706,10 @@ function create_fragment$L(ctx) {
9358
9706
  t3 = space();
9359
9707
  if (if_block2)
9360
9708
  if_block2.c();
9361
- if_block2_anchor = empty();
9709
+ t4 = space();
9710
+ if (if_block3)
9711
+ if_block3.c();
9712
+ if_block3_anchor = empty();
9362
9713
  attr(div, "class", "ms-modal__title-container");
9363
9714
  },
9364
9715
  m(target, anchor) {
@@ -9372,7 +9723,10 @@ function create_fragment$L(ctx) {
9372
9723
  insert(target, t3, anchor);
9373
9724
  if (if_block2)
9374
9725
  if_block2.m(target, anchor);
9375
- insert(target, if_block2_anchor, anchor);
9726
+ insert(target, t4, anchor);
9727
+ if (if_block3)
9728
+ if_block3.m(target, anchor);
9729
+ insert(target, if_block3_anchor, anchor);
9376
9730
  current = true;
9377
9731
  },
9378
9732
  p(ctx2, [dirty]) {
@@ -9387,7 +9741,7 @@ function create_fragment$L(ctx) {
9387
9741
  transition_in(if_block0, 1);
9388
9742
  }
9389
9743
  } else {
9390
- if_block0 = create_if_block_2$c(ctx2);
9744
+ if_block0 = create_if_block_3$9(ctx2);
9391
9745
  if_block0.c();
9392
9746
  transition_in(if_block0, 1);
9393
9747
  if_block0.m(t2.parentNode, t2);
@@ -9400,133 +9754,1252 @@ function create_fragment$L(ctx) {
9400
9754
  check_outros();
9401
9755
  }
9402
9756
  if (
9403
- /*freePlanConnections*/
9757
+ /*joinedTeams*/
9404
9758
  ctx2[1].length > 0
9405
9759
  ) {
9406
9760
  if (if_block1) {
9407
9761
  if_block1.p(ctx2, dirty);
9408
- if (dirty & /*freePlanConnections*/
9762
+ if (dirty & /*joinedTeams*/
9409
9763
  2) {
9410
9764
  transition_in(if_block1, 1);
9411
9765
  }
9412
9766
  } else {
9413
- if_block1 = create_if_block_1$g(ctx2);
9767
+ if_block1 = create_if_block_2$d(ctx2);
9414
9768
  if_block1.c();
9415
9769
  transition_in(if_block1, 1);
9416
9770
  if_block1.m(t3.parentNode, t3);
9417
9771
  }
9418
- } else if (if_block1) {
9419
- group_outros();
9420
- transition_out(if_block1, 1, 1, () => {
9421
- if_block1 = null;
9422
- });
9423
- check_outros();
9772
+ } else if (if_block1) {
9773
+ group_outros();
9774
+ transition_out(if_block1, 1, 1, () => {
9775
+ if_block1 = null;
9776
+ });
9777
+ check_outros();
9778
+ }
9779
+ if (
9780
+ /*freePlanConnections*/
9781
+ ctx2[2].length > 0
9782
+ ) {
9783
+ if (if_block2) {
9784
+ if_block2.p(ctx2, dirty);
9785
+ if (dirty & /*freePlanConnections*/
9786
+ 4) {
9787
+ transition_in(if_block2, 1);
9788
+ }
9789
+ } else {
9790
+ if_block2 = create_if_block_1$h(ctx2);
9791
+ if_block2.c();
9792
+ transition_in(if_block2, 1);
9793
+ if_block2.m(t4.parentNode, t4);
9794
+ }
9795
+ } else if (if_block2) {
9796
+ group_outros();
9797
+ transition_out(if_block2, 1, 1, () => {
9798
+ if_block2 = null;
9799
+ });
9800
+ check_outros();
9801
+ }
9802
+ if (!/*member*/
9803
+ ctx2[0].stripeCustomerId && /*freePlanConnections*/
9804
+ ctx2[2].length === 0) {
9805
+ if (if_block3)
9806
+ ;
9807
+ else {
9808
+ if_block3 = create_if_block$n();
9809
+ if_block3.c();
9810
+ if_block3.m(if_block3_anchor.parentNode, if_block3_anchor);
9811
+ }
9812
+ } else if (if_block3) {
9813
+ if_block3.d(1);
9814
+ if_block3 = null;
9815
+ }
9816
+ },
9817
+ i(local) {
9818
+ if (current)
9819
+ return;
9820
+ transition_in(if_block0);
9821
+ transition_in(if_block1);
9822
+ transition_in(if_block2);
9823
+ current = true;
9824
+ },
9825
+ o(local) {
9826
+ transition_out(if_block0);
9827
+ transition_out(if_block1);
9828
+ transition_out(if_block2);
9829
+ current = false;
9830
+ },
9831
+ d(detaching) {
9832
+ if (detaching)
9833
+ detach(div);
9834
+ if (detaching)
9835
+ detach(t1);
9836
+ if (if_block0)
9837
+ if_block0.d(detaching);
9838
+ if (detaching)
9839
+ detach(t2);
9840
+ if (if_block1)
9841
+ if_block1.d(detaching);
9842
+ if (detaching)
9843
+ detach(t3);
9844
+ if (if_block2)
9845
+ if_block2.d(detaching);
9846
+ if (detaching)
9847
+ detach(t4);
9848
+ if (if_block3)
9849
+ if_block3.d(detaching);
9850
+ if (detaching)
9851
+ detach(if_block3_anchor);
9852
+ }
9853
+ };
9854
+ }
9855
+ function instance$q($$self, $$props, $$invalidate) {
9856
+ let freePlanConnections;
9857
+ let joinedTeams;
9858
+ let $app;
9859
+ component_subscribe($$self, AppStore, ($$value) => $$invalidate(3, $app = $$value));
9860
+ let { profileLoader } = $$props;
9861
+ let { member } = $$props;
9862
+ function launchPortal(e) {
9863
+ return __async(this, null, function* () {
9864
+ $$invalidate(7, profileLoader = true);
9865
+ yield window.$memberstackDom.launchStripeCustomerPortal({ priceIds: [], autoRedirect: true });
9866
+ });
9867
+ }
9868
+ function removeFreePlan(planId) {
9869
+ return __async(this, null, function* () {
9870
+ $$invalidate(7, profileLoader = true);
9871
+ try {
9872
+ yield window.$memberstackDom.removePlan({ planId });
9873
+ $$invalidate(0, member.planConnections = member.planConnections.filter((plan) => plan.planId !== planId), member);
9874
+ } catch (err) {
9875
+ console.log(err);
9876
+ window.$memberstackDom._showMessage(err.message, true);
9877
+ } finally {
9878
+ $$invalidate(7, profileLoader = false);
9879
+ }
9880
+ });
9881
+ }
9882
+ function removeMemberFromTeam(teamId, memberId) {
9883
+ return __async(this, null, function* () {
9884
+ try {
9885
+ yield window.$memberstackDom.removeMemberFromTeam({ teamId, memberId });
9886
+ $$invalidate(0, member.teams.joinedTeams = member.teams.joinedTeams.filter((t) => t.teamId !== teamId), member);
9887
+ } catch (err) {
9888
+ window.$memberstackDom._showMessage(err.message, true);
9889
+ }
9890
+ });
9891
+ }
9892
+ const func2 = (team) => removeMemberFromTeam(team.teamId, member.id);
9893
+ const func_12 = (memberPlan, plan) => plan.id === memberPlan.planId;
9894
+ const func_22 = (memberPlan) => removeFreePlan(memberPlan.planId);
9895
+ $$self.$$set = ($$props2) => {
9896
+ if ("profileLoader" in $$props2)
9897
+ $$invalidate(7, profileLoader = $$props2.profileLoader);
9898
+ if ("member" in $$props2)
9899
+ $$invalidate(0, member = $$props2.member);
9900
+ };
9901
+ $$self.$$.update = () => {
9902
+ var _a;
9903
+ if ($$self.$$.dirty & /*member*/
9904
+ 1) {
9905
+ $$invalidate(2, freePlanConnections = member.planConnections.filter((plan) => plan.type === "FREE"));
9906
+ }
9907
+ if ($$self.$$.dirty & /*member*/
9908
+ 1) {
9909
+ $$invalidate(1, joinedTeams = (_a = member.teams) == null ? void 0 : _a.joinedTeams);
9910
+ }
9911
+ };
9912
+ return [
9913
+ member,
9914
+ joinedTeams,
9915
+ freePlanConnections,
9916
+ $app,
9917
+ launchPortal,
9918
+ removeFreePlan,
9919
+ removeMemberFromTeam,
9920
+ profileLoader,
9921
+ func2,
9922
+ func_12,
9923
+ func_22
9924
+ ];
9925
+ }
9926
+ var PlansInfoContent = class extends SvelteComponent {
9927
+ constructor(options) {
9928
+ super();
9929
+ init(this, options, instance$q, create_fragment$N, safe_not_equal, { profileLoader: 7, member: 0 });
9930
+ }
9931
+ };
9932
+ function add_css$k(target) {
9933
+ append_styles(target, "svelte-c6ihgv", "svg.svelte-c6ihgv{fill:currentColor}");
9934
+ }
9935
+ function create_fragment$M(ctx) {
9936
+ let svg;
9937
+ let path;
9938
+ return {
9939
+ c() {
9940
+ svg = svg_element("svg");
9941
+ path = svg_element("path");
9942
+ attr(path, "d", "M226.783-133.782q-38.363 0-65.682-27.319-27.319-27.319-27.319-65.682v-506.434q0-38.363 27.319-65.682 27.319-27.319 65.682-27.319h151.521q10.391-32.696 37.688-53.261 27.296-20.566 64.008-20.566 34.326 0 62.283 20.566 27.957 20.565 38.913 53.261h152.021q38.363 0 65.682 27.319 27.319 27.319 27.319 65.682v506.434q0 38.363-27.319 65.682-27.319 27.319-65.682 27.319H226.783Zm0-93.001h506.434v-506.434h-63.043v75.043q0 18.887-13.807 32.694-13.807 13.807-32.694 13.807H336.327q-18.887 0-32.694-13.807-13.807-13.807-13.807-32.694v-75.043h-63.043v506.434Zm253.006-518.913q13.711 0 23.711-9.789 10-9.79 10-23.5 0-13.711-9.789-23.711-9.79-10-23.5-10-13.711 0-23.711 9.79-10 9.789-10 23.5 0 13.71 9.789 23.71 9.79 10 23.5 10Z");
9943
+ attr(svg, "xmlns", "http://www.w3.org/2000/svg");
9944
+ attr(svg, "height", "20");
9945
+ attr(svg, "viewBox", "0 -960 960 960");
9946
+ attr(svg, "width", "20");
9947
+ attr(svg, "class", "svelte-c6ihgv");
9948
+ },
9949
+ m(target, anchor) {
9950
+ insert(target, svg, anchor);
9951
+ append(svg, path);
9952
+ },
9953
+ p: noop,
9954
+ i: noop,
9955
+ o: noop,
9956
+ d(detaching) {
9957
+ if (detaching)
9958
+ detach(svg);
9959
+ }
9960
+ };
9961
+ }
9962
+ var CopyIcon$1 = class extends SvelteComponent {
9963
+ constructor(options) {
9964
+ super();
9965
+ init(this, options, null, create_fragment$M, safe_not_equal, {}, add_css$k);
9966
+ }
9967
+ };
9968
+ function create_fragment$L(ctx) {
9969
+ let svg;
9970
+ let path;
9971
+ return {
9972
+ c() {
9973
+ svg = svg_element("svg");
9974
+ path = svg_element("path");
9975
+ attr(path, "fill", "currentColor");
9976
+ attr(path, "d", "M109-120q-11 0-20-5.5T75-140q-5-9-5.5-19.5T75-180l370-640q6-10 15.5-15t19.5-5q10 0 19.5 5t15.5 15l370 640q6 10 5.5 20.5T885-140q-5 9-14 14.5t-20 5.5H109Zm371-120q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm0-120q17 0 28.5-11.5T520-400v-120q0-17-11.5-28.5T480-560q-17 0-28.5 11.5T440-520v120q0 17 11.5 28.5T480-360Z");
9977
+ attr(svg, "xmlns", "http://www.w3.org/2000/svg");
9978
+ attr(svg, "height", "24");
9979
+ attr(svg, "viewBox", "0 -960 960 960");
9980
+ attr(svg, "width", "24");
9981
+ },
9982
+ m(target, anchor) {
9983
+ insert(target, svg, anchor);
9984
+ append(svg, path);
9985
+ },
9986
+ p: noop,
9987
+ i: noop,
9988
+ o: noop,
9989
+ d(detaching) {
9990
+ if (detaching)
9991
+ detach(svg);
9992
+ }
9993
+ };
9994
+ }
9995
+ var WarningIcon$1 = class extends SvelteComponent {
9996
+ constructor(options) {
9997
+ super();
9998
+ init(this, options, null, create_fragment$L, safe_not_equal, {});
9999
+ }
10000
+ };
10001
+ function add_css$j(target) {
10002
+ append_styles(target, "svelte-1haqb7b", ".ms-modal__title-container--teams.svelte-1haqb7b{display:flex;justify-content:flex-start;align-items:baseline;margin-bottom:24px;gap:12px}.ms-modal__title--teams.svelte-1haqb7b{margin-bottom:0px}.ms-modal__title--seats.svelte-1haqb7b{font-size:14px;line-height:1;font-weight:500;color:#5c5c5c}.ms-modal__invite-group.svelte-1haqb7b{margin-bottom:24px}.ms-modal__invite-input-group.svelte-1haqb7b{display:flex;gap:12px;border:1px solid #ddd;border-radius:6px;justify-content:space-between;align-items:center;padding:6px}.ms-modal__invite-input.svelte-1haqb7b{border:none;background:none;outline:none;width:100%;font-size:12px;padding:8px 0;text-overflow:ellipsis}.ms-modal__invite-copy-btn.svelte-1haqb7b{font-size:14px;font-weight:700;line-height:1;color:#fff;background-color:#2962ff;border-radius:4px;display:flex;align-items:center;padding:8px 12px;gap:6px}.ms-modal__invite-copy-btn svg{margin-right:4px;width:16px}.ms-modal__invite-regenerate-btn.svelte-1haqb7b{font-size:12px;font-weight:600;line-height:1;color:#2962ff;background-color:transparent;border:none;outline:none;padding:4px 0}.ms-modal__upgrade-warning.svelte-1haqb7b{display:flex;align-items:center;gap:12px;padding:12px;border-radius:8px;font-size:14px;font-weight:500;line-height:1;color:#e28c0a;background-color:#faf3e1;width:100%;text-align:left}.ms-modal__upgrade-warning-text.svelte-1haqb7b{width:100%}.ms-modal__team-member.svelte-1haqb7b{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #ebebeb}.ms-modal__team-member.svelte-1haqb7b:last-child{border-bottom:none}.ms-modal__team-member-info.svelte-1haqb7b{display:flex;align-items:center}.ms-modal__team-member-image.svelte-1haqb7b{width:32px;height:32px;border-radius:50%;margin-right:10px}.ms-modal__team-member-image--initial.svelte-1haqb7b{width:32px;height:32px;border-radius:50%;border:1.33px solid #2962ff;margin-right:12px;display:flex;justify-content:center;align-items:center;background-color:#e7f1ff;color:#2962ff;font-size:18px;font-weight:500;line-height:1}.ms-modal__team-member-email.svelte-1haqb7b{font-size:14px;font-weight:500;line-height:1;color:#5c5c5c}.ms-modal__team-member-actions.svelte-1haqb7b{display:flex;align-items:center}.ms-modal__team-member-role.svelte-1haqb7b{font-size:12px;font-weight:500;line-height:1;color:#5c5c5c}.ms-modal__team-member-remove-btn.svelte-1haqb7b{font-size:12px;font-weight:600;line-height:1;color:#c8020d;background-color:transparent;border:none;outline:none;padding:4px 0;display:flex;align-items:center;margin-left:8px}.ms-modal__team-member-remove-text.svelte-1haqb7b{margin-right:8px}.ms-modal__team-member-remove-btn svg{width:10px !important}");
10003
+ }
10004
+ function get_each_context$8(ctx, list, i) {
10005
+ const child_ctx = ctx.slice();
10006
+ child_ctx[15] = list[i];
10007
+ return child_ctx;
10008
+ }
10009
+ function create_if_block_5$5(ctx) {
10010
+ var _a, _b;
10011
+ let div;
10012
+ let t0_value = (
10013
+ /*teamData*/
10014
+ ((_a = ctx[0]) == null ? void 0 : _a.members.length) + ""
10015
+ );
10016
+ let t0;
10017
+ let t1;
10018
+ let t2_value = (
10019
+ /*teamData*/
10020
+ ((_b = ctx[0]) == null ? void 0 : _b.maxTeamMembers) + ""
10021
+ );
10022
+ let t2;
10023
+ let t3;
10024
+ return {
10025
+ c() {
10026
+ div = element("div");
10027
+ t0 = text(t0_value);
10028
+ t1 = text("/");
10029
+ t2 = text(t2_value);
10030
+ t3 = text(" Seats");
10031
+ attr(div, "class", "ms-modal__title--seats svelte-1haqb7b");
10032
+ },
10033
+ m(target, anchor) {
10034
+ insert(target, div, anchor);
10035
+ append(div, t0);
10036
+ append(div, t1);
10037
+ append(div, t2);
10038
+ append(div, t3);
10039
+ },
10040
+ p(ctx2, dirty) {
10041
+ var _a2, _b2;
10042
+ if (dirty & /*teamData*/
10043
+ 1 && t0_value !== (t0_value = /*teamData*/
10044
+ ((_a2 = ctx2[0]) == null ? void 0 : _a2.members.length) + ""))
10045
+ set_data(t0, t0_value);
10046
+ if (dirty & /*teamData*/
10047
+ 1 && t2_value !== (t2_value = /*teamData*/
10048
+ ((_b2 = ctx2[0]) == null ? void 0 : _b2.maxTeamMembers) + ""))
10049
+ set_data(t2, t2_value);
10050
+ },
10051
+ d(detaching) {
10052
+ if (detaching)
10053
+ detach(div);
10054
+ }
10055
+ };
10056
+ }
10057
+ function create_catch_block(ctx) {
10058
+ return {
10059
+ c: noop,
10060
+ m: noop,
10061
+ p: noop,
10062
+ i: noop,
10063
+ o: noop,
10064
+ d: noop
10065
+ };
10066
+ }
10067
+ function create_then_block(ctx) {
10068
+ let current_block_type_index;
10069
+ let if_block0;
10070
+ let t;
10071
+ let if_block1_anchor;
10072
+ let current;
10073
+ const if_block_creators = [create_if_block_4$6, create_else_block_2$1];
10074
+ const if_blocks = [];
10075
+ function select_block_type(ctx2, dirty) {
10076
+ var _a, _b;
10077
+ if (
10078
+ /*teamData*/
10079
+ ((_a = ctx2[0]) == null ? void 0 : _a.members.length) < /*teamData*/
10080
+ ((_b = ctx2[0]) == null ? void 0 : _b.maxTeamMembers)
10081
+ )
10082
+ return 0;
10083
+ return 1;
10084
+ }
10085
+ current_block_type_index = select_block_type(ctx);
10086
+ if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
10087
+ let if_block1 = (
10088
+ /*teamData*/
10089
+ ctx[0] && /*teamData*/
10090
+ ctx[0].members.length > 0 && create_if_block$m(ctx)
10091
+ );
10092
+ return {
10093
+ c() {
10094
+ if_block0.c();
10095
+ t = space();
10096
+ if (if_block1)
10097
+ if_block1.c();
10098
+ if_block1_anchor = empty();
10099
+ },
10100
+ m(target, anchor) {
10101
+ if_blocks[current_block_type_index].m(target, anchor);
10102
+ insert(target, t, anchor);
10103
+ if (if_block1)
10104
+ if_block1.m(target, anchor);
10105
+ insert(target, if_block1_anchor, anchor);
10106
+ current = true;
10107
+ },
10108
+ p(ctx2, dirty) {
10109
+ let previous_block_index = current_block_type_index;
10110
+ current_block_type_index = select_block_type(ctx2);
10111
+ if (current_block_type_index === previous_block_index) {
10112
+ if_blocks[current_block_type_index].p(ctx2, dirty);
10113
+ } else {
10114
+ group_outros();
10115
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
10116
+ if_blocks[previous_block_index] = null;
10117
+ });
10118
+ check_outros();
10119
+ if_block0 = if_blocks[current_block_type_index];
10120
+ if (!if_block0) {
10121
+ if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
10122
+ if_block0.c();
10123
+ } else {
10124
+ if_block0.p(ctx2, dirty);
10125
+ }
10126
+ transition_in(if_block0, 1);
10127
+ if_block0.m(t.parentNode, t);
10128
+ }
10129
+ if (
10130
+ /*teamData*/
10131
+ ctx2[0] && /*teamData*/
10132
+ ctx2[0].members.length > 0
10133
+ ) {
10134
+ if (if_block1) {
10135
+ if_block1.p(ctx2, dirty);
10136
+ if (dirty & /*teamData*/
10137
+ 1) {
10138
+ transition_in(if_block1, 1);
10139
+ }
10140
+ } else {
10141
+ if_block1 = create_if_block$m(ctx2);
10142
+ if_block1.c();
10143
+ transition_in(if_block1, 1);
10144
+ if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
10145
+ }
10146
+ } else if (if_block1) {
10147
+ group_outros();
10148
+ transition_out(if_block1, 1, 1, () => {
10149
+ if_block1 = null;
10150
+ });
10151
+ check_outros();
10152
+ }
10153
+ },
10154
+ i(local) {
10155
+ if (current)
10156
+ return;
10157
+ transition_in(if_block0);
10158
+ transition_in(if_block1);
10159
+ current = true;
10160
+ },
10161
+ o(local) {
10162
+ transition_out(if_block0);
10163
+ transition_out(if_block1);
10164
+ current = false;
10165
+ },
10166
+ d(detaching) {
10167
+ if_blocks[current_block_type_index].d(detaching);
10168
+ if (detaching)
10169
+ detach(t);
10170
+ if (if_block1)
10171
+ if_block1.d(detaching);
10172
+ if (detaching)
10173
+ detach(if_block1_anchor);
10174
+ }
10175
+ };
10176
+ }
10177
+ function create_else_block_2$1(ctx) {
10178
+ let div;
10179
+ let warningicon;
10180
+ let t0;
10181
+ let span;
10182
+ let current;
10183
+ warningicon = new WarningIcon$1({});
10184
+ return {
10185
+ c() {
10186
+ div = element("div");
10187
+ create_component(warningicon.$$.fragment);
10188
+ t0 = space();
10189
+ span = element("span");
10190
+ span.textContent = "Your team is growing! Upgrade your plan for more seats.";
10191
+ attr(span, "class", "ms-modal__upgrade-warning-text svelte-1haqb7b");
10192
+ attr(div, "class", "ms-modal__upgrade-warning svelte-1haqb7b");
10193
+ },
10194
+ m(target, anchor) {
10195
+ insert(target, div, anchor);
10196
+ mount_component(warningicon, div, null);
10197
+ append(div, t0);
10198
+ append(div, span);
10199
+ current = true;
10200
+ },
10201
+ p: noop,
10202
+ i(local) {
10203
+ if (current)
10204
+ return;
10205
+ transition_in(warningicon.$$.fragment, local);
10206
+ current = true;
10207
+ },
10208
+ o(local) {
10209
+ transition_out(warningicon.$$.fragment, local);
10210
+ current = false;
10211
+ },
10212
+ d(detaching) {
10213
+ if (detaching)
10214
+ detach(div);
10215
+ destroy_component(warningicon);
10216
+ }
10217
+ };
10218
+ }
10219
+ function create_if_block_4$6(ctx) {
10220
+ let div1;
10221
+ let div0;
10222
+ let input;
10223
+ let t0;
10224
+ let button0;
10225
+ let copyicon;
10226
+ let t1;
10227
+ let t2;
10228
+ let t3;
10229
+ let button1;
10230
+ let current;
10231
+ let mounted;
10232
+ let dispose;
10233
+ copyicon = new CopyIcon$1({});
10234
+ return {
10235
+ c() {
10236
+ div1 = element("div");
10237
+ div0 = element("div");
10238
+ input = element("input");
10239
+ t0 = space();
10240
+ button0 = element("button");
10241
+ create_component(copyicon.$$.fragment);
10242
+ t1 = space();
10243
+ t2 = text(
10244
+ /*copyInviteText*/
10245
+ ctx[2]
10246
+ );
10247
+ t3 = space();
10248
+ button1 = element("button");
10249
+ button1.textContent = "Regenerate Invite Link";
10250
+ attr(input, "type", "text");
10251
+ attr(input, "class", "ms-modal__invite-input svelte-1haqb7b");
10252
+ input.value = /*inviteLink*/
10253
+ ctx[3];
10254
+ input.readOnly = true;
10255
+ attr(button0, "class", "ms-modal__invite-copy-btn svelte-1haqb7b");
10256
+ attr(div0, "class", "ms-modal__invite-input-group svelte-1haqb7b");
10257
+ attr(button1, "class", "ms-modal__invite-regenerate-btn svelte-1haqb7b");
10258
+ attr(div1, "class", "ms-modal__invite-group svelte-1haqb7b");
10259
+ },
10260
+ m(target, anchor) {
10261
+ insert(target, div1, anchor);
10262
+ append(div1, div0);
10263
+ append(div0, input);
10264
+ append(div0, t0);
10265
+ append(div0, button0);
10266
+ mount_component(copyicon, button0, null);
10267
+ append(button0, t1);
10268
+ append(button0, t2);
10269
+ append(div1, t3);
10270
+ append(div1, button1);
10271
+ current = true;
10272
+ if (!mounted) {
10273
+ dispose = [
10274
+ listen(
10275
+ button0,
10276
+ "click",
10277
+ /*click_handler*/
10278
+ ctx[10]
10279
+ ),
10280
+ listen(
10281
+ button1,
10282
+ "click",
10283
+ /*click_handler_1*/
10284
+ ctx[11]
10285
+ )
10286
+ ];
10287
+ mounted = true;
10288
+ }
10289
+ },
10290
+ p(ctx2, dirty) {
10291
+ if (!current || dirty & /*inviteLink*/
10292
+ 8 && input.value !== /*inviteLink*/
10293
+ ctx2[3]) {
10294
+ input.value = /*inviteLink*/
10295
+ ctx2[3];
10296
+ }
10297
+ if (!current || dirty & /*copyInviteText*/
10298
+ 4)
10299
+ set_data(
10300
+ t2,
10301
+ /*copyInviteText*/
10302
+ ctx2[2]
10303
+ );
10304
+ },
10305
+ i(local) {
10306
+ if (current)
10307
+ return;
10308
+ transition_in(copyicon.$$.fragment, local);
10309
+ current = true;
10310
+ },
10311
+ o(local) {
10312
+ transition_out(copyicon.$$.fragment, local);
10313
+ current = false;
10314
+ },
10315
+ d(detaching) {
10316
+ if (detaching)
10317
+ detach(div1);
10318
+ destroy_component(copyicon);
10319
+ mounted = false;
10320
+ run_all(dispose);
10321
+ }
10322
+ };
10323
+ }
10324
+ function create_if_block$m(ctx) {
10325
+ let div;
10326
+ let each_blocks = [];
10327
+ let each_1_lookup = /* @__PURE__ */ new Map();
10328
+ let current;
10329
+ let each_value = (
10330
+ /*teamData*/
10331
+ ctx[0].members
10332
+ );
10333
+ const get_key = (ctx2) => (
10334
+ /*m*/
10335
+ ctx2[15].member.id
10336
+ );
10337
+ for (let i = 0; i < each_value.length; i += 1) {
10338
+ let child_ctx = get_each_context$8(ctx, each_value, i);
10339
+ let key = get_key(child_ctx);
10340
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$8(key, child_ctx));
10341
+ }
10342
+ return {
10343
+ c() {
10344
+ div = element("div");
10345
+ for (let i = 0; i < each_blocks.length; i += 1) {
10346
+ each_blocks[i].c();
10347
+ }
10348
+ attr(div, "class", "ms-modal__team-members");
10349
+ },
10350
+ m(target, anchor) {
10351
+ insert(target, div, anchor);
10352
+ for (let i = 0; i < each_blocks.length; i += 1) {
10353
+ if (each_blocks[i]) {
10354
+ each_blocks[i].m(div, null);
10355
+ }
10356
+ }
10357
+ current = true;
10358
+ },
10359
+ p(ctx2, dirty) {
10360
+ if (dirty & /*showRemoveButton, teamData, removeMemberFromTeam*/
10361
+ 81) {
10362
+ each_value = /*teamData*/
10363
+ ctx2[0].members;
10364
+ group_outros();
10365
+ each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div, outro_and_destroy_block, create_each_block$8, null, get_each_context$8);
10366
+ check_outros();
10367
+ }
10368
+ },
10369
+ i(local) {
10370
+ if (current)
10371
+ return;
10372
+ for (let i = 0; i < each_value.length; i += 1) {
10373
+ transition_in(each_blocks[i]);
10374
+ }
10375
+ current = true;
10376
+ },
10377
+ o(local) {
10378
+ for (let i = 0; i < each_blocks.length; i += 1) {
10379
+ transition_out(each_blocks[i]);
10380
+ }
10381
+ current = false;
10382
+ },
10383
+ d(detaching) {
10384
+ if (detaching)
10385
+ detach(div);
10386
+ for (let i = 0; i < each_blocks.length; i += 1) {
10387
+ each_blocks[i].d();
10388
+ }
10389
+ }
10390
+ };
10391
+ }
10392
+ function create_else_block_1$3(ctx) {
10393
+ let img;
10394
+ let img_src_value;
10395
+ return {
10396
+ c() {
10397
+ img = element("img");
10398
+ attr(img, "class", "ms-modal__team-member-image svelte-1haqb7b");
10399
+ if (!src_url_equal(img.src, img_src_value = /*m*/
10400
+ ctx[15].member.profileImage))
10401
+ attr(img, "src", img_src_value);
10402
+ attr(img, "alt", "Member Profile Avatar");
10403
+ },
10404
+ m(target, anchor) {
10405
+ insert(target, img, anchor);
10406
+ },
10407
+ p(ctx2, dirty) {
10408
+ if (dirty & /*teamData*/
10409
+ 1 && !src_url_equal(img.src, img_src_value = /*m*/
10410
+ ctx2[15].member.profileImage)) {
10411
+ attr(img, "src", img_src_value);
10412
+ }
10413
+ },
10414
+ d(detaching) {
10415
+ if (detaching)
10416
+ detach(img);
10417
+ }
10418
+ };
10419
+ }
10420
+ function create_if_block_3$8(ctx) {
10421
+ let div;
10422
+ let t_value = (
10423
+ /*m*/
10424
+ ctx[15].member.auth.email[0].toUpperCase() + ""
10425
+ );
10426
+ let t;
10427
+ return {
10428
+ c() {
10429
+ div = element("div");
10430
+ t = text(t_value);
10431
+ attr(div, "class", "ms-modal__team-member-image--initial svelte-1haqb7b");
10432
+ },
10433
+ m(target, anchor) {
10434
+ insert(target, div, anchor);
10435
+ append(div, t);
10436
+ },
10437
+ p(ctx2, dirty) {
10438
+ if (dirty & /*teamData*/
10439
+ 1 && t_value !== (t_value = /*m*/
10440
+ ctx2[15].member.auth.email[0].toUpperCase() + ""))
10441
+ set_data(t, t_value);
10442
+ },
10443
+ d(detaching) {
10444
+ if (detaching)
10445
+ detach(div);
10446
+ }
10447
+ };
10448
+ }
10449
+ function create_if_block_1$g(ctx) {
10450
+ let current_block_type_index;
10451
+ let if_block;
10452
+ let if_block_anchor;
10453
+ let current;
10454
+ const if_block_creators = [create_if_block_2$c, create_else_block$9];
10455
+ const if_blocks = [];
10456
+ function select_block_type_2(ctx2, dirty) {
10457
+ if (!/*m*/
10458
+ ctx2[15].showRemoveButton)
10459
+ return 0;
10460
+ return 1;
10461
+ }
10462
+ current_block_type_index = select_block_type_2(ctx);
10463
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
10464
+ return {
10465
+ c() {
10466
+ if_block.c();
10467
+ if_block_anchor = empty();
10468
+ },
10469
+ m(target, anchor) {
10470
+ if_blocks[current_block_type_index].m(target, anchor);
10471
+ insert(target, if_block_anchor, anchor);
10472
+ current = true;
10473
+ },
10474
+ p(ctx2, dirty) {
10475
+ let previous_block_index = current_block_type_index;
10476
+ current_block_type_index = select_block_type_2(ctx2);
10477
+ if (current_block_type_index === previous_block_index) {
10478
+ if_blocks[current_block_type_index].p(ctx2, dirty);
10479
+ } else {
10480
+ group_outros();
10481
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
10482
+ if_blocks[previous_block_index] = null;
10483
+ });
10484
+ check_outros();
10485
+ if_block = if_blocks[current_block_type_index];
10486
+ if (!if_block) {
10487
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
10488
+ if_block.c();
10489
+ } else {
10490
+ if_block.p(ctx2, dirty);
10491
+ }
10492
+ transition_in(if_block, 1);
10493
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
10494
+ }
10495
+ },
10496
+ i(local) {
10497
+ if (current)
10498
+ return;
10499
+ transition_in(if_block);
10500
+ current = true;
10501
+ },
10502
+ o(local) {
10503
+ transition_out(if_block);
10504
+ current = false;
10505
+ },
10506
+ d(detaching) {
10507
+ if_blocks[current_block_type_index].d(detaching);
10508
+ if (detaching)
10509
+ detach(if_block_anchor);
10510
+ }
10511
+ };
10512
+ }
10513
+ function create_else_block$9(ctx) {
10514
+ let button;
10515
+ let span;
10516
+ let t1;
10517
+ let closeicon;
10518
+ let current;
10519
+ let mounted;
10520
+ let dispose;
10521
+ closeicon = new CloseIcon({});
10522
+ function click_handler_3() {
10523
+ return (
10524
+ /*click_handler_3*/
10525
+ ctx[13](
10526
+ /*m*/
10527
+ ctx[15]
10528
+ )
10529
+ );
10530
+ }
10531
+ return {
10532
+ c() {
10533
+ button = element("button");
10534
+ span = element("span");
10535
+ span.textContent = "Are you sure?";
10536
+ t1 = space();
10537
+ create_component(closeicon.$$.fragment);
10538
+ attr(span, "class", "ms-modal__team-member-remove-text svelte-1haqb7b");
10539
+ attr(button, "class", "ms-modal__team-member-remove-btn svelte-1haqb7b");
10540
+ },
10541
+ m(target, anchor) {
10542
+ insert(target, button, anchor);
10543
+ append(button, span);
10544
+ append(button, t1);
10545
+ mount_component(closeicon, button, null);
10546
+ current = true;
10547
+ if (!mounted) {
10548
+ dispose = listen(button, "click", click_handler_3);
10549
+ mounted = true;
10550
+ }
10551
+ },
10552
+ p(new_ctx, dirty) {
10553
+ ctx = new_ctx;
10554
+ },
10555
+ i(local) {
10556
+ if (current)
10557
+ return;
10558
+ transition_in(closeicon.$$.fragment, local);
10559
+ current = true;
10560
+ },
10561
+ o(local) {
10562
+ transition_out(closeicon.$$.fragment, local);
10563
+ current = false;
10564
+ },
10565
+ d(detaching) {
10566
+ if (detaching)
10567
+ detach(button);
10568
+ destroy_component(closeicon);
10569
+ mounted = false;
10570
+ dispose();
10571
+ }
10572
+ };
10573
+ }
10574
+ function create_if_block_2$c(ctx) {
10575
+ let button;
10576
+ let closeicon;
10577
+ let current;
10578
+ let mounted;
10579
+ let dispose;
10580
+ closeicon = new CloseIcon({});
10581
+ function click_handler_2() {
10582
+ return (
10583
+ /*click_handler_2*/
10584
+ ctx[12](
10585
+ /*m*/
10586
+ ctx[15]
10587
+ )
10588
+ );
10589
+ }
10590
+ return {
10591
+ c() {
10592
+ button = element("button");
10593
+ create_component(closeicon.$$.fragment);
10594
+ attr(button, "class", "ms-modal__team-member-remove-btn svelte-1haqb7b");
10595
+ },
10596
+ m(target, anchor) {
10597
+ insert(target, button, anchor);
10598
+ mount_component(closeicon, button, null);
10599
+ current = true;
10600
+ if (!mounted) {
10601
+ dispose = listen(button, "click", click_handler_2);
10602
+ mounted = true;
10603
+ }
10604
+ },
10605
+ p(new_ctx, dirty) {
10606
+ ctx = new_ctx;
10607
+ },
10608
+ i(local) {
10609
+ if (current)
10610
+ return;
10611
+ transition_in(closeicon.$$.fragment, local);
10612
+ current = true;
10613
+ },
10614
+ o(local) {
10615
+ transition_out(closeicon.$$.fragment, local);
10616
+ current = false;
10617
+ },
10618
+ d(detaching) {
10619
+ if (detaching)
10620
+ detach(button);
10621
+ destroy_component(closeicon);
10622
+ mounted = false;
10623
+ dispose();
10624
+ }
10625
+ };
10626
+ }
10627
+ function create_each_block$8(key_1, ctx) {
10628
+ let div4;
10629
+ let div1;
10630
+ let t0;
10631
+ let div0;
10632
+ let t1_value = (
10633
+ /*m*/
10634
+ ctx[15].member.auth.email + ""
10635
+ );
10636
+ let t1;
10637
+ let t2;
10638
+ let div3;
10639
+ let div2;
10640
+ let t3_value = (
10641
+ /*m*/
10642
+ ctx[15].role + ""
10643
+ );
10644
+ let t3;
10645
+ let t4;
10646
+ let t5;
10647
+ let current;
10648
+ function select_block_type_1(ctx2, dirty) {
10649
+ if (
10650
+ /*m*/
10651
+ ctx2[15].member.profileImage === null
10652
+ )
10653
+ return create_if_block_3$8;
10654
+ return create_else_block_1$3;
10655
+ }
10656
+ let current_block_type = select_block_type_1(ctx);
10657
+ let if_block0 = current_block_type(ctx);
10658
+ let if_block1 = (
10659
+ /*m*/
10660
+ ctx[15].role !== "OWNER" && create_if_block_1$g(ctx)
10661
+ );
10662
+ return {
10663
+ key: key_1,
10664
+ first: null,
10665
+ c() {
10666
+ div4 = element("div");
10667
+ div1 = element("div");
10668
+ if_block0.c();
10669
+ t0 = space();
10670
+ div0 = element("div");
10671
+ t1 = text(t1_value);
10672
+ t2 = space();
10673
+ div3 = element("div");
10674
+ div2 = element("div");
10675
+ t3 = text(t3_value);
10676
+ t4 = space();
10677
+ if (if_block1)
10678
+ if_block1.c();
10679
+ t5 = space();
10680
+ attr(div0, "class", "ms-modal__team-member-email svelte-1haqb7b");
10681
+ attr(div1, "class", "ms-modal__team-member-info svelte-1haqb7b");
10682
+ attr(div2, "class", "ms-modal__team-member-role svelte-1haqb7b");
10683
+ attr(div3, "class", "ms-modal__team-member-actions svelte-1haqb7b");
10684
+ attr(div4, "class", "ms-modal__team-member svelte-1haqb7b");
10685
+ this.first = div4;
10686
+ },
10687
+ m(target, anchor) {
10688
+ insert(target, div4, anchor);
10689
+ append(div4, div1);
10690
+ if_block0.m(div1, null);
10691
+ append(div1, t0);
10692
+ append(div1, div0);
10693
+ append(div0, t1);
10694
+ append(div4, t2);
10695
+ append(div4, div3);
10696
+ append(div3, div2);
10697
+ append(div2, t3);
10698
+ append(div3, t4);
10699
+ if (if_block1)
10700
+ if_block1.m(div3, null);
10701
+ append(div4, t5);
10702
+ current = true;
10703
+ },
10704
+ p(new_ctx, dirty) {
10705
+ ctx = new_ctx;
10706
+ if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block0) {
10707
+ if_block0.p(ctx, dirty);
10708
+ } else {
10709
+ if_block0.d(1);
10710
+ if_block0 = current_block_type(ctx);
10711
+ if (if_block0) {
10712
+ if_block0.c();
10713
+ if_block0.m(div1, t0);
10714
+ }
10715
+ }
10716
+ if ((!current || dirty & /*teamData*/
10717
+ 1) && t1_value !== (t1_value = /*m*/
10718
+ ctx[15].member.auth.email + ""))
10719
+ set_data(t1, t1_value);
10720
+ if ((!current || dirty & /*teamData*/
10721
+ 1) && t3_value !== (t3_value = /*m*/
10722
+ ctx[15].role + ""))
10723
+ set_data(t3, t3_value);
10724
+ if (
10725
+ /*m*/
10726
+ ctx[15].role !== "OWNER"
10727
+ ) {
10728
+ if (if_block1) {
10729
+ if_block1.p(ctx, dirty);
10730
+ if (dirty & /*teamData*/
10731
+ 1) {
10732
+ transition_in(if_block1, 1);
10733
+ }
10734
+ } else {
10735
+ if_block1 = create_if_block_1$g(ctx);
10736
+ if_block1.c();
10737
+ transition_in(if_block1, 1);
10738
+ if_block1.m(div3, null);
10739
+ }
10740
+ } else if (if_block1) {
10741
+ group_outros();
10742
+ transition_out(if_block1, 1, 1, () => {
10743
+ if_block1 = null;
10744
+ });
10745
+ check_outros();
10746
+ }
10747
+ },
10748
+ i(local) {
10749
+ if (current)
10750
+ return;
10751
+ transition_in(if_block1);
10752
+ current = true;
10753
+ },
10754
+ o(local) {
10755
+ transition_out(if_block1);
10756
+ current = false;
10757
+ },
10758
+ d(detaching) {
10759
+ if (detaching)
10760
+ detach(div4);
10761
+ if_block0.d();
10762
+ if (if_block1)
10763
+ if_block1.d();
10764
+ }
10765
+ };
10766
+ }
10767
+ function create_pending_block(ctx) {
10768
+ let p;
10769
+ return {
10770
+ c() {
10771
+ p = element("p");
10772
+ p.textContent = "Loading...";
10773
+ },
10774
+ m(target, anchor) {
10775
+ insert(target, p, anchor);
10776
+ },
10777
+ p: noop,
10778
+ i: noop,
10779
+ o: noop,
10780
+ d(detaching) {
10781
+ if (detaching)
10782
+ detach(p);
10783
+ }
10784
+ };
10785
+ }
10786
+ function create_fragment$K(ctx) {
10787
+ var _a;
10788
+ let div;
10789
+ let h2;
10790
+ let t1;
10791
+ let t2;
10792
+ let await_block_anchor;
10793
+ let promise2;
10794
+ let current;
10795
+ let if_block = (
10796
+ /*teamData*/
10797
+ ((_a = ctx[0]) == null ? void 0 : _a.members.length) > 0 && create_if_block_5$5(ctx)
10798
+ );
10799
+ let info = {
10800
+ ctx,
10801
+ current: null,
10802
+ token: null,
10803
+ hasCatch: false,
10804
+ pending: create_pending_block,
10805
+ then: create_then_block,
10806
+ catch: create_catch_block,
10807
+ blocks: [, , ,]
10808
+ };
10809
+ handle_promise(promise2 = /*teamPromise*/
10810
+ ctx[1], info);
10811
+ return {
10812
+ c() {
10813
+ div = element("div");
10814
+ h2 = element("h2");
10815
+ h2.textContent = "Team";
10816
+ t1 = space();
10817
+ if (if_block)
10818
+ if_block.c();
10819
+ t2 = space();
10820
+ await_block_anchor = empty();
10821
+ info.block.c();
10822
+ attr(h2, "class", "ms-modal__title ms-modal__title--teams svelte-1haqb7b");
10823
+ attr(div, "class", "ms-modal__title-container ms-modal__title-container--teams svelte-1haqb7b");
10824
+ },
10825
+ m(target, anchor) {
10826
+ insert(target, div, anchor);
10827
+ append(div, h2);
10828
+ append(div, t1);
10829
+ if (if_block)
10830
+ if_block.m(div, null);
10831
+ insert(target, t2, anchor);
10832
+ insert(target, await_block_anchor, anchor);
10833
+ info.block.m(target, info.anchor = anchor);
10834
+ info.mount = () => await_block_anchor.parentNode;
10835
+ info.anchor = await_block_anchor;
10836
+ current = true;
10837
+ },
10838
+ p(new_ctx, [dirty]) {
10839
+ var _a2;
10840
+ ctx = new_ctx;
10841
+ if (
10842
+ /*teamData*/
10843
+ ((_a2 = ctx[0]) == null ? void 0 : _a2.members.length) > 0
10844
+ ) {
10845
+ if (if_block) {
10846
+ if_block.p(ctx, dirty);
10847
+ } else {
10848
+ if_block = create_if_block_5$5(ctx);
10849
+ if_block.c();
10850
+ if_block.m(div, null);
10851
+ }
10852
+ } else if (if_block) {
10853
+ if_block.d(1);
10854
+ if_block = null;
9424
10855
  }
9425
- if (!/*member*/
9426
- ctx2[0].stripeCustomerId && /*freePlanConnections*/
9427
- ctx2[1].length === 0) {
9428
- if (if_block2)
9429
- ;
9430
- else {
9431
- if_block2 = create_if_block$m();
9432
- if_block2.c();
9433
- if_block2.m(if_block2_anchor.parentNode, if_block2_anchor);
9434
- }
9435
- } else if (if_block2) {
9436
- if_block2.d(1);
9437
- if_block2 = null;
10856
+ info.ctx = ctx;
10857
+ if (dirty & /*teamPromise*/
10858
+ 2 && promise2 !== (promise2 = /*teamPromise*/
10859
+ ctx[1]) && handle_promise(promise2, info))
10860
+ ;
10861
+ else {
10862
+ update_await_block_branch(info, ctx, dirty);
9438
10863
  }
9439
10864
  },
9440
10865
  i(local) {
9441
10866
  if (current)
9442
10867
  return;
9443
- transition_in(if_block0);
9444
- transition_in(if_block1);
10868
+ transition_in(info.block);
9445
10869
  current = true;
9446
10870
  },
9447
10871
  o(local) {
9448
- transition_out(if_block0);
9449
- transition_out(if_block1);
10872
+ for (let i = 0; i < 3; i += 1) {
10873
+ const block = info.blocks[i];
10874
+ transition_out(block);
10875
+ }
9450
10876
  current = false;
9451
10877
  },
9452
10878
  d(detaching) {
9453
10879
  if (detaching)
9454
10880
  detach(div);
9455
- if (detaching)
9456
- detach(t1);
9457
- if (if_block0)
9458
- if_block0.d(detaching);
10881
+ if (if_block)
10882
+ if_block.d();
9459
10883
  if (detaching)
9460
10884
  detach(t2);
9461
- if (if_block1)
9462
- if_block1.d(detaching);
9463
- if (detaching)
9464
- detach(t3);
9465
- if (if_block2)
9466
- if_block2.d(detaching);
9467
10885
  if (detaching)
9468
- detach(if_block2_anchor);
10886
+ detach(await_block_anchor);
10887
+ info.block.d(detaching);
10888
+ info.token = null;
10889
+ info = null;
9469
10890
  }
9470
10891
  };
9471
10892
  }
9472
10893
  function instance$p($$self, $$props, $$invalidate) {
9473
- let freePlanConnections;
9474
- let $app;
9475
- component_subscribe($$self, AppStore, ($$value) => $$invalidate(2, $app = $$value));
10894
+ var _a, _b, _c;
10895
+ let inviteLink;
9476
10896
  let { profileLoader } = $$props;
9477
10897
  let { member } = $$props;
9478
- function launchPortal(e) {
10898
+ let teamPromise;
10899
+ let teamData;
10900
+ let copyInviteText = "Copy";
10901
+ function showRemoveButton(m) {
10902
+ m.showRemoveButton = true;
10903
+ $$invalidate(0, teamData.members = [...teamData.members.filter((member2) => member2.member.id !== m.member.id), m], teamData);
10904
+ setTimeout(
10905
+ () => {
10906
+ m.showRemoveButton = false;
10907
+ },
10908
+ 3e3
10909
+ );
10910
+ }
10911
+ function copyInviteLink() {
10912
+ navigator.clipboard.writeText(inviteLink);
10913
+ $$invalidate(2, copyInviteText = "Copied!");
10914
+ setTimeout(
10915
+ () => {
10916
+ $$invalidate(2, copyInviteText = "Copy");
10917
+ },
10918
+ 2e3
10919
+ );
10920
+ }
10921
+ function getTeam(teamId) {
9479
10922
  return __async(this, null, function* () {
9480
- $$invalidate(5, profileLoader = true);
9481
- yield window.$memberstackDom.launchStripeCustomerPortal({ priceIds: [], autoRedirect: true });
10923
+ const { data } = yield window.$memberstackDom.getTeam({ teamId });
10924
+ $$invalidate(0, teamData = data);
10925
+ return data;
9482
10926
  });
9483
10927
  }
9484
- function removeFreePlan(planId) {
10928
+ function removeMemberFromTeam(memberId) {
9485
10929
  return __async(this, null, function* () {
9486
- $$invalidate(5, profileLoader = true);
9487
10930
  try {
9488
- yield window.$memberstackDom.removePlan({ planId });
9489
- $$invalidate(0, member.planConnections = member.planConnections.filter((plan) => plan.planId !== planId), member);
10931
+ $$invalidate(8, profileLoader = true);
10932
+ yield window.$memberstackDom.removeMemberFromTeam({ teamId: teamData.id, memberId });
10933
+ $$invalidate(0, teamData.members = teamData.members.filter((m) => m.member.id !== memberId), teamData);
10934
+ window.$memberstackDom._showMessage("Member has been removed from team.", false);
9490
10935
  } catch (err) {
9491
- console.log(err);
9492
10936
  window.$memberstackDom._showMessage(err.message, true);
9493
10937
  } finally {
9494
- $$invalidate(5, profileLoader = false);
10938
+ $$invalidate(8, profileLoader = false);
10939
+ }
10940
+ });
10941
+ }
10942
+ function generateInviteToken() {
10943
+ return __async(this, null, function* () {
10944
+ try {
10945
+ $$invalidate(8, profileLoader = true);
10946
+ const { data } = yield window.$memberstackDom.generateInviteToken({ teamId: teamData.id });
10947
+ $$invalidate(0, teamData.inviteToken = data.inviteToken, teamData);
10948
+ window.$memberstackDom._showMessage("Invite Link Regenerated", false);
10949
+ } catch (err) {
10950
+ window.$memberstackDom._showMessage(err.message, true);
10951
+ } finally {
10952
+ $$invalidate(8, profileLoader = false);
9495
10953
  }
9496
10954
  });
9497
10955
  }
9498
- const func2 = (memberPlan, plan) => plan.id === memberPlan.planId;
9499
- const func_12 = (memberPlan) => removeFreePlan(memberPlan.planId);
10956
+ if (((_b = (_a = member == null ? void 0 : member.teams) == null ? void 0 : _a.ownedTeams) == null ? void 0 : _b.length) > 0) {
10957
+ const teamId = (_c = member.teams) == null ? void 0 : _c.ownedTeams[0].teamId;
10958
+ teamPromise = getTeam(teamId);
10959
+ } else {
10960
+ teamPromise = Promise.resolve(null);
10961
+ }
10962
+ const click_handler = () => copyInviteLink();
10963
+ const click_handler_1 = () => generateInviteToken();
10964
+ const click_handler_2 = (m) => showRemoveButton(m);
10965
+ const click_handler_3 = (m) => removeMemberFromTeam(m.member.id);
9500
10966
  $$self.$$set = ($$props2) => {
9501
10967
  if ("profileLoader" in $$props2)
9502
- $$invalidate(5, profileLoader = $$props2.profileLoader);
10968
+ $$invalidate(8, profileLoader = $$props2.profileLoader);
9503
10969
  if ("member" in $$props2)
9504
- $$invalidate(0, member = $$props2.member);
10970
+ $$invalidate(9, member = $$props2.member);
9505
10971
  };
9506
10972
  $$self.$$.update = () => {
9507
- if ($$self.$$.dirty & /*member*/
10973
+ var _a2;
10974
+ if ($$self.$$.dirty & /*teamData*/
9508
10975
  1) {
9509
- $$invalidate(1, freePlanConnections = member.planConnections.filter((plan) => plan.type === "FREE"));
10976
+ $$invalidate(3, inviteLink = `${window.location.origin}${(_a2 = teamData == null ? void 0 : teamData.plan) == null ? void 0 : _a2.teamAccountInviteSignupLink}?inviteToken=${teamData == null ? void 0 : teamData.inviteToken}`);
9510
10977
  }
9511
10978
  };
9512
10979
  return [
9513
- member,
9514
- freePlanConnections,
9515
- $app,
9516
- launchPortal,
9517
- removeFreePlan,
10980
+ teamData,
10981
+ teamPromise,
10982
+ copyInviteText,
10983
+ inviteLink,
10984
+ showRemoveButton,
10985
+ copyInviteLink,
10986
+ removeMemberFromTeam,
10987
+ generateInviteToken,
9518
10988
  profileLoader,
9519
- func2,
9520
- func_12
10989
+ member,
10990
+ click_handler,
10991
+ click_handler_1,
10992
+ click_handler_2,
10993
+ click_handler_3
9521
10994
  ];
9522
10995
  }
9523
- var PlansInfoContent = class extends SvelteComponent {
10996
+ var ProfileTeamContent = class extends SvelteComponent {
9524
10997
  constructor(options) {
9525
10998
  super();
9526
- init(this, options, instance$p, create_fragment$L, safe_not_equal, { profileLoader: 5, member: 0 });
10999
+ init(this, options, instance$p, create_fragment$K, safe_not_equal, { profileLoader: 8, member: 9 }, add_css$j);
9527
11000
  }
9528
11001
  };
9529
- function create_if_block_4$5(ctx) {
11002
+ function create_if_block_5$4(ctx) {
9530
11003
  let profileloader;
9531
11004
  let current;
9532
11005
  profileloader = new ProfileLoader({});
@@ -9553,6 +11026,76 @@ function create_if_block_4$5(ctx) {
9553
11026
  }
9554
11027
  };
9555
11028
  }
11029
+ function create_if_block_4$5(ctx) {
11030
+ let profileteamcontent;
11031
+ let updating_member;
11032
+ let updating_profileLoader;
11033
+ let current;
11034
+ function profileteamcontent_member_binding(value) {
11035
+ ctx[19](value);
11036
+ }
11037
+ function profileteamcontent_profileLoader_binding(value) {
11038
+ ctx[20](value);
11039
+ }
11040
+ let profileteamcontent_props = {};
11041
+ if (
11042
+ /*member*/
11043
+ ctx[1] !== void 0
11044
+ ) {
11045
+ profileteamcontent_props.member = /*member*/
11046
+ ctx[1];
11047
+ }
11048
+ if (
11049
+ /*profileLoader*/
11050
+ ctx[4] !== void 0
11051
+ ) {
11052
+ profileteamcontent_props.profileLoader = /*profileLoader*/
11053
+ ctx[4];
11054
+ }
11055
+ profileteamcontent = new ProfileTeamContent({ props: profileteamcontent_props });
11056
+ binding_callbacks.push(() => bind(profileteamcontent, "member", profileteamcontent_member_binding));
11057
+ binding_callbacks.push(() => bind(profileteamcontent, "profileLoader", profileteamcontent_profileLoader_binding));
11058
+ return {
11059
+ c() {
11060
+ create_component(profileteamcontent.$$.fragment);
11061
+ },
11062
+ m(target, anchor) {
11063
+ mount_component(profileteamcontent, target, anchor);
11064
+ current = true;
11065
+ },
11066
+ p(ctx2, dirty) {
11067
+ const profileteamcontent_changes = {};
11068
+ if (!updating_member && dirty & /*member*/
11069
+ 2) {
11070
+ updating_member = true;
11071
+ profileteamcontent_changes.member = /*member*/
11072
+ ctx2[1];
11073
+ add_flush_callback(() => updating_member = false);
11074
+ }
11075
+ if (!updating_profileLoader && dirty & /*profileLoader*/
11076
+ 16) {
11077
+ updating_profileLoader = true;
11078
+ profileteamcontent_changes.profileLoader = /*profileLoader*/
11079
+ ctx2[4];
11080
+ add_flush_callback(() => updating_profileLoader = false);
11081
+ }
11082
+ profileteamcontent.$set(profileteamcontent_changes);
11083
+ },
11084
+ i(local) {
11085
+ if (current)
11086
+ return;
11087
+ transition_in(profileteamcontent.$$.fragment, local);
11088
+ current = true;
11089
+ },
11090
+ o(local) {
11091
+ transition_out(profileteamcontent.$$.fragment, local);
11092
+ current = false;
11093
+ },
11094
+ d(detaching) {
11095
+ destroy_component(profileteamcontent, detaching);
11096
+ }
11097
+ };
11098
+ }
9556
11099
  function create_if_block_3$7(ctx) {
9557
11100
  let plansinfocontent;
9558
11101
  let updating_member;
@@ -9880,7 +11423,7 @@ function create_if_block$l(ctx) {
9880
11423
  }
9881
11424
  };
9882
11425
  }
9883
- function create_fragment$K(ctx) {
11426
+ function create_fragment$J(ctx) {
9884
11427
  let div5;
9885
11428
  let div1;
9886
11429
  let div0;
@@ -9955,9 +11498,15 @@ function create_fragment$K(ctx) {
9955
11498
  binding_callbacks.push(() => bind(profilemodalnav, "profileLoader", profilemodalnav_profileLoader_binding));
9956
11499
  let if_block0 = (
9957
11500
  /*profileLoader*/
9958
- ctx[4] && create_if_block_4$5()
11501
+ ctx[4] && create_if_block_5$4()
9959
11502
  );
9960
- const if_block_creators = [create_if_block$l, create_if_block_1$f, create_if_block_2$b, create_if_block_3$7];
11503
+ const if_block_creators = [
11504
+ create_if_block$l,
11505
+ create_if_block_1$f,
11506
+ create_if_block_2$b,
11507
+ create_if_block_3$7,
11508
+ create_if_block_4$5
11509
+ ];
9961
11510
  const if_blocks = [];
9962
11511
  function select_block_type(ctx2, dirty) {
9963
11512
  if (
@@ -9980,6 +11529,11 @@ function create_fragment$K(ctx) {
9980
11529
  ctx2[0] === "plans"
9981
11530
  )
9982
11531
  return 3;
11532
+ if (
11533
+ /*displayProfile*/
11534
+ ctx2[0] === "team"
11535
+ )
11536
+ return 4;
9983
11537
  return -1;
9984
11538
  }
9985
11539
  if (~(current_block_type_index = select_block_type(ctx))) {
@@ -10085,7 +11639,7 @@ function create_fragment$K(ctx) {
10085
11639
  transition_in(if_block0, 1);
10086
11640
  }
10087
11641
  } else {
10088
- if_block0 = create_if_block_4$5();
11642
+ if_block0 = create_if_block_5$4();
10089
11643
  if_block0.c();
10090
11644
  transition_in(if_block0, 1);
10091
11645
  if_block0.m(div3, t4);
@@ -10219,6 +11773,14 @@ function instance$o($$self, $$props, $$invalidate) {
10219
11773
  profileLoader = value;
10220
11774
  $$invalidate(4, profileLoader);
10221
11775
  }
11776
+ function profileteamcontent_member_binding(value) {
11777
+ member = value;
11778
+ $$invalidate(1, member);
11779
+ }
11780
+ function profileteamcontent_profileLoader_binding(value) {
11781
+ profileLoader = value;
11782
+ $$invalidate(4, profileLoader);
11783
+ }
10222
11784
  $$self.$$set = ($$props2) => {
10223
11785
  if ("onSuccessLogout" in $$props2)
10224
11786
  $$invalidate(2, onSuccessLogout = $$props2.onSuccessLogout);
@@ -10248,13 +11810,15 @@ function instance$o($$self, $$props, $$invalidate) {
10248
11810
  passwordinfocontent_profileLoader_binding,
10249
11811
  passwordinfocontent_member_binding,
10250
11812
  plansinfocontent_member_binding,
10251
- plansinfocontent_profileLoader_binding
11813
+ plansinfocontent_profileLoader_binding,
11814
+ profileteamcontent_member_binding,
11815
+ profileteamcontent_profileLoader_binding
10252
11816
  ];
10253
11817
  }
10254
11818
  var ProfileModal = class extends SvelteComponent {
10255
11819
  constructor(options) {
10256
11820
  super();
10257
- init(this, options, instance$o, create_fragment$K, safe_not_equal, {
11821
+ init(this, options, instance$o, create_fragment$J, safe_not_equal, {
10258
11822
  onSuccessLogout: 2,
10259
11823
  closeModal: 3,
10260
11824
  displayProfile: 0,
@@ -10262,7 +11826,7 @@ var ProfileModal = class extends SvelteComponent {
10262
11826
  });
10263
11827
  }
10264
11828
  };
10265
- function create_fragment$J(ctx) {
11829
+ function create_fragment$I(ctx) {
10266
11830
  let svg;
10267
11831
  let path;
10268
11832
  return {
@@ -10292,7 +11856,7 @@ function create_fragment$J(ctx) {
10292
11856
  var ForwardIcon = class extends SvelteComponent {
10293
11857
  constructor(options) {
10294
11858
  super();
10295
- init(this, options, null, create_fragment$J, safe_not_equal, {});
11859
+ init(this, options, null, create_fragment$I, safe_not_equal, {});
10296
11860
  }
10297
11861
  };
10298
11862
  function create_if_block_1$e(ctx) {
@@ -10437,7 +12001,7 @@ function create_if_block$k(ctx) {
10437
12001
  }
10438
12002
  };
10439
12003
  }
10440
- function create_fragment$I(ctx) {
12004
+ function create_fragment$H(ctx) {
10441
12005
  let div2;
10442
12006
  let t0;
10443
12007
  let button0;
@@ -10697,7 +12261,7 @@ function instance$n($$self, $$props, $$invalidate) {
10697
12261
  var MobileProfileModalNav = class extends SvelteComponent {
10698
12262
  constructor(options) {
10699
12263
  super();
10700
- init(this, options, instance$n, create_fragment$I, safe_not_equal, {
12264
+ init(this, options, instance$n, create_fragment$H, safe_not_equal, {
10701
12265
  member: 1,
10702
12266
  onSuccessLogout: 6,
10703
12267
  displayProfile: 0,
@@ -10866,7 +12430,7 @@ function create_each_block$7(ctx) {
10866
12430
  }
10867
12431
  };
10868
12432
  }
10869
- function create_fragment$H(ctx) {
12433
+ function create_fragment$G(ctx) {
10870
12434
  let form;
10871
12435
  let t0;
10872
12436
  let div;
@@ -10989,7 +12553,7 @@ function instance$m($$self, $$props, $$invalidate) {
10989
12553
  var MobileProfileInfoContent = class extends SvelteComponent {
10990
12554
  constructor(options) {
10991
12555
  super();
10992
- init(this, options, instance$m, create_fragment$H, safe_not_equal, {
12556
+ init(this, options, instance$m, create_fragment$G, safe_not_equal, {
10993
12557
  customFields: 1,
10994
12558
  member: 0,
10995
12559
  profileLoader: 3
@@ -11310,7 +12874,7 @@ function create_each_block$6(key_1, ctx) {
11310
12874
  }
11311
12875
  };
11312
12876
  }
11313
- function create_fragment$G(ctx) {
12877
+ function create_fragment$F(ctx) {
11314
12878
  let form;
11315
12879
  let emailinput;
11316
12880
  let updating_emailInputValid;
@@ -11633,7 +13197,7 @@ function instance$l($$self, $$props, $$invalidate) {
11633
13197
  var MobileSecurityInfoContent = class extends SvelteComponent {
11634
13198
  constructor(options) {
11635
13199
  super();
11636
- init(this, options, instance$l, create_fragment$G, safe_not_equal, {
13200
+ init(this, options, instance$l, create_fragment$F, safe_not_equal, {
11637
13201
  displayProfile: 0,
11638
13202
  member: 1,
11639
13203
  emailValue: 2,
@@ -11714,7 +13278,7 @@ function create_if_block$h(ctx) {
11714
13278
  }
11715
13279
  };
11716
13280
  }
11717
- function create_fragment$F(ctx) {
13281
+ function create_fragment$E(ctx) {
11718
13282
  let form;
11719
13283
  let t0;
11720
13284
  let passwordinput0;
@@ -12030,7 +13594,7 @@ function instance$k($$self, $$props, $$invalidate) {
12030
13594
  var MobilePasswordInfoContent = class extends SvelteComponent {
12031
13595
  constructor(options) {
12032
13596
  super();
12033
- init(this, options, instance$k, create_fragment$F, safe_not_equal, { profileLoader: 8, member: 0 });
13597
+ init(this, options, instance$k, create_fragment$E, safe_not_equal, { profileLoader: 8, member: 0 });
12034
13598
  }
12035
13599
  };
12036
13600
  function create_if_block_6$3(ctx) {
@@ -12537,7 +14101,7 @@ function create_if_block$g(ctx) {
12537
14101
  }
12538
14102
  };
12539
14103
  }
12540
- function create_fragment$E(ctx) {
14104
+ function create_fragment$D(ctx) {
12541
14105
  let div5;
12542
14106
  let div2;
12543
14107
  let t0;
@@ -12943,7 +14507,7 @@ function instance$j($$self, $$props, $$invalidate) {
12943
14507
  var MobileProfileModal = class extends SvelteComponent {
12944
14508
  constructor(options) {
12945
14509
  super();
12946
- init(this, options, instance$j, create_fragment$E, safe_not_equal, {
14510
+ init(this, options, instance$j, create_fragment$D, safe_not_equal, {
12947
14511
  onSuccessLogout: 3,
12948
14512
  closeModal: 4,
12949
14513
  displayProfile: 0,
@@ -12952,42 +14516,6 @@ var MobileProfileModal = class extends SvelteComponent {
12952
14516
  });
12953
14517
  }
12954
14518
  };
12955
- function add_css$j(target) {
12956
- append_styles(target, "svelte-c6ihgv", "svg.svelte-c6ihgv{fill:currentColor}");
12957
- }
12958
- function create_fragment$D(ctx) {
12959
- let svg;
12960
- let path;
12961
- return {
12962
- c() {
12963
- svg = svg_element("svg");
12964
- path = svg_element("path");
12965
- attr(path, "d", "M226.783-133.782q-38.363 0-65.682-27.319-27.319-27.319-27.319-65.682v-506.434q0-38.363 27.319-65.682 27.319-27.319 65.682-27.319h151.521q10.391-32.696 37.688-53.261 27.296-20.566 64.008-20.566 34.326 0 62.283 20.566 27.957 20.565 38.913 53.261h152.021q38.363 0 65.682 27.319 27.319 27.319 27.319 65.682v506.434q0 38.363-27.319 65.682-27.319 27.319-65.682 27.319H226.783Zm0-93.001h506.434v-506.434h-63.043v75.043q0 18.887-13.807 32.694-13.807 13.807-32.694 13.807H336.327q-18.887 0-32.694-13.807-13.807-13.807-13.807-32.694v-75.043h-63.043v506.434Zm253.006-518.913q13.711 0 23.711-9.789 10-9.79 10-23.5 0-13.711-9.789-23.711-9.79-10-23.5-10-13.711 0-23.711 9.79-10 9.789-10 23.5 0 13.71 9.789 23.71 9.79 10 23.5 10Z");
12966
- attr(svg, "xmlns", "http://www.w3.org/2000/svg");
12967
- attr(svg, "height", "20");
12968
- attr(svg, "viewBox", "0 -960 960 960");
12969
- attr(svg, "width", "20");
12970
- attr(svg, "class", "svelte-c6ihgv");
12971
- },
12972
- m(target, anchor) {
12973
- insert(target, svg, anchor);
12974
- append(svg, path);
12975
- },
12976
- p: noop,
12977
- i: noop,
12978
- o: noop,
12979
- d(detaching) {
12980
- if (detaching)
12981
- detach(svg);
12982
- }
12983
- };
12984
- }
12985
- var CopyIcon$1 = class extends SvelteComponent {
12986
- constructor(options) {
12987
- super();
12988
- init(this, options, null, create_fragment$D, safe_not_equal, {}, add_css$j);
12989
- }
12990
- };
12991
14519
  function add_css$i(target) {
12992
14520
  append_styles(target, "svelte-50knw2", "svg.svelte-50knw2{fill:currentColor;width:9px;height:auto}");
12993
14521
  }
@@ -15016,7 +16544,7 @@ var InspectorBadgeOpen = class extends SvelteComponent {
15016
16544
  }
15017
16545
  };
15018
16546
  function add_css$f(target) {
15019
- append_styles(target, "svelte-1dmftgw", ".ms-inspector-badge.svelte-1dmftgw{position:fixed;bottom:10px;left:50%;transform:translateX(-50%);z-index:2147483648 !important;background:#fff;padding:0 7px;margin:0;box-shadow:0 0 10px rgba(0, 0, 0, 0.1);cursor:pointer;display:flex;align-items:stretch;color:#000;background-color:#faf3e1;border:1px solid #d78e2c;border-radius:4px;font-size:12px;font-weight:700;font-family:Plus Jakarta Sans, sans-serif;gap:7px;height:42px}.ms-inspector-badge__text-wrapper.svelte-1dmftgw{display:flex;justify-content:center;align-items:center;gap:7px}.ms-inspector-badge__logo.svelte-1dmftgw{display:flex;align-items:center;align-self:center}.ms-inspector-badge__text.svelte-1dmftgw{align-self:center}.ms-inspector-badge__divider.svelte-1dmftgw{border-left:1px solid #d88e2b}.ms-inspector-badge__count.svelte-1dmftgw{border:1px solid #c1c1c1;border-radius:4px;background-color:#fff;color:#000;padding:0 7px;margin:7px 0;display:flex;align-items:center;position:relative}.ms-inspector-badge__count--open.svelte-1dmftgw{background-color:#fff;color:#000;padding:0}.ms-inspector-badge__error-indicator.svelte-1dmftgw{width:10px;height:10px;background-color:#e06657;border-radius:50%;position:absolute;top:0;right:0;transform:translate(50%, -50%)}");
16547
+ append_styles(target, "svelte-rhveiw", ".ms-inspector-badge.svelte-rhveiw{position:fixed;bottom:10px;left:50%;transform:translateX(-50%);z-index:2147483648 !important;background:#fff;padding:0 7px;margin:0;box-shadow:0 0 10px rgba(0, 0, 0, 0.1);cursor:pointer;display:flex;align-items:stretch;color:#000;background-color:#faf3e1;border:1px solid #d78e2c;border-radius:4px;font-size:12px;font-weight:700;font-family:Plus Jakarta Sans, sans-serif;gap:7px;height:42px}.ms-inspector-badge--error.svelte-rhveiw{background-color:#f6cfca;border-color:#e06657}.ms-inspector-badge__text-wrapper.svelte-rhveiw{display:flex;justify-content:center;align-items:center;gap:7px}.ms-inspector-badge__logo.svelte-rhveiw{display:flex;align-items:center;align-self:center}.ms-inspector-badge__text.svelte-rhveiw{align-self:center}.ms-inspector-badge__divider.svelte-rhveiw{border-left:1px solid #d88e2b}.ms-inspector-badge__count.svelte-rhveiw{border:1px solid #c1c1c1;border-radius:4px;background-color:#fff;color:#000;padding:0 7px;margin:7px 0;display:flex;align-items:center;position:relative}.ms-inspector-badge__count--open.svelte-rhveiw{background-color:#fff;color:#000;padding:0}.ms-inspector-badge__error-indicator.svelte-rhveiw{width:10px;height:10px;background-color:#e06657;border-radius:50%;position:absolute;top:0;right:0;transform:translate(50%, -50%)}");
15020
16548
  }
15021
16549
  function create_else_block_1$1(ctx) {
15022
16550
  let span;
@@ -15024,7 +16552,7 @@ function create_else_block_1$1(ctx) {
15024
16552
  c() {
15025
16553
  span = element("span");
15026
16554
  span.textContent = "Hide Inspector";
15027
- attr(span, "class", "ms-inspector-badge__text svelte-1dmftgw");
16555
+ attr(span, "class", "ms-inspector-badge__text svelte-rhveiw");
15028
16556
  },
15029
16557
  m(target, anchor) {
15030
16558
  insert(target, span, anchor);
@@ -15041,7 +16569,7 @@ function create_if_block_2$8(ctx) {
15041
16569
  c() {
15042
16570
  span = element("span");
15043
16571
  span.textContent = "Test Mode";
15044
- attr(span, "class", "ms-inspector-badge__text svelte-1dmftgw");
16572
+ attr(span, "class", "ms-inspector-badge__text svelte-rhveiw");
15045
16573
  },
15046
16574
  m(target, anchor) {
15047
16575
  insert(target, span, anchor);
@@ -15059,7 +16587,7 @@ function create_if_block_1$b(ctx) {
15059
16587
  return {
15060
16588
  c() {
15061
16589
  span = element("span");
15062
- attr(span, "class", "ms-inspector-badge__error-indicator svelte-1dmftgw");
16590
+ attr(span, "class", "ms-inspector-badge__error-indicator svelte-rhveiw");
15063
16591
  },
15064
16592
  m(target, anchor) {
15065
16593
  insert(target, span, anchor);
@@ -15201,18 +16729,24 @@ function create_fragment$y(ctx) {
15201
16729
  if_block1.c();
15202
16730
  t3 = space();
15203
16731
  if_block2.c();
15204
- attr(span0, "class", "ms-inspector-badge__logo svelte-1dmftgw");
15205
- attr(span1, "class", "ms-inspector-badge__text-wrapper svelte-1dmftgw");
15206
- attr(span2, "class", "ms-inspector-badge__divider svelte-1dmftgw");
15207
- attr(span3, "class", "ms-inspector-badge__count svelte-1dmftgw");
16732
+ attr(span0, "class", "ms-inspector-badge__logo svelte-rhveiw");
16733
+ attr(span1, "class", "ms-inspector-badge__text-wrapper svelte-rhveiw");
16734
+ attr(span2, "class", "ms-inspector-badge__divider svelte-rhveiw");
16735
+ attr(span3, "class", "ms-inspector-badge__count svelte-rhveiw");
15208
16736
  toggle_class(
15209
16737
  span3,
15210
16738
  "ms-inspector-badge__count--open",
15211
16739
  /*$InspectorStore*/
15212
16740
  ctx[0].showSidebar
15213
16741
  );
15214
- attr(button, "class", "ms-inspector-badge svelte-1dmftgw");
16742
+ attr(button, "class", "ms-inspector-badge svelte-rhveiw");
15215
16743
  attr(button, "data-cy", "inspector-button");
16744
+ toggle_class(
16745
+ button,
16746
+ "ms-inspector-badge--error",
16747
+ /*$InspectorStore*/
16748
+ ctx[0].xRayErrorElements.length > 0
16749
+ );
15216
16750
  set_style(
15217
16751
  button,
15218
16752
  "z-index",
@@ -15306,6 +16840,15 @@ function create_fragment$y(ctx) {
15306
16840
  ctx2[0].showSidebar
15307
16841
  );
15308
16842
  }
16843
+ if (!current || dirty & /*$InspectorStore*/
16844
+ 1) {
16845
+ toggle_class(
16846
+ button,
16847
+ "ms-inspector-badge--error",
16848
+ /*$InspectorStore*/
16849
+ ctx2[0].xRayErrorElements.length > 0
16850
+ );
16851
+ }
15309
16852
  if (dirty & /*$InspectorStore*/
15310
16853
  1) {
15311
16854
  set_style(
@@ -25031,7 +26574,6 @@ function instance($$self, $$props, $$invalidate) {
25031
26574
  if (params && params.app) {
25032
26575
  setAppStore(params.app);
25033
26576
  } else {
25034
- console.log("No app specified - request it");
25035
26577
  yield getApp();
25036
26578
  }
25037
26579
  $$invalidate(7, appLoading = false);
@@ -25258,11 +26800,15 @@ function isLocalStorageAvailable() {
25258
26800
  var localStorageAvailable = isLocalStorageAvailable();
25259
26801
  var useCookies = false;
25260
26802
  var setCookieOnRootDomain = false;
26803
+ var apiDomain;
25261
26804
  var setUseCookies = (setCookieOnRoot) => {
25262
26805
  useCookies = true;
25263
26806
  if (setCookieOnRoot)
25264
26807
  setCookieOnRootDomain = true;
25265
26808
  };
26809
+ var setApiDomain = (domain) => {
26810
+ apiDomain = domain;
26811
+ };
25266
26812
  var extractDomainFromHostname = (hostname) => {
25267
26813
  const hostnameParts = hostname.split(".");
25268
26814
  const isCountryCodeTLD = hostnameParts.length >= 3 && hostnameParts[hostnameParts.length - 2].length <= 3;
@@ -25272,8 +26818,18 @@ var extractDomainFromHostname = (hostname) => {
25272
26818
  return hostnameParts.slice(-2).join(".");
25273
26819
  }
25274
26820
  };
26821
+ var useCookiesValid = () => {
26822
+ if (!useCookies)
26823
+ return false;
26824
+ if (setCookieOnRootDomain) {
26825
+ const apiDomainHost = extractDomainFromHostname(apiDomain);
26826
+ const currentHost = extractDomainFromHostname(window.location.hostname);
26827
+ return apiDomainHost === currentHost;
26828
+ }
26829
+ return true;
26830
+ };
25275
26831
  var setMemberToken = (token, expires) => {
25276
- if (localStorageAvailable && !useCookies) {
26832
+ if (localStorageAvailable && useCookiesValid() === false) {
25277
26833
  localStorage.setItem(memberAuthTokenName, token);
25278
26834
  } else {
25279
26835
  const domain = extractDomainFromHostname(window.location.hostname);
@@ -25298,7 +26854,7 @@ var removeMemberToken = () => {
25298
26854
  });
25299
26855
  };
25300
26856
  var getMemberToken = () => {
25301
- if (localStorageAvailable && !useCookies) {
26857
+ if (localStorageAvailable) {
25302
26858
  const memAuthToken = localStorage.getItem(memberAuthTokenName);
25303
26859
  if (memAuthToken)
25304
26860
  return memAuthToken;
@@ -26044,7 +27600,8 @@ var initRequest = ({
26044
27600
  password: params.password,
26045
27601
  customFields: params.customFields,
26046
27602
  metaData: params.metaData,
26047
- captchaToken: params.captchaToken
27603
+ captchaToken: params.captchaToken,
27604
+ inviteToken: params.inviteToken
26048
27605
  }, params.plans && { plans: params.plans }), {
26049
27606
  //internal use only
26050
27607
  origin_domain: window.location.origin,
@@ -26064,6 +27621,52 @@ var initRequest = ({
26064
27621
  return data;
26065
27622
  });
26066
27623
  },
27624
+ joinTeam(params, options) {
27625
+ return __async(this, null, function* () {
27626
+ return sendRequest({
27627
+ method: "POST" /* POST */,
27628
+ url: `/member/team/join`,
27629
+ data: {
27630
+ inviteToken: params.inviteToken
27631
+ },
27632
+ headers: addHeaders(options)
27633
+ });
27634
+ });
27635
+ },
27636
+ getTeam(params, options) {
27637
+ return __async(this, null, function* () {
27638
+ return sendRequest({
27639
+ method: "GET" /* GET */,
27640
+ url: `/member/team/${params.teamId}`,
27641
+ headers: addHeaders(options)
27642
+ });
27643
+ });
27644
+ },
27645
+ removeMemberFromTeam(params, options) {
27646
+ return __async(this, null, function* () {
27647
+ return sendRequest({
27648
+ method: "POST" /* POST */,
27649
+ url: `/member/team/remove-member`,
27650
+ data: {
27651
+ teamId: params.teamId,
27652
+ memberId: params.memberId
27653
+ },
27654
+ headers: addHeaders(options)
27655
+ });
27656
+ });
27657
+ },
27658
+ generateInviteToken(params, options) {
27659
+ return __async(this, null, function* () {
27660
+ return sendRequest({
27661
+ method: "POST" /* POST */,
27662
+ url: `/member/team/generate-invite-link`,
27663
+ data: {
27664
+ teamId: params.teamId
27665
+ },
27666
+ headers: addHeaders(options)
27667
+ });
27668
+ });
27669
+ },
26067
27670
  updateMemberProfileImage(params) {
26068
27671
  return __async(this, null, function* () {
26069
27672
  if (params.profileImage) {
@@ -26144,6 +27747,8 @@ var methods = {
26144
27747
  _captchaReady: captchaReadyPromise
26145
27748
  };
26146
27749
  function init2(props) {
27750
+ const apiDomain2 = props.domain || endpoints.API;
27751
+ setApiDomain(apiDomain2);
26147
27752
  if (props.useCookies)
26148
27753
  setUseCookies(props.setCookieOnRootDomain);
26149
27754
  setMemberTokenIfAvailable();
@@ -26151,26 +27756,14 @@ function init2(props) {
26151
27756
  publicKey: props.publicKey,
26152
27757
  appId: props.appId,
26153
27758
  token: getMemberToken(),
26154
- domain: props.domain || endpoints.API
27759
+ domain: apiDomain2
26155
27760
  });
26156
27761
  const allMethods = Object.assign(methods, requests);
26157
27762
  if (typeof window !== "undefined") {
26158
27763
  window.$memberstackDom = allMethods;
26159
27764
  }
26160
- _initCaptchas();
26161
27765
  return allMethods;
26162
27766
  }
26163
- function _initCaptchas() {
26164
- return __async(this, null, function* () {
26165
- if (typeof window === "undefined" || typeof chrome !== "undefined" && chrome.runtime && chrome.runtime.id)
26166
- return;
26167
- const script = document.createElement("script");
26168
- script.src = "https://js.hcaptcha.com/1/api.js?render=explicit&onload=_hcaptchaReady";
26169
- script.async = true;
26170
- script.defer = true;
26171
- document.head.appendChild(script);
26172
- });
26173
- }
26174
27767
  var methods_default = { init: (props) => init2(props) };
26175
27768
 
26176
27769
  // src/index.ts